David says in the docstring for a possible log() function " TODO:
verify that the base ring is a QQ-algebra."  Now I recall reading
(quite recent) papers of Morain et al on computing isogenies between
elliptic curves over finite fields where it is useful to be able to
take truncated logs of power series where the truncation occurs early
enough that division by the characteristic does not happen.  Is it
possible to allow for that in a mathematically consistent way?

John

2009/3/14 William Stein <wst...@gmail.com>:
>
> On Fri, Mar 13, 2009 at 5:00 PM, David Kohel <drko...@gmail.com> wrote:
>>
>> 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?
>
> At least two different people probably implemented the code.  You
> might start up sage and type
>
>  sage: hg_sage.browse()
>
> or go to
>
> http://hg.sagemath.org/sage-main/file/5c72dbb92d82/sage/rings
>
> and start browsing around so you can see exactly who edited the files
> you're looking at and when. You can also do the following at the
> command line in the rings directory to see the history of any given
> file:
>
> $ hg log laurent_series_ring.py |more
>
>
> changeset:   11695:3e8e9cdd9715
> user:        Mike Hansen <mhan...@gmail.com>
> date:        Tue Feb 24 09:13:31 2009 -0800
> summary:     Converting sage.rings.* docstrings to Sphinx
>
> changeset:   8413:f4aeaf9e22c6
> user:        Martin Albrecht <m...@informatik.uni-bremen.de>
> date:        Sun Jan 20 16:44:08 2008 +0000
> summary:     allow rational functions to be coerced into
> LaurentSeriesRings (fixes 1/3 of #1793)
>
> changeset:   5481:1fb33b78a725
> user:        Robert Bradshaw <rober...@math.washington.edu>
> date:        Wed Jul 18 01:35:31 2007 -0700
> summary:     Fix mathematical error I stupidly introduced
>
> You can do
>
> $ hg export 8413
>
> to see the actual 8413 patch (say).
>
>>
>> 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) ])
>> }}}
>> >
>>
>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to