-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Allowing HeckeAlgebraSymmetricGroupT to accept elements of SymmetricGroup(n) as input #37318
Allowing HeckeAlgebraSymmetricGroupT to accept elements of SymmetricGroup(n) as input #37318
Conversation
…elements of SymmetricGroup
Independently of this patch, I wondered whether it might be better to depreciate
Both of these features could be added to IwahoriHeckeAlgebra (the jucys_murphy method would raise a NotImplemented error outside of types A and B, and possibly D, and lists in Permutation(n) can be distinguished from a list of generators). |
Documentation preview for this PR (built with commit 19ffe6c; changes) is ready! 🎉 |
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.
Looks good to me
…ents of SymmetricGroup(n) as input <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Currently, the following fails in sage: ``` sage: S4 = SymmetricGroup(4) sage: H4 = HeckeAlgebraSymmetricGroupT(ZZ, 4) sage: H4( Permutations(4).an_element() ) T[4, 1, 2, 3] sage: H4( S4.an_element() ) Traceback (most recent call last) ... TypeError: do not know how to make x (= (2,3,4)) an element of self (=Hecke algebra of the symmetric group of order 4 on the T basis over Univariate Polynomial Ring in q over Integer Ring) ``` I view this as a bug because the elements of this algebra are indexed by elements of the symmetric group and `HeckeAlgebraSymmetricGroupT` does accept elements of `Permutations(n)`. This PR makes works work as well as accepting elements of `Permutations(N)`, for `N>n, that fix `n+1,...,N`. Previously, `HeckeAlgebraSymmetricGroupT` contain a `_coerce_start` method. I have renamed this as `_element_constructor_`, which is what I think it should be, and made some minor changes there. Probably, I should deprecate `_coerce_start` but this method does not seem to exist anywhere else in sage, so I suspect that this belongs to some code that was deprecated years ago. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37318 Reported by: Andrew Mathas Reviewer(s): Andrew Mathas, Giacomo Pope
…ents of SymmetricGroup(n) as input <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Currently, the following fails in sage: ``` sage: S4 = SymmetricGroup(4) sage: H4 = HeckeAlgebraSymmetricGroupT(ZZ, 4) sage: H4( Permutations(4).an_element() ) T[4, 1, 2, 3] sage: H4( S4.an_element() ) Traceback (most recent call last) ... TypeError: do not know how to make x (= (2,3,4)) an element of self (=Hecke algebra of the symmetric group of order 4 on the T basis over Univariate Polynomial Ring in q over Integer Ring) ``` I view this as a bug because the elements of this algebra are indexed by elements of the symmetric group and `HeckeAlgebraSymmetricGroupT` does accept elements of `Permutations(n)`. This PR makes works work as well as accepting elements of `Permutations(N)`, for `N>n, that fix `n+1,...,N`. Previously, `HeckeAlgebraSymmetricGroupT` contain a `_coerce_start` method. I have renamed this as `_element_constructor_`, which is what I think it should be, and made some minor changes there. Probably, I should deprecate `_coerce_start` but this method does not seem to exist anywhere else in sage, so I suspect that this belongs to some code that was deprecated years ago. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37318 Reported by: Andrew Mathas Reviewer(s): Andrew Mathas, Giacomo Pope
Currently, the following fails in sage:
I view this as a bug because the elements of this algebra are indexed by elements of the symmetric group and
HeckeAlgebraSymmetricGroupT
does accept elements ofPermutations(n)
.This PR makes works work as well as accepting elements of
Permutations(N)
, forN>n, that fix
n+1,...,N`.Previously,
HeckeAlgebraSymmetricGroupT
contain a_coerce_start
method. I have renamed this as_element_constructor_
, which is what I think it should be, and made some minor changes there. Probably, I should deprecate_coerce_start
but this method does not seem to exist anywhere else in sage, so I suspect that this belongs to some code that was deprecated years ago.📝 Checklist
⌛ Dependencies