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
""" Spaces of homomorphisms between modular abelian varieties
EXAMPLES:
First, we consider J0(37). This Jacobian has two simple factors, corresponding to distinct newforms. These two intersect nontrivially in J0(37).
::
sage: J = J0(37) sage: D = J.decomposition() ; D [ Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37), Simple abelian subvariety 37b(1,37) of dimension 1 of J0(37) ] sage: D[0].intersection(D[1]) (Finite subgroup with invariants [2, 2] over QQ of Simple abelian subvariety 37a(1,37) of dimension 1 of J0(37), Simple abelian subvariety of dimension 0 of J0(37))
As an abstract product, since these newforms are distinct, the corresponding simple abelian varieties are not isogenous, and so there are no maps between them. The endomorphism ring of the corresponding product is thus isomorphic to the direct sum of the endomorphism rings for each factor. Since the factors correspond to abelian varieties of dimension 1, these endomorphism rings are each isomorphic to ZZ.
::
sage: Hom(D[0],D[1]).gens() () sage: A = D[0] * D[1] ; A Abelian subvariety of dimension 2 of J0(37) x J0(37) sage: A.endomorphism_ring().gens() (Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(37) x J0(37), Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(37) x J0(37)) sage: [ x.matrix() for x in A.endomorphism_ring().gens() ] [ [1 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0] [0 0 0 0] [0 0 1 0] [0 0 0 0], [0 0 0 1] ]
However, these two newforms have a congruence between them modulo 2, which gives rise to interesting endomorphisms of J0(37).
::
sage: E = J.endomorphism_ring() sage: E.gens() (Abelian variety endomorphism of Abelian variety J0(37) of dimension 2, Abelian variety endomorphism of Abelian variety J0(37) of dimension 2) sage: [ x.matrix() for x in E.gens() ] [ [1 0 0 0] [ 0 1 1 -1] [0 1 0 0] [ 1 0 1 0] [0 0 1 0] [ 0 0 -1 1] [0 0 0 1], [ 0 0 0 1] ] sage: (-1*E.gens()[0] + E.gens()[1]).matrix() [-1 1 1 -1] [ 1 -1 1 0] [ 0 0 -2 1] [ 0 0 0 0]
Of course, these endomorphisms will be reflected in the Hecke algebra, which is in fact the full endomorphism ring of J0(37) in this case::
sage: J.hecke_operator(2).matrix() [-1 1 1 -1] [ 1 -1 1 0] [ 0 0 -2 1] [ 0 0 0 0] sage: T = E.image_of_hecke_algebra() sage: T.gens() (Abelian variety endomorphism of Abelian variety J0(37) of dimension 2, Abelian variety endomorphism of Abelian variety J0(37) of dimension 2) sage: [ x.matrix() for x in T.gens() ] [ [1 0 0 0] [ 0 1 1 -1] [0 1 0 0] [ 1 0 1 0] [0 0 1 0] [ 0 0 -1 1] [0 0 0 1], [ 0 0 0 1] ] sage: T.index_in(E) 1
Next, we consider J0(33). In this case, we have both oldforms and newforms. There are two copies of J0(11), one for each degeneracy map from J0(11) to J0(33). There is also one newform at level 33. The images of the two degeneracy maps are, of course, isogenous.
::
sage: J = J0(33) sage: D = J.decomposition() sage: D [ Simple abelian subvariety 11a(1,33) of dimension 1 of J0(33), Simple abelian subvariety 11a(3,33) of dimension 1 of J0(33), Simple abelian subvariety 33a(1,33) of dimension 1 of J0(33) ] sage: Hom(D[0],D[1]).gens() (Abelian variety morphism: From: Simple abelian subvariety 11a(1,33) of dimension 1 of J0(33) To: Simple abelian subvariety 11a(3,33) of dimension 1 of J0(33),) sage: Hom(D[0],D[1]).gens()[0].matrix() [ 0 1] [-1 0]
Then this gives that the component corresponding to the sum of the oldforms will have a rank 4 endomorphism ring. We also have a rank one endomorphism ring for the newform 33a (since it is again 1-dimensional), which gives a rank 5 endomorphism ring for J0(33).
::
sage: DD = J.decomposition(simple=False) ; DD [ Abelian subvariety of dimension 2 of J0(33), Abelian subvariety of dimension 1 of J0(33) ] sage: A, B = DD sage: A == D[0] + D[1] True sage: A.endomorphism_ring().gens() (Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33), Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33), Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33), Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33)) sage: B.endomorphism_ring().gens() (Abelian variety endomorphism of Abelian subvariety of dimension 1 of J0(33),) sage: E = J.endomorphism_ring() ; E.gens() # long time (3s on sage.math, 2011) (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3)
In this case, the image of the Hecke algebra will only have rank 3, so that it is of infinite index in the full endomorphism ring. However, if we call this image T, we can still ask about the index of T in its saturation, which is 1 in this case.
::
sage: T = E.image_of_hecke_algebra() # long time sage: T.gens() # long time (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3) sage: T.index_in(E) # long time +Infinity sage: T.index_in_saturation() # long time 1
AUTHORS:
- William Stein (2007-03)
- Craig Citro, Robert Bradshaw (2008-03): Rewrote with modabvar overhaul """
#***************************************************************************** # Copyright (C) 2007 William Stein <wstein@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # http://www.gnu.org/licenses/ #*****************************************************************************
from __future__ import absolute_import
from copy import copy
from sage.categories.homset import HomsetWithBase from sage.structure.all import parent from sage.misc.lazy_attribute import lazy_attribute
from . import morphism
import sage.rings.integer_ring import sage.rings.all
from sage.rings.ring import Ring from sage.matrix.matrix_space import MatrixSpace from sage.matrix.constructor import Matrix, identity_matrix from sage.structure.element import is_Matrix
ZZ = sage.rings.integer_ring.ZZ
class Homspace(HomsetWithBase): """ A space of homomorphisms between two modular abelian varieties. """ Element = morphism.Morphism def __init__(self, domain, codomain, cat): """ Create a homspace.
INPUT:
- ``domain, codomain`` - modular abelian varieties
- ``cat`` - category
EXAMPLES::
sage: H = Hom(J0(11), J0(22)); H Space of homomorphisms from Abelian variety J0(11) of dimension 1 to Abelian variety J0(22) of dimension 2 sage: Hom(J0(11), J0(11)) Endomorphism ring of Abelian variety J0(11) of dimension 1 sage: type(H) <class 'sage.modular.abvar.homspace.Homspace_with_category'> sage: H.homset_category() Category of modular abelian varieties over Rational Field """ raise TypeError("domain must be a modular abelian variety") raise TypeError("codomain must be a modular abelian variety")
def identity(self): """ Return the identity endomorphism.
EXAMPLES::
sage: E = End(J0(11)) sage: E.identity() Abelian variety endomorphism of Abelian variety J0(11) of dimension 1 sage: E.one() Abelian variety endomorphism of Abelian variety J0(11) of dimension 1
sage: H = Hom(J0(11), J0(22)) sage: H.identity() Traceback (most recent call last): ... TypeError: the identity map is only defined for endomorphisms """
@lazy_attribute def _matrix_space(self): """ Return the matrix space of ``self``.
.. WARNING::
During unpickling, the domain and codomain may be unable to provide the necessary information. This is why this is a lazy attribute. See :trac:`14793`.
EXAMPLES::
sage: Hom(J0(11), J0(22))._matrix_space Full MatrixSpace of 2 by 4 dense matrices over Integer Ring """
def _element_constructor_from_element_class(self, *args, **keywords): """ Used in the coercion framework. Unfortunately, the default method would get the order of parent and data different from what is expected in ``MatrixMorphism.__init__``.
EXAMPLES::
sage: H = Hom(J0(11), J0(22)) sage: phi = H(matrix(ZZ,2,4,[5..12])); phi # indirect doctest Abelian variety morphism: From: Abelian variety J0(11) of dimension 1 To: Abelian variety J0(22) of dimension 2 """ return self.element_class(self, *args, **keywords)
def __call__(self, M): r""" Create a homomorphism in this space from M. M can be any of the following:
- a Morphism of abelian varieties
- a matrix of the appropriate size (i.e. 2\*self.domain().dimension() x 2\*self.codomain().dimension()) whose entries are coercible into self.base_ring()
- anything that can be coerced into self.matrix_space()
EXAMPLES::
sage: H = Hom(J0(11), J0(22)) sage: phi = H(matrix(ZZ,2,4,[5..12])) ; phi Abelian variety morphism: From: Abelian variety J0(11) of dimension 1 To: Abelian variety J0(22) of dimension 2 sage: phi.matrix() [ 5 6 7 8] [ 9 10 11 12] sage: phi.matrix().parent() Full MatrixSpace of 2 by 4 dense matrices over Integer Ring
::
sage: H = J0(22).Hom(J0(11)*J0(11)) sage: m1 = J0(22).degeneracy_map(11,1).matrix() ; m1 [ 0 1] [-1 1] [-1 0] [ 0 -1] sage: m2 = J0(22).degeneracy_map(11,2).matrix() ; m2 [ 1 -2] [ 0 -2] [ 1 -1] [ 0 -1] sage: m = m1.transpose().stack(m2.transpose()).transpose() ; m [ 0 1 1 -2] [-1 1 0 -2] [-1 0 1 -1] [ 0 -1 0 -1] sage: phi = H(m) ; phi Abelian variety morphism: From: Abelian variety J0(22) of dimension 2 To: Abelian variety J0(11) x J0(11) of dimension 2 sage: phi.matrix() [ 0 1 1 -2] [-1 1 0 -2] [-1 0 1 -1] [ 0 -1 0 -1] """ else: raise ValueError("cannot convert %s into %s" % (M, self)) raise TypeError("matrix has wrong dimension") else: raise TypeError("can only coerce in matrices or morphisms")
def _coerce_impl(self, x): """ Coerce x into self, if possible.
EXAMPLES::
sage: J = J0(37) ; J.Hom(J)._coerce_impl(matrix(ZZ,4,[5..20])) Abelian variety endomorphism of Abelian variety J0(37) of dimension 2 sage: K = J0(11) * J0(11) ; J.Hom(K)._coerce_impl(matrix(ZZ,4,[5..20])) Abelian variety morphism: From: Abelian variety J0(37) of dimension 2 To: Abelian variety J0(11) x J0(11) of dimension 2 """ else: return HomsetWithBase._coerce_impl(self, x)
def _repr_(self): """ String representation of a modular abelian variety homspace.
EXAMPLES::
sage: J = J0(11) sage: End(J)._repr_() 'Endomorphism ring of Abelian variety J0(11) of dimension 1' """ (self.domain(), self.codomain())
def _get_matrix(self, g): """ Given an object g, try to return a matrix corresponding to g with dimensions the same as those of self.matrix_space().
INPUT:
- ``g`` - a matrix or morphism or object with a list method
OUTPUT: a matrix
EXAMPLES::
sage: E = End(J0(11)) sage: E._get_matrix(matrix(QQ,2,[1,2,3,4])) [1 2] [3 4] sage: E._get_matrix(J0(11).hecke_operator(2)) [-2 0] [ 0 -2]
::
sage: H = Hom(J0(11) * J0(17), J0(22)) sage: H._get_matrix(tuple([8..23])) [ 8 9 10 11] [12 13 14 15] [16 17 18 19] [20 21 22 23] sage: H._get_matrix(tuple([8..23])) [ 8 9 10 11] [12 13 14 15] [16 17 18 19] [20 21 22 23] sage: H._get_matrix([8..23]) [ 8 9 10 11] [12 13 14 15] [16 17 18 19] [20 21 22 23] """
else:
def free_module(self): r""" Return this endomorphism ring as a free submodule of a big `\ZZ^{4nm}`, where `n` is the dimension of the domain abelian variety and `m` the dimension of the codomain.
OUTPUT: free module
EXAMPLES::
sage: E = Hom(J0(11), J0(22)) sage: E.free_module() Free module of degree 8 and rank 2 over Integer Ring Echelon basis matrix: [ 1 0 -3 1 1 1 -1 -1] [ 0 1 -3 1 1 1 -1 0] """
def gen(self, i=0): """ Return i-th generator of self.
INPUT:
- ``i`` - an integer
OUTPUT: a morphism
EXAMPLES::
sage: E = End(J0(22)) sage: E.gen(0).matrix() [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1] """ raise ValueError("self only has %s generators"%self.ngens())
def ngens(self): """ Return number of generators of self.
OUTPUT: integer
EXAMPLES::
sage: E = End(J0(22)) sage: E.ngens() 4 """
def gens(self): """ Return tuple of generators for this endomorphism ring.
EXAMPLES::
sage: E = End(J0(22)) sage: E.gens() (Abelian variety endomorphism of Abelian variety J0(22) of dimension 2, Abelian variety endomorphism of Abelian variety J0(22) of dimension 2, Abelian variety endomorphism of Abelian variety J0(22) of dimension 2, Abelian variety endomorphism of Abelian variety J0(22) of dimension 2) """
def matrix_space(self): """ Return the underlying matrix space that we view this endomorphism ring as being embedded into.
EXAMPLES::
sage: E = End(J0(22)) sage: E.matrix_space() Full MatrixSpace of 4 by 4 dense matrices over Integer Ring """
def calculate_generators(self): """ If generators haven't already been computed, calculate generators for this homspace. If they have been computed, do nothing.
EXAMPLES::
sage: E = End(J0(11)) sage: E.calculate_generators() """
for g in im_gens ]).saturation().basis()
def _calculate_product_gens(self): """ For internal use.
Calculate generators for self, assuming that self is a product of simple factors.
EXAMPLES::
sage: E = End(J0(37)) sage: E.gens() (Abelian variety endomorphism of Abelian variety J0(37) of dimension 2, Abelian variety endomorphism of Abelian variety J0(37) of dimension 2) sage: [ x.matrix() for x in E.gens() ] [ [1 0 0 0] [ 0 1 1 -1] [0 1 0 0] [ 1 0 1 0] [0 0 1 0] [ 0 0 -1 1] [0 0 0 1], [ 0 0 0 1] ] sage: E._calculate_product_gens() [ [1 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0] [0 0 0 0] [0 0 1 0] [0 0 0 0], [0 0 0 1] ] """ # Handle the base case of A, B simple
else: # Handle the case of A, B simple powers
else: # Handle the case of A, B generic cur_col - sub_mat.ncols(), sub_mat)
def _calculate_simple_gens(self): """ Calculate generators for self, where both the domain and codomain for self are assumed to be simple abelian varieties. The saturation of the span of these generators in self will be the full space of homomorphisms from the domain of self to its codomain.
EXAMPLES::
sage: H = Hom(J0(11), J0(22)[0]) sage: H._calculate_simple_gens() [ [1 0] [1 1] ] sage: J = J0(11) * J0(33) ; J.decomposition() [ Simple abelian subvariety 11a(1,11) of dimension 1 of J0(11) x J0(33), Simple abelian subvariety 11a(1,33) of dimension 1 of J0(11) x J0(33), Simple abelian subvariety 11a(3,33) of dimension 1 of J0(11) x J0(33), Simple abelian subvariety 33a(1,33) of dimension 1 of J0(11) x J0(33) ] sage: J[0].Hom(J[1])._calculate_simple_gens() [ [ 0 -1] [ 1 -1] ] sage: J[0].Hom(J[2])._calculate_simple_gens() [ [-1 0] [-1 -1] ] sage: J[0].Hom(J[0])._calculate_simple_gens() [ [1 0] [0 1] ] sage: J[1].Hom(J[2])._calculate_simple_gens() [ [ 0 -4] [ 4 0] ]
::
sage: J = J0(23) ; J.decomposition() [ Simple abelian variety J0(23) of dimension 2 ] sage: J[0].Hom(J[0])._calculate_simple_gens() [ [1 0 0 0] [ 0 1 -1 0] [0 1 0 0] [ 0 1 -1 1] [0 0 1 0] [-1 2 -2 1] [0 0 0 1], [-1 1 0 -1] ] sage: J.hecke_operator(2).matrix() [ 0 1 -1 0] [ 0 1 -1 1] [-1 2 -2 1] [-1 1 0 -1]
::
sage: H = Hom(J0(11), J0(22)[0]) sage: H._calculate_simple_gens() [ [1 0] [1 1] ] """
# NOTE/WARNING/TODO: Below in the __init__, etc. we do *not* check # that the input gens are give something that spans a sub*ring*, as apposed # to just a subgroup. class EndomorphismSubring(Homspace, Ring):
def __init__(self, A, gens=None, category=None): """ A subring of the endomorphism ring.
INPUT:
- ``A`` - an abelian variety
- ``gens`` - (default: None); optional; if given should be a tuple of the generators as matrices
EXAMPLES::
sage: J0(23).endomorphism_ring() Endomorphism ring of Abelian variety J0(23) of dimension 2 sage: sage.modular.abvar.homspace.EndomorphismSubring(J0(25)) Endomorphism ring of Abelian variety J0(25) of dimension 0 sage: E = J0(11).endomorphism_ring() sage: type(E) <class 'sage.modular.abvar.homspace.EndomorphismSubring_with_category'> sage: E.homset_category() Category of modular abelian varieties over Rational Field sage: E.category() Category of endsets of modular abelian varieties over Rational Field sage: E in Rings() True sage: TestSuite(E).run(skip=["_test_prod"])
TESTS:
The following tests against a problem on 32 bit machines that occured while working on :trac:`9944`::
sage: sage.modular.abvar.homspace.EndomorphismSubring(J1(12345)) Endomorphism ring of Abelian variety J1(12345) of dimension 5405473
:trac:`16275` removed the custom ``__reduce__`` method, since :meth:`Homset.__reduce__` already implements appropriate unpickling by construction::
sage: E.__reduce__.__module__ 'sage.categories.homset' sage: E.__reduce__() (<function Hom at ...>, (Abelian variety J0(11) of dimension 1, Abelian variety J0(11) of dimension 1, Category of modular abelian varieties over Rational Field, False)) """
# Initialise self with the correct category. # We need to initialise it as a ring first else: # Remark: Ring.__init__ will automatically form the join # of the category of rings and of homset_cat else:
def _repr_(self): """ Return the string representation of self.
EXAMPLES::
sage: J0(31).endomorphism_ring()._repr_() 'Endomorphism ring of Abelian variety J0(31) of dimension 2' sage: J0(31).endomorphism_ring().image_of_hecke_algebra()._repr_() 'Subring of endomorphism ring of Abelian variety J0(31) of dimension 2' """ else:
def abelian_variety(self): """ Return the abelian variety that this endomorphism ring is attached to.
EXAMPLES::
sage: J0(11).endomorphism_ring().abelian_variety() Abelian variety J0(11) of dimension 1 """
def index_in(self, other, check=True): """ Return the index of self in other.
INPUT:
- ``other`` - another endomorphism subring of the same abelian variety
- ``check`` - bool (default: True); whether to do some type and other consistency checks
EXAMPLES::
sage: R = J0(33).endomorphism_ring() sage: R.index_in(R) 1 sage: J = J0(37) ; E = J.endomorphism_ring() ; T = E.image_of_hecke_algebra() sage: T.index_in(E) 1 sage: J = J0(22) ; E = J.endomorphism_ring() ; T = E.image_of_hecke_algebra() sage: T.index_in(E) +Infinity """ raise ValueError("other must be a subring of an endomorphism ring of an abelian variety.") raise ValueError("self and other must be endomorphisms of the same abelian variety")
def index_in_saturation(self): """ Given a Hecke algebra T, compute its index in its saturation.
EXAMPLES::
sage: End(J0(23)).image_of_hecke_algebra().index_in_saturation() 1 sage: End(J0(44)).image_of_hecke_algebra().index_in_saturation() 2 """
def discriminant(self): """ Return the discriminant of this ring, which is the discriminant of the trace pairing.
.. note::
One knows that for modular abelian varieties, the endomorphism ring should be isomorphic to an order in a number field. However, the discriminant returned by this function will be `2^n` ( `n =` self.dimension()) times the discriminant of that order, since the elements are represented as 2d x 2d matrices. Notice, for example, that the case of a one dimensional abelian variety, whose endomorphism ring must be ZZ, has discriminant 2, as in the example below.
EXAMPLES::
sage: J0(33).endomorphism_ring().discriminant() -64800 sage: J0(46).endomorphism_ring().discriminant() # long time (6s on sage.math, 2011) 24200000000 sage: J0(11).endomorphism_ring().discriminant() 2 """ for i in range(len(g)) for j in range(len(g)) ])
def image_of_hecke_algebra(self, check_every=1): """ Compute the image of the Hecke algebra inside this endomorphism subring.
We simply calculate Hecke operators up to the Sturm bound, and look at the submodule spanned by them. While computing, we can check to see if the submodule spanned so far is saturated and of maximal dimension, in which case we may be done. The optional argument check_every determines how many Hecke operators we add in before checking to see if this condition is met.
INPUT:
- ``check_every`` -- integer (default: 1) If this integer is positive, this integer determines how many Hecke operators we add in before checking to see if the submodule spanned so far is maximal and saturated.
OUTPUT:
- The image of the Hecke algebra as an subring of ``self``.
EXAMPLES::
sage: E = J0(33).endomorphism_ring() sage: E.image_of_hecke_algebra() Subring of endomorphism ring of Abelian variety J0(33) of dimension 3 sage: E.image_of_hecke_algebra().gens() (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, Abelian variety endomorphism of Abelian variety J0(33) of dimension 3) sage: [ x.matrix() for x in E.image_of_hecke_algebra().gens() ] [ [1 0 0 0 0 0] [ 0 2 0 -1 1 -1] [ 0 0 1 -1 1 -1] [0 1 0 0 0 0] [-1 -2 2 -1 2 -1] [ 0 -1 1 0 1 -1] [0 0 1 0 0 0] [ 0 0 1 -1 3 -1] [ 0 0 1 0 2 -2] [0 0 0 1 0 0] [-2 2 0 1 1 -1] [-2 0 1 1 1 -1] [0 0 0 0 1 0] [-1 1 0 2 0 -3] [-1 0 1 1 0 -1] [0 0 0 0 0 1], [-1 1 -1 1 1 -2], [-1 0 0 1 0 -1] ] sage: J0(33).hecke_operator(2).matrix() [-1 0 1 -1 1 -1] [ 0 -2 1 0 1 -1] [ 0 0 0 0 2 -2] [-2 0 1 0 1 -1] [-1 0 1 1 -1 -1] [-1 0 0 1 0 -2] """
raise ValueError("ambient variety is not Hecke stable")
self.__hecke_algebra_image = EndomorphismSubring(A, [[1,0,0,1]]) return self.__hecke_algebra_image
n % check_every == 0 and V.dimension() == d and V.index_in_saturation() == 1):
|