# Ticket #9266: trac_9266.patch

File trac_9266.patch, 1.6 KB (added by wuthrich, 12 years ago)

exported against 4.4.4.alpha0

• ## sage/schemes/elliptic_curves/ell_number_field.py

```# HG changeset patch
# User Chris Wuthrich <christian.wuthrich@gmail.com>
# Date 1277248576 -3600
# Node ID ed02c64247e94be84329782e4e130ecc81fa76ca
# Parent  556bb66e4c6dbb92a4ee37c1750d82a5c6298eeb
trac 9266: bug in global_integral_model

diff -r 556bb66e4c6d -r ed02c64247e9 sage/schemes/elliptic_curves/ell_number_field.py```
 a # -*- coding: utf-8 -*- r""" Elliptic curves over number fields. sage: E.global_integral_model() Elliptic Curve defined by y^2 = x^3 + 1444*a*x + 27436 over Number Field in a with defining polynomial x^2 - 38 trac #9266:: sage: K. = NumberField(x^2-5) sage: w = (1+s)/2 sage: E = EllipticCurve(K,[2,w]) sage: E.global_integral_model() Elliptic Curve defined by y^2 = x^3 + 2*x + (1/2*s+1/2) over Number Field in s with defining polynomial x^2 - 5 """ K = self.base_field() ai = self.a_invariants() e  = min([(ai[i].valuation(P)/[1,2,3,4,6][i]) for i in range(5)]).floor() ai = [ai[i]/pi**(e*[1,2,3,4,6][i]) for i in range(5)] for z in ai: assert z.denominator() == 1, "bug in global_integral_model: %s" % ai assert z.is_integral(), "bug in global_integral_model: %s" % list(ai) return EllipticCurve(list(ai)) integral_model = global_integral_model