Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Computations in a Quotient Ring

I'm trying to do some computations in a quotient ring in Sage, and I'm having some trouble. For example:

Working with the ring:

R.<x,y,z,w,u,z1,z2,z3,z4,z5> = PolynomialRing(QQ,10) S.<a,b,c,d,e,m1,m2,m3,m4,m5> = R.quo((x^2,y^2+xy, z^2+xz + yz, w^2 - wx+wy, u^2 + ux+ uz + uw))

I want to compute (a(m3+m4+m5) + b(m1+m2+m3+m4) + c(m1+m3) + d(m1+m2) + e*m1)^5

where I'm thinking about m1,m2,m3,m4, and m5 as arbitrary coefficients. When I type this in it returns

4/19e^5m1^5 + 15/19e^5m1^4m2 + 10/19e^5m1^3m2^2 + 10/19e^5m1^4m3 + 40/19e^5m1^3m2m3 + 15/19e^5m1^2m2^2m3 - 15/19e^5m1m2^2m3^2 - 5/19e^5m1^2m3^3 - 10/19e^5m1m2m3^3 + 5/19e^5m1^4m4 - 15/19e^5m1^2m2^2m4 - 30/19e^5m1m2^2m3m4 - 15/19e^5m1^2m3^2m4 - 30/19e^5m1m2m3^2m4 - 10/19e^5m1^3m4^2 - 15/19e^5m1^2m2m4^2 - 15/19e^5m1^2m3m4^2 - 30/19e^5m1m2m3m4^2 - 5/19e^5m1^4m5 - 20/19e^5m1^3m2m5 - 15/19e^5m1^2m2^2m5 - 20/19e^5m1^3m3m5 - 60/19e^5m1^2m2m3m5 - 30/19e^5m1m2^2m3m5 - 15/19e^5m1^2m3^2m5 - 30/19e^5m1m2m3^2m5 - 20/19e^5m1^3m4m5 - 30/19e^5m1^2m2m4m5 - 30/19e^5m1^2m3m4m5 - 60/19e^5m1m2m3m4*m5

However, this is also equivalent to (some expression of mi's)abcd*e.

I want it in this form, because for the problem I'm working on I need this coefficient in front of abcde. But I'm not sure how to ask Sage to convert it to this form? For example, "solve" doesn't seem to work in a quotient ring.

(I'm sorry if this is a silly question. I'm new to Sage!)

Computations in a Quotient Ring

I'm trying to do some computations in a quotient ring in Sage, and I'm having some trouble. For example:

Working with the ring:

R.<x,y,z,w,u,z1,z2,z3,z4,z5> = PolynomialRing(QQ,10)
S.<a,b,c,d,e,m1,m2,m3,m4,m5> = R.quo((x^2,y^2+xy, z^2+xz + yz, R.quo((x^2,y^2+x*y, z^2+x*z + y*z, w^2 - wx+wy, w*x+w*y, u^2 + ux+ uz + uw))

u*x+ u*z + u*w))

I want to compute (a(m3+m4+m5) + b(m1+m2+m3+m4) + c(m1+m3) + d(m1+m2) (a*(m3+m4+m5) + b*(m1+m2+m3+m4) + c*(m1+m3) + d*(m1+m2) + e*m1)^5

where I'm thinking about m1,m2,m3,m4, m1, m2, m3, m4, and m5 m5 as arbitrary coefficients. When I type this in it returns

4/19e^5m1^5 + 15/19e^5m1^4m2 + 10/19e^5m1^3m2^2

4/19*e^5*m1^5 + 15/19*e^5*m1^4*m2 + 10/19*e^5*m1^3*m2^2 +
10/19e^5m1^4m3 + 40/19e^5m1^3m2m3 + 15/19e^5m1^2m2^2m3 -
15/19e^5m1m2^2m3^2 - 5/19e^5m1^2m3^3 - 10/19e^5m1m2m3^3 10/19*e^5*m1^4*m3 + 40/19*e^5*m1^3*m2*m3 + 15/19*e^5*m1^2*m2^2*m3 -
15/19*e^5*m1*m2^2*m3^2 - 5/19*e^5*m1^2*m3^3 - 10/19*e^5*m1*m2*m3^3 +
5/19e^5m1^4m4 - 15/19e^5m1^2m2^2m4 - 30/19e^5m1m2^2m3m4 -
15/19e^5m1^2m3^2m4 - 30/19e^5m1m2m3^2m4 - 10/19e^5m1^3m4^2 -
15/19e^5m1^2m2m4^2 - 15/19e^5m1^2m3m4^2 -
30/19e^5m1m2m3m4^2 - 5/19e^5m1^4m5 - 20/19e^5m1^3m2m5 -
15/19e^5m1^2m2^2m5 - 20/19e^5m1^3m3m5 - 60/19e^5m1^2m2m3m5
- 30/19e^5m1m2^2m3m5 - 15/19e^5m1^2m3^2m5 -
30/19e^5m1m2m3^2m5 - 20/19e^5m1^3m4m5 - 30/19e^5m1^2m2m4m5
- 30/19e^5m1^2m3m4m5 - 60/19e^5m1m2m3m4*m5

5/19*e^5*m1^4*m4 - 15/19*e^5*m1^2*m2^2*m4 - 30/19*e^5*m1*m2^2*m3*m4 - 15/19*e^5*m1^2*m3^2*m4 - 30/19*e^5*m1*m2*m3^2*m4 - 10/19*e^5*m1^3*m4^2 - 15/19*e^5*m1^2*m2*m4^2 - 15/19*e^5*m1^2*m3*m4^2 - 30/19*e^5*m1*m2*m3*m4^2 - 5/19*e^5*m1^4*m5 - 20/19*e^5*m1^3*m2*m5 - 15/19*e^5*m1^2*m2^2*m5 - 20/19*e^5*m1^3*m3*m5 - 60/19*e^5*m1^2*m2*m3*m5 - 30/19*e^5*m1*m2^2*m3*m5 - 15/19*e^5*m1^2*m3^2*m5 - 30/19*e^5*m1*m2*m3^2*m5 - 20/19*e^5*m1^3*m4*m5 - 30/19*e^5*m1^2*m2*m4*m5 - 30/19*e^5*m1^2*m3*m4*m5 - 60/19*e^5*m1*m2*m3*m4*m5

However, this is also equivalent to (some expression of mi's)abcd*e.mi's)*a*b*c*d*e.

I want it in this form, because for the problem I'm working on I need this coefficient in front of abcde. a*b*c*d*e. But I'm not sure how to ask Sage to convert it to this form? For example, "solve" doesn't seem to work in a quotient ring.

(I'm sorry if this is a silly question. I'm new to Sage!)