Ticket #8349: trac_8349.patch

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

    # HG changeset patch
    # User Craig Citro <craigcitro@gmail.com>
    # Date 1267036455 28800
    # Node ID efec3c039f8664b62984828822c6ec85d9642ac4
    # Parent  d338dae0e4e1a9c707c90f68eaef8355f4fd7401
    Fix for trac #8349: issue with codomains in elliptic curve isogeny objects.
    
    diff -r d338dae0e4e1 -r efec3c039f86 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