# quotient ring

I need to compute some things in matrices over a quotient ring. My definition of the quotient ring in question is

R.<A,B,C,D>=QQ[]
I=R.ideal(A,B,C,D)
v = 8
S.<a,b,c,d>=R.quotient_ring(I^(v+1))


In particular, I need to quotient out by large (>8 shown above) powers of the ideal I. However, I've noticed that in constructing S, Sage much generate all of the monomials in the power of I which, when v=10, takes quite awhile. Is there any faster/more efficient way to have Sage internally generate S. It actually takes longer to construct S than it does to perform my computations.

This might just be how it is given I'm working over a polynomial ring with four indeterminates...

edit retag close merge delete

Sort by » oldest newest most voted

One possibility to construct the ring would be as in the sample code:

sage: S = PowerSeriesRing( base_ring=QQ, names='a,b,c,d', default_prec=9 )
sage: S
Multivariate Power Series Ring in a, b, c, d over Rational Field
sage: a,b,c,d = S.gens()
sage: J = S.O(9)
sage: J
0 + O(a, b, c, d)^9
sage: u = (1+a^3+J)*(1+b^3+J)*(1+c^3+J)*(1+d^3+J)
sage: u
1 + a^3 + b^3 + c^3 + d^3 + a^3*b^3 + a^3*c^3 + a^3*d^3 + b^3*c^3 + b^3*d^3 + c^3*d^3 + O(a, b, c, d)^9
sage: 1/u
1 - a^3 - b^3 - c^3 - d^3 + a^6 + a^3*b^3 + a^3*c^3 + a^3*d^3 + b^6 + b^3*c^3 + b^3*d^3 + c^6 + c^3*d^3 + d^6 + O(a, b, c, d)^9


The above uses the PowerSeriesRing with a declared precision, and the ideal J is implemented as an $O$-calculus. Hope it works for the needed purpose.

more

Thanks for this. This is quite promising, though I have one issue. Sage seems loathe to compute something as 0+O(...)^k, and so I'm getting monstrous terms that should simplify to 0 but aren't. Is there any way to have Sage fix the precision to be at most k-power terms so that 0 entries can be written? I can't seem to find any documentation about this.

( 2017-10-16 12:13:46 -0500 )edit

The default_prec should be given in the initialization of the power series ring.

Also, it is important to use as often as possible (in all factors) the apparently insignificant +J. For example, in the example posted above, basicly

S = PowerSeriesRing( base_ring=QQ,
names='a,b',
default_prec=9 )
a,b = S.gens()
J = S.O(9)

u     = (1+a^3+J)^10 * (1+b^3+J)^10
bad_u = (1+a^3  )^10 * (1+b^3  )^10


there is a big difference between u and bad_u.

sage: u
1 + 10*a^3 + 10*b^3 + 45*a^6 + 100*a^3*b^3 + 45*b^6 + O(a, b)^9
1 + 10*a^3 + 10*b^3 + 45*a^6 + 100*a^3*b^3 + 45*b^6 + 120*a^9 + 450*a^6*b^3 + 450*a^3*b^6 + 120*b^9 + 210*a^12 + 1200*a^9 ...
(more)
( 2017-10-17 14:01:03 -0500 )edit