Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
91 views
# Examples of Elliptic Curves, with Graphical Representations # # plot([],figsize=(4,4),title='Here is a Graph',frame=True,axes_labels=['$x$-axis, units','$y$-axis, units']) # # The examples are from Ash and Gros book Fearless symmetry # E=EllipticCurve([-1,0]); E # y2=x^3-x (implicitely) over the rational field E.plot(figsize=(4,4), thickness=4, rgbcolor=(0.1,0.7,0.1),title="Elliptic Curve",frame=True,axes_labels=['$x$-axis, units','$y$-axis, units'] )
Elliptic Curve defined by y^2 = x^3 - x over Rational Field
# Addition on Elliptic Curves # # The Group Law R=E([-1,0]); P=E([0,0]); Q=E([1,0]) # defining the obvious points on the EC <-> roots of f(x) print P, Q, R # notice the use of homogeneous coordinates
(0 : 0 : 1) (1 : 0 : 1) (-1 : 0 : 1)
# Addition Law print P+P, Q+Q, R+R # The point at infinity is (0:1:0)
(0 : 1 : 0) (0 : 1 : 0) (0 : 1 : 0)
O=E([0,1,0]); print O # ... Let's label it O
(0 : 1 : 0)
2*P == O # simple way of comparing ... ("if ... then ..." not needed)
True
(P+Q)==R
True