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

dft for symmetric group algebra when p|n! #37748

Closed
wants to merge 15 commits into from
Closed
Changes from 11 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
40 changes: 39 additions & 1 deletion src/sage/combinat/symmetric_group_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1909,12 +1909,14 @@
"""
if form == "seminormal":
return self._dft_seminormal(mult=mult)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to catch the error in the case $p \mid n$ here and raise an error with a clearer error message, or to remove the standard argument for form and choose it depending on whether the characteristic divides $n$ (depending on whether ._dft_seminormal always fails in the modular case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, at the very least the failing cases p|n should at least be handled with a clear error message. I believe it only fails when p | n! (n was a type - it's the order of the symmetric group, so n!). I've chosen to just remove the standard argument for form and return the modular DFT in that case.

if form == "modular":
return self._dft_modular()

Check warning on line 1913 in src/sage/combinat/symmetric_group_algebra.py

View check run for this annotation

Codecov / codecov/patch

src/sage/combinat/symmetric_group_algebra.py#L1912-L1913

Added lines #L1912 - L1913 were not covered by tests
else:
raise ValueError("invalid form (= %s)" % form)

def _dft_seminormal(self, mult='l2r'):
"""
Return the seminormal form of the discrete Fourier for ``self``.
Return the seminormal form of the discrete Fourier transform for ``self``.

INPUT:

Expand All @@ -1941,6 +1943,42 @@
snb = self.seminormal_basis(mult=mult)
return matrix([vector(b) for b in snb]).inverse().transpose()

def _dft_modular(self):
"""
Return the discrete Foruier transform when the characterisc divides the order of the group.
The usual .dft() throws ZeroDivisionError when p|n.
jacksonwalters marked this conversation as resolved.
Show resolved Hide resolved

EXAMPLES::

sage: GF2S3 = SymmetricGroupAlgebra(GF(2),3)
sage: GF2S3._dft_modular()
[1 0 0 0 1 0]
[0 1 0 0 0 1]
[0 0 1 0 0 1]
[0 0 0 1 1 0]
[1 0 0 1 1 0]
[0 1 1 0 0 1]
jacksonwalters marked this conversation as resolved.
Show resolved Hide resolved
"""
#create a spanning set for the block corresponding to an idempotent
spanning_set = lambda idem: [self(sigma)*idem for sigma in self.group()]
#compute central primitive orthogonal idempotents
idempotents = self.central_orthogonal_idempotents()
#project v onto each block U_i = F_p[S_n]*e_i via \pi_i: v |--> v*e_i
blocks = [self.submodule(spanning_set(idem)) for idem in idempotents]
#helper function to flatten a list
flatten = lambda l: [item for sublist in l for item in sublist]
#compute the list of basis vectors lifed to the SGA from each block
block_decomposition_basis = flatten([[u.lift() for u in block.basis()] for block in blocks])
#the elements of the symmetric group are ordered, giving the map from the standard basis
sym_group_list = list(self.group())
change_of_basis_matrix = []
for b in block_decomposition_basis:
coord_vector = [0]*len(sym_group_list)
for pair in list(b):
coord_vector[sym_group_list.index(pair[0])] = pair[1]
change_of_basis_matrix.append(coord_vector)
return matrix(self.base_ring(),change_of_basis_matrix).transpose()

def epsilon_ik(self, itab, ktab, star=0, mult='l2r'):
r"""
Return the seminormal basis element of ``self`` corresponding to the
Expand Down
Loading