Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Move _tableau_contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Oct 13, 2022
1 parent a66c597 commit a5e0bd0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3023,9 +3023,16 @@ def number_of_reduced_words(self):
EXAMPLES::
sage: w = Permutation([1,4,3,2])
sage: w.n_reduced_words()
sage: w.number_of_reduced_words()
2
"""
from sage.combinat.tableau import StandardTableaux
def _tableau_contribution(T):
r"""
Get the number of SYT of shape(``T``).
"""
return(StandardTableaux(T.shape()).cardinality())

Tx = self.rothe_diagram().peelable_tableaux()
return sum(map(_tableau_contribution, Tx))

Expand Down Expand Up @@ -5277,13 +5284,6 @@ def shifted_shuffle(self, other):
return self.shifted_concatenation(other, "right").\
right_permutohedron_interval(self.shifted_concatenation(other, "left"))

def _tableau_contribution(T):
r"""
Get the number of SYT of shape(``T``).
"""
from sage.combinat.tableau import StandardTableaux
return(StandardTableaux(T.shape()).cardinality())


################################################################
# Parent classes
Expand Down

0 comments on commit a5e0bd0

Please sign in to comment.