Thanks, Robert -- I changed rings/integer_ring.pxd suitably and the build worked.
Two things worry me about this: (1) Changing that caused a lot of recompilation with sage -b, suggesting that the file I changed is used a lot (not surprising). I just hope that this almost trivial change has not added unnecessary overhead in a lot of places. (2) In fact the EuclideanDomain class has essentially no functionality, so I wonder if it would not be better to remove it altogether, despite its place in the theoretical mathematical hierarchy of commutative rings. Think about it: the classical Euclidean rings ZZ and F[] (F a field) already have their perfectly good Euclidean implementation (division with remainder). I don't know if any other rings do. A few rings of integers are Euclidean, but it is highly nontrivial to say whether or not any individual one is, and Sage certainly does not try to do so, so the is_EuclideanDomain() function will return False except for specific rings (such as ZZ after the change I made), despite this being mathematically incorect. e.g. the Gaussian Integers: sage: GI = ZZ[sqrt(-1)] sage: GI Order in Number Field in I with defining polynomial x^2 + 1 sage: is_EuclideanDomain(GI) False Can anyone see a reason *not* to delete the is_EuclideanDomain() function and also the EuclideanDomain class? John On 08/03/2008, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > > Make sure you cimport EuclideanDomain in the rings/integer_ring.pxd > file. > > - Robert > > > > On Mar 8, 2008, at 10:17 AM, John Cremona wrote: > > > > > This is not right: > > > > sage: is_EuclideanDomain(ZZ) > > False > > > > (discovered while working on #2425, i.e. doctests for rings/rings and > > rings/integer_ring) > > > > I reckon that the solution is simply to change > > > > cdef class IntegerRing_class(PrincipalIdealDomain): > > > > to > > > > cdef class IntegerRing_class(EuclideanDomain): > > > > in rings/integer_ring.pyx > > > > since EuclideanDomain is imply derived from PrincipalIdealDomain, with > > almost no extra functionality as far as I can see. > > > > However when I make that change I get errors rebuilding: > > > > /home/jec/sage-2.10.3.rc2/devel/sage-rings/sage/rings/ > > integer_ring.pyx:103:5: > > 'EuclideanDomain' is not declared > > > > I'm not sure how to make this declaration in cython. Can someone > > help? > > > > John > > > > -- > > John Cremona > > > > > > > > > -- John Cremona --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
