Bases: sage.structure.sage_object.SageObject
A class for Kazhdan-Lusztig polynomials
INPUT:
- W - a Weyl Group.
- q - an indeterminate.
OPTIONAL:
- trace
The parent of q may be a PolynomialRing or a LaurentPolynomialRing.
Set trace=True in order to see intermediate results. This is fun and instructive.
EXAMPLES
sage: W = WeylGroup("B3",prefix="s")
sage: [s1,s2,s3]=W.simple_reflections()
sage: R.<q>=LaurentPolynomialRing(QQ)
sage: KL=KazhdanLusztigPolynomial(W,q)
sage: KL.P(s2,s3*s2*s3*s1*s2)
q + 1
A faster implementation (using the optional package Coxeter 3) is given by:
sage: W = CoxeterGroup(['B', 3], implementation='coxeter3') # optional - coxeter3
sage: W.kazhdan_lusztig_polynomial([2], [3,2,3,1,2]) # optional - coxeter3
q + 1
Returns the Kazhdan-Lusztig P polynomial.
If the rank is large, this runs slowly at first but speeds up as you do repeated calculations due to the caching.
INPUT:
See also
kazhdan_lusztig_polynomial for a faster implementation using Fokko Ducloux’s Coxeter3 C++ library.
EXAMPLES
sage: R.<q>=QQ[]
sage: W = WeylGroup("A3", prefix="s")
sage: [s1,s2,s3]=W.simple_reflections()
sage: KL = KazhdanLusztigPolynomial(W, q)
sage: KL.P(s2,s2*s1*s3*s2)
q + 1
Returns the Kazhdan-Lusztig R polynomial.
INPUT:
EXAMPLES
sage: R.<q>=QQ[]
sage: W = WeylGroup("A2", prefix="s")
sage: [s1,s2]=W.simple_reflections()
sage: KL = KazhdanLusztigPolynomial(W, q)
sage: [KL.R(x,s2*s1) for x in [1,s1,s2,s1*s2]]
[q^2 - 2*q + 1, q - 1, q - 1, 0]
Truncates the Laurent polynomial p, returning only terms of degree <n, similar to the truncate method for polynomials.
EXAMPLES
sage: from sage.combinat.kazhdan_lusztig import laurent_polynomial_truncate
sage: P.<q> = LaurentPolynomialRing(QQ)
sage: laurent_polynomial_truncate((q+q^-1)^3+q^2*(q+q^-1)^4,3)
6*q^2 + 3*q + 4 + 3*q^-1 + q^-2 + q^-3