On Nov 27, 6:12 am, Christian Stump <christian.st...@gmail.com> wrote:
> sage: UCF.<E> = UniversalCyclotomicField(); UCF
> Universal Cyclotomic Field endowed with the Zumbroich basis
> sage: E(5)
> E(5)
> sage: UCF.<zeta> = UniversalCyclotomicField()
> sage: zeta(5)
> zeta5

OK, now we're firmly arriving in bikeshedding territory:

Is there a reason they print differently? Does "zeta[5]" (both as
printname and input notation) make sense?

> UCF.gen(5)
> zeta5
> UCF.gen(5,2)
> zeta5^2

The difference between UCF.gen(0) and UCF.gen(1) is cute, but how much
field code out there expects that K.gen(0) is a field element? If
being cute at this point causes errors, incompatibility and limited
use of UCF in other situations, it's probably not worth it.

> ...  This is to say that
>
> sage: E(5)+E(6)
> E(15) + E(15)^4 + E(15)^7 - E(15)^8
>
> should always hold true. And I don't yet see (yet) how to ensure this
> - in particular, the embedding for prime n's does at least fix the
> embedding of all others.

No, they don't. All you need is that E(9)^3==E(3), so once you've
fixed the image of E(3), the choice of E(9) is only determined up to
cube roots of unity. UCF is not finitely generated and not given by
finitely many relations, so you can't verify in a finite amount of
computation whether arbitrary generator images define a consistent
embedding. I'd say just document that it's up to the user to ensure
correctness (the alternative, cache all images used and test
consistency between those, would allow at least an eventual error but
sounds way too onerous to be practical)

This is generally a problem and CyclotomicField presently doesn't
solve it very nicely either:

sage: zC=(CC(-1)^(1/3))^2
sage: Ka.<aa>=CyclotomicField(3,embedding=zC)
sage: Kb.<bb>=CyclotomicField(3,embedding=zC^2)
sage: Kc.<cc>=CyclotomicField(3,embedding=CC(17))
sage: CC(aa)
-0.500000000000000 + 0.866025403784439*I
sage: CC(bb)
-0.500000000000000 - 0.866025403784439*I
sage: CC(Ka(bb))
-0.500000000000000 + 0.866025403784439*I

As you see, Ka and Kb apparently have an arbitrary isomorphism between
them that is preferred, but of course we can't expect that to be
compatible with chosen embeddings.

The behaviour with an erroneous embedding is deplorable: The system
silently chooses an arbitrary one rather than throw an error or use
the specified data and produce the garbage the user deserves:

sage: CC(cc)
-0.500000000000000 - 0.866025403784439*I



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


Reply via email to