This repository was archived by the owner on Feb 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2121from sage .rings .polynomial .multi_polynomial import is_MPolynomial
2222from sage .combinat .permutation import Permutations , Permutation
2323import sage .libs .symmetrica .all as symmetrica
24+ from sage .misc .cachefunc import cached_method
2425
2526
2627def SchubertPolynomialRing (R ):
@@ -89,8 +90,7 @@ def expand(self):
8990
9091 def divided_difference (self , i , algorithm = "sage" ):
9192 r"""
92- Return the ``i``-th divided difference operator, applied to
93- ``self``.
93+ Return the ``i``-th divided difference operator, applied to ``self``.
9494
9595 Here, ``i`` can be either a permutation or a positive integer.
9696
@@ -321,6 +321,7 @@ def __init__(self, R):
321321 category = GradedAlgebrasWithBasis (R ),
322322 prefix = 'X' )
323323
324+ @cached_method
324325 def one_basis (self ):
325326 """
326327 Return the index of the unit of this algebra.
@@ -331,7 +332,7 @@ def one_basis(self):
331332 sage: X.one() # indirect doctest
332333 X[1]
333334 """
334- return Permutations ()([1 ])
335+ return self . indices ()([1 ])
335336
336337 def _element_constructor_ (self , x ):
337338 """
You can’t perform that action at this time.
0 commit comments