Skip to content

Commit

Permalink
Addressing reviewer comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Dec 18, 2023
1 parent ff616a8 commit e1f1a46
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/sage/combinat/symmetric_group_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ def murphy_basis(self):
"""
return MurphyBasis(self)

@cached_method
@cached_method(key=lambda s, X, Y: (StandardTableaux()(X), StandardTableaux()(Y)))
def murphy_basis_element(self, S, T):
r"""
Return the Murphy basis element indexed by ``S`` and ``T``.
Expand All @@ -2095,15 +2095,28 @@ def murphy_basis_element(self, S, T):
[[1, 3], [2]] [[1, 2], [3]] [1, 3, 2] + [3, 1, 2]
[[1, 2], [3]] [[1, 3], [2]] [1, 3, 2] + [2, 3, 1]
[[1, 2], [3]] [[1, 2], [3]] [1, 2, 3] + [3, 2, 1]
TESTS::
sage: SGA = SymmetricGroupAlgebra(QQ, 3)
sage: SGA.murphy_basis_element([[1,2,3,4]], [[1,2],[3,4]])
Traceback (most recent call last):
...
ValueError: [[1, 2, 3, 4]] is not an element of Standard tableaux of size 3
sage: SGA.murphy_basis_element([[1,2,3]], [[1,2],[3]])
Traceback (most recent call last):
...
ValueError: S and T must have the same shape
"""
std_tab = StandardTableaux(self.n)
S = std_tab(S)
T = std_tab(T)
S = S.conjugate()
T = T.conjugate()

la = S.shape()
if la != T.shape():
raise ValueError("S and T must have the same shape")
if sum(la) != self.n:
raise ValueError(f"the shape must be a partition of size {self.n}")

G = self.group()
ds = G(list(sum((row for row in S), ())))
Expand Down

0 comments on commit e1f1a46

Please sign in to comment.