I have a graded quotient of a graded polynomial ring, say something like

P  = PolynomialRing(QQ, , 'x,y,z', order=TermOrder('wdegrevlex',(1,2,3)))
I = P.ideal(x*y^2 + x^5, z*y + x^3*y)
Q = P.quotient(I)


I would like to get the vector space over QQ consisting on vectors of degree, say 9, in Q.

edit retag close merge delete

Sort by » oldest newest most voted This is not perfect, but it works: use GradedCommutativeAlgebra. This isn't perfect because such objects are graded commutative, not commutative, so if x and z are in odd degrees, then xz = -zx. You can deal with this by doubling all degrees to make sure nothing is in an odd degree.

P = GradedCommutativeAlgebra(QQ, names=('x', 'y', 'z'), degrees=(2, 4, 6))
P.inject_variables()


or

P.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(2, 4, 6))


Then

I = P.ideal(x*y^2 + x^5, z*y + x^3*y)
Q = P.quotient(I)
Q.basis(18)


will return

[z^3, x*y*z^2, x^3*z^2, x^2*y^2*z]

more

Thanks for the reply, I had seen another question with this answer. What I ended up doing is implementing the same basis(n) method from the source code of GradedCommutativeAlgebra in my quotient ring because I couldn't change the degrees.