#13697: Improvements and corrections to QuotientRingElement
-------------------------------------+-------------------------------------
Reporter: Bouillaguet | Owner: malb
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.0
Component: commutative | Resolution:
algebra | Merged in:
Keywords: | Reviewers:
Authors: Charles | Work issues:
Bouillaguet | Dependencies:
Report Upstream: N/A | #13670,#13671,#13675,#13714
Branch: |
u/saraedum/ticket/13697 |
Stopgaps: |
-------------------------------------+-------------------------------------
Changes (by saraedum):
* milestone: sage-5.12 => sage-6.0
Old description:
> The class {{{QuotientRingElement}}}, which implements the operations an
> element of the quotient `R/I` of a ring `R` by an ideal `I`, suffers from
> several problems and limitations. Most of these were uncovered while
> working on #13670 and #13675.
>
> * While {{{QuotientRingElement}}} aims to be generic, it contains code
> dedicated to the case where `R` is a multivariate polynomial ring. In
> particular, the implementation of division first checks if `R` supports
> the computation of Groebner bases. This is not the proper way to go ; a
> special class should be created, following the approach taken for
> univariate polynomial quotient rings ({{{PolynomialQuotientRing}}},
> {{{PolynomialQuotientRingElement}}}). We should create
> {{{MPolynomialQuotientRing}}} and {{{MPolynomialQuotientRingElement}}},
> and host multivariate-polynomial-specific code here.
>
> * The {{{is_unit()}}} function does almost nothing (it checks if its
> argument is a unit in `R`). In the case of (multivariate) polynomial
> rings, an actual test can be implemented.
>
> * The class lacks an {{{is_regular()}}} methods (that detects zero
> divisors).
>
> * In the case of (multivariate) polynomial rings, {{{is_regular()}}} can
> be implemented.
>
> * The interest of {{{is_regular()}}} is that division by `x` should only
> be allowed if `x` is regular.
>
> * The present implementation of division has problems. It contains
> multivariate-polynomial-specific code, which is bad. Furthermore, it
> allows division by zero-divisors, even tough the result is not defined :
> {{{
> sage: R.<x,y> = QQ[]
> sage: S = R.quotient_ring(R.ideal(x^2, y))
> sage: S(2*x)/S(x)
> S(2)
> sage: S(2) * S(x) == S(2*x) # indeed, division works correctly....
> True
> sage: S(2+x) * S(x) == S(2*x) # but several "quotients" are possible,
> because ``S(x)`` is a zero-divisor
> }}}
>
> In contrast, univariate polynomial rings behave more rigorously:
> {{{
> sage: P.<x> = QQ[]
> sage: S = P.quotient_ring(x^2)
> sage: S(2*x)/S(x)
> ZeroDivisionError: element xbar of quotient polynomial ring not
> invertible
> }}}
>
> * This raises the question of how we want division to proceed:
> * ignore the problem? (current status, no overhead)
> * test for regularity before dividing (mathematically better, may be
> '''much''' slower)
>
> * Clarifying all this would then open the possibility to have, for
> example, special code to deal with ideals given by a regular chain
> instead of a Groebner basis
>
> -----
>
> Apply
>
> 1. [[attachment:trac_13697.patch]]
New description:
The class {{{QuotientRingElement}}}, which implements the operations an
element of the quotient `R/I` of a ring `R` by an ideal `I`, suffers from
several problems and limitations. Most of these were uncovered while
working on #13670 and #13675.
* While {{{QuotientRingElement}}} aims to be generic, it contains code
dedicated to the case where `R` is a multivariate polynomial ring. In
particular, the implementation of division first checks if `R` supports
the computation of Groebner bases. This is not the proper way to go ; a
special class should be created, following the approach taken for
univariate polynomial quotient rings ({{{PolynomialQuotientRing}}},
{{{PolynomialQuotientRingElement}}}). We should create
{{{MPolynomialQuotientRing}}} and {{{MPolynomialQuotientRingElement}}},
and host multivariate-polynomial-specific code here.
* The {{{is_unit()}}} function does almost nothing (it checks if its
argument is a unit in `R`). In the case of (multivariate) polynomial
rings, an actual test can be implemented.
* The class lacks an {{{is_regular()}}} methods (that detects zero
divisors).
* In the case of (multivariate) polynomial rings, {{{is_regular()}}} can
be implemented.
* The interest of {{{is_regular()}}} is that division by `x` should only
be allowed if `x` is regular.
* The present implementation of division has problems. It contains
multivariate-polynomial-specific code, which is bad. Furthermore, it
allows division by zero-divisors, even tough the result is not defined :
{{{
sage: R.<x,y> = QQ[]
sage: S = R.quotient_ring(R.ideal(x^2, y))
sage: S(2*x)/S(x)
S(2)
sage: S(2) * S(x) == S(2*x) # indeed, division works correctly....
True
sage: S(2+x) * S(x) == S(2*x) # but several "quotients" are possible,
because ``S(x)`` is a zero-divisor
}}}
In contrast, univariate polynomial rings behave more rigorously:
{{{
sage: P.<x> = QQ[]
sage: S = P.quotient_ring(x^2)
sage: S(2*x)/S(x)
ZeroDivisionError: element xbar of quotient polynomial ring not
invertible
}}}
* This raises the question of how we want division to proceed:
* ignore the problem? (current status, no overhead)
* test for regularity before dividing (mathematically better, may be
'''much''' slower)
* Clarifying all this would then open the possibility to have, for
example, special code to deal with ideals given by a regular chain instead
of a Groebner basis
-----
Apply
1. [[attachment:trac_13697.patch]]
--
--
Ticket URL: <http://trac.sagemath.org/ticket/13697#comment:8>
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/groups/opt_out.