Skip to content

Commit

Permalink
Reviewer comments and adding a few more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Dec 30, 2023
1 parent b2cf16d commit 7fcf2c5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
67 changes: 50 additions & 17 deletions src/sage/combinat/specht_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,53 +65,53 @@ def frobenius_image(self):
where `\chi` is the character of the `S_n`-module ``self``,
`p_{\lambda}` is the powersum symmetric function basis element
indexed by `\lambda`, and `\rho(w)` is partition of the cycle type
of `w`. Specifically, this map takes irreducible representations
indexed by `\lambda`, and `\rho(w)` is the cycle type of `w` as a
partition. Specifically, this map takes irreducible representations
indexed by `\lambda` to the Schur function `s_{\lambda}`.
EXAMPLES::
sage: s = SymmetricFunctions(QQ).s()
sage: SM = Partition([2,2,1]).specht_module(QQ)
sage: s(SM.frobenius_image())
sage: SM.frobenius_image()
s[2, 2, 1]
sage: SM = Partition([4,1]).specht_module(CyclotomicField(5))
sage: s(SM.frobenius_image())
sage: SM.frobenius_image()
s[4, 1]
We verify the regular representation::
sage: from sage.combinat.diagram import Diagram
sage: D = Diagram([(0,0), (1,1), (2,2), (3,3), (4,4)])
sage: F = s(D.specht_module(QQ).frobenius_image()); F
sage: F = D.specht_module(QQ).frobenius_image(); F
s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1]
+ 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5]
sage: F == sum(StandardTableaux(la).cardinality() * s[la]
....: for la in Partitions(5))
True
sage: all(s[la] == s(la.specht_module(QQ).frobenius_image())
sage: all(s[la] == la.specht_module(QQ).frobenius_image()
....: for n in range(1, 5) for la in Partitions(n))
True
sage: D = Diagram([(0,0), (1,1), (1,2), (2,3), (2,4)])
sage: SM = D.specht_module(QQ)
sage: s(SM.frobenius_image())
sage: SM.frobenius_image()
s[2, 2, 1] + s[3, 1, 1] + 2*s[3, 2] + 2*s[4, 1] + s[5]
An example using the tabloid module::
sage: SGA = SymmetricGroupAlgebra(QQ, 5)
sage: TM = SGA.tabloid_module([2, 2, 1])
sage: s(TM.frobenius_image())
sage: TM.frobenius_image()
s[2, 2, 1] + s[3, 1, 1] + 2*s[3, 2] + 2*s[4, 1] + s[5]
"""
from sage.combinat.sf.sf import SymmetricFunctions
BR = self.base_ring()
p = SymmetricFunctions(BR).p()
p = SymmetricFunctions(QQ).p()
s = SymmetricFunctions(QQ).s()
G = self._semigroup
CCR = [(elt, elt.cycle_type()) for elt in G.conjugacy_classes_representatives()]
return p.sum(self.representation_matrix(elt).trace() / la.centralizer_size() * p[la]
for elt, la in CCR)
return s(p.sum(QQ(self.representation_matrix(elt).trace()) / la.centralizer_size() * p[la]
for elt, la in CCR))

# TODO: Move these methods up to methods of general representations

Expand Down Expand Up @@ -493,6 +493,23 @@ def _acted_upon_(self, x, self_on_left=False):
9*S[[1, 2, 3], [4]] + 17*S[[1, 2, 4], [3]] + 14*S[[1, 3, 4], [2]]
sage: 4 * SM.an_element()
12*S[[1, 2, 3], [4]] + 8*S[[1, 2, 4], [3]] + 8*S[[1, 3, 4], [2]]
TESTS::
sage: SGA = SymmetricGroupAlgebra(QQ, 4)
sage: SM = SGA.specht_module([3,1])
sage: SM.an_element() * SGA.an_element()
Traceback (most recent call last):
...
TypeError: unsupported operand parent(s) for *:
'Specht module of [3, 1] over Rational Field'
and 'Symmetric group algebra of order 4 over Rational Field'
sage: groups.permutation.Dihedral(3).an_element() * SM.an_element()
Traceback (most recent call last):
...
TypeError: unsupported operand parent(s) for *:
'Dihedral group of order 6 as a permutation group'
and 'Specht module of [3, 1] over Rational Field'
"""
# Check for a scalar first
ret = super()._acted_upon_(x, self_on_left)
Expand All @@ -507,6 +524,7 @@ def _acted_upon_(self, x, self_on_left=False):
return P.retract(P._SGA(x) * self.lift())
return None


class TabloidModule(CombinatorialFreeModule, SymmetricGroupRepresentation):
r"""
The vector space of all tabloids with the natural symmetric group action.
Expand Down Expand Up @@ -595,6 +613,8 @@ def bilinear_form(self, u, v):
sage: v = sum(TM.basis())
sage: TM.bilinear_form(u, v)
7
sage: TM.bilinear_form(u, TM.zero())
0
"""
if len(v) < len(u):
u, v = v, u
Expand Down Expand Up @@ -622,6 +642,12 @@ def _acted_upon_(self, x, self_on_left):
+ 12*T[{1, 2}, {3, 4}, {5}] + 15*T[{1, 2}, {3, 5}, {4}] + 15*T[{1, 2}, {4, 5}, {3}]
sage: 4 * SM.an_element()
8*T[{1, 2}, {3, 4}, {5}] + 8*T[{1, 2}, {3, 5}, {4}] + 12*T[{1, 2}, {4, 5}, {3}]
sage: SM.an_element() * SGA.an_element()
Traceback (most recent call last):
...
TypeError: unsupported operand parent(s) for *:
'Tabloid module of [2, 2, 1] over Rational Field'
and 'Symmetric group algebra of order 5 over Rational Field'
"""
# first check for the base action
ret = super()._acted_upon_(x, self_on_left)
Expand Down Expand Up @@ -665,14 +691,10 @@ def __init__(self, ambient):
self._diagram = ambient._shape
SymmetricGroupRepresentation.__init__(self, ambient._SGA)

from sage.combinat.symmetric_group_algebra import e
ambient_basis = ambient.basis()
tabloids = ambient_basis.keys()
support_order = list(tabloids)

G = self._SGA.basis().keys()
BR = self._SGA.base_ring()

def elt(T):
tab = tabloids.from_tableau(T)
return ambient.sum_of_terms((tab.symmetric_group_action(sigma), sigma.sign())
Expand Down Expand Up @@ -720,6 +742,10 @@ def retract(self):
sage: Y.retract(X.zero())
0
sage: Y.retract(sum(X.basis()))
Traceback (most recent call last):
...
ValueError: ... is not in the image
"""
B = self.basis()
COB = matrix([b.lift().to_vector() for b in B]).T
Expand Down Expand Up @@ -867,12 +893,19 @@ def __init__(self, specht_module):
Traceback (most recent call last):
...
NotImplementedError: only implemented for 3-regular partitions
sage: SGA = SymmetricGroupAlgebra(QQ, 5)
sage: SM = SGA.specht_module([3,2])
sage: U = SM.maximal_submodule()
sage: TestSuite(U).run(skip="_test_cardinality") # skip due to bug for 0 dimensional modules
sage: U.dimension()
0
"""
SymmetricGroupRepresentation.__init__(self, specht_module._SGA)

p = specht_module.base_ring().characteristic()
if p == 0:
basis = []
basis = Family([])
else:
TM = specht_module._ambient
if not TM._shape.is_regular(p):
Expand Down
4 changes: 4 additions & 0 deletions src/sage/combinat/tabloid.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def _latex_(self):
\lr{6}\\\cline{1-1}
\end{array}$}
}
sage: T = Tabloids([])
sage: latex(T([]))
{\emptyset}
"""
if not self:
return "{\\emptyset}"
Expand Down

0 comments on commit 7fcf2c5

Please sign in to comment.