diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index 402f4b148c8..a6c3979d4da 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -3021,9 +3021,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)) @@ -5298,13 +5305,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