#15714: implement CFiniteSequence
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:  rws
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:  recurrence,        |    Merged in:
  sequence, ogf                      |    Reviewers:
        Authors:  Ralf Stephan       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  0656d07dfa6dfa57f78fb1c2cfb7572a3c842801
  public/ticket/15714                |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by rws):

 Please compare:
 {{{
 sage: fr = (x/(1+x)).fraction(QQ)
 sage: 1+fr
 (2*x + 1)/(x + 1)
 sage: type(_)
 <class
 'sage.rings.fraction_field_element.FractionFieldElement_1poly_field'>
 sage: fr+1
 (2*x + 1)/(x + 1)
 sage: type(_)
 <class
 'sage.rings.fraction_field_element.FractionFieldElement_1poly_field'>
 }}}
 versus
 {{{
 sage: R.<x> = PolynomialRing(QQ, 'x')
 sage: s = CFiniteSequence(x/(1+x))
 /home/ralf/sage/local/lib/python2.7/site-
 packages/sage/rings/cfinite_sequence.py:212: DeprecationWarning: This
 method is deprecated.
 See http://trac.sagemath.org/16201 for details.
   R.set_default_prec(alen)
 sage: s
 C-finite sequence, generated by x/(x + 1)
 sage: 1+s
 (2*x + 1)/(x + 1)
 sage: s+1
 C-finite sequence, generated by (2*x + 1)/(x + 1)
 sage: CFiniteSequence(1)+s
 C-finite sequence, generated by (2*x + 1)/(x + 1)
 }}}
 What do yu think is wrong there? (Will fix the deprecation warning)

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