#9457: power series equality fails when trailing coefficients are zero
-------------------------------------+-------------------------------------
       Reporter:  niles              |        Owner:  malb
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.2
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  niles              |  Work issues:  resolve problems with
Report Upstream:  N/A                |  sha_tate.py
         Branch:                     |       Commit:
  u/niles/ticket/9457                |  e2219602a9d360f465ad79b098e4f923765ab791
   Dependencies:                     |     Stopgaps:  #15748
-------------------------------------+-------------------------------------

Comment (by niles):

 Replying to [comment:29 wuthrich]:

 > I try to remember what happened 4 years ago.

 Thanks for putting this together :)

 >
 > So let's make a list - as there are several overlapping tickets and
 issues:
 >
 > * (see #4656) is_zero is broken for power series. This causes your
 {{{QpT( O(5^-1))}}} to print as zero. It remembers that it is not, if you
 have .list you see its first coefficient is still {{{O(5^-1)}}}. We should
 change {{{__nonzero__}}} in power_series_poly.pyx
 >

 #5075 addresses this too -- the patch there introduces 3 concepts of zero:
 exact zero (infinite precision), maximally zero (zero to maximal precision
 allowed by parent ring), and inexact zero (zero to precision less than
 maximal precision).  These are used to define some functions that are
 equal to degree for polynomials over exact rings, but more subtle over
 inexact rings, and these functions, in turn, are used to fix other
 functions . . .

 In short, that ticket seems to me like a good place to start.

 > * (see #4656, too) power series compare wrongly. Your suggestion to use
 padded_list above is better than what I tried to do in the other ticket.
 That is cmp in power_series_ring_element.pyx

 `padded_list` works, but is substantially slower.  In the latest commit
 here, I have a more direct fix.  The patch at #5075 also has a fix that
 looks similar to mine, but I didn't compare them closely.

 >
 > * (see #4656) power series also print wrongly. You would expect the
 inexact coefficients of the form {{{O(p^2)}}} to print, too. I tried to
 change that in the other ticket. That is {{{_repr_}}} in
 power_series_ring_element.pyx
 >

 #5075 may address this too, at least judging by how some of the new
 doctests appear.

 > * (see #8198) Matrix multiplication on p-adics looses precision. I
 believe that is the heart of the problem for getting the right answer for
 this Dp_series. If I understand correctly you have spotted the same thing
 above.

 This might be right . . . in my calculation above, the input to the
 vector*matrix multiplication is wrong, so I can't tell whether the matrix
 multiplication would also go wrong or not.

 >
 > * There is also #5075 which I have never looked at myself.

 I think we should go there :)

 >
 > We could take the out the doc-string in sha-tate out for now, so that
 this and #4656 can be closed. Then reintroduce it if we can fix #8198.

 Hmmm . . . that doctest is holding up some pretty reasonable fixes, but
 it's also the only reason that we noticed these padic problems in the
 first place so I'm extremely reluctant to take it out.  I think it is
 especially bad to take it out before we fully understand where the
 problems are coming from.

--
Ticket URL: <http://trac.sagemath.org/ticket/9457#comment:30>
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.

Reply via email to