-
-
Notifications
You must be signed in to change notification settings - Fork 602
Revert SymmetricGroup.algebra change from #16678 #16925
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
Comments
This comment has been minimized.
This comment has been minimized.
comment:3
I have a request. Could you add the fact that New commits:
|
Commit: |
comment:4
Replying to @darijgr:
I considered this. It means leaving an algebra method in SymmetricGroup that does nothing but the standard thing, except for having an extra chunk of doc advertising SymmetricGroupAlgebra and the backward incompatibility issue. I can do that if you think that's helpful for the user. Right now, I am running all tests after just stripping away the method. |
comment:5
Oops, I meant adding a mention of this to the class-wide doc. Overshadowing the method solely for this sake is too much of a hassle, sorry. |
comment:6
Replying to @darijgr:
I am still hesitant actually. It's still nice to the user to warn him about the backward incompatibility flip-flop. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
With the last commit, all tests passed. Haven't run long tests pass. Let's see what the bot says. |
comment:9
Looks good to me... |
comment:10
For the record: it's actually a piece of luck that e.g. hecke_algebra_representations only needed a doctest update. The data structure of the element that was created behind the scene was actually corrupted since a term was internaly indexed by an element of Granted: the overall infrastructure should have trapped the creation of such corrupt element; but that's a different discussion ... |
comment:11
I'm not quite sure about the (unwritten as far I can tell) assumption that Here are some timings of the two implementations:
So getting the basis is significantly slower using the generic code, but multiplying elements is faster using the group. Also going from the permutation group elements to a permutation is fast:
although there is a slight bug:
Multiplying permutation group elements is really fast compared to Sage's permutations:
So my proposal would be to change the indexing set of |
comment:12
Minor technical challenge (or perhaps question), we will have to deal with handling backwards compatibility with giving the basis an instance of our |
comment:13
Hi Travis, Thanks for the timings! Replying to @tscrim:
So any subclass overriding
To be precise: in both cases, the implementation of
In principle the complexity should be fairly similar, even for a
But we are deviating here. That's for a separate ticket.
This would be even more backward incompatible: people have been using Cheers, |
comment:14
Replying to @nthiery:
I didn't interpret that as a contract, but just instead a statement about what the generic method returns. I think some more terse language is needed, such as adding "All classes overriding this method must return a K-module with basis indexed by S".
It's possible that GAP is also slow, and I get similar behavior when using the Weyl group. However this is definitely something for a separate ticket.
It's (relatively) easy to get Sage's At the end of the day, the biggest thing I don't like is having a generic implementation when there is a specialized implementation (which we agree on I believe). Reverting the change and having more classes (even with a good ABC) seems like a much harder maintenance task in the long run. |
comment:15
This can be set to duplicate of #16926 which is ready to go. We don't need anymore this intermediate step. |
comment:16
reviewer name |
Changed commit from |
Changed branch from u/nthiery/revert_symmetricgroup_algebra_change_from__16678 to none |
comment:18
Thanks Volker for the notice. |
Changed author from Nicolas M. Thiéry to none |
Reviewer: Nicolas M. Thiéry |
comment:19
there is no branch, did you delete it accidentally? |
comment:20
I deleted it because this branch is obsolete and a dead end. Or was this a wrong assumption? |
comment:21
The milestone wasn't changed to duplicate. |
#16678 makes
SymmetricGroup(n).algebra(K)
returnSymmetricGroupAlgebra(K,n)
.This is nice in principle since
SymmetricGroupAlgebra
makes use of the specific properties of the symmetric group to provide more features (better implementation of the center, Yucis-Murphy elements, ...). HoweverSymmetricGroupAlgebra
is not a drop-in replacement for the plain group algebra of the symmetric group. In particular it breaks several assumptions of.algebra
like the fact that the basis ofG.algebra(K)
is indexed by elements ofG
(here the basis is indexed by plainPermutation
's); it is therefore likely to create bugs and confusion.This ticket reverts
SymmetricGroup.algebra
to the default behavior. See #16926 for a proper plan to endow it with the additional structure ofSymmetricGroupAlgebra
.CC: @sagetrac-sage-combinat @tscrim @darijgr @avirmaux
Component: combinatorics
Reviewer: Nicolas M. Thiéry
Issue created by migration from https://trac.sagemath.org/ticket/16925
The text was updated successfully, but these errors were encountered: