# Ticket #9467: 14329.patch

File 14329.patch, 8.5 KB (added by jen, 12 years ago)
• ## sage/modular/abvar/abvar.py

# HG changeset patch
# User Jen Balakrishnan <jen@math.mit.edu>
# Date 1278706571 25200
# Node ID 9e6c9dd499ff08c036f04a17639e166084c04c6b
# Parent  12b029c403261077dca4fae35c5f3291b1be1fdd
Trac #9467: p-adic l-series associated to modular Jacobians

A first attempt at merging the p-adic L-series code from Sage Days 22

diff -r 12b029c40326 -r 9e6c9dd499ff sage/modular/abvar/abvar.py
 a import homology import homspace import lseries #import lseries import padics def is_ModularAbelianVariety(x): """ self.__lseries = lseries.Lseries_complex(self) return self.__lseries def padic_lseries(self, p): """ Return the p-adic L-series of this modular abelian variety. EXAMPLES:: sage: A = J0(37) sage: A.padic_lseries(7) 7-adic L-series attached to Abelian variety J0(37) of dimension 2 """ p = int(p) try: return self.__lseries_padic[p] except AttributeError: self.__lseries_padic = {} except KeyError: pass self.__lseries_padic[p] = lseries.Lseries_padic(self, p) return self.__lseries_padic[p] padic_lseries = padics.padic_lseries #    def padic_lseries(self, p): #        """ #        Return the p-adic L-series of this modular #        abelian variety. # #        EXAMPLES:: # #            sage: A = J0(37) #            sage: A.padic_lseries(7) #            7-adic L-series attached to Abelian variety J0(37) of dimension 2 #        """ #        p = int(p) #        try: #            return self.__lseries_padic[p] #        except AttributeError: #            self.__lseries_padic = {} #        except KeyError: #            pass #        self.__lseries_padic[p] = lseries.Lseries_padic(self, p) #        self.__lseries_padic[p] = lseries.pAdicLseries(self,p) #        return self.__lseries_padic[p] ############################################################################### # Hecke Operators else: # The hard case -- now we have to pull back the # factorization # Suppose $B$ is an abelian variety and there is a # finite degree map $B\to J$, where $J$ is an ambient # Jacobian.  Suppose further that we find abelian
• ## sage/modular/abvar/lseries.py

diff -r 12b029c40326 -r 9e6c9dd499ff sage/modular/abvar/lseries.py
 a raise NotImplementedError class Lseries_padic(Lseries): """ A p-adic L-series attached to a modular abelian variety. """ def __init__(self, abvar, p): """ Create a p-adic L-series. #class pAdicLseries(SageObject): #    """ #    A p-adic L-series attached to a modular abelian variety. #    """ #    def __init__(self, abvar, p): #        """ #        Create a p-adic L-series. # #        EXAMPLES:: # #            sage: J0(37)[0].padic_lseries(389) #            389-adic L-series attached to Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37) #        """ #        Lseries.__init__(self, abvar) #        p = Integer(p) #        if not p.is_prime(): #            raise ValueError, "p (=%s) must be prime"%p #        self.__p = p # #    def __cmp__(self, other): #        """ #        Compare this p-adic L-series to another one. # #        First the abelian varieties are compared; if they are the same, #        then the primes are compared. # #        INPUT: #            other -- object # #        OUTPUT: #            -1, 0, or 1 # #        EXAMPLES:: # #            sage: L = J0(37)[0].padic_lseries(5); M = J0(37)[1].padic_lseries(5) #            sage: K = J0(37)[0].padic_lseries(3) #            sage: cmp(L,K) #            1 #            sage: cmp(K,L) #            -1 #            sage: K < L #            True #            sage: cmp(L,M) #            -1 #            sage: cmp(M,L) #            1 #            sage: cmp(L,L) #            0 #        """ #        if not isinstance(other, pAdicLseries): #            return cmp(type(self), type(other)) #        return cmp((self.abelian_variety(), self.__p), #                   (other.abelian_variety(), other.__p)) EXAMPLES:: #    def prime(self): #        """ #        Return the prime p of this p-adic L-series. # #        EXAMPLES:: # #            sage: J0(11).padic_lseries(7).prime() #            7 #        """ #        return self.__p #    def _repr_(self): #        """ #        String representation of this p-adic L-series. # #        EXAMPLES:: # #            sage: L = J0(37)[0].padic_lseries(5) #            sage: L._repr_() #            '5-adic L-series attached to Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37)' #        """ #        return "%s-adic L-series attached to %s"%(self.__p, self.abelian_variety()) sage: J0(37)[0].padic_lseries(389) 389-adic L-series attached to Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37) """ Lseries.__init__(self, abvar) p = Integer(p) if not p.is_prime(): raise ValueError, "p (=%s) must be prime"%p self.__p = p def __cmp__(self, other): """ Compare this p-adic L-series to another one. First the abelian varieties are compared; if they are the same, then the primes are compared. INPUT: other -- object OUTPUT: -1, 0, or 1 EXAMPLES:: sage: L = J0(37)[0].padic_lseries(5); M = J0(37)[1].padic_lseries(5) sage: K = J0(37)[0].padic_lseries(3) sage: cmp(L,K) 1 sage: cmp(K,L) -1 sage: K < L True sage: cmp(L,M) -1 sage: cmp(M,L) 1 sage: cmp(L,L) 0 """ if not isinstance(other, Lseries_padic): return cmp(type(self), type(other)) return cmp((self.abelian_variety(), self.__p), (other.abelian_variety(), other.__p)) def prime(self): """ Return the prime p of this p-adic L-series. EXAMPLES:: sage: J0(11).padic_lseries(7).prime() 7 """ return self.__p def power_series(self, n=2, prec=5): """ Return the n-th approximation to this p-adic L-series as a power series in T.  Each coefficient is a p-adic number whose precision is provably correct. NOTE: This is not yet implemented. EXAMPLES:: sage: L = J0(37)[0].padic_lseries(5) sage: L.power_series() Traceback (most recent call last): ... NotImplementedError sage: L.power_series(3,7) Traceback (most recent call last): ... NotImplementedError """ raise NotImplementedError def _repr_(self): """ String representation of this p-adic L-series. EXAMPLES:: sage: L = J0(37)[0].padic_lseries(5) sage: L._repr_() '5-adic L-series attached to Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37)' """ return "%s-adic L-series attached to %s"%(self.__p, self.abelian_variety())
• ## sage/schemes/elliptic_curves/ell_rational_field.py

diff -r 12b029c40326 -r 9e6c9dd499ff sage/schemes/elliptic_curves/ell_rational_field.py
 a return M padic_lseries = padics.padic_lseries def newform(self): r""" Same as self.modular_form(). ################################################################################# # p-adic functions ################################################################################# padic_regulator = padics.padic_regulator padic_height_pairing_matrix = padics.padic_height_pairing_matrix