#10085: The gen() method for power series over power series works incorrectly
-----------------------------------+-----------------------------
       Reporter:  schilly          |        Owner:  sage-combinat
           Type:  defect           |       Status:  new
       Priority:  major            |    Milestone:  sage-6.4
      Component:  combinatorics    |   Resolution:
       Keywords:  LazyPowerSeries  |    Merged in:
        Authors:                   |    Reviewers:
Report Upstream:  N/A              |  Work issues:
         Branch:                   |       Commit:
   Dependencies:                   |     Stopgaps:
-----------------------------------+-----------------------------
Description changed by chapoton:

Old description:

> If I type the following:
> {{{
> S1 = LazyPowerSeriesRing(ZZ)
> S2 = LazyPowerSeriesRing(S1)
> y = S2.gen()
> y.coefficient(1) == 1
> }}}
> I get True, and
> {{{
> y.coefficient(1).coefficient(0)
> }}}
> gets me the "'int' object has no attribute 'coefficient'" error message.
>
> I solved the problem by changing the following line in the gen() method:
> {{{
> res = self._new_initial(1, Stream([0,1,0]))
> }}}
> by
> {{{
> res = self.term(1, 1)
> }}}
>
> The coefficient of order 1 in the series y should not be the integer 1,
> but the power series [1, 0, ...] in S1.

New description:

 If I type the following:
 {{{
 S1 = LazyPowerSeriesRing(ZZ)
 S2 = LazyPowerSeriesRing(S1)
 y = S2.gen()
 y.coefficient(1) == 1
 }}}
 I get True, and
 {{{
 y.coefficient(1).coefficient(0)
 }}}
 gets me the "'int' object has no attribute 'coefficient'" error message.

 I solved the problem by changing the following line in the gen() method:
 {{{
 res = self._new_initial(1, Stream([0,1,0]))
 }}}
 by
 {{{
 res = self.term(1, 1)
 }}}

 The coefficient of order 1 in the series y should not be the integer 1,
 but the power series [1, 0, ...] in S1.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/10085#comment:9>
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/d/optout.

Reply via email to