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.Fri, 24 Apr 2020 03:00:38 +0200How 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/center lift of a polynomial?https://ask.sagemath.org/question/49613/center-lift-of-a-polynomial/Hello! I am trying to code up the NTRU example in Hoffstein, Pipher and Silverman. Anyone know if the "center lift" of a polynomial is implemented in Sage? I am working the quotient ring:
Z_7[x] / x^5 - 1
I have a(x) = 5 + 3x - 6x^2 + 2x^3 + 4x^4
The center lift takes this a polynomial with coefficients in the range of - 7/2 < coeff <= 7/2.
Thus a(x) -> -2 + 3x + x^2 + 2x^3 - 3x^4
But what I get is:
N = 5
q = 7
P.<x> = GF(q)[]
Q = QuotientRing(P, x^N - 1)
a = 5 + 3*x - 6*x^2 + 2*x^3 + 4*x^4
aa = Q(a)
aa.lift()
4*x^4 + 2*x^3 + x^2 + 3*x + 5
Any thoughts? I guess I could write my own function to do the center lifting...
Thanks!
Susansusan_in_AnnapolisTue, 21 Jan 2020 01:55:52 +0100https://ask.sagemath.org/question/49613/Quotient of Polynomial rings reduction not workinghttps://ask.sagemath.org/question/27068/quotient-of-polynomial-rings-reduction-not-working/<code>
<br>R.<x>=PolynomialRing(QQ)
<br>R.ideal(x^4).reduce(x^8+1)
<br>R.<x>=PolynomialRing(ZZ)
<br>R.ideal(x^4).reduce(x^8+1)
1
x^8 + 1
</code>
Why am I not getting the result 1 in both cases?WizqTue, 09 Jun 2015 15:44:26 +0200https://ask.sagemath.org/question/27068/Mysterious behavior for quotient rings and cover()https://ask.sagemath.org/question/10944/mysterious-behavior-for-quotient-rings-and-cover/I don't understand this:
R.<T,U>=PolynomialRing(QQ)
Q=R.quo((T^2))
pi=Q.cover()
pi(T)
-- returns Tbar
However:
R.<T>=PolynomialRing(QQ)
Q=R.quo((T^2))
pi=Q.cover()
pi(T)
-- returns an error.jeremy9959Sat, 18 Jan 2014 08:49:36 +0100https://ask.sagemath.org/question/10944/