#9457: power series comparison should use padded_list
-------------------------------------+-------------------------------------
       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:
-------------------------------------+-------------------------------------

Old description:

> Comparison of power series uses list instead of padded_list; this means
> that power series equality can fail:
>
> {{{
> 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)]
> [True, False, True, False, True, False, True]
> sage: g.add_bigoh(3).list()
> [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 == 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]

--

Comment (by niles):

 I had hoped the changes at #12555 would magically resolve this, but they
 do not.  The other related tickets, listed in comment [comment:14]  are
 also not fixed by #12555.

 Note that the current version of the git branch for this ticket (commit
 e221960) does *not* include the changes of #12555, although the initial
 version mistakenly did.

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