Ticket #6045: 6045-heegner2.patch

File 6045-heegner2.patch, 3.1 KB (added by robertwb, 12 years ago)

apply on top of previous

  • sage/schemes/elliptic_curves/ell_rational_field.py

    # HG changeset patch
    # User Robert Bradshaw <robertwb@math.washington.edu>
    # Date 1245996758 25200
    # Node ID f77fe37202bbb46883a500378203ab609a4074b1
    # Parent  013352f04fe0ac208b4b6c0e6ea0042adea3c7cf
    Modify modular parameterization to use new elliptic exponential.
    
    diff -r 013352f04fe0 -r f77fe37202bb sage/schemes/elliptic_curves/ell_rational_field.py
    a b  
    28192819            sage: E.period_lattice()
    28202820            Period lattice associated to Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
    28212821        """
    2822         from sage.schemes.elliptic_curves.period_lattice import PeriodLattice_ell
    2823         return PeriodLattice_ell(self)
     2822        try:
     2823            return self._period_lattice
     2824        except AttributeError:
     2825            from sage.schemes.elliptic_curves.period_lattice import PeriodLattice_ell
     2826            self._period_lattice = PeriodLattice_ell(self)
     2827            return self._period_lattice
    28242828
    28252829    def elliptic_exponential(self, z, embedding=None):
    28262830        r"""
     
    31913195            [-7 -1]
    31923196            [15  2]
    31933197            sage: phi((-7*z-1)/(15*z+2))
    3194             (8.20822465478524 - 13.1562816054681*I : -8.79855099049343 + 69.4006129342194*I : 1.00000000000000)
     3198            (8.20822465478524 - 13.1562816054681*I : -8.79855099049339 + 69.4006129342195*I : 1.00000000000000)
    31953199       
    31963200        We can also get a series expansion of this modular parameterization::
    31973201       
     
    69646968            sage: E = EllipticCurve('37a')
    69656969            sage: phi = E.modular_parametrization()
    69666970            sage: phi((sqrt(7)*I - 17)/74, 53)
    6967             (-3.44405199344475e-16 - 1.69572887583947e-16*I : 3.44405199344530e-16 + 1.69572887583947e-16*I : 1.00000000000000)
     6971            (-3.37746093871080e-16 - 2.21824021705058e-16*I : 3.33066907387547e-16 + 2.21719344273286e-16*I : 1.00000000000000)
    69686972           
    69696973        Verify that the mapping is invariant under the action of `\Gamma_0(N)`
    69706974        on the upper half plane::
     
    69776981            sage: phi(tau+1)
    69786982            (-3.92181329652810 - 12.2578555525366*I : 44.9649874434872 + 14.3257120944681*I : 1.00000000000000)
    69796983            sage: phi((6*tau+1) / (11*tau+2))
    6980             (-3.92181329652853 - 12.2578555525369*I : 44.9649874434897 + 14.3257120944671*I : 1.00000000000000)
     6984            (-3.92181329652856 - 12.2578555525369*I : 44.9649874434898 + 14.3257120944670*I : 1.00000000000000)
    69816985       
    69826986        ALGORITHM:
    69836987       
     
    70087012            lattice_point += an/n
    70097013            lattice_point *= q
    70107014        # Map to E via Weierstrass P
    7011         E2 = self._E.change_ring(CC)
    7012         from sage.interfaces.all import gp
    7013         gp.set_real_precision((CC.prec()+10)//3)
    7014         e = gp(E2)
    7015         w = list(e.ellztopoint(lattice_point))
    7016         return E2.point([CC(repr(w[0])), CC(repr(w[1])), CC(1)], check=False)
     7015        return self._E.elliptic_exponential(lattice_point)
    70177016   
    70187017    def power_series(self):
    70197018        r"""