#11126: Symbolic Ring is_integral_domain() throws exception
-------------------------+--------------------------------------------------
   Reporter:  duenez     |       Owner:  burcin          
       Type:  defect     |      Status:  new             
   Priority:  major      |   Milestone:  sage-4.7        
  Component:  symbolics  |    Keywords:  symbolics matrix
     Author:  duenez     |    Upstream:  N/A             
   Reviewer:             |      Merged:                  
Work_issues:             |  
-------------------------+--------------------------------------------------
 The symbolic ring (SR) in sage is considered a field:

 {{{
   sage: SR.is_field()
   True
 }}}
 but it is not considered an integer domain:

 {{{
   sage: SR.is_integer_domain()
   NotImplementedError                       Traceback (most recent call
 last)

 /***/sage-4.6.2-linux-32bit-
 ubuntu_10.04_lts-i686-Linux-i686-Linux/<ipython console> in <module>()

 /***/sage-4.6.2-linux-32bit-
 ubuntu_10.04_lts-i686-Linux-i686-Linux/local/lib/python2.6/site-
 packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.solve_right
 (sage/matrix/matrix2.c:3387)()

 /***/sage-4.6.2-linux-32bit-
 ubuntu_10.04_lts-i686-Linux-i686-Linux/local/lib/python2.6/site-
 packages/sage/rings/ring.so in sage.rings.ring.Ring.is_integral_domain
 (sage/rings/ring.c:6035)()

 NotImplementedError:
 }}}
 However, functions like matrix's '''solve_right()''' (correctly) test for
 the ring being integral domain before testing for the ring being a field.
 Thus, matrices with symbolic entries fail with an exception when trying to
 use '''solve_right()''' and related functions.

 This behavior was introduced by ticket #10481 where they (correctly)
 changed the behavior of '''is_integral_domain() '''of a ring to raise an
 exception instead of returning it.

 The problems is that '''SR''' does not override '''is_integral_domain()
 '''correctly. I propose the addition of the following function to
 sage/symbolic/rings.pyx

 {{{
 #!python
     def is_integral_domain(self, proof = True):
         """
         Returns True, since the symbolic expression ring is reported as a
         field.

         EXAMPLES::

             sage: SR.is_integral_domain()
             True
         """
         return True
 }}}

 What do you think?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11126>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

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