# Ticket #9944: trac9944_abvar_endomorphism.patch

File trac9944_abvar_endomorphism.patch, 1.7 KB (added by SimonKing, 12 years ago)

Fix a problem with initialisation of endomorphism rings of abelian varieties on 32 bit

• ## sage/modular/abvar/homspace.py

```# HG changeset patch
# User Simon King <simon.king@uni-jena.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 import sage.rings.all from sage.rings.ring import Ring from sage.categories.rings import Rings from sage.matrix.matrix_space import MatrixSpace from sage.matrix.constructor import Matrix, identity_matrix from sage.structure.element import is_Matrix Endomorphism ring of Abelian variety J0(25) of dimension 0 sage: type(J0(11).endomorphism_ring()) TESTS: The following tests against a problem on 32 bit machines that occured while working on trac ticket #9944:: sage: sage.modular.abvar.homspace.EndomorphismSubring(J1(12345)) Endomorphism ring of Abelian variety J1(12345) of dimension 5405473 """ self._J = A.ambient_variety() self._A = A Homspace.__init__(self, A, A, A.category()) Ring.__init__(self, A.base_ring()) # Initialise self with the correct category. # We need to initialise it as a ring first cat = A.category() cat = cat.join([cat.hom_category(),Rings()]) Ring.__init__(self, A.base_ring(), category=cat) Homspace.__init__(self, A, A, cat=cat) if gens is None: self._gens = None else: