#12612: Fix is_unit() in padics so that it is mathematically correct
-----------------------+----------------------------------------------------
   Reporter:  mmasdeu  |          Owner:  roed          
       Type:  defect   |         Status:  new           
   Priority:  minor    |      Milestone:  sage-5.0      
  Component:  padics   |       Keywords:  padics is_unit
Work_issues:           |       Upstream:  N/A           
   Reviewer:           |         Author:                
     Merged:           |   Dependencies:                
-----------------------+----------------------------------------------------
 Consider the following code:
 {{{
 sage: R = Qp(5,5)
 sage: S.<x> = PowerSeriesRing(R,3)
 sage: f=5+x
 sage: f**(-1)
 5^-1 + O(5^4) + (4*5^-2 + 4*5^-1 + 4 + 4*5 + 4*5^2 + O(5^3))*x + (5^-3 +
 O(5^2))*x^2 + O(x^3)
 sage: f.is_unit()
 False
 }}}

 This does not make mathematical sense, and the reason for this behavior is
 that is_unit() in `p`-adics does not return whether a given element can be
 inverted in its parent ring. Instead, it returns whether the element has
 valuation zero. Since the function is_unit() is used in generic algorithms
 (for instance when trying to invert a power series) it should return what
 its name promises.

 I attach a patch with corrected output and doctests.

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