Ticket #10888: trac_10888.patch

File trac_10888.patch, 2.4 KB (added by wuthrich, 9 years ago)

exported against 4.6.2. Only this patch should be applied.

  • sage/schemes/elliptic_curves/ell_curve_isogeny.py

    # HG changeset patch
    # User Chris Wuthrich <christian.wuthrich@gmail.com>
    # Date 1300287229 0
    # Node ID 31496a24bd30935497e95550314c771551e0df8b
    # Parent  bcfb1b518aeb98cb77413945d389716be533d611
    trac 10888: bug in ellitpic curve isogenies due to the wrong type after evaluation
    
    diff -r bcfb1b518aeb -r 31496a24bd30 sage/schemes/elliptic_curves/ell_curve_isogeny.py
    a b  
    962962            sage: tau = E.isogeny([Q],E)
    963963            sage: tau(Q)
    964964            (0 : 1 : 0)
    965            
     965
     966        TESTS (trac 10888)::
     967
     968            sage: K.<th> = NumberField(x^2+3)
     969            sage: E = EllipticCurve(K,[7,0])
     970            sage: phi = E.isogeny(E(0,0))
     971            sage: P = E(-3,4*th)
     972            sage: phi(P)
     973            (-16/3 : 8/9*th : 1)
     974            sage: Q = phi(P)
     975            sage: phihat = phi.dual()
     976            sage: phihat(Q)
     977            (-1/48 : 127/576*th : 1)
     978
    966979        """
    967980        E1 = self.__E1
    968981        E_P = P.curve()
     
    9871000
    9881001        # if there is a pre isomorphism, apply it
    9891002        if (self.__pre_isomorphism is not None):
    990             temp_xP = self.__prei_x_coord_ratl_map(x=xP, y=yP)
    991             temp_yP = self.__prei_y_coord_ratl_map(x=xP, y=yP)
     1003            temp_xP = self.__prei_x_coord_ratl_map(xP, yP)
     1004            temp_yP = self.__prei_y_coord_ratl_map(xP, yP)
    9921005            (xP, yP) = (temp_xP, temp_yP)
    9931006
    9941007        if ("velu" == self.__algorithm):
     
    10031016
    10041017        # if there is a post isomorphism, apply it
    10051018        if (self.__post_isomorphism is not None):
    1006             tempX = self.__posti_x_coord_ratl_map(x=outP[0], y=outP[1])
    1007             tempY = self.__posti_y_coord_ratl_map(x=outP[0], y=outP[1])
     1019            tempX = self.__posti_x_coord_ratl_map(outP[0], outP[1])
     1020            tempY = self.__posti_y_coord_ratl_map(outP[0], outP[1])
    10081021            outP = [tempX, tempY]
    10091022
    10101023        if change_output_ring:
     
    24872500        x = self.__x_var
    24882501        y = self.__y_var
    24892502
    2490         psi_out = self.__psi(x=xP,y=yP)
    2491         phi_out = self.__phi(x=xP,y=yP)
    2492         omega_out =self.__omega(x=xP, y=yP)
     2503        psi_out = self.__psi(xP,yP)
     2504        phi_out = self.__phi(xP,yP)
     2505        omega_out =self.__omega(xP, yP)
    24932506
    24942507        psi_inv_out = 1/psi_out
    24952508