On Nov 25, 10:49 am, Christian Stump <christian.st...@gmail.com>
wrote:
> Hi --
>
> we are almost ready getting the universal cyclotomic field, UCF (which
> is the smallest subfield of the complex numbers containing all roots
> of unity) into sage, seehttp://trac.sagemath.org/sage_trac/ticket/8327.
>
> In GAP, the point of entry is the function E, like in E(5) to get exp(
> 2 \pi i / 5 ) . The question is:
>
> Do people agree to use this letter as well in Sage ?

Your primary interface should be compatible with other sage parents,
which means that

UCF.gen(0), UCF.gen(1), ...

should work, where UCF.gen(i) should probably give you the primitive i-
th root of unity.

Controlling how that prints should probably be decided on creation:

sage: UCF = AbelianClosure(QQ,name="zeta")
sage: UCF.3
zeta(3)
sage: UCF = AbelianClosure(QQ,name="E")
sage: UCF.3
E(3)

If you want convenient input notation:

sage: UCF = AbelianClosure(QQ,name="E")
sage: E = UCF.gen
sage: E(3)
E(3)

However, I would be opposed to have E injected in the global namespace
for this purpose. E can mean so many things: elliptic curve, extension
field, exponent position holder in a float. In fact, I would be
opposed to having an instance of UCF initialized in sage by default.
It's a very useful parent to have, but it can easily be constructed
when required.

Since indexing is often equated with subscripts, it would be cute to
have

sage: UCF.3
zeta[3]

but that's easily too cute.

Whether you have UCF.E as an alias to UCF.gen is your choice. I don't
think it makes sense in general, only in the context of the
conventions chosen in GAP, so I wouldn't bother. E = UCF.gen solves
your problem much better.

-- 
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