-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Ideals and subalgebras of finite dimensional Lie algebras #26078
Comments
comment:1
Some implementation already exists in a codebase that I need to clean up and import into Sage. |
comment:2
That was basically how my previous code (on #14901) was doing things. Although it probably should be done lazily (i.e., when the user asks for |
comment:3
The lazy implementation is a good idea, I will tweak it in when I get to the import. Currently I have no code related to generic subalgebras, only a coercion from an ideal back to the ambient algebra. I'll have to see if during cleanup of the ideal-code there is something that sticks out as belonging in a subalgebra construction. |
This comment has been minimized.
This comment has been minimized.
comment:4
A first iteration of ideals and subalgebras of finite dimensional Lie algebras with basis is in the commits. I added subalgebras to the scope of this ticket since it turned out that a lot of the code fit naturally within the subalgebra setting, and the only extra piece was the differing computation of a basis. The implementation of ideals+subalgebras is through a Much of the code would fit inside also within a generic Although technically independent from nilpotent Lie algebras, I added the dependency #26076 in order to implement the fact that a subalgebra or ideal of a nilpotent Lie algebra is also nilpotent. Last 10 new commits:
|
Branch: u/gh-ehaka/lie_ideals-26078 |
Dependencies: #26076 |
Commit: |
Changed keywords from Lie algebras, ideals to Lie algebras, ideals, subalgebras |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Eero Hakavuori |
comment:9
Some comments: Why do you have these ABCs? I don't see the point of having them and instead just having Rather than manually setting the category as default, you should just use
as that means you do not need the essentially duplication of In
Subsequently your I would consider caching the result of I would change def module(self, sparse=False):
m = self.ambient().module(sparse=sparse)
ambientbasis = [self.lift(X).to_vector() for X in self.basis()]
return m.submodule_with_basis(ambientbasis) I found the name somewhat confusing and nothing in the API for
I would avoid the use of the (more) ambiguous Instead of Do you want to implement methods like |
comment:10
Replying to @tscrim:
No use case, just my own misunderstanding of which way of doing things was more maintainable. I will fix this now.
The thing I was worried about here is the
but not every subalgebra is graded, so this would still need separate handling. Because of this it wasn't clear to me if categories should be handled in an 'opt-out' or 'opt-in' manner. The main worry was that if the default is 'opt-out', then any future implementation of a subcategory of Lie algebras would have to also consider whether ideals and subalgebras are automatically in this category, which sounded error-prone.
Will fix. However I am not sure how to get rid of "free" coming from
How much processing should be done here? The upper limit I suppose would be to extract a maximal linearly independent subset, but this might be too expensive for high dimensions. I will add the 'cheap' zero-stripping now.
I will add
These sound like very good convenience additions. You can do the implementation as you most likely have a clearer vision on how it should be done. I will do the other corrections now, except for the default category thing, as I would still like to hear your comments on how to handle the |
comment:11
Replying to @ehaka:
Ah, I see your point. However, I think this might be more of an issue of
As for the free modules, the result of
I think removing the "cheap" zeros (i.e., identically zero) gens is sufficient.
+1 for keeping
I will do that soon. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
I made the changes, however I am still having some confusion with the desired behavior for the subalgebra element methods Having changed |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
I would just keep it called subalgebra, but in the docs you will have to discuss the new input parameter |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
I combined everything into one class, which seemed to work quite nicely as it even cut down on some of the duplicate code e.g. in the basis computation. I also added the category parameter to the
I'm not sure how to handle the issue of not knowing the proper indices a priori. Having Is the correct way to fix this behavior to create a subclass for graded subalgebras or is there something else that could be done? Alternatively, the proper implementation of graded subalgebras could also be left to a later ticket. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:24
Make from sage.misc.lazy_attribute import lazy_attribute
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
@lazy_attribute
def _indices(self):
return FiniteEnumeratedSet(self.basis().keys()) With this, the first part of your example passes. (The reason for |
comment:25
Although code generally should not be using |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:27
My last round of comments (I am pretty sure); just two more things. I can do these fixes too (since I also have the other ideal creation to take care of too) if you prefer.
|
comment:28
I take it moving things to |
comment:29
Yes, it would be an optimization (because it will be in Cython and closer to C code). I will get to work on them now. |
Reviewer: Travis Scrimshaw |
Changed branch from u/gh-ehaka/lie_ideals-26078 to public/lie_algebras/fin_dim_ideals_subalgebras-26078 |
comment:30
Okay, here are those changes. I did not do If my changes are good, then I believe we are at a positive review. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
All the improvements above look good to me. I also added a doctest to the initialization of a subalgebra element (at least I assume that was what patchbot was complaining about). |
comment:33
Whoops, yes, I forgot to add that. Thank you. |
Changed branch from public/lie_algebras/fin_dim_ideals_subalgebras-26078 to |
An implementation of ideals and subalgebras generated by a subset of a finite dimensional Lie algebra with basis. In the finite dimensional case a naive (and probably inefficient) method of repeatedly computing brackets to find a basis of the ideal or subalgebra is available, as opposed to the Gröbner-basis style methods that would need to be used in the general case. Part of a part of #16824
Depends on #26076
CC: @tscrim
Component: algebra
Keywords: Lie algebras, ideals, subalgebras
Author: Eero Hakavuori
Branch/Commit:
fcb4888
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/26078
The text was updated successfully, but these errors were encountered: