Coverage for local/lib/python2.7/site-packages/sage/modular/abvar/abvar_newform.py : 70%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Abelian varieties attached to newforms
TESTS::
sage: A = AbelianVariety('23a') sage: loads(dumps(A)) == A True """ from __future__ import absolute_import
########################################################################### # Copyright (C) 2008 William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public License (GPL) # # http://www.gnu.org/licenses/ # ###########################################################################
from sage.databases.cremona import cremona_letter_code
from sage.rings.all import QQ, ZZ
from sage.modular.modform.element import Newform from sage.modular.arithgroup.all import is_Gamma0, is_Gamma1, is_GammaH
from .abvar import ModularAbelianVariety_modsym_abstract from . import homspace
class ModularAbelianVariety_newform(ModularAbelianVariety_modsym_abstract): """ A modular abelian variety attached to a specific newform. """ def __init__(self, f, internal_name=False): """ Create the modular abelian variety `A_f` attached to the newform `f`.
INPUT: f -- a newform
EXAMPLES::
sage: f = CuspForms(37).newforms('a')[0] sage: f.abelian_variety() Newform abelian subvariety 37a of dimension 1 of J0(37)
sage: AbelianVariety(Newforms(1, 12)[0]) Traceback (most recent call last): ... TypeError: f must have weight 2 """ raise TypeError("f must be a newform") else: is_simple=True, newform_level = (f.level(), f.group()), isogeny_number=f.number(), number=0)
def _modular_symbols(self,sign=0): """ EXAMPLES::
sage: f = CuspForms(52).newforms('a')[0] sage: A = f.abelian_variety() sage: A._modular_symbols() Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 15 for Gamma_0(52) of weight 2 with sign 0 over Rational Field sage: A._modular_symbols(1) Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 10 for Gamma_0(52) of weight 2 with sign 1 over Rational Field sage: A._modular_symbols(-1) Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 5 for Gamma_0(52) of weight 2 with sign -1 over Rational Field """
def newform(self, names=None): r""" Return the newform that this modular abelian variety is attached to.
EXAMPLES::
sage: f = Newform('37a') sage: A = f.abelian_variety() sage: A.newform() q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + O(q^6) sage: A.newform() is f True
If the a variable name has not been specified, we must specify one::
sage: A = AbelianVariety('67b') sage: A.newform() Traceback (most recent call last): ... TypeError: You must specify the name of the generator. sage: A.newform('alpha') q + alpha*q^2 + (-alpha - 3)*q^3 + (-3*alpha - 3)*q^4 - 3*q^5 + O(q^6)
If the eigenform is actually over `\QQ` then we don't have to specify the name::
sage: A = AbelianVariety('67a') sage: A.newform() q + 2*q^2 - 2*q^3 + 2*q^4 + 2*q^5 + O(q^6) """
def label(self): """ Return canonical label that defines this newform modular abelian variety.
OUTPUT: string
EXAMPLES::
sage: A = AbelianVariety('43b') sage: A.label() '43b' """ elif is_Gamma1(G): group = 'G1' elif is_GammaH(G): group = 'GH[' + ','.join([str(z) for z in G._generators_for_H()]) + ']'
def factor_number(self): """ Return factor number.
OUTPUT: int
EXAMPLES::
sage: A = AbelianVariety('43b') sage: A.factor_number() 1 """
def _repr_(self): """ String representation of this modular abelian variety.
EXAMPLES::
sage: AbelianVariety('37a')._repr_() 'Newform abelian subvariety 37a of dimension 1 of J0(37)' """ self.newform_label(), self.dimension(), self._ambient_repr())
def endomorphism_ring(self): """ Return the endomorphism ring of this newform abelian variety.
EXAMPLES::
sage: A = AbelianVariety('23a') sage: E = A.endomorphism_ring(); E Endomorphism ring of Newform abelian subvariety 23a of dimension 2 of J0(23)
We display the matrices of these two basis matrices::
sage: E.0.matrix() [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1] sage: E.1.matrix() [ 0 1 -1 0] [ 0 1 -1 1] [-1 2 -2 1] [-1 1 0 -1]
The result is cached::
sage: E is A.endomorphism_ring() True """
def _calculate_endomorphism_generators(self): """ EXAMPLES::
sage: A = AbelianVariety('43b') sage: B = A.endomorphism_ring(); B # indirect doctest Endomorphism ring of Newform abelian subvariety 43b of dimension 2 of J0(43) sage: [b.matrix() for b in B.gens()] [ [1 0 0 0] [ 0 1 0 0] [0 1 0 0] [ 1 -2 0 0] [0 0 1 0] [ 1 0 -2 -1] [0 0 0 1], [ 0 1 -1 0] ] """
for i in range(1,d+1)])
|