Skip to content
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

Conversation

AndrewMathas
Copy link
Member

@AndrewMathas AndrewMathas commented Feb 13, 2024

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.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@AndrewMathas
Copy link
Member Author

Independently of this patch, I wondered whether it might be better to depreciate HeckeAlgebraSymmetricGroupT since almost all of its functionality is available using HeckeAlgebraSymmetricGroupT. The exceptions are that:

  • HeckeAlgebraSymmetricGroupT accepts Permutations, and lists, as input
    
  • The HeckeAlgebraSymmetricGroupT class has a jucys_murphy method
    

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).

Copy link

Documentation preview for this PR (built with commit 19ffe6c; changes) is ready! 🎉

Copy link
Contributor

@GiacomoPope GiacomoPope left a 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

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2024
…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
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 19, 2024
…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
@vbraun vbraun merged commit 0b38b3e into sagemath:develop Feb 25, 2024
14 of 20 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants