Skip to content

Commit 39e75dd

Browse files
author
Release Manager
committed
gh-39049: Fixing typo with $g_i^{-1}$ implementation in Yokonuma-Hecke algebras. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> ``` sage: Y = algebras.YokonumaHecke(3, 3) sage: g = prod(Y.g()) sage: ~g * g == Y.one() False ``` There was a sign error in the implementation (which didn't match the documentation). ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [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 and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #39049 Reported by: Travis Scrimshaw Reviewer(s): Frédéric Chapoton, user202729
2 parents da151a9 + b0b8845 commit 39e75dd

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/sage/algebras/yokonuma_hecke_algebra.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,17 @@ def inverse_g(self, i):
447447
448448
sage: Y = algebras.YokonumaHecke(2, 4)
449449
sage: [2*Y.inverse_g(i) for i in range(1, 4)]
450-
[(q^-1+q) + 2*g[1] + (q^-1+q)*t1*t2,
451-
(q^-1+q) + 2*g[2] + (q^-1+q)*t2*t3,
452-
(q^-1+q) + 2*g[3] + (q^-1+q)*t3*t4]
450+
[(q^-1-q) + 2*g[1] + (q^-1-q)*t1*t2,
451+
(q^-1-q) + 2*g[2] + (q^-1-q)*t2*t3,
452+
(q^-1-q) + 2*g[3] + (q^-1-q)*t3*t4]
453+
sage: all(Y.inverse_g(i) * Y.g(i) == Y.one() for i in range(1, 4))
454+
True
455+
sage: all(Y.g(i) * Y.inverse_g(i) == Y.one() for i in range(1, 4))
456+
True
453457
"""
454458
if i < 1 or i >= self._n:
455459
raise ValueError("invalid index")
456-
return self.g(i) + (~self._q + self._q) * self.e(i)
460+
return self.g(i) + (~self._q - self._q) * self.e(i)
457461

458462
class Element(CombinatorialFreeModule.Element):
459463
def __invert__(self):
@@ -468,10 +472,15 @@ def __invert__(self):
468472
sage: t.inverse() # indirect doctest
469473
t1^2*t2^2*t3^2
470474
sage: [3*~(t*g) for g in Y.g()]
471-
[(q^-1+q)*t2*t3^2 + (q^-1+q)*t1*t3^2
472-
+ (q^-1+q)*t1^2*t2^2*t3^2 + 3*t1^2*t2^2*t3^2*g[1],
473-
(q^-1+q)*t1^2*t3 + (q^-1+q)*t1^2*t2
474-
+ (q^-1+q)*t1^2*t2^2*t3^2 + 3*t1^2*t2^2*t3^2*g[2]]
475+
[(q^-1-q)*t2*t3^2 + (q^-1-q)*t1*t3^2
476+
+ (q^-1-q)*t1^2*t2^2*t3^2 + 3*t1^2*t2^2*t3^2*g[1],
477+
(q^-1-q)*t1^2*t3 + (q^-1-q)*t1^2*t2
478+
+ (q^-1-q)*t1^2*t2^2*t3^2 + 3*t1^2*t2^2*t3^2*g[2]]
479+
sage: g = prod(Y.g())
480+
sage: ~g * g == Y.one()
481+
True
482+
sage: g * ~g == Y.one()
483+
True
475484
476485
TESTS:
477486

0 commit comments

Comments
 (0)