#13670: Inversion in polynomial quotient rings could give clearer error message
when element is non-invertible
---------------------------------------+------------------------------------
Reporter: Bouillaguet | Owner: malb
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-5.5
Component: commutative algebra | Resolution:
Keywords: polynomial rings | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Charles Bouillaguet | Merged in:
Dependencies: #13671 | Stopgaps:
---------------------------------------+------------------------------------
Changes (by mstreng):
* priority: major => minor
* status: needs_review => needs_work
Old description:
> {{{
> sage: R.<x1,x2> = QQ[]
> sage: S = R.quotient_ring( R.ideal(x2**2 + x1 - 2, x1**2 - 1) )
> sage:
> sage: 1 / S(x1 + x2)
> ...
> NotImplementedError:
> }}}
>
> In fact, the element is non-invertible. The test used to check for
> invertibility is correct and complete, so we should return a
> "!ValueError: Non-invertible exception" instead.
New description:
As of #13671, we have
{{{
sage: R.<x1,x2> = QQ[]
sage: S = R.quotient_ring( R.ideal(x2**2 + x1 - 2, x1**2 - 1) )
sage:
sage: 1 / S(x1 + x2)
...
ValueError: polynomial is not in the ideal
}}}
Before #13671, it was worse: !NotImplementedError.
This can be clarified.
--
Comment:
There's a problem with the documentation in the patch: "that when the
error message actually describes what happens when division is not
possible"
You can also be more precise than "not possible" in the string of the
Error. How about "Left hand side is not a multiple of right hand side in
quotient ring element division". My problem is that "not possible" is
vague and can mean many other things, such as non-uniqueness, a
computability problem, or a practical problem.
And then there is the following problem (which was there already). For
most rings, only unique division is allowed, and non-unique divisions give
a {{{ZeroDivisionError}}}:
{{{
sage: 0/0 # every integer a satisfies 0*a=0, so we don't give an answer at
all
ZeroDivisionError: Rational division by zero
sage: L = Zmod(8)(4); R = Zmod(8)(2)
sage: L/R # both a=(2 mod 8) a=(6 mod 8) satisfy a*R=L, so we don't give
an answer at all
ZeroDivisionError: Inverse does not exist.
sage: R.<x,y> = QQ[]
sage: S = R.quotient_ring(R.ideal(x^2, y))
sage: 0/S(x) #any polynomial p with p(0)=0 satisfies p*S(x)=0 in S, but
still we output one such element
0
}}}
Obviously you don't have to do anything with this non-uniqueness at this
ticket, which is just about clarifying errors.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13670#comment:2>
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.