Hi Nils,

On Wednesday 07 May 2014 16:43:03 Nils Bruin wrote:
> On Wednesday, May 7, 2014 9:58:48 AM UTC-7, François Colas wrote:
> > What I want to do is a way to evaluate polynomials of K in a power of a
> > primitive square root of unity:
> > 
> > omega = CC(e^(2*I*pi/m))
> > F = Hom(K, CC)
> > f = F([omega])
> > TypeError: images do not define a valid homomorphism
> > 
> > Does anyone see another way to do this?
> 
> Have you tried using CyclotomicField(m) ? I think that uses specialized
> code, which should handle high degrees much better than generic number
> field code:

unfortunately that's not the case for the OP, see:

https://groups.google.com/forum/#!searchin/sage-devel/QuotientRing|
sort:date/sage-devel/qxGMiYDF4eQ/zDcTmXWJH9UJ
 
> sage: K=CyclotomicField(3*5*7*11)
> sage: K.coerce_embedding()
> Generic morphism:
>   From: Cyclotomic Field of order 1155 and degree 480
>   To:   Complex Lazy Field
>   Defn: zeta1155 -> 0.9999852033056930? + 0.00543996044764063?*I
> 
> Alternatively, if you really want to use an explicit quotient ring
> construction:
> 
> f = F([omega],check=False)
> 
> The error you run into otherwise is:
> 
> sage: sage.rings.morphism.RingHomomorphism_im_gens(H,[omega])
> ValueError: relations do not all (canonically) map to 0 under map
> determined by images of generators.
> 
> i.e., the cyclotomic polynomial evaluated at omega doesn't return an exact
> zero, because CC uses float arithmetic.

Cheers,
Martin

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to