#9457: power series equality fails when trailing coefficients are zero
-------------------------------------+-------------------------------------
       Reporter:  niles              |        Owner:  malb
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.1
      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
-------------------------------------+-------------------------------------
Changes (by niles):

 * stopgaps:   => #15748


Old description:

> Comparison of power series uses `list` instead of `padded_list`.  This
> drops trailing zeros, and means that power series equality is buggy:
>
> {{{
> sage: A.<t> = PowerSeriesRing(ZZ)
> sage: g = t + t^3 + t^5 + O(t^6); g
> t + t^3 + t^5 + O(t^6)
> sage: [g == g.add_bigoh(i) for i in range(7)]    # these should all be
> True
> [True, False, True, False, True, False, True]
>
> sage: g.add_bigoh(3).list()  # drops trailing zero
> [0, 1]
> sage: g.add_bigoh(3).padded_list()
> [0, 1, 0]
> }}}
>
> == Apply ==
>
> * [attachment:trac_9457_power_series_eq_rebase.patch]

New description:

 Comparison of power series uses `list` instead of `padded_list`.  This
 drops trailing zeros, and means that power series equality is buggy:

 {{{
 sage: A.<t> = PowerSeriesRing(ZZ)
 sage: g = t + t^3 + t^5 + O(t^6); g
 t + t^3 + t^5 + O(t^6)
 sage: g == t + O(t^3)   # should be True
 False

 sage: [g == g.add_bigoh(i) for i in range(7)]    # these should all be
 True
 [True, False, True, False, True, False, True]

 sage: g.add_bigoh(3).list()  # drops trailing zero
 [0, 1]
 sage: g.add_bigoh(3).padded_list()
 [0, 1, 0]
 }}}

--

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