\(q\)-Commuting Polynomials#

AUTHORS:

  • Travis Scrimshaw (2022-08-23): Initial version

class sage.algebras.q_commuting_polynomials.qCommutingPolynomials(q, B, names)#

Bases: sage.combinat.free_module.CombinatorialFreeModule

The algebra of \(q\)-commuting polynomials.

Let \(R\) be a commutative ring, and fix an element \(q \in R\). Let B = (B_{xy})_{x,y in I}` be a skew-symmetric bilinear form with index set \(I\). Let \(R[I]_{q,B}\) denote the polynomial ring in the variables \(I\) such that we have the \(q\)-commuting relation for \(x, y \in I\):

\[y x = q^{B_{xy}} \cdot x y.\]

This is a graded \(R\)-algebra with a natural basis given by monomials written in increasing order with respect to some total order on \(I\).

When \(B_{xy} = 1\) and \(B_{yx} = -1\) for all \(x < y\), then we have a \(q\)-analog of the classical binomial coefficient theorem:

\[(x + y)^n = \sum_{k=0}^n \binom{n}{k}_q x^k y^{n-k}.\]

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y> = algebras.qCommutingPolynomials(q)

We verify a case of the \(q\)-binomial theorem:

sage: f = (x + y)^10
sage: all(f[b] == q_binomial(10, b.list()[0]) for b in f.support())
True

We now do a computation with a non-standard \(B\) matrix:

sage: B = matrix([[0,1,2],[-1,0,3],[-2,-3,0]])
sage: B
[ 0  1  2]
[-1  0  3]
[-2 -3  0]
sage: q = ZZ['q'].gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q, B)
sage: y * x
q*x*y
sage: z * x
q^2*x*z
sage: z * y
q^3*y*z

sage: f = (x + z)^10
sage: all(f[b] == q_binomial(10, b.list()[0], q^2) for b in f.support())
True

sage: f = (y + z)^10
sage: all(f[b] == q_binomial(10, b.list()[1], q^3) for b in f.support())
True
algebra_generators()#

Return the algebra generators of self.

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.algebra_generators()
Finite family {'x': x, 'y': y, 'z': z}
degree_on_basis(m)#

Return the degree of the monomial index by m.

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.degree_on_basis(R.one_basis())
0
sage: f = (x + y)^3 + z^3
sage: f.degree()
3
dimension()#

Return the dimension of self, which is \(\infty\).

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.dimension()
+Infinity
gen(i)#

Return the i-generator of self.

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.gen(0)
x
sage: R.gen(2)
z
gens()#

Return the generators of self.

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.gens()
(x, y, z)
one_basis()#

Return the basis index of the element \(1\).

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q)
sage: R.one_basis()
1
product_on_basis(x, y)#

Return the product of two monomials given by x and y.

EXAMPLES:

sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y> = algebras.qCommutingPolynomials(q)
sage: R.product_on_basis(x.leading_support(), y.leading_support())
x*y
sage: R.product_on_basis(y.leading_support(), x.leading_support())
q*x*y

sage: x * y
x*y
sage: y * x
q*x*y
sage: y^2 * x
q^2*x*y^2
sage: y * x^2
q^2*x^2*y
sage: x * y * x
q*x^2*y
sage: y^2 * x^2
q^4*x^2*y^2
sage: (x + y)^2
x^2 + (q+1)*x*y + y^2
sage: (x + y)^3
x^3 + (q^2+q+1)*x^2*y + (q^2+q+1)*x*y^2 + y^3
sage: (x + y)^4
x^4 + (q^3+q^2+q+1)*x^3*y + (q^4+q^3+2*q^2+q+1)*x^2*y^2 + (q^3+q^2+q+1)*x*y^3 + y^4

With a non-standard \(B\) matrix:

sage: B = matrix([[0,1,2],[-1,0,3],[-2,-3,0]])
sage: q = ZZ['q'].fraction_field().gen()
sage: R.<x,y,z> = algebras.qCommutingPolynomials(q, B=B)
sage: x * y
x*y
sage: y * x^2
q^2*x^2*y
sage: z^2 * x
q^4*x*z^2
sage: z^2 * x^3
q^12*x^3*z^2
sage: z^2 * y
q^6*y*z^2
sage: z^2 * y^3
q^18*y^3*z^2