# 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

b


 1  # * coding: utf8 * 
1  2  r""" 
2  3  Elliptic curves over number fields. 
3  4  
… 
… 

366  367  sage: E.global_integral_model() 
367  368  Elliptic Curve defined by y^2 = x^3 + 1444*a*x + 27436 over Number Field in a with defining polynomial x^2  38 
368  369  
 370  trac #9266:: 
 371  
 372  sage: K.<s> = NumberField(x^25) 
 373  sage: w = (1+s)/2 
 374  sage: E = EllipticCurve(K,[2,w]) 
 375  sage: E.global_integral_model() 
 376  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 
 377  
369  378  """ 
370  379  K = self.base_field() 
371  380  ai = self.a_invariants() 
… 
… 

376  385  e = min([(ai[i].valuation(P)/[1,2,3,4,6][i]) for i in range(5)]).floor() 
377  386  ai = [ai[i]/pi**(e*[1,2,3,4,6][i]) for i in range(5)] 
378  387  for z in ai: 
379   assert z.denominator() == 1, "bug in global_integral_model: %s" % ai 
 388  assert z.is_integral(), "bug in global_integral_model: %s" % list(ai) 
380  389  return EllipticCurve(list(ai)) 
381  390  
382  391  integral_model = global_integral_model 