Ticket #8349: trac_8349.2.patch

File trac_8349.2.patch, 1.5 KB (added by wuthrich, 11 years ago)
  • sage/schemes/elliptic_curves/ell_curve_isogeny.py

    # HG changeset patch
    # User Chris Wuthrich <christian.wuthrich@gmail.com>
    # Date 1267038103 0
    # Node ID bd7534f00be7b291e2ef167a8eb24d7a751cdee9
    # Parent  46b1ee5997ac7e7faafdd86751fe7d121b6c1385
    trac #8349 : issue with codomains in elliptic curve isogeny objects.
    
    diff -r 46b1ee5997ac -r bd7534f00be7 sage/schemes/elliptic_curves/ell_curve_isogeny.py
    a b  
    957957            sage: phi(-P)
    958958            (4 : 4 : 1)
    959959
    960 
     960            sage: E = EllipticCurve(GF(17), [0,-1,0,-3,-1])
     961            sage: Q = E((16,0))
     962            sage: tau = E.isogeny([Q],E)
     963            sage: tau(Q)
     964            (0 : 1 : 0)
     965           
    961966        """
    962967        E1 = self.__E1
    963968        E_P = P.curve()
     
    18411846            (0, 0)
    18421847       
    18431848        """
    1844         E2 = self.__E2
    1845 
    18461849        # first check if the point is in the kernel
    18471850        if ( self.__kernel_2tor.has_key(xP) or self.__kernel_non2tor.has_key(xP) ) :
    1848             return E2(0)
     1851            return self.__intermediate_codomain(0)
    18491852
    18501853        outP = self.__compute_via_velu(xP,yP)
    18511854
     
    24352438
    24362439        """
    24372440
    2438         E2 = self.__E2
    2439 
    24402441        # first check if this is a kernel point
    24412442        # to avoid a divide by 0 error later
    24422443        if(0 == self.__inner_kernel_polynomial(x=xP)):
    2443             return E2(0)
     2444            return self.__intermediate_codomain(0)
    24442445
    24452446        (xP_out, yP_out) = self.__compute_via_kohel(xP,yP)
    24462447