ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 19 Apr 2021 22:33:39 +0200Quotient of polynomial ring over integers not workinghttps://ask.sagemath.org/question/56734/quotient-of-polynomial-ring-over-integers-not-working/I have a problem. I want Sage to calculate in $\mathbb Z[x]/\langle4,2x,x^2\rangle$ but none of the relations are being calculated/recognized properly:
sage: R.<x> = ZZ[]
sage: I = R.ideal(4,2*x,x^2)
sage: S.<a> = R.quotient(I)
sage: a^2 # the output should be 0
a^2
sage: 2*a # the output should be 0
2*a
sage: S(2)+S(2) # the output should be 0
4
When I introduce a superfluous variable $y$ and consider $\mathbb Z[x,y]/\langle4,2x,x^2,y\rangle$ instead, which is practically the same ring (i.e. isomorphic), then it seems to work:
sage: R.<x,y> = ZZ[]
sage: I = R.ideal(4,2*x,x^2,y)
sage: S.<a,b> = R.quotient(I)
sage: a^2
0
sage: 2*a
0
sage: S(2)+S(2)
0
But now look at this:
sage: S(2)+S(3) # the output should be 1
5
How can I solve this problem?ThrashMon, 19 Apr 2021 22:33:39 +0200https://ask.sagemath.org/question/56734/How to base change from a PolynomialRing to that Ring with one variable evaluated, i.e., from Q[x,y] to Q[x,y]/(x=0) = Q[y]?https://ask.sagemath.org/question/50978/how-to-base-change-from-a-polynomialring-to-that-ring-with-one-variable-evaluated-ie-from-qxy-to-qxyx0-qy/I am trying to base change a Laurent series ring element from its base ring, Q[u1, u2, u3], to a quotient of its base ring, Q[u2, u3], but I am quite confused in forming this quotient. My setting is this:
S.<u1,u2,u3> = QQ[]
L.<z> = LaurentSeriesRing(S);
f = -4*z - 4/5*u1*z^5 + (-4/9*u1^2 - 8/9*u2)*z^9 + (-4/13*u1^3 - 24/13*u1*u2 - 12/13*u3)*z^13 + (-4/17*u1^4 - 48/17*u1^2*u2 - 24/17*u2^2 - 48/17*u1*u3 + 16/17*u1 + 16/17*u2 + 16/17*u3 + 16/17)*z^17 + O(z^20)
In other words, I wish to set u1 = 0, and look at f over that ring. I tried the following two things, which spit out f unchanged.
f.change_ring(S.quo(u1))
R = S.quotient(u1)
f.change_ring(R)
I also tried the following which gives an attribute error:
f.reduce(u1)
I am completely stuck and would deeply appreciate any help. I would also like to eventually set u2 = 0 and look at f over that ring, which I mention at the off chance that this changes the answer at all.masseygirlFri, 24 Apr 2020 03:00:38 +0200https://ask.sagemath.org/question/50978/