#11126: Fix category of Symbolic Ring
------------------------------------------+--------------------------
Reporter: duenez | Owner: burcin
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: symbolic ring category | Merged in:
Authors: duenez | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------------+--------------------------
Changes (by pbruin):
* keywords: symbolics matrix => symbolic ring category
Old description:
> 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?
New description:
The symbolic ring (`SR`) in Sage currently considers itself to be a field
and therefore also an integral domain:
{{{
sage: SR.is_field()
True
sage: SR.is_integral_domain()
True
}}}
However, it is confused about its category:
{{{
sage: SR.category()
Category of commutative rings
sage: SR in PrincipalIdealDomains()
False
sage: SR in Fields()
True
}}}
The last command causes the category of `SR` to be refined, and running
the same commands again gives a different output:
{{{
sage: SR.category()
Category of fields
sage: SR in PrincipalIdealDomains()
True
sage: SR in Fields()
True
}}}
We should either make `SR.is_field()` return `False` (which is the only
mathematically correct option) or put `SR` in `Fields()` from the
beginning.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/11126#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.