Path: blob/master/sage/schemes/elliptic_curves/ell_tate_curve.py
4156 views
r"""1Tate's parametrisation of `p`-adic curves with multiplicative reduction23Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`.4Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant5of `E` has negative valuation, say `n`. Then there exists a parameter6`q` in `\ZZ_p` of valuation `n` such that the points of `E` defined over7the algebraic closure `\bar{\QQ}_p` are in bijection with8`\bar{\QQ}_p^{\times}\,/\, q^{\ZZ}`. More precisely there exists9the series `s_4(q)` and `s_6(q)` such that the10`y^2+x y = x^3 + s_4(q) x+s_6(q)` curve is isomorphic to `E` over11`\bar{\QQ}_p` (or over `\QQ_p` if the reduction is *split* multiplicative). There is `p`-adic analytic map from12`\bar{\QQ}^{\times}_p` to this curve with kernel `q^{\ZZ}`.13Points of good reduction correspond to points of valuation14`0` in `\bar{\QQ}^{\times}_p`.15See chapter V of [Sil2] for more details.1617REFERENCES :1819- [Sil2] Silverman Joseph, Advanced Topics in the Arithmetic of Elliptic Curves,20GTM 151, Springer 1994.212223AUTHORS:2425- chris wuthrich (23/05/2007): first version2627- William Stein (2007-05-29): added some examples; editing.2829- chris wuthrich (04/09): reformatted docstrings.3031"""3233######################################################################34# Copyright (C) 2007 chris wuthrich35#36# Distributed under the terms of the GNU General Public License (GPL)37#38# This code is distributed in the hope that it will be useful,39# but WITHOUT ANY WARRANTY; without even the implied warranty of40# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU41# General Public License for more details.42#43# The full text of the GPL is available at:44#45# http://www.gnu.org/licenses/46######################################################################4748from sage.rings.integer_ring import ZZ49from sage.rings.padics.factory import Qp50from sage.structure.sage_object import SageObject51from sage.rings.arith import LCM52from sage.modular.modform.constructor import EisensteinForms, CuspForms53from sage.schemes.elliptic_curves.constructor import EllipticCurve54from sage.misc.functional import log55from sage.misc.all import denominator, prod56import sage.matrix.all as matrix5758class TateCurve(SageObject):59r"""60Tate's `p`-adic uniformisation of an elliptic curve with61multiplicative reduction.6263.. note::6465Some of the methods of this Tate curve only work when the66reduction is split multiplicative over `\QQ_p`.6768EXAMPLES::6970sage: e = EllipticCurve('130a1')71sage: eq = e.tate_curve(5); eq725-adic Tate curve associated to the Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field73sage: eq == loads(dumps(eq))74True7576REFERENCES :7778- [Sil2] Silverman Joseph, Advanced Topics in the Arithmetic of Elliptic Curves,79GTM 151, Springer 1994.8081"""82def __init__(self,E,p):83r"""84INPUT:8586- ``E`` - an elliptic curve over the rational numbers8788- ``p`` - a prime where `E` has multiplicative reduction,89i.e., such that `j(E)` has negative valuation.9091EXAMPLES::9293sage: e = EllipticCurve('130a1')94sage: eq = e.tate_curve(2); eq952-adic Tate curve associated to the Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field96"""97self._p = ZZ(p)98self._E = E99self._q = self.parameter()100if not p.is_prime():101raise ValueError, "p (=%s) must be a prime"%p102if E.j_invariant().valuation(p) >= 0:103raise ValueError, "The elliptic curve must have multiplicative reduction at %s"%p104105def __cmp__(self, other):106r"""107Compare self and other.108109TESTS::110111sage: E = EllipticCurve('35a')112sage: eq5 = E.tate_curve(5)113sage: eq7 = E.tate_curve(7)114sage: eq7 == eq7115True116sage: eq7 == eq5117False118"""119c = cmp(type(self), type(other))120if c: return c121return cmp((self._E, self._p), (other._E, other._p))122123124def _repr_(self):125r"""126Return print representation.127128EXAMPLES::129130sage: e = EllipticCurve('130a1')131sage: eq = e.tate_curve(2)132sage: eq._repr_()133'2-adic Tate curve associated to the Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field'134"""135s = "%s-adic Tate curve associated to the %s"%(self._p, self._E)136return s137138def original_curve(self):139r"""140Returns the elliptic curve the Tate curve was constructed from.141142EXAMPLES::143144sage: eq = EllipticCurve('130a1').tate_curve(5)145sage: eq.original_curve()146Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field147"""148return self._E149150def prime(self):151r"""152Returns the residual characteristic `p`.153154EXAMPLES::155156sage: eq = EllipticCurve('130a1').tate_curve(5)157sage: eq.original_curve()158Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field159sage: eq.prime()1605161"""162return self._p163164165def parameter(self,prec=20):166r"""167Returns the Tate parameter `q` such that the curve is isomorphic168over the algebraic closure of `\QQ_p` to the curve169`\QQ_p^{\times}/q^{\ZZ}`.170171INPUT:172173- ``prec`` - the `p`-adic precision, default is 20.174175EXAMPLES::176177sage: eq = EllipticCurve('130a1').tate_curve(5)178sage: eq.parameter(prec=5)1793*5^3 + 3*5^4 + 2*5^5 + 2*5^6 + 3*5^7 + O(5^8)180"""181try:182qE = self._q183if qE.absolute_precision() >= prec:184return qE185except AttributeError:186pass187188jE = self._E.j_invariant()189E4 = EisensteinForms(weight=4).basis()[0]190Delta = CuspForms(weight=12).basis()[0]191j = (E4.q_expansion(prec+3))**3/Delta.q_expansion(prec+3)192jinv = (1/j).power_series()193q_in_terms_of_jinv = jinv.reversion()194R = Qp(self._p,prec=prec)195qE = q_in_terms_of_jinv(R(1/self._E.j_invariant()))196self._q = qE197return qE198199__sk = lambda e,k,prec: sum( [n**k*e._q**n/(1-e._q**n) for n in range(1,prec+1)] )200201__delta = lambda e,prec: e._q* prod([(1-e._q**n)**24 for n in range(1,prec+1) ] )202203def curve(self,prec=20):204r"""205Returns the `p`-adic elliptic curve of the form `y^2+x y = x^3 + s_4 x+s_6`.206This curve with split multiplicative reduction is isomorphic to the given curve207over the algebraic closure of `\QQ_p`.208209INPUT:210211- ``prec`` - the `p`-adic precision, default is 20.212213EXAMPLES::214215sage: eq = EllipticCurve('130a1').tate_curve(5)216sage: eq.curve(prec=5)217Elliptic Curve defined by y^2 + (1+O(5^5))*x*y = x^3 +218(2*5^4+5^5+2*5^6+5^7+3*5^8+O(5^9))*x + (2*5^3+5^4+2*5^5+5^7+O(5^8)) over 5-adic219Field with capped relative precision 5220"""221try:222Eq = self.__curve223if Eq.a6().absolute_precision() >= prec:224return Eq225except AttributeError:226pass227228229qE = self.parameter(prec=prec)230n = qE.valuation()231precp = (prec/n).floor() + 2;232R = qE.parent()233234tate_a4 = -5 * self.__sk(3,precp)235tate_a6 = (tate_a4 - 7 * self.__sk(5,precp) )/12236Eq = EllipticCurve([R(1),R(0),R(0),tate_a4,tate_a6])237self.__curve = Eq238return Eq239240def _Csquare(self,prec=20):241r"""242Returns the square of the constant `C` such that the canonical Neron differential `\omega`243and the canonical differential `\frac{du}{u}` on `\QQ^{\times}/q^{\ZZ}` are linked by244`\omega = C \frac{du}{u}`. This constant is only a square in `\QQ_p` if the curve has split245multiplicative reduction.246247INPUT:248249- ``prec`` - the `p`-adic precision, default is 20.250251EXAMPLES::252253sage: eq = EllipticCurve('130a1').tate_curve(5)254sage: eq._Csquare(prec=5)2554 + 2*5^2 + 2*5^4 + O(5^5)256"""257try:258Csq = self.__Csquare259if Csq.absolute_precision() >= prec:260return Csq261except AttributeError:262pass263264Eq = self.curve(prec=prec)265tateCsquare = Eq.c6() * self._E.c4()/Eq.c4()/self._E.c6()266self.__Csquare = tateCsquare267return tateCsquare268269def E2(self,prec=20):270r"""271Returns the value of the `p`-adic Eisenstein series of weight 2 evaluated on the elliptic272curve having split multiplicative reduction.273274INPUT:275276- ``prec`` - the `p`-adic precision, default is 20.277278EXAMPLES::279280sage: eq = EllipticCurve('130a1').tate_curve(5)281sage: eq.E2(prec=10)2824 + 2*5^2 + 2*5^3 + 5^4 + 2*5^5 + 5^7 + 5^8 + 2*5^9 + O(5^10)283284sage: T = EllipticCurve('14').tate_curve(7)285sage: T.E2(30)2862 + 4*7 + 7^2 + 3*7^3 + 6*7^4 + 5*7^5 + 2*7^6 + 7^7 + 5*7^8 + 6*7^9 + 5*7^10 + 2*7^11 + 6*7^12 + 4*7^13 + 3*7^15 + 5*7^16 + 4*7^17 + 4*7^18 + 2*7^20 + 7^21 + 5*7^22 + 4*7^23 + 4*7^24 + 3*7^25 + 6*7^26 + 3*7^27 + 6*7^28 + O(7^30)287"""288289p = self._p290Csq = self._Csquare(prec=prec)291qE = self._q292n = qE.valuation()293R = Qp(p,prec)294295e2 = Csq*(1 - 24 * sum( [ qE**i/(1-qE**i)**2 for i in range(1,(prec/n).floor() + 5) ]))296297return R(e2)298299300def is_split(self):301r"""302Returns True if the given elliptic curve has split multiplicative reduction.303304EXAMPLES::305306sage: eq = EllipticCurve('130a1').tate_curve(5)307sage: eq.is_split()308True309310sage: eq = EllipticCurve('37a1').tate_curve(37)311sage: eq.is_split()312False313"""314return self._Csquare().is_square()315316def parametrisation_onto_tate_curve(self,u,prec=20):317r"""318Given an element `u` in `\QQ_p^{\times}`, this computes its image on the Tate curve319under the `p`-adic uniformisation of `E`.320321INPUT:322323- ``u`` - a non-zero `p`-adic number.324325- ``prec`` - the `p`-adic precision, default is 20.326327328EXAMPLES::329330sage: eq = EllipticCurve('130a1').tate_curve(5)331sage: eq.parametrisation_onto_tate_curve(1+5+5^2+O(5^10))332(5^-2 + 4*5^-1 + 1 + 2*5 + 3*5^2 + 2*5^5 + 3*5^6 + O(5^7) :3334*5^-3 + 2*5^-1 + 4 + 2*5 + 3*5^4 + 2*5^5 + O(5^6) : 1 + O(5^20))334"""335if u == 1:336return self.curve(prec=prec)(0)337338q = self._q339un = u * q**(-(u.valuation()/q.valuation()).floor())340341precn = (prec/q.valuation()).floor() + 4342343# formulas in Silverman II (Advanced Topics in the Arithmetic of Elliptic curves, p. 425)344345xx = un/(1-un)**2 + sum( [q**n*un/(1-q**n*un)**2 + q**n/un/(1-q**n/un)**2-2*q**n/(1-q**n)**2 for n in range(1,precn) ])346347yy = un**2/(1-un)**3 + sum( [q**(2*n)*un**2/(1-q**n*un)**3 - q**n/un/(1-q**n/un)**3+q**n/(1-q**n)**2 for n in range(1,precn) ])348349return self.curve(prec=prec)( [xx,yy] )350351352353# From here on all function need that the curve has split multiplicative reduction.354355def L_invariant(self,prec=20):356r"""357Returns the *mysterious* `\mathcal{L}`-invariant associated358to an elliptic curve with split multiplicative reduction. One359instance where this constant appears is in the exceptional360case of the `p`-adic Birch and Swinnerton-Dyer conjecture as361formulated in [MTT]. See [Col] for a detailed discussion.362363INPUT:364365- ``prec`` - the `p`-adic precision, default is 20.366367REFERENCES:368369- [MTT] B. Mazur, J. Tate, and J. Teitelbaum,370On `p`-adic analogues of the conjectures of Birch and371Swinnerton-Dyer, Inventiones mathematicae 84, (1986), 1-48.372373- [Col] Pierre Colmez, Invariant `\mathcal{L}` et derivees de374valeurs propores de Frobenius, preprint, 2004.375376EXAMPLES::377378sage: eq = EllipticCurve('130a1').tate_curve(5)379sage: eq.L_invariant(prec=10)3805^3 + 4*5^4 + 2*5^5 + 2*5^6 + 2*5^7 + 3*5^8 + 5^9 + O(5^10)381"""382383if not self.is_split():384raise RuntimeError, "The curve must have split multiplicative reduction"385qE = self.parameter(prec=prec)386n = qE.valuation()387u = qE/self._p**n # the p-adic logarithm of Iwasawa normalised by log(p) = 0388return log(u)/n389390391def _isomorphism(self,prec=20):392r"""393Returns the isomorphism between ``self.curve()`` and the given curve in the394form of a list ``[u,r,s,t]`` of `p`-adic numbers. For this to exist395the given curve has to have split multiplicative reduction over `\QQ_p`.396397More precisely, if `E` has coordinates `x` and `y` and the Tate curve398has coordinates `X`, `Y` with `Y^2 + XY = X^3 + s_4 X +s_6` then399`X = u^2 x +r` and `Y = u^3 y +s u^2 x +t`.400401INPUT:402403- ``prec`` - the `p`-adic precision, default is 20.404405EXAMPLES::406407sage: eq = EllipticCurve('130a1').tate_curve(5)408sage: eq._isomorphism(prec=5)409[2 + 3*5^2 + 2*5^3 + 4*5^4 + O(5^5), 4 + 3*5 + 4*5^2 + 2*5^3 + O(5^5),4103 + 2*5 + 5^2 + 5^3 + 2*5^4 + O(5^5), 2 + 5 + 3*5^2 + 5^3 + 5^4 + O(5^5)]411"""412413if not self.is_split():414raise RuntimeError, "The curve must have split multiplicative reduction"415416Csq = self._Csquare(prec=prec+4)417C = Csq.sqrt()418R = Qp(self._p,prec)419C = R(C)420s = (C * R(self._E.a1()) -R(1))/R(2)421r = (C**2*R(self._E.a2()) +s +s**2)/R(3)422t = (C**3*R(self._E.a3()) - r)/R(2)423return [C,r,s,t]424425def _inverse_isomorphism(self,prec=20):426r"""427Returns the isomorphism between the given curve and ``self.curve()`` in the428form of a list ``[u,r,s,t]`` of `p`-adic numbers. For this to exist429the given curve has to have split multiplicative reduction over `\QQ_p`.430431More precisely, if `E` has coordinates `x` and `y` and the Tate curve432has coordinates `X`, `Y` with `Y^2 + XY = X^3 + s_4 X +s_6` then433`x = u^2 X +r` and `y = u^3 Y +s u^2 X +t`.434435INPUT:436437- ``prec`` - the `p`-adic precision, default is 20.438439EXAMPLES::440441sage: eq = EllipticCurve('130a1').tate_curve(5)442sage: eq._inverse_isomorphism(prec=5)443[3 + 2*5 + 3*5^3 + O(5^5), 4 + 2*5 + 4*5^3 + 3*5^4 + O(5^5),4441 + 5 + 4*5^3 + 2*5^4 + O(5^5), 5 + 2*5^2 + 3*5^4 + O(5^5)]445"""446if not self.is_split():447raise RuntimeError, "The curve must have split multiplicative reduction"448vec = self._isomorphism(prec=prec)449return [1/vec[0],-vec[1]/vec[0]**2,-vec[2]/vec[0],(vec[1]*vec[2]-vec[3])/vec[0]**3]450451def lift(self,P, prec = 20):452r"""453Given a point `P` in the formal group of the elliptic curve `E` with split multiplicative reduction,454this produces an element `u` in `\QQ_p^{\times}` mapped to the point `P` by the Tate parametrisation.455The algorithm return the unique such element in `1+p\ZZ_p`.456457INPUT:458459- ``P`` - a point on the elliptic curve.460461- ``prec`` - the `p`-adic precision, default is 20.462463EXAMPLES::464465sage: e = EllipticCurve('130a1')466sage: eq = e.tate_curve(5)467sage: P = e([-6,10])468sage: l = eq.lift(12*P, prec=10); l4691 + 4*5 + 5^3 + 5^4 + 4*5^5 + 5^6 + 5^7 + 4*5^8 + 5^9 + O(5^10)470471Now we map the lift l back and check that it is indeed right.::472473sage: eq.parametrisation_onto_original_curve(l)474(4*5^-2 + 2*5^-1 + 4*5 + 3*5^3 + 5^4 + 2*5^5 + 4*5^6 + O(5^7) : 2*5^-3 + 5^-1 + 4 + 4*5 + 5^2 + 3*5^3 + 4*5^4 + O(5^6) : 1 + O(5^20))475sage: e5 = e.change_ring(Qp(5,9))476sage: e5(12*P)477(4*5^-2 + 2*5^-1 + 4*5 + 3*5^3 + 5^4 + 2*5^5 + 4*5^6 + O(5^7) : 2*5^-3 + 5^-1 + 4 + 4*5 + 5^2 + 3*5^3 + 4*5^4 + O(5^6) : 1 + O(5^9))478"""479p = self._p480R = Qp(self._p,prec)481if not self._E == P.curve():482raise ValueError , "The point must lie on the original curve."483if not self.is_split():484raise ValueError, "The curve must have split multiplicative reduction."485if P.is_zero():486return R(1)487if P[0].valuation(p) >= 0:488raise ValueError , "The point must lie in the formal group."489490Eq = self.curve(prec=prec)491isom = self._isomorphism(prec=prec)492C = isom[0]493r = isom[1]494s = isom[2]495t = isom[3]496xx = r + C**2 * P[0]497yy = t + s * C**2 * P[0] + C**3 * P[1]498try:499Pq = Eq([xx,yy])500except:501raise RuntimeError, "Bug : Point %s does not lie on the curve "%[xx,yy]502503tt = -xx/yy504eqhat = Eq.formal()505eqlog = eqhat.log(prec + 3)506z = eqlog(tt)507u = ZZ(1)508fac = ZZ(1)509for i in range(1,2*prec+1):510fac = fac * i511u = u + z**i/fac512return u513514def parametrisation_onto_original_curve(self,u,prec=20):515r"""516Given an element `u` in `\QQ_p^{\times}`, this computes its image on the original curve517under the `p`-adic uniformisation of `E`.518519INPUT:520521- ``u`` - a non-zero `p`-adic number.522523- ``prec`` - the `p`-adic precision, default is 20.524525EXAMPLES::526527sage: eq = EllipticCurve('130a1').tate_curve(5)528sage: eq.parametrisation_onto_original_curve(1+5+5^2+O(5^10))529(4*5^-2 + 4*5^-1 + 4 + 2*5^3 + 3*5^4 + 2*5^6 + O(5^7) :5303*5^-3 + 5^-2 + 4*5^-1 + 1 + 4*5 + 5^2 + 3*5^5 + O(5^6) : 1 + O(5^20))531532Here is how one gets a 4-torsion point on `E` over `\QQ_5`::533534sage: R = Qp(5,10)535sage: i = R(-1).sqrt()536sage: T = eq.parametrisation_onto_original_curve(i); T537(2 + 3*5 + 4*5^2 + 2*5^3 + 5^4 + 4*5^5 + 2*5^7 + 5^8 + 5^9 + O(5^10) :5383*5 + 5^2 + 5^4 + 3*5^5 + 3*5^7 + 2*5^8 + 4*5^9 + O(5^10) : 1 + O(5^20))539sage: 4*T540(0 : 1 + O(5^20) : 0)541"""542if not self.is_split():543raise ValueError, "The curve must have split multiplicative reduction."544P = self.parametrisation_onto_tate_curve(u,prec=20)545isom = self._inverse_isomorphism(prec=prec)546C = isom[0]547r = isom[1]548s = isom[2]549t = isom[3]550xx = r + C**2 * P[0]551yy = t + s * C**2 * P[0] + C**3 * P[1]552R = Qp(self._p,prec)553E_over_Qp = self._E.base_extend(R)554return E_over_Qp([xx,yy])555556557558__padic_sigma_square = lambda e,u,prec: (u-1)**2/u* prod([((1-e._q**n*u)*(1-e._q**n/u)/(1-e._q**n)**2)**2 for n in range(1,prec+1)])559560# the following functions are rather functions of the global curve than the local curve561# we use the same names as for elliptic curves over rationals.562563def padic_height(self,prec=20):564r"""565Returns the canonical `p`-adic height function on the original curve.566567INPUT:568569- ``prec`` - the `p`-adic precision, default is 20.570571OUTPUT:572573- A function that can be evaluated on rational points of `E`.574575EXAMPLES::576577sage: e = EllipticCurve('130a1')578sage: eq = e.tate_curve(5)579sage: h = eq.padic_height(prec=10)580sage: P=e.gens()[0]581sage: h(P)5822*5^-1 + 1 + 2*5 + 2*5^2 + 3*5^3 + 3*5^6 + 5^7 + O(5^8)583584Check that it is a quadratic function::585586sage: h(3*P)-3^2*h(P)587O(5^8)588"""589590if not self.is_split():591raise NotImplementedError, "The curve must have split multiplicative reduction"592593p = self._p594595# we will have to do it properly with David Harvey's _multiply_point(E, R, Q)596n = LCM(self._E.tamagawa_numbers()) * (p-1)597598# this function is a closure, I don't see how to doctest it (PZ)599def _height(P,check=True):600if check:601assert P.curve() == self._E, "the point P must lie on the curve from which the height function was created"602Q = n * P603cQ = denominator(Q[0])604uQ = self.lift(Q,prec = prec)605si = self.__padic_sigma_square(uQ, prec=prec)606nn = self._q.valuation()607qEu = self._q/p**nn608return -(log(si*self._Csquare()/cQ) + log(uQ)**2/log(qEu)) / n**2609610return _height611612613def padic_regulator(self,prec=20):614r"""615Computes the canonical `p`-adic regulator on the extended Mordell-Weil group as in [MTT]616(with the correction of [Wer] and sign convention in [SW].)617The `p`-adic Birch and Swinnerton-Dyer conjecture618predicts that this value appears in the formula for the leading term of the619`p`-adic L-function.620621INPUT:622623- ``prec`` - the `p`-adic precision, default is 20.624625REFERENCES:626627- [MTT] B. Mazur, J. Tate, and J. Teitelbaum,628On `p`-adic analogues of the conjectures of Birch and629Swinnerton-Dyer, Inventiones mathematicae 84, (1986), 1-48.630631- [Wer] Annette Werner, Local heights on abelian varieties and rigid analytic unifomization,632Doc. Math. 3 (1998), 301-319.633634- [SW] William Stein and Christian Wuthrich, Computations About Tate-Shafarevich Groups635using Iwasawa theory, preprint 2009.636637EXAMPLES::638639sage: eq = EllipticCurve('130a1').tate_curve(5)640sage: eq.padic_regulator()6412*5^-1 + 1 + 2*5 + 2*5^2 + 3*5^3 + 3*5^6 + 5^7 + 3*5^9 + 3*5^10 + 3*5^12 + 4*5^13 + 3*5^15 + 2*5^16 + 3*5^18 + 4*5^19 + O(5^20)642643"""644prec = prec + 4645646K = Qp(self._p, prec=prec)647rank = self._E.rank()648if rank == 0:649return K(1)650651if not self.is_split():652raise NotImplementedError, "The p-adic regulator is not implemented for non-split multiplicative reduction."653654655basis = self._E.gens()656M = matrix.matrix(K, rank, rank, 0)657658height = self.padic_height(prec= prec)659point_height = [height(P) for P in basis]660for i in range(rank):661for j in range(i+1, rank):662M[i, j] = M[j, i] = (- point_height[i] - point_height[j] + height(basis[i] + basis[j]))/2663for i in range(rank):664M[i,i] = point_height[i]665666return M.determinant()667668669670