#14425: Incorrect/inconsistent treatment of inexact zeroes in coefficients of 
power
series
-------------------------+--------------------------------------------------
   Reporter:  robharron  |             Owner:  roed                           
       Type:  defect     |            Status:  new                            
   Priority:  major      |         Milestone:  sage-5.10                      
  Component:  padics     |          Keywords:  padics, power series, precision
Work issues:             |   Report Upstream:  N/A                            
  Reviewers:             |           Authors:                                 
  Merged in:             |      Dependencies:                                 
   Stopgaps:             |  
-------------------------+--------------------------------------------------
 p-adic coefficients: first of all, the way an inexact zero is treated is
 different based on whether one is working with capped-absolute or capped-
 relative coefficients:

 {{{
 sage: R = ZpCA(3,5)
 sage: PS.<z> = PowerSeriesRing(R)
 sage: F = PS([1,2,3,O(3^3)])
 sage: F
 1 + O(3^5) + (2 + O(3^5))*z + (3 + O(3^5))*z^2
 sage: F.list()
 [1 + O(3^5), 2 + O(3^5), 3 + O(3^5)]
 sage: F.coefficients()
 [1 + O(3^5), 2 + O(3^5), 3 + O(3^5)]
 sage: F[3]
 O(3^5)
 }}}

 whereas the capped-relative p-adics (almost) behave as I would hope:

 {{{
 sage: RCR = ZpCR(3,5)
 sage: PSCR.<w> = PowerSeriesRing(RCR)
 sage: G = PSCR([1,2,3,O(3^3)])
 sage: G
 1 + O(3^5) + (2 + O(3^5))*w + (3 + O(3^6))*w^2 + O(3^3)*w^3
 sage: G.list()
 [1 + O(3^5), 2 + O(3^5), 3 + O(3^6), O(3^3)]
 sage: G.coefficients()
 [1 + O(3^5), 2 + O(3^5), 3 + O(3^6)]
 sage: G[3]
 0
 }}}

 This last command should return `O(3^3)`, but returns an exact zero
 because if n > degree of the underlying polynomial of G, then G[n] returns
 an exact zero. Really, it should just return `self.__f[n]` in all cases.

 The case of power series rings is similar to the capped-absolute case
 (unfortunately):

 {{{
 sage: S.<t> = PowerSeriesRing(ZZ)
 sage: c = S(0,3)
 sage: PSS.<u> = PowerSeriesRing(S)
 sage: H = PSS([t,2,3,c], 5)
 sage: H
 t + 2*u + 3*u^2 + O(u^5)
 sage: H.list()
 [t, 2, 3]
 sage: H.coefficients()
 [t, 2, 3]
 sage: H[3]
 0
 }}}

 These problems I think trace back to the way the underlying polynomial
 treats things, and I think some people are working to revamp polynomials
 over inexact rings, but I wanted to point out these problems. For
 instance, some of these I think can be solved without change the
 polynomial code.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14425>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to