Ticket #13953: trac13953-local_heights_torsion.patch

File trac13953-local_heights_torsion.patch, 1.9 KB (added by pbruin, 9 years ago)

based on 5.9 + three patches of #12509

  • sage/schemes/elliptic_curves/ell_point.py

    # HG changeset patch
    # User Peter Bruin <peter.bruin@math.uzh.ch>
    # Date 1358186616 -3600
    # Node ID d24fffa1b7b13b6fed29ee2a0b8fdc33d01bcc29
    # Parent  b35250d9f922914f4bfccc89443f150aebce40d4
    #13953: local heights of torsion points can be non-zero
    
    diff --git a/sage/schemes/elliptic_curves/ell_point.py b/sage/schemes/elliptic_curves/ell_point.py
    a b  
    26452645            sage: Q.archimedian_local_height(K.places()[0]) / 2
    26462646            0.654445619529600
    26472647
     2648        Local heights of torsion points can be non-zero (unlike the
     2649        global height)::
     2650
     2651            sage: K.<i> = QuadraticField(-1)
     2652            sage: E = EllipticCurve([0, 0, 0, K(1), 0])
     2653            sage: P = E(i, 0)
     2654            sage: P.archimedian_local_height()
     2655            0.346573590279973
     2656
    26482657        TESTS:
    26492658
    26502659        See :trac:`12509`::
     
    26582667            -0.2206607955468278492183362746930
    26592668
    26602669        """
    2661         if self.has_finite_order():
    2662             return QQ(0)
    2663        
    26642670        if v is None:
    26652671            K = self.curve().base_ring()
    26662672            def local_degree(v):
     
    27792785            sage: Q.nonarchimedian_local_height()
    27802786            1/2*log(16)
    27812787           
     2788        Local heights of torsion points can be non-zero (unlike the
     2789        global height)::
     2790
     2791            sage: K.<i> = QuadraticField(-1)
     2792            sage: E = EllipticCurve([0, 0, 0, K(1), 0])
     2793            sage: P = E(i, 0)
     2794            sage: P.nonarchimedian_local_height()
     2795            -1/2*log(2)
     2796
    27822797        TESTS::
    27832798
    27842799            sage: Q.nonarchimedian_local_height(prec=100)
     
    27992814            sage: P.nonarchimedian_local_height()
    28002815            0
    28012816        """
    2802         if self.has_finite_order():
    2803             return rings.QQ(0)
    2804        
    28052817        if prec:
    28062818            log = lambda x: rings.RealField(prec)(x).log()
    28072819        else: