-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
fix typo in ladder_idempotent #39638
Open
fchapoton
wants to merge
2
commits into
sagemath:develop
Choose a base branch
from
fchapoton:ladder_di
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−22
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,13 @@ | |
from sage.misc.lazy_attribute import lazy_attribute | ||
from sage.categories.algebras_with_basis import AlgebrasWithBasis | ||
from sage.combinat.free_module import CombinatorialFreeModule | ||
from sage.combinat.permutation import Permutation, Permutations, from_permutation_group_element | ||
from sage.combinat.permutation_cython import (left_action_same_n, right_action_same_n) | ||
from sage.combinat.permutation import (Permutation, Permutations, | ||
from_permutation_group_element) | ||
from sage.combinat.permutation_cython import (left_action_same_n, | ||
right_action_same_n) | ||
from sage.combinat.partition import _Partitions, Partitions, Partitions_n | ||
from sage.combinat.tableau import Tableau, StandardTableaux_size, StandardTableaux_shape, StandardTableaux | ||
from sage.combinat.tableau import (Tableau, StandardTableaux_size, | ||
StandardTableaux_shape, StandardTableaux) | ||
from sage.combinat.skew_tableau import SkewTableau | ||
from sage.algebras.group_algebra import GroupAlgebra_class | ||
from sage.algebras.cellular_basis import CellularBasis | ||
|
@@ -30,7 +33,8 @@ | |
from sage.misc.lazy_import import lazy_import | ||
from sage.misc.persist import register_unpickle_override | ||
|
||
lazy_import('sage.groups.perm_gps.permgroup_element', 'PermutationGroupElement') | ||
lazy_import('sage.groups.perm_gps.permgroup_element', | ||
'PermutationGroupElement') | ||
|
||
|
||
# TODO: Remove this function and replace it with the class | ||
|
@@ -74,7 +78,8 @@ | |
sage: a = sum(basis); a | ||
[1, 2, 3] + [1, 3, 2] + [2, 1, 3] + [2, 3, 1] + [3, 1, 2] + [3, 2, 1] | ||
sage: a^2 | ||
6*[1, 2, 3] + 6*[1, 3, 2] + 6*[2, 1, 3] + 6*[2, 3, 1] + 6*[3, 1, 2] + 6*[3, 2, 1] | ||
6*[1, 2, 3] + 6*[1, 3, 2] + 6*[2, 1, 3] + 6*[2, 3, 1] | ||
+ 6*[3, 1, 2] + 6*[3, 2, 1] | ||
sage: a^2 == 6*a | ||
True | ||
sage: b = QS3([3, 1, 2]) | ||
|
@@ -105,7 +110,8 @@ | |
sage: SGA = SymmetricGroupAlgebra(QQ, WeylGroup(["A",3], prefix='s')); SGA | ||
Symmetric group algebra of order 4 over Rational Field | ||
sage: SGA.group() | ||
Weyl Group of type ['A', 3] (as a matrix group acting on the ambient space) | ||
Weyl Group of type ['A', 3] (as a matrix group acting | ||
on the ambient space) | ||
sage: SGA.an_element() | ||
s1*s2*s3 + 3*s2*s3*s1*s2 + 2*s3*s1 + 1 | ||
|
||
|
@@ -184,7 +190,8 @@ | |
|
||
sage: QS3 = SymmetricGroupAlgebra(QQ, 3, category=Monoids()) | ||
sage: QS3.category() | ||
Category of finite dimensional cellular monoid algebras over Rational Field | ||
Category of finite dimensional cellular monoid algebras | ||
over Rational Field | ||
sage: TestSuite(QS3).run(skip=['_test_construction']) | ||
|
||
|
||
|
@@ -1247,17 +1254,17 @@ | |
blocks[c] = [la] | ||
return blocks | ||
|
||
def ladder_idemponent(self, la): | ||
def ladder_idempotent(self, la): | ||
r""" | ||
Return the ladder idempontent of ``self``. | ||
Return the ladder idempotent of ``self``. | ||
|
||
Let `F` be a field of characteristic `p`. The *ladder idempotent* | ||
of shape `\lambda` is the idempotent of `F[S_n]` defined as follows. | ||
Let `T` be the :meth:`ladder tableau | ||
<sage.combinat.partition.Partition.ladder_tableau>` of shape `\lambda`. | ||
Let `[T]` be the set of standard tableaux whose residue sequence | ||
is the same as for `T`. Let `\alpha` be the sizes of the ladders | ||
of `\lambda`. Then the ladder idempontent is constructed as | ||
of `\lambda`. Then the ladder idempotent is constructed as | ||
|
||
.. MATH:: | ||
|
||
|
@@ -1273,7 +1280,7 @@ | |
|
||
sage: SGA = SymmetricGroupAlgebra(GF(3), 4) | ||
sage: for la in Partitions(SGA.n): | ||
....: idem = SGA.ladder_idemponent(la) | ||
....: idem = SGA.ladder_idempotent(la) | ||
....: print(la) | ||
....: print(idem) | ||
....: assert idem^2 == idem | ||
|
@@ -1301,8 +1308,8 @@ | |
and also projective modules):: | ||
|
||
sage: SGA = SymmetricGroupAlgebra(QQ, 5) | ||
sage: for la in Partitions(SGA.n): | ||
Check warning on line 1311 in src/sage/combinat/symmetric_group_algebra.py
|
||
....: idem = SGA.ladder_idemponent(la) | ||
....: idem = SGA.ladder_idempotent(la) | ||
....: assert idem^2 == idem | ||
....: print(la, SGA.principal_ideal(idem).dimension()) | ||
[5] 1 | ||
|
@@ -1324,15 +1331,14 @@ | |
n = self.n | ||
if not p: | ||
p = n + 1 | ||
la = _Partitions(la) | ||
if sum(la) != n: | ||
raise ValueError(f"{la} is not a partition of {n}") | ||
la = Partitions_n(n)(la) | ||
Tlad, alpha = la.ladder_tableau(p, ladder_lengths=True) | ||
if not all(val < p for val in alpha): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a detail: |
||
raise ValueError(f"{la} is not {p}-ladder restricted") | ||
Tclass = Tlad.residue_sequence(p).standard_tableaux() | ||
Elad = sum(epsilon_ik(T, T) for T in Tclass) | ||
Elad = self.element_class(self, {sigma: R(c) for sigma, c in Elad._monomial_coefficients.items()}) | ||
Elad = self.element_class(self, {sigma: R(c) | ||
for sigma, c in Elad._monomial_coefficients.items()}) | ||
from sage.groups.perm_gps.permgroup_named import SymmetricGroup | ||
YG = SymmetricGroup(n).young_subgroup(alpha) | ||
coeff = ~R.prod(factorial(val) for val in alpha) | ||
|
@@ -2066,7 +2072,7 @@ | |
return self._dft_seminormal(mult=mult) | ||
if form == "modular": | ||
return self._dft_modular() | ||
raise ValueError("invalid form (= %s)" % form) | ||
raise ValueError(f"invalid form (= {form})") | ||
|
||
def _dft_seminormal(self, mult='l2r'): | ||
""" | ||
|
@@ -2382,7 +2388,7 @@ | |
[1, 1, 1] [1, 2, 3] - [1, 3, 2] - [2, 1, 3] + [2, 3, 1] + [3, 1, 2] - [3, 2, 1] | ||
""" | ||
T = [] | ||
total = 1 # make it 1-based | ||
total = 1 # make it 1-based | ||
for r in la: | ||
T.append(list(range(total, total+r))) | ||
total += r | ||
|
@@ -3454,7 +3460,7 @@ | |
T[1, 2, 3] | ||
""" | ||
if i not in range(1, self.n): | ||
raise ValueError("i (= %(i)d) must be between 1 and n (= %(n)d)" % {'i': i, 'n': self.n}) | ||
raise ValueError(f"i (= {i}) must be between 1 and n (={self.n})") | ||
|
||
t_i = Permutation((i, i + 1)) | ||
perm_i = t_i.right_action_product(perm) | ||
|
@@ -3496,7 +3502,8 @@ | |
sage: H3 = HeckeAlgebraSymmetricGroupT(QQ, 3, 1) | ||
sage: a = H3([2,1,3])+2*H3([1,2,3])-H3([3,2,1]) | ||
sage: a^2 #indirect doctest | ||
6*T[1, 2, 3] + 4*T[2, 1, 3] - T[2, 3, 1] - T[3, 1, 2] - 4*T[3, 2, 1] | ||
6*T[1, 2, 3] + 4*T[2, 1, 3] - T[2, 3, 1] | ||
- T[3, 1, 2] - 4*T[3, 2, 1] | ||
|
||
:: | ||
|
||
|
@@ -3527,7 +3534,7 @@ | |
ValueError: i (= 0) must be between 1 and n-1 (= 2) | ||
""" | ||
if i not in range(1, self.n): | ||
raise ValueError("i (= %(i)d) must be between 1 and n-1 (= %(nm)d)" % {'i': i, 'nm': self.n - 1}) | ||
raise ValueError(f"i (= {i}) must be between 1 and n-1 (= {self.n - 1})") | ||
|
||
P = self.basis().keys() | ||
return self.monomial(P(list(range(1, i)) + [i + 1, i] + | ||
|
@@ -3591,7 +3598,7 @@ | |
if k not in range(2, self.n + 1): | ||
if k == 1: | ||
return self.one() | ||
raise ValueError("k (= %(k)d) must be between 1 and n (= %(n)d)" % {'k': k, 'n': self.n}) | ||
raise ValueError(f"k (= {k}) must be between 1 and n (= {self.n})") | ||
|
||
q = self.q() | ||
P = self._indices | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be before
permutation