On Jun 6, 2008, at 10:00 AM, John Cremona wrote: > 2008/6/6 Nick Alexander <[EMAIL PROTECTED]>: >> >>> This thread got slightly off topic to the original question though: >>> where should sqrt(2) belong? Z[sqrt(2)], SR, or somewhere else? >> >> I always want my data to start as close to the initial object as >> possible. In this case, Z[sqrt(2)] \into SR and not vice versa -- so >> sqrt(2) should be in Z[sqrt(2)]. >> >> Nick > > I agree: for exactly the same reason that I expect 2 to be in ZZ > and not in SR! > > What about sqrt(8)? Would you put that in the maximal order > Z[sqrt(2)] or in its own order Z[sqrt(8)]? I would recommenfd the > former, otherwise every time you type sqrt(n) for some integer n then > you would be forcing the factorization of n (on the grounds that there > is no known algorithm for finding the square-free part of an integer > which is faster than factorization). > > Similarly for other algebraic integers alpha (at least those which > have a "symbolic" definition like sqrt(n)). > > What about sqrt(1/2)? (or anyother non-integral algebraic number)? > This does not belong to any finitely-generated ring (I mean f.g. as > Z-module of course) so I would put it straight into the field > Q(sqrt(2)).
Yes, this is what I was thinking to--I think I've mentioned it before, but I think there should be a coercion parent(a) -> parent (sqrt(a)). - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---