#5759: [with patch, needs work] class CommutativeRingElement
------------------------------+---------------------------------------------
 Reporter:  was               |       Owner:  was       
     Type:  defect            |      Status:  new       
 Priority:  major             |   Milestone:  sage-3.4.2
Component:  basic arithmetic  |    Keywords:            
------------------------------+---------------------------------------------

Comment(by kkilger):

 The whole divides function is broken (nearly irreparable) with the effect
 that "divides" failes or gives *wrong* answers if and only if the ring is
 no polynomial ring or ZZ (which have their own (buggy) implementation).

 The reason is that not all commutative rings are euclidean domains and
 "modulo" operation does not do what it is supposed to do in general
 commutative rings, for example in finite integer rings: Zmod(12)(3) %
 Zmod(12)(4) gives Zmod(3)(0) (which is also broken, by the way).

 The only correct behaviour would be:

 1. to raise a NotImplementedError in element.py and let all subclasses
 implemenent their own divides.
      or:
 2. define divides as "inclusion of ideals" and give errors if the
 subclasses can't check the inclusion of ideals.

 Also: all doctests in element.py and other files are for polynomial rings
 only, with the effect that many functions in SAGE fail or give *wrong*
 answers if the ring is no polynomial ring.

 Greetings,
 Kilian.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5759#comment:9>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to