Ask Your Question
0

how to create an elliptic curve in sage

asked 2023-05-06 09:44:49 +0100

andriam gravatar image

updated 2023-05-06 14:29:12 +0100

Max Alekseyev gravatar image

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 flag offensive close merge delete

Comments

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

John Palmieri gravatar imageJohn Palmieri ( 2023-05-06 20:29:34 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-06 15:00:38 +0100

achrzesz gravatar image

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

edit flag offensive delete link more

Comments

Many thanks to achrzesz; now its works !

andriam gravatar imageandriam ( 2023-05-06 18:25:26 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-05-06 09:44:49 +0100

Seen: 189 times

Last updated: May 06 '23