# HG changeset patch
# User Simon King <simon.king@unijena.de>
# Date 1304688960 7200
# Node ID dab5e9f161e510e1b0d54db0e5c8183aac8b72c5
# Parent 9ef6e3b6921a6ac709117f14b4f99f7c0d800c2e
#9944: Fix endomorphism ring of abelian varieties on 32 bit machines.
diff git a/sage/modular/abvar/homspace.py b/sage/modular/abvar/homspace.py
a

b


183  183  import sage.rings.all 
184  184  
185  185  from sage.rings.ring import Ring 
 186  from sage.categories.rings import Rings 
186  187  from sage.matrix.matrix_space import MatrixSpace 
187  188  from sage.matrix.constructor import Matrix, identity_matrix 
188  189  from sage.structure.element import is_Matrix 
… 
… 

701  702  Endomorphism ring of Abelian variety J0(25) of dimension 0 
702  703  sage: type(J0(11).endomorphism_ring()) 
703  704  <class 'sage.modular.abvar.homspace.EndomorphismSubring_with_category'> 
 705  
 706  TESTS: 
 707  
 708  The following tests against a problem on 32 bit machines that 
 709  occured while working on trac ticket #9944:: 
 710  
 711  sage: sage.modular.abvar.homspace.EndomorphismSubring(J1(12345)) 
 712  Endomorphism ring of Abelian variety J1(12345) of dimension 5405473 
 713  
704  714  """ 
705  715  self._J = A.ambient_variety() 
706  716  self._A = A 
707   Homspace.__init__(self, A, A, A.category()) 
708   Ring.__init__(self, A.base_ring()) 
709  717  
 718  # Initialise self with the correct category. 
 719  # We need to initialise it as a ring first 
 720  cat = A.category() 
 721  cat = cat.join([cat.hom_category(),Rings()]) 
 722  Ring.__init__(self, A.base_ring(), category=cat) 
 723  Homspace.__init__(self, A, A, cat=cat) 
710  724  if gens is None: 
711  725  self._gens = None 
712  726  else: 