Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
138 views
# Elliptic Curves # EllipticCurve([a1,a2,a3,a4,a6]) returns y^2+a1xy+a3y=x^3+a2x^2+a6 # EllipticCurve([a4,a6]) returns y^2=x^3+a4x+a6 # EllipticCurve(j) returns EC with j-invariant j # EllipticCurve(label) returns the EC over Q from Cremona database # EllipticCurve(R,[...]) creates EC over the ring R
# Examples of EC/ff and torsion subgroups E = EllipticCurve([-4, 0]); E
Elliptic Curve defined by y^2 = x^3 - 4*x over Rational Field
G = E.torsion_subgroup(); G
Torsion Subgroup isomorphic to Z/2 + Z/2 associated to the Elliptic Curve defined by y^2 = x^3 - 4*x over Rational Field
print "Order:", G.order(), "No. generators:", G.ngens()
Order: 4 No. generators: 2
for k in range(0,G.ngens()): print G.gen(k)
(-2 : 0 : 1) (0 : 0 : 1)
# Example y^2=x^3+2 E = EllipticCurve([0, -2]); E G = E.torsion_subgroup(); G print "Order:", G.order(), "No. generators:", G.ngens() for k in range(0,G.ngens()): print G.gen(k)
Elliptic Curve defined by y^2 = x^3 - 2 over Rational Field Torsion Subgroup isomorphic to Trivial group associated to the Elliptic Curve defined by y^2 = x^3 - 2 over Rational Field Order: 1 No. generators: 0
# Counting the number of points p=7; n=1; q=p^n; E=EllipticCurve(GF(q),[0,1]); E N1=E.cardinality(); N1 E.points() a=1+q-N1; print "p=", p, "q=", q, "N1(q)=", N1, " Defect a=",a
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7 12 [(0 : 1 : 0), (0 : 1 : 1), (0 : 6 : 1), (1 : 3 : 1), (1 : 4 : 1), (2 : 3 : 1), (2 : 4 : 1), (3 : 0 : 1), (4 : 3 : 1), (4 : 4 : 1), (5 : 0 : 1), (6 : 0 : 1)] p= 7 q= 7 N1(q)= 12 Defect a= -4
# see also is_quadratic_twist() function
# Weil zeros # generates Weil Betti polynomial # lists its roots: Weil zeros
from sage.rings.polynomial.complex_roots import complex_roots # imports the roots function x=polygen(ZZ); wpoly=1-a*x+q*x^2; wpoly # generates Weil Betti polynomial wzeros=complex_roots(wpoly, retval='algebraic'); wzeros # computes the roots in alg closure of Q
7*x^2 + 4*x + 1 [(-0.2857142857142857? - 0.2474358296526968?*I, 1), (-0.2857142857142857? + 0.2474358296526968?*I, 1)]
# Compute the Weil frequencies: wzeros[0]=r e^(it) ︠b0ea8e97-a5a6-4496-a690-26ac76e91f6e︠ # ... later ... # define as a routine when stabilized and loop it on a set of primes, # n>1 extensions for later ... ︠73a0b496-7b49-464a-b4e6-f8c9a6e95ca4︠