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

Commit

Permalink
Add type-A algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Aug 17, 2022
1 parent 75ce24e commit 8c3cb4e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/sage/categories/weyl_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,28 @@ def stanley_symmetric_function(self):
- [LSS2009]_
- [Pon2010]_
.. ALGORITHM::
In type-A, utilize the peelable tableaux algorithm of [RS1995]_.
In other types, use induction on left Pieri factors.
"""
import sage.combinat.sf
from sage.rings.rational_field import QQ
m = sage.combinat.sf.sf.SymmetricFunctions(QQ).monomial()
cartan_type = self.parent().cartan_type()

# the setting for [RS1995]_
if cartan_type[0] == 'A' and not cartan_type.is_affine():
from sage.combinat.permutation import Permutation
from sage.combinat.diagram import RotheDiagram
s = sage.combinat.sf.sf.SymmetricFunctions(QQ).schur()
try:
p = Permutation(self.to_permutation())
except AttributeError: # to handle SymmetricGroupElements
p = Permutation(self.domain())
return m.sum(s[T.shape()] for T in RotheDiagram(p).peelable_tableaux())

return m.from_polynomial_exp(self.stanley_symmetric_function_as_polynomial())

@cached_in_parent_method
Expand Down

0 comments on commit 8c3cb4e

Please sign in to comment.