Ask Your Question
1

quotient ring

asked 2017-10-02 22:54:37 +0100

malikb gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-03 04:02:17 +0100

dan_fulea gravatar image

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.

edit flag offensive delete link more

Comments

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.

malikb gravatar imagemalikb ( 2017-10-16 19:13:46 +0100 )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
sage: bad_u
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)
dan_fulea gravatar imagedan_fulea ( 2017-10-17 21:01:03 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-10-02 22:54:37 +0100

Seen: 359 times

Last updated: Oct 03 '17