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

Some fixes for Specht modules and diagrams #35432

Merged
merged 3 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sage/combinat/diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@

class Diagram(ClonableArray, metaclass=InheritComparisonClasscallMetaclass):
r"""
Combinatorial diagrams with positions indexed by rows in columns.
Combinatorial diagrams with positions indexed by rows and columns.

The positions are indexed by rows and columns as in a matrix. For example,
a Ferrer's diagram is a diagram obtained from a partition
a Ferrers diagram is a diagram obtained from a partition
`\lambda = (\lambda_0, \lambda_1, \ldots, \lambda_{\ell})`, where the
cells are in rows `i` for `0 \leq i \leq \ell` and the cells in row `i`
consist of `(i,j)` for `0 \leq j < \lambda_i`. In English notation, the
Expand All @@ -57,7 +57,7 @@ class Diagram(ClonableArray, metaclass=InheritComparisonClasscallMetaclass):

EXAMPLES:

To create an arbirtrary diagram, pass a list of all cells::
To create an arbitrary diagram, pass a list of all cells::

sage: from sage.combinat.diagram import Diagram
sage: cells = [(0,0), (0,1), (1,0), (1,1), (4,4), (4,5), (4,6), (5,4), (7, 6)]
Expand Down Expand Up @@ -469,7 +469,7 @@ def check(self):
sage: D.check()

In the next two examples, a bad diagram is passed.
The first example fails because one cells is indexed by negative
The first example fails because one cell is indexed by negative
integers::

sage: D = Diagram([(0,0), (0,-3), (2,2), (2,4)])
Expand Down
41 changes: 26 additions & 15 deletions src/sage/combinat/specht_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,35 +394,46 @@ def specht_module_spanning_set(D, SGA=None):
sage: specht_module_spanning_set([(0,0), (1,1), (2,1)], SGA)
(() - (2,3), -(1,2) + (1,3,2), (1,2,3) - (1,3),
-() + (2,3), -(1,2,3) + (1,3), (1,2) - (1,3,2))

TESTS:

Verify that diagrams bigger than the rank work::

sage: specht_module_spanning_set([(0,0), (3,5)])
([1, 2], [2, 1])
sage: specht_module_spanning_set([(0,0), (5,3)])
([1, 2], [2, 1])
"""
n = len(D)
if SGA is None:
from sage.combinat.symmetric_group_algebra import SymmetricGroupAlgebra
SGA = SymmetricGroupAlgebra(QQ, n)
elif SGA.group().rank() != n - 1:
raise ValueError("the rank does not match the size of the diagram")
row_diagram = [set() for _ in range(n)]
col_diagram = [set() for _ in range(n)]
for i,cell in enumerate(D):
x,y = cell
nr = max((c[0] for c in D), default=0) + 1
nc = max((c[1] for c in D), default=0) + 1
row_diagram = [set() for _ in range(nr)]
col_diagram = [set() for _ in range(nc)]
for i, cell in enumerate(D):
x, y = cell
row_diagram[x].add(i)
col_diagram[y].add(i)
# Construct the row and column stabilizer elements
row_stab = SGA.zero()
col_stab = SGA.zero()
B = SGA.basis()
for w in B.keys():
# Remember that the permutation w is 1-based
row_perm = [set() for _ in range(n)]
col_perm = [set() for _ in range(n)]
for i,cell in enumerate(D):
x,y = cell
row_perm[x].add(w(i+1)-1)
col_perm[y].add(w(i+1)-1)
if row_diagram == row_perm:
row_stab += B[w]
if col_diagram == col_perm:
col_stab += w.sign() * B[w]
# Remember that the permutation w is 1-based
row_perm = [set() for _ in range(nr)]
col_perm = [set() for _ in range(nc)]
for i, cell in enumerate(D):
x, y = cell
row_perm[x].add(w(i+1)-1)
col_perm[y].add(w(i+1)-1)
if row_diagram == row_perm:
row_stab += B[w]
if col_diagram == col_perm:
col_stab += w.sign() * B[w]
gen = col_stab * row_stab
return tuple([b * gen for b in B])

Expand Down