Quantum-valued polynomial rings¶
This provides a IntegerValuedPolynomialRing
.
AUTHORS:
Frédéric Chapoton (2024-03): Initial version
- class sage.rings.polynomial.q_integer_valued_polynomials.QuantumValuedPolynomialRing(R, q)[source]¶
Bases:
UniqueRepresentation
,Parent
The quantum-valued polynomial ring over a base ring.
Quantum-valued polynomial rings are commutative and associative algebras, with a basis indexed by nonnegative integers.
The elements are polynomials in one variable
with coefficients in the field of rational functions in , such that the value at every nonegative -integer is a polynomial in .This algebra is endowed with two bases, named
B
orBinomial
andS
orShifted
.INPUT:
R
– commutative ringq
– optional variable
There are two possible input formats:
If the argument
q
is not given, then the ringR
is taken as a base ring and the ring of Laurent polynomials in overR
is built and used.If the argument
q
is given, then it should belong to the ringR
and be invertible in this ring.
EXAMPLES:
sage: F = QuantumValuedPolynomialRing(QQ).S(); F Quantum-Valued Polynomial Ring over Rational Field in the shifted basis sage: F.gen() S[1] sage: S = QuantumValuedPolynomialRing(ZZ); S Quantum-Valued Polynomial Ring over Integer Ring sage: S.base_ring() Univariate Laurent Polynomial Ring in q over Integer Ring
Quantum-valued polynomial rings commute with their base ring:
sage: K = QuantumValuedPolynomialRing(QQ).S() sage: a = K.gen() sage: c = K.monomial(2)
Quantum-valued polynomial rings are commutative:
sage: c^3 * a == c * a * c * c True
We can also manipulate elements in the basis and coerce elements from our base field:
sage: F = QuantumValuedPolynomialRing(QQ).S() sage: B = F.basis() sage: B[2] * B[3] (q^-5+q^-4+q^-3)*S[3] - (q^-6+2*q^-5+3*q^-4+3*q^-3+2*q^-2+q^-1)*S[4] + (q^-6+q^-5+2*q^-4+2*q^-3+2*q^-2+q^-1+1)*S[5] sage: 1 - B[2] * B[2] / 2 S[0] - (1/2*q^-3)*S[2] + (1/2*q^-4+q^-3+q^-2+1/2*q^-1)*S[3] - (1/2*q^-4+1/2*q^-3+q^-2+1/2*q^-1+1/2)*S[4]
- class Bases(parent_with_realization)[source]¶
Bases:
Category_realization_of_parent
- class ElementMethods[source]¶
Bases:
object
- polynomial()[source]¶
Convert to a polynomial in
.EXAMPLES:
sage: F = QuantumValuedPolynomialRing(ZZ).S() sage: S = F.gen() sage: (S+1).polynomial() q*x + 2 sage: F = QuantumValuedPolynomialRing(ZZ).B() sage: B = F.gen() sage: (B+1).polynomial() x + 1
- class ParentMethods[source]¶
Bases:
object
- algebra_generators()[source]¶
Return the generators of this algebra.
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S(); A Quantum-Valued Polynomial Ring over Integer Ring in the shifted basis sage: A.algebra_generators() Family (S[1],)
- degree_on_basis(m)[source]¶
Return the degree of the basis element indexed by
m
.EXAMPLES:
sage: A = QuantumValuedPolynomialRing(QQ).S() sage: A.degree_on_basis(4) 4
- from_polynomial(p)[source]¶
Convert a polynomial into the ring of quantum-valued polynomials.
This raises a
ValueError
if this is not possible.INPUT:
p
– a polynomial inx
with coefficients inQQ(q)
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S() sage: S = A.basis() sage: A.from_polynomial((S[1]).polynomial()) S[1] sage: A.from_polynomial((S[2]+2*S[3]).polynomial()) S[2] + 2*S[3] sage: A = QuantumValuedPolynomialRing(ZZ).B() sage: B = A.basis() sage: A.from_polynomial((B[1]).polynomial()) B[1] sage: A.from_polynomial((B[2]+2*B[3]).polynomial()) B[2] + 2*B[3]
- gen(i=0)[source]¶
Return the generator of the algebra.
The optional argument is ignored.
EXAMPLES:
sage: F = QuantumValuedPolynomialRing(ZZ).S() sage: F.gen() S[1]
- gens()[source]¶
alias of
algebra_generators()
.
- ground_ring()[source]¶
Return the ring of coefficients.
This ring is not supposed to contain the variable
.EXAMPLES:
sage: A = QuantumValuedPolynomialRing(QQ).S() sage: A.ground_ring() Rational Field
- super_categories()[source]¶
Return the super-categories of
self
.EXAMPLES:
sage: A = QuantumValuedPolynomialRing(QQ); A Quantum-Valued Polynomial Ring over Rational Field sage: C = A.Bases(); C Category of bases of Quantum-Valued Polynomial Ring over Rational Field sage: C.super_categories() [Category of realizations of Quantum-Valued Polynomial Ring over Rational Field, Join of Category of algebras with basis over Univariate Laurent Polynomial Ring in q over Rational Field and Category of filtered algebras over Univariate Laurent Polynomial Ring in q over Rational Field and Category of commutative algebras over Univariate Laurent Polynomial Ring in q over Rational Field and Category of realizations of unital magmas]
- class Binomial(A)[source]¶
Bases:
CombinatorialFreeModule
,BindableClass
The quantum-valued polynomial ring in the binomial basis.
The basis used here is given by
for .Assuming
, the product of two monomials is given by the sum- class Element[source]¶
Bases:
IndexedFreeModuleElement
- variable_shift(k=1)[source]¶
Return the image by the shift of variables.
On polynomials, the action for
is the shift on variables .This implementation follows formula (5.5) in [HaHo2017].
INPUT:
– nonnegative integer (default: 1)
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).B() sage: B = A.basis() sage: B[5].variable_shift() B[4] + q^5*B[5]
- product_on_basis(n1, n2)[source]¶
Return the product of basis elements
n1
andn2
.INPUT:
n1
,n2
– integers
The formula is taken from Theorem 3.4 in [HaHo2017].
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(QQ).B() sage: A.product_on_basis(0, 1) B[1]
- class Shifted(A)[source]¶
Bases:
CombinatorialFreeModule
,BindableClass
The quantum-valued polynomial ring in the shifted basis.
The basis used here is given by
for .Assuming
, the product of two monomials is given by the sum- class Element[source]¶
Bases:
IndexedFreeModuleElement
- derivative_at_minus_one()[source]¶
Return the ‘derivative’ at -1.
See also
EXAMPLES:
sage: F = QuantumValuedPolynomialRing(ZZ).S() sage: B = F.gen() sage: (B+1).derivative_at_minus_one() 1
- fraction()[source]¶
Return the generating series of values as a fraction.
See also
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(QQ).S() sage: ex = A.basis()[4] sage: ex.fraction().factor() (-1) * (t - 1)^-1 * (q*t - 1)^-1 * (q^2*t - 1)^-1 * (q^3*t - 1)^-1 * (q^4*t - 1)^-1 sage: q = polygen(QQ,'q') sage: x = polygen(q.parent(), 'x') sage: ex = A.from_polynomial((1+q*x)**3) sage: ex.fraction().factor() (t - 1)^-1 * (q*t - 1)^-1 * (q^2*t - 1)^-1 * (q^3*t - 1)^-1 * (q^3*t^2 + 2*q^2*t + 2*q*t + 1) sage: ex.fraction().numerator() q^3*t^2 + 2*q^2*t + 2*q*t + 1
- h_polynomial()[source]¶
Return the
-vector as a polynomial.See also
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S() sage: q = polygen(ZZ,'q') sage: x = polygen(q.parent(),'x') sage: ex = A.from_polynomial((1+q*x)**3) sage: ex.h_polynomial() z^3 + (2*q + 2*q^2)*z^2 + q^3*z
- h_vector()[source]¶
Return the numerator of the generating series of values.
If
self
is an Ehrhart polynomial, this is the h-vector.See also
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S() sage: ex = A.basis()[4] sage: ex.h_vector() (0, 0, 0, 0, 1) sage: q = polygen(QQ,'q') sage: x = polygen(q.parent(),'x') sage: ex = A.from_polynomial((1+q*x)**3) sage: ex.h_vector() (0, q^3, 2*q + 2*q^2, 1)
- umbra()[source]¶
Return the Bernoulli umbra.
This is the derivative at
of the shift by one.This is related to Carlitz’s
-Bernoulli numbers.See also
EXAMPLES:
sage: F = QuantumValuedPolynomialRing(ZZ).S() sage: B = F.gen() sage: (B+1).umbra() (q + 2)/(q + 1)
- variable_shift(k=1)[source]¶
Return the image by the shift on variables.
The shift is the substitution operator
INPUT:
– integer (default: 1)
EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S() sage: S = A.basis() sage: S[5].variable_shift() S[0] + q*S[1] + q^2*S[2] + q^3*S[3] + q^4*S[4] + q^5*S[5] sage: S[5].variable_shift(-1) -(q^-5)*S[4] + (q^-5)*S[5]
- from_h_vector(hv)[source]¶
Convert from some
-vector.EXAMPLES:
sage: A = QuantumValuedPolynomialRing(ZZ).S() sage: B = A.basis() sage: ex = B[2] + B[3] sage: A.from_h_vector(ex.h_vector()) S[2] + S[3] sage: q = A.base_ring().gen() sage: ex = B[2] + q*B[3] sage: A.from_h_vector(ex.h_vector()) S[2] + q*S[3]
- sage.rings.polynomial.q_integer_valued_polynomials.q_binomial_x(m, n, q=None)[source]¶
Return a
-analogue ofbinomial(m + x, n)
.When evaluated at the
-integer , this gives the usual -binomial coefficient .INPUT:
m
andn
– positive integersq
– optional variable
EXAMPLES:
sage: from sage.combinat.q_analogues import q_int sage: from sage.rings.polynomial.q_integer_valued_polynomials import q_binomial_x, q_int_x sage: q_binomial_x(4,2)(0) == q_binomial(4,2) True sage: q_binomial_x(3,2)(1) == q_binomial(4,2) True sage: q_binomial_x(3,1) == q_int_x(4) True sage: q_binomial_x(2,0).parent() Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in q over Integer Ring