On 3 July, 14:11, Simon King <simon.k...@nuigalway.ie> wrote: > Hi! > > This is related with #5618. > > In Sage, one can have two different cyclotomic fields, namely when the > variable names differ: > sage: K.<z> = CyclotomicField(3) > sage: L.<y> = CyclotomicField(3) > sage: K == L > False
They may compare as unequal, but because they have a canonical embedding into CC, the coercion model knows how to pass between them: sage: L.has_coerce_map_from(K) True sage: y in K True sage: z in L True > I see different possibilities to cope with that mess: > > 1. In the Sage methods that rely on GAP's cyclotomic methods, > construct a cyclotomic field explicitly, rather than gap(K). An > example of an offensive method occurs in #5618. This doesn't sound > proper to me: It is likely to involve many special cases. > > 2. If K is a cyclotomic field, let gap(K) be a cyclotomic field. > Sounds logical, but it is likely to break existing code, one would > have K!=L but gap(K)==gap(L), and one couldn't choose generator names. I'd advocate (2), with all cyclotomic fields (of given order) in Sage corresponding to the same one in Gap. I doubt this would be much of a problem with breaking existing code given the coercion thing I mentioned above. David -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org