-
Notifications
You must be signed in to change notification settings - Fork 126
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
Type changes for modules over non commutative rings #3988
Type changes for modules over non commutative rings #3988
Conversation
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.
I added some more things which I found to be necessary to make modules over non-commutative rings work.
Among other things I did some profiling with my code and also added some fixes to save resources in general.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3988 +/- ##
==========================================
- Coverage 84.65% 84.64% -0.01%
==========================================
Files 614 614
Lines 83344 83349 +5
==========================================
- Hits 70554 70550 -4
- Misses 12790 12799 +9
|
Would it be possible to put the fixes and performance optimizations in a separate pull request? I assume we definitely want to have 76c3599 independent of whether the decision is to have modules over non-commutative rings in this generality or not. |
Yes, I can do that. But I wanted to first get a full picture of how this should be split up or not. If everything was approved eventually, then I could save the extra time on the manual splitting and testing, right? If it's urgent, though, I can separate certain things. Let me know if this is the case. Edit: Also, I think, it would make sense to include the tests written by @Lax202 . They just don't run at this point, because a later Hecke version is required (one which accepts sparse rows over non-commutative rings). Edit: In the end I think, you're right. We will probably want the changes in different patches either way. |
I just think it would make sense to keep fixes separate from new features if possible. None of this is urgent (for me), but I assume that the whole pull request has to wait for some people to return from holidays, a new Hecke release and in general people to agree on something to be merged. The fix for the radical or the optimization with making |
98d91d4
to
26b858a
Compare
I updated this PR to only comprise the changes necessary to allow for non-commutative rings. Everything else should already be in #3995 . Still I think we should carry over the tests due to @Lax202 from #3900. But this requires the new Hecke ping @jankoboehm |
Looks like the Hecke release is breaking the doctests? |
@thofma ? |
Was not caught in the downstream tests unfortunately, but should be fixed by #3999. |
Tests pass. We need to decide on the following:
For a full fledged support of left-, right-, and bi-modules we should then eventually discuss whether it might be worth introducing new types. Alternatively, one could probably also go via attributes of the existing modules, but as you can guess I would not be a fan of such an approach. I think some stuff is already done for ideals and we could peak at the structure there to learn? Either way: I think this PR can be merged without going into that discussion for the moment: All modules are naturally treated as left-modules for the time being and that can be extended at a later date to whatever we decide to do. |
If I remember correctly, one of Oscars design principle says that we use right actions, so the modules should be right modules by default. It is also the convention that we use for the modules over noncommutative rings that we have already, e.g., modules over finite-dimensional algebras. Maybe it is a also a good question to ask what the goal of these modules is? Catching all |
In the docu we write: |
It is fine with me if this is how the PBW algebras and their modules should be implemented. But what is implemented here is Oscar.jl/src/Modules/UngradedModules/FreeModElem.jl Lines 264 to 270 in 9b269b8
which is, I think, both not adhering to the Oscar standard and against the idea to not have a default. |
I was afraid this was the case. However, this would be a whole different load of work! All of the code for
So does catching all For example, I have implemented a custom type |
Probably true. I would like to hear an executive decision about this. Personally, I do not really care, but this should be decided somehow. These lines are just a minimal fix to make things half-way coherent for the moment. And given that, as I explained above, the current implementation of the generic module code is unable to support right-modules, this is the only feasible solution for the moment. |
@thofma Oh, I see now. I perfectly agree with what you write. |
First of all, I am sympathetic to small changes that enable some nice applications. But the fundamental design decision on how modules over noncommutative rings should be handled is probably beyond a small PR:
So I don't thinks this is a good argument for going against the design principle and the rest of Oscar. Changing the signature to only allow |
Given the above discussion, you are probably right. I understand your concerns. Even though this is rather sad, because I would have liked to have these changes supported in Oscar with a view towards cohomology computations via exterior algebras. But if I have to wait for a coherent framework of modules over non-commutative rings to first be developed, then that is what it is. In that case we can close the PR and just continue with #3900. |
There is a chance that we can follow the situation for ideals. Then what we have in this PR would exactly be what is needed, there is just some logic missing on top: We reduce the right case to the left, and the two-sided to the right. What would be needed is that the underlying algorithmic oracles can support that. Groebner bases should. |
For PBW algebras we compute a LEFT GB first and enlarge is successively until it is a right GB, too. |
I want to apologize to anyone involved here. Today I was informed that similar discussions had already taken place elsewhere, also offline. I didn't mean to overthrow or question the considerations and conclusions that were eventually reached at other occasions. I suggest to continue any discussion about these matters in person when we meet again. |
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.
A first write-up of today's discussion.
In addition, we will insert a type union AdmissibleModuleFPRingElem = Union{<:RingElem, <:PBWAlgElem, <:PBWAlgQuoElem, ...}
and use that in the restriction for the type parameters of the module types and functions.
In the long run we plan to support right-modules similar to the case of ideals: For an NCRing
A
there is an "opposite algebra" A_op
and a bijective morphism phi : A -> A_op
. This should extend generically to modules phi : M -> M_op
. For a right-module M
we can then define multiplication for elements a
in A
and v
in M
via
v*a = inv(phi)(phi(a)*phi(v))
. The opposite algebra and -modules are, of course, cached.
I had a short discussion with @wdecker and we concluded that there should be |
What happened to this PR? I tried to push some more fixes, but it rejected me. When I pulled, I got all that stuff from other people. Was this a mistake? |
d831115
to
046c51f
Compare
Tests pass. From my side this is good to go. |
Does this here only implement |
Yes, I think, I took out the `free_module` implementation from Lakshmi already before for the obvious reasons. But that reminds me that I didn't yet add the other constructors.
|
OK. Not sure what you plan to add exactly, but with @wdecker we agreed to not have |
Yes, let's finalize this on Monday together then. |
Building on the work by @Lax202 in #3900, I deliberately extended the signatures to also allow for rather general non-commutative rings. I tested this code locally in another branch with a generic type for exterior algebras and the changes you see here were those necessary to make everything run.
This is a suggestion only. If people feel uncomfortable with the generality here, please feel free to close the PR.
Note that reasonable testing is not yet possible, since the latest Hecke version is needed for that.