William Stein <wst...@gmail.com> writes:

> On Mon, Dec 7, 2009 at 11:04 AM, Matt Bainbridge
> <bainbridge.m...@gmail.com> wrote:
>> Thanks, William!
>>
>> I guess so far it only works over Q?
>>
>> --Matt
>>
>
> It calls off to PARI, so it probably works (or can trivially be made
> to work) over any base that PARI supports.   

In case it doesn't and you really really need it, and there is no other way to 
do it, you could call
the fricas implementation for lazy power series.  Eg: (WARNING: ASCII art 
follows)

sage: X=fricas('monomial(1,1)$UnivariateTaylorSeries(SquareMatrix(2, PrimeField 
7), x, 0)')
sage: X
x
sage: s = 4*(fricas.recip(1-2*X)-1)
sage: s

      +2  0+ 2   +4  0+ 3    4   +2  0+ 5   +4  0+ 6    7   +2  0+ 8   +4  0+ 9 
   10      11
  x + |    |x  + |    |x  + x  + |    |x  + |    |x  + x  + |    |x  + |    |x  
+ x   + O(x  )
      +0  2+     +0  4+          +0  2+     +0  4+          +0  2+     +0  4+
sage: t = fricas.revert(s)
sage: t

      +5  0+ 2   +4  0+ 3    4   +2  0+ 5   +3  0+ 6    7   +5  0+ 8   +4  0+ 9 
   10      11
  x + |    |x  + |    |x  - x  + |    |x  + |    |x  + x  + |    |x  + |    |x  
- x   + O(x  )
      +0  5+     +0  4+          +0  2+     +0  3+          +0  5+     +0  4+
sage: fricas.elt(t,s)

         11
  x + O(x  )
sage: fricas.coefficient(t, 100)

  +6  0+
  |    |
  +0  6+


(Unfortunately, the sage wrapper is not very polished... The computations 
should be pretty fast
though.)

Martin

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to