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
Lie algebra quotients are incorrect for some basis orders #26352
Comments
comment:1
I changed the helper methods
The disadvantage is that the submodule computation is now more complicated as things needs to be sorted based on indices. Before the fix:
After the fix:
Having the extra functionality of custom orderings is nice, but it would be also good to have also a speed optimized one, where the submodule computation is done without worrying which elements are the pivot elements in the echelon form. In that case the reduction and complementary submodule computation would need special case handling though. New commits:
|
Commit: |
Author: Eero Hakavuori |
comment:2
Hmm...I see the problem:
When I designed this, I was thinking of doing linear algebra directly using the I am not sure I like having the ideal handle an I don't think this is efficient either: return self.ambient().module().from_vector(vector(R, X_sorted)) I would avoid the call M = self.ambient().module()
B = M.basis()
return M.sum(R(mc[i]) * b[i] for i in self._reversed_indices if i in mc) You don't even need to create the I would Little thing: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
Replying to @tscrim:
I did not understand what you mean by this.
It is true that
Good call. It cut down the overhead in the previous testcase by a decent amount:
This is still a ~5% increase from prepatch, but not nearly as bad as the earlier 12-17% one.
Added. |
comment:5
Replying to @ehaka:
I had gotten an impression you were doing some work with the Lie algebra elements instead of their corresponding (typically underlying)
There is some reasons to have this. It might be faster in one order than other or you want different representatives. The catch with storing this with the ambient Lie algebra is that you have to create a new object for each order. Which is somewhat annoying at the very least. Unfortunately I don't think this is something simply solved by adding/changing stuff in the doc. Anyways, this fixes a bug and I don't see any other obvious ways to speed this up right now. Positive review. |
Reviewer: Travis Scrimshaw |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:8
Replying to @tscrim:
I see your point, will let it be as is. I removed the orphaned import of |
Changed branch from u/gh-ehaka/subalgebra_basis_ordering-26352 to |
The current implementation of Lie subalgebras confuses two things: the ordering of the basis of the ambient algebra and the ordering of the indices of the ambient algebra. If both orderings agree, then everything works fine:
But if there is a mismatch in the ordering, then the output is wrong:
The difference is
That is, the behavior in the latter case is different to what is described in the doc. The indices which are not leading supports of
I2
do not span a complementary subspace, but instead something bigger.The issue is that currently the computation in
basis
takes its pivot elements based on the ordering of the ambient basis, whereas quotients and reduction assume they can work withleading_support
, i.e. the ordering of the indices.Component: algebra
Keywords: Lie algebras, ideals, subalgebras, quotients
Author: Eero Hakavuori
Branch/Commit:
25026d4
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/26352
The text was updated successfully, but these errors were encountered: