First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This isn't perfect, but it's close: use GradedCommutativeAlgebra. The generators in odd degrees anti-commute, so if you want a polynomial algebra, double the degrees of the generators:

sage: S.<x,y> = GradedCommutativeAlgebra(QQ, degrees=(2, 4))
sage: S
Graded Commutative Algebra with generators ('x', 'y') in degrees (2, 4) with relations [0] over Rational Field
sage: (x*y).degree()
6
sage: S.basis(10)
[x*y^2, x^3*y, x^5]
click to hide/show revision 2
No.2 Revision

This isn't perfect, but it's close: use GradedCommutativeAlgebra. The generators in odd degrees anti-commute, so if you want a an honest polynomial algebra, double the degrees of the generators:

sage: S.<x,y> = GradedCommutativeAlgebra(QQ, degrees=(2, 4))
sage: S
Graded Commutative Algebra with generators ('x', 'y') in degrees (2, 4) with relations [0] over Rational Field
sage: (x*y).degree()
6
sage: S.basis(10)
[x*y^2, x^3*y, x^5]