> iload "ex1-2.m"; Interactive-loading "ex1-2.m" > //Define the finite field > p := 431; > F := FiniteField(p^2); > E:= EllipticCurve([F!1, F!0]); > //Compute the j-invariant > jInvariant(E); 4 > // Point on an elliptic curve: > P2:= E![0,0]; > // Check the order of this point > Order(P2); 2 > // Compute an isogeny with kernel P: > R := PolynomialRing(F); > // IsogenyFromKernel takes in the kernel polynomial of the isogeny > E2, phi := IsogenyFromKernel(E, X - P2[1]); > E2, phi; Elliptic Curve defined by y^2 = x^3 + 427*x over GF(431^2) Elliptic curve isogeny from: CrvEll: E to CrvEll: E2 taking (x : y : 1) to ((x^2 + 1) / x : (x^2*y + 430*y) / x^2 : 1) > // Compute the dual isogeny > DualIsogeny(phi); Mapping from: CrvEll: E2 to CrvEll: E Composition of Elliptic curve isogeny from: CrvEll: E2 to CrvEll: E taking (x : y : 1) to ((323*x^2 + 1) / x : (z^132840*x^2*y + z^137160*y) / x^2 : 1) and Mapping from: CrvEll: E to CrvEll: E with equations : 430*$.1 z^139320*$.2 $.3 > // For an isogeny of prime degree, can use the following: > function Isog(P) function> Edom := Curve(P); function> n := Order(P); function> // assert IsPrime(n); function> if n eq 2 then function|if> return IsogenyFromKernel(Edom, X - P[1]); function|if> else function|if> return IsogenyFromKernel(Edom, &*[X - (i*P)[1] : i in [1..(n-1) div 2]]); function|if> end if; function> end function; > // This code works for any degree > function IsogenyFromPoint(P) function> Edom := Curve(P); function> n := Order(P); function> return IsogenyFromKernel(Edom, &*[X - (i*P)[1] : i in [1..n div 2]]); function> end function; > // Find a random point of order 16: > P := 3^3*Random(E); > while Order(P) ne 16 do while> P := 3^3*Random(E); while> end while; > // Find a second basis point for the E[16] torsion. > Q := 3^3*Random(E); > while (8*Q eq E!0) or (WeilPairing(P, Q, 16)^8 eq 1) do while> Q := 3^3*Random(E); while> end while; > // We can also check whether P, Q generate the full 16-torsion > // By checking that 8P != 8Q. > //while 8*P eq 8*Q and do > // Q := 3^3*Random(E); > //end while; > // Figuring out all the subgroups is not trivial (can't see it now). > // generates all points of exact order 16 > points := [a*P+b*Q : a,b in [0..15] | 8*(a*P+b*Q) ne E!0] ; > // I don't know how to define a list of isogenies from scratch > // This forces a list of isogenies (Magma universe) > Etemp, phitemp := IsogenyFromPoint(points[1]); > Isog16 := [phitemp]; > Prune(~Isog16); > for T in points do for> Etemp, phitemp := IsogenyFromPoint(T); for> if phitemp in Isog16 then for|if> else for|if> Isog16 := Isog16 cat [phitemp]; for|if> end if; for> end for; > // Check we have all the isogenies > #Isog16 eq 24; true > >