# how to create an elliptic curve in sage

the following code

from sage.schemes.elliptic_curves import EllipticCurve

E = EllipticCurve('y^2 = x^3 + 1', field='GF(8)')

points = E.points()

print(points)

E.plots()


always returns the following error : ImportError: cannot import name 'EllipticCurve' from 'sage.schemes.elliptic_curves'

edit retag close merge delete

You could try from sage.schemes.elliptic_curves.all import EllipticCurve.

( 2023-05-06 20:29:34 +0200 )edit

Sort by ยป oldest newest most voted

You are trying to define a singular curve

For real elliptic curves you can try

F=GF(5^2,'a')
E=EllipticCurve([F(0),F(1)])
E

Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field in a of size 5^2

pp=E.points()
[p.xy() for p in pp[1:]]


gives all finite points

For finite fields plot is defined for prime fields

F=GF(101)
E=EllipticCurve([F(0),F(1)])
E
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 101

E.plot()


gives the plot

more

Many thanks to achrzesz; now its works !

( 2023-05-06 18:25:26 +0200 )edit