Hi, I am finding problems, holes, or missing features in power series rings and Laurent series rings.
sage: K.<u> = LaurentSeriesRing(QQ) sage: R.<t> = 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) <type 'sage.rings.power_series_poly.PowerSeries_poly'> sage: type(u) <type 'sage.rings.laurent_series_ring_element.LaurentSeries'> 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 -~----------~----~----~----~------~----~------~--~---