Skip to content

Commit deaf9d9

Browse files
committed
Reviewer comments and adding a few more tests.
1 parent 089931a commit deaf9d9

File tree

2 files changed

+54
-17
lines changed

2 files changed

+54
-17
lines changed

src/sage/combinat/specht_module.py

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,53 +65,53 @@ def frobenius_image(self):
6565
6666
where `\chi` is the character of the `S_n`-module ``self``,
6767
`p_{\lambda}` is the powersum symmetric function basis element
68-
indexed by `\lambda`, and `\rho(w)` is partition of the cycle type
69-
of `w`. Specifically, this map takes irreducible representations
68+
indexed by `\lambda`, and `\rho(w)` is the cycle type of `w` as a
69+
partition. Specifically, this map takes irreducible representations
7070
indexed by `\lambda` to the Schur function `s_{\lambda}`.
7171
7272
EXAMPLES::
7373
7474
sage: s = SymmetricFunctions(QQ).s()
7575
sage: SM = Partition([2,2,1]).specht_module(QQ)
76-
sage: s(SM.frobenius_image())
76+
sage: SM.frobenius_image()
7777
s[2, 2, 1]
7878
sage: SM = Partition([4,1]).specht_module(CyclotomicField(5))
79-
sage: s(SM.frobenius_image())
79+
sage: SM.frobenius_image()
8080
s[4, 1]
8181
8282
We verify the regular representation::
8383
8484
sage: from sage.combinat.diagram import Diagram
8585
sage: D = Diagram([(0,0), (1,1), (2,2), (3,3), (4,4)])
86-
sage: F = s(D.specht_module(QQ).frobenius_image()); F
86+
sage: F = D.specht_module(QQ).frobenius_image(); F
8787
s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1]
8888
+ 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5]
8989
sage: F == sum(StandardTableaux(la).cardinality() * s[la]
9090
....: for la in Partitions(5))
9191
True
92-
sage: all(s[la] == s(la.specht_module(QQ).frobenius_image())
92+
sage: all(s[la] == la.specht_module(QQ).frobenius_image()
9393
....: for n in range(1, 5) for la in Partitions(n))
9494
True
9595
9696
sage: D = Diagram([(0,0), (1,1), (1,2), (2,3), (2,4)])
9797
sage: SM = D.specht_module(QQ)
98-
sage: s(SM.frobenius_image())
98+
sage: SM.frobenius_image()
9999
s[2, 2, 1] + s[3, 1, 1] + 2*s[3, 2] + 2*s[4, 1] + s[5]
100100
101101
An example using the tabloid module::
102102
103103
sage: SGA = SymmetricGroupAlgebra(QQ, 5)
104104
sage: TM = SGA.tabloid_module([2, 2, 1])
105-
sage: s(TM.frobenius_image())
105+
sage: TM.frobenius_image()
106106
s[2, 2, 1] + s[3, 1, 1] + 2*s[3, 2] + 2*s[4, 1] + s[5]
107107
"""
108108
from sage.combinat.sf.sf import SymmetricFunctions
109-
BR = self.base_ring()
110-
p = SymmetricFunctions(BR).p()
109+
p = SymmetricFunctions(QQ).p()
110+
s = SymmetricFunctions(QQ).s()
111111
G = self._semigroup
112112
CCR = [(elt, elt.cycle_type()) for elt in G.conjugacy_classes_representatives()]
113-
return p.sum(self.representation_matrix(elt).trace() / la.centralizer_size() * p[la]
114-
for elt, la in CCR)
113+
return s(p.sum(QQ(self.representation_matrix(elt).trace()) / la.centralizer_size() * p[la]
114+
for elt, la in CCR))
115115

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

@@ -493,6 +493,23 @@ def _acted_upon_(self, x, self_on_left=False):
493493
9*S[[1, 2, 3], [4]] + 17*S[[1, 2, 4], [3]] + 14*S[[1, 3, 4], [2]]
494494
sage: 4 * SM.an_element()
495495
12*S[[1, 2, 3], [4]] + 8*S[[1, 2, 4], [3]] + 8*S[[1, 3, 4], [2]]
496+
497+
TESTS::
498+
499+
sage: SGA = SymmetricGroupAlgebra(QQ, 4)
500+
sage: SM = SGA.specht_module([3,1])
501+
sage: SM.an_element() * SGA.an_element()
502+
Traceback (most recent call last):
503+
...
504+
TypeError: unsupported operand parent(s) for *:
505+
'Specht module of [3, 1] over Rational Field'
506+
and 'Symmetric group algebra of order 4 over Rational Field'
507+
sage: groups.permutation.Dihedral(3).an_element() * SM.an_element()
508+
Traceback (most recent call last):
509+
...
510+
TypeError: unsupported operand parent(s) for *:
511+
'Dihedral group of order 6 as a permutation group'
512+
and 'Specht module of [3, 1] over Rational Field'
496513
"""
497514
# Check for a scalar first
498515
ret = super()._acted_upon_(x, self_on_left)
@@ -507,6 +524,7 @@ def _acted_upon_(self, x, self_on_left=False):
507524
return P.retract(P._SGA(x) * self.lift())
508525
return None
509526

527+
510528
class TabloidModule(CombinatorialFreeModule, SymmetricGroupRepresentation):
511529
r"""
512530
The vector space of all tabloids with the natural symmetric group action.
@@ -595,6 +613,8 @@ def bilinear_form(self, u, v):
595613
sage: v = sum(TM.basis())
596614
sage: TM.bilinear_form(u, v)
597615
7
616+
sage: TM.bilinear_form(u, TM.zero())
617+
0
598618
"""
599619
if len(v) < len(u):
600620
u, v = v, u
@@ -622,6 +642,12 @@ def _acted_upon_(self, x, self_on_left):
622642
+ 12*T[{1, 2}, {3, 4}, {5}] + 15*T[{1, 2}, {3, 5}, {4}] + 15*T[{1, 2}, {4, 5}, {3}]
623643
sage: 4 * SM.an_element()
624644
8*T[{1, 2}, {3, 4}, {5}] + 8*T[{1, 2}, {3, 5}, {4}] + 12*T[{1, 2}, {4, 5}, {3}]
645+
sage: SM.an_element() * SGA.an_element()
646+
Traceback (most recent call last):
647+
...
648+
TypeError: unsupported operand parent(s) for *:
649+
'Tabloid module of [2, 2, 1] over Rational Field'
650+
and 'Symmetric group algebra of order 5 over Rational Field'
625651
"""
626652
# first check for the base action
627653
ret = super()._acted_upon_(x, self_on_left)
@@ -665,14 +691,10 @@ def __init__(self, ambient):
665691
self._diagram = ambient._shape
666692
SymmetricGroupRepresentation.__init__(self, ambient._SGA)
667693

668-
from sage.combinat.symmetric_group_algebra import e
669694
ambient_basis = ambient.basis()
670695
tabloids = ambient_basis.keys()
671696
support_order = list(tabloids)
672697

673-
G = self._SGA.basis().keys()
674-
BR = self._SGA.base_ring()
675-
676698
def elt(T):
677699
tab = tabloids.from_tableau(T)
678700
return ambient.sum_of_terms((tab.symmetric_group_action(sigma), sigma.sign())
@@ -720,6 +742,10 @@ def retract(self):
720742
721743
sage: Y.retract(X.zero())
722744
0
745+
sage: Y.retract(sum(X.basis()))
746+
Traceback (most recent call last):
747+
...
748+
ValueError: ... is not in the image
723749
"""
724750
B = self.basis()
725751
COB = matrix([b.lift().to_vector() for b in B]).T
@@ -867,12 +893,19 @@ def __init__(self, specht_module):
867893
Traceback (most recent call last):
868894
...
869895
NotImplementedError: only implemented for 3-regular partitions
896+
897+
sage: SGA = SymmetricGroupAlgebra(QQ, 5)
898+
sage: SM = SGA.specht_module([3,2])
899+
sage: U = SM.maximal_submodule()
900+
sage: TestSuite(U).run(skip="_test_cardinality") # skip due to bug for 0 dimensional modules
901+
sage: U.dimension()
902+
0
870903
"""
871904
SymmetricGroupRepresentation.__init__(self, specht_module._SGA)
872905

873906
p = specht_module.base_ring().characteristic()
874907
if p == 0:
875-
basis = []
908+
basis = Family([])
876909
else:
877910
TM = specht_module._ambient
878911
if not TM._shape.is_regular(p):

src/sage/combinat/tabloid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ def _latex_(self):
115115
\lr{6}\\\cline{1-1}
116116
\end{array}$}
117117
}
118+
119+
sage: T = Tabloids([])
120+
sage: latex(T([]))
121+
{\emptyset}
118122
"""
119123
if not self:
120124
return "{\\emptyset}"

0 commit comments

Comments
 (0)