-
Notifications
You must be signed in to change notification settings - Fork 73
Expand the common code for ideal implementations #2108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I have mainly questions about
|
|
All good questions, I've been pondering them as well, and I thought I should make this PR precisely so that we have a somewhat better base for discussing them. Let's start with the non-commutative situation, I'll reply regarding Right now as far as I can tell this is completely open and unspecified, and we should at least have a rough plan before proceeding. Do we have any serious non-commutative rings with ideals in any of our packages? I realize there is some GB code for free associative algebras both here in AA (due to @julien-schanz @Sequenzer ) and in Oscar (based on Singular code). But the code in AA does not seem to even try to define an ideal type (and worse, it does not even seem to specify what kind of GB it computes: two-sided or one-sided...). The code in Oscar defines a type Do we have any other existing code for non-commutative ideals? Anyway, we now have some options how to proceed;
Regardless of which option we go, we need to agree on APIs if we want to support all kinds of ideals. Probably a good idea to also look at e.g. Sage and Magma for inspiration, which I have not yet done; just some general thoughts
I think to answer this well, we need actual applications involving one-sided ideals... Personally I think that option 1. is the way to go:
BTW, do we know someone who currently has an actual usecase for one-sided ideals? Who would be interested in discussing an implementing a design for them together with us? That'd be great! |
|
Regarding
While I understand that there is some loathing for But it seems OK for "toy" ideals over Z, fields, polynomial rings over fields? Or am I missing something? BTW if we go with a version of option 1, then I can also replace |
|
BTW a primary motivation is that I looked at ideal implementation in Oscar.jl and found
So I actually started with a partial PR for Oscar, then decided to shelf that for now, and instead work on the fundamental in AA. Once we have agreed on something here, I plan to proceed to make PRs for Hecke and Oscar to adjust things to it. |
I personally would remove anything related to non-commutative things from the "generic"/"fallback" stuff. I think the |
|
I think we can remove
|
|
I'd be fine with restricting all the work in here to the commutative setting, no problem. I wasn't really aware of the non-commutative ideals in Hecke, cool, I'll have a look eventually. But for now I am mainly concerned about having the commutative ideals suck less in terms of consistent user experience. I can also look into removing |
e460676 to
d69de74
Compare
|
I've revised this, and among other things dropped the In fact, I wonder: do we really want or need a |
|
As domains or codomains of maps. |
|
In which categories is that? Do we have any existing examples? The ideal implementations I looked at in Oscar.jl all don't implement parent -- I guess your examples are in Hecke? |
|
Here the example: Probably implemented somewhere in Hecke. Edit: I don't mind if this is dropped here, since we can just add it to the ideals we need it for. |
|
OK, thanks for the example. To be clear: no existing functionality is "dropped" here -- it's just that I wrote a generic I also restricted a bunch of things in here to the commutative cases and essentially remove all references to the non-commutative setting -- with the exception of a few places that had I have also put in the start for making the Oh and the new tests also discovered a bug: the new |
|
Sounds good |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2108 +/- ##
==========================================
- Coverage 88.08% 88.02% -0.06%
==========================================
Files 127 127
Lines 31782 31800 +18
==========================================
- Hits 27994 27991 -3
- Misses 3788 3809 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| function Base.:hash(I::T, h::UInt) where {T <: Ideal} | ||
| h = hash(base_ring(I), h) | ||
| return h | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately Oscar also implements such a hash method for ideals, and a bunch of others, making this breaking. I'll make a matching PR.
And I guess it means this PR is breaking after all sigh.
081c24e to
a0108d5
Compare
This includes the addition of a `DefaultIdealSet` struct type which can be used with zero overhead, and hopefully can simply be used as parent type for all ideal implementations (in Hecke, Oscar or wherever) down the road. Also semi-documented the interfaces to be implemented (the list is surely incomplete but better than nothing).
b05593f to
2ac4366
Compare
This includes the addition of aDefaultIdealSetstruct type which can be used with zero overhead, and hopefully can simply be used as parent type for all ideal implementations (in Hecke, Oscar or wherever) down the road.Also semi-documented the interfaces to be implemented (the list is surely incomplete but better than nothing).