[sage-devel] Power series rings

2009-03-13 Thread David Kohel

Hi,

I am finding problems, holes, or missing features in power series
rings
and Laurent series rings.

sage: K. = LaurentSeriesRing(QQ)
sage: R. = PowerSeriesRing(QQ)

1. exp(t) is defined but exp(u) is not.
2. log(1 - t) and log(1-u)  -- I started filling in this gap (below)
for
Laurent series but ran into more problems.
3. coercion to R does not work (R(u) fails trying to coerce to QQ).

The style of implementations of source code look completely
independent.
I would like to have R == K.ring_of_integers() be defined and True
(maybe
if I call the variables the same).  But the lack of coercion suggests
that
these where not designed together, as do the functions for creating
error
terms O(t^n).

The names of the files hint at a design break:

sage: type(t)

sage: type(u)


Now there also exists a power_series_ring_element file, but it
implements
a class PowerSeries inheritted from PowerSeries_poly (in a separate
file).
There is also a power_series_mpoly, which must either be an attempt
at
multivariate power series or a sparse power series.

Is there a reason for this split, and if so, why do Laurent series not
follow
the same dichotomy?

I think I need to understand what is intended before hacking around
all
of these classes.

Cheers,
David

P.S. A first start with log -- is there a more efficient algorithm
already
implemented somewhere or does someone want to put in place a more
efficient algorithm?

{{{
def log
(self):
 
"""
The logarithm of the power series t, which must be in a
neighborhood of 1.

TODO: verify that the base ring is a QQ-algebra.
 
"""
u =
self-1
if u.valuation() <=
0:
raise AttributeError, "Argument t must satisfy val(t-1) >
0."
N = self.prec
()
if isinstance(N,
sage.rings.infinity.PlusInfinity):
N = self.parent().default_prec
()
u.add_bigoh
(N)
err = LaurentSeries(self.parent(), 0, 0).add_bigoh
(N)
return sum([ u**k/k + err for k in range
(1,N) ])
}}}
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Power series rings

2007-11-16 Thread David Roe
Hey all,
At some point in the near future I may try to bring the implementation of
power series rings more into line with the p-adics.  The single variable
case seems straightforward, but a something popped up for me when thinking
about the multivariable case.

What is the appropriate analogue of laurent series?  Is the key point for
laurent series that we allow bounded negative exponents?   Or that it's a
field?  Because allowing bounded negative exponents is not enough to always
have inverses: x + y has no inverse if we require the exponents of x and y
to be bounded away from negative infinity.
David

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---