On Monday, January 14, 2013 2:31:46 PM UTC-8, Michael Beeson wrote:
>
> sage:  K.<p,d,e,N> = FractionField(PolynomialRing(QQ,4,'pdeN'))
>

Why not just

sage:  K.<p,d,e,N> = PolynomialRing(QQ,4,'pdeN')
>

With this change, sage doesn't hang (for me). Oh, I see, later you need 
field coefficients.


sage: R.<x> = K[]
> sage: a = x^3-x^-3
> sage: b = x^5-x^-5
> sage: c = x^8-x^-8
> sage: X = p*a + d*b + e*c
> sage: f = x^16 *(X^2- N*b*c)
>
> and Sage does not answer.  It just hangs and I have to kill the session.
> If it would answer I would like to continue with 
>
> F = R(f)
>

When I do this, I get 

    TypeError: denominator must be a unit
    sage: f.denominator()
    x^45
 
 

Starting over:

sage: P.<p,d,e,N> = (PolynomialRing(QQ,4,'pdeN')
sage: R.<x> = P[]
sage: a = x^3-x^-3
sage: b = x^5-x^-5
sage: c = x^8-x^-8
sage: X = p*a + d*b + e*c
sage: f = x^16 *(X^2- N*b*c)

sage: K = FractionField(P)
sage: S.<x> = K[]
sage: F = S(f.numerator())  # not sure if this is what you want
sage: psi = cyclotomic_polynomial(30)
sage: g = F.quo_rem(psi)[1]
sage: g
(p^2 + 6*p*d + 2*p*e)*x^7 + (4*p*d + 2*d*e - N)*x^6 + (-p^2 - 2*p*d - 2*p*e 
+ 2*d*e - N)*x^5 + (-4*p*d - 2*d*e + N)*x^4 + (-8*p*d - 4*d*e + 2*N)*x^3 + 
(-4*p*d - 2*p*e - 2*d*e - e^2 + N)*x^2 + (-2*p^2 + 2*p*d - 3*d^2 - 2*p*e - 
2*d*e - 2*e^2 + N)*x + p^2 + 6*p*d - e^2

-- 
John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to