#13670: Inversion in polynomial quotient rings could give clearer error message
when element is non-invertible
---------------------------------------+------------------------------------
       Reporter:  Bouillaguet          |         Owner:  malb        
           Type:  enhancement          |        Status:  needs_review
       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:              
---------------------------------------+------------------------------------

Comment (by Bouillaguet):

 Replying to [comment:7 mstreng]:
 > It's not just a problem of dividing 0 by something. If you try to
 compute {{{S(2x)/S(x)}}}, then you have the same problem: the answer is
 non-unique, so the univariate case gives a !ZeroDivisionError, while the
 multivariate case gives the answer {{{S(2)}}} where {{{S(2+x)}}} is
 equally correct.

 So, if I understand correctly, division by `f` should only be allowed if
 `f` has an inverse in `R/I`. Is that correct?

 Thinking about this file more generally : most of the functions in this
 file are completely generic and do not depend on what `R` and `I` are.
 However there are a few exceptions to this :

 * {{{is_unit()}}}. Currently does almost nothing. Could possibly be
 improved while staying generic by trying the {{{inverse_mod}}} method of
 the parent ring `R`.

 * {{{_div_}}}. Currently does something specific when `R` is a polynomial
 ring (computing a Gröbner basis, etc.), and something generic in other
 cases (multiplying the numerator by the inverse of the denominator, using
 the {{{inverse_mod}}} function of `R`).

 {{{__invert__}}} is somewhat generic: it tries to use the
 {{{inverse_mod}}} function of `R`, and if this is {{{NotImplemented}}},
 then it tries {{{_div_}}}. This is bizarre, because in the end it will
 also fall back to {{{inverse_mod}}}, except when `R` is a polynomial ring,
 but these now have the {{{inverse_mod function}}} thanks to #13675.

 So, maybe this ticket could become "Various Small Improvements to
 !QuotientRingElement", and could implement:
 * the improvement to the error message already discussed above
 * small improvement to the {{{is_unit}}} function
 * small improvement to the {{{_div_}}} function

 I also wonder whether it is the Right Thing to have polynomial-specific
 code here...

 Ch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13670#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 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