Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic curve construction from weierstrass equation #5113

Closed
robertwb opened this issue Jan 27, 2009 · 3 comments
Closed

elliptic curve construction from weierstrass equation #5113

robertwb opened this issue Jan 27, 2009 · 3 comments

Comments

@robertwb
Copy link
Contributor

It would be nice to be able to do

        sage: x, y = var('x,y')
        sage: EllipticCurve(y^2 + y ==  x^3 + x - 9)
        Elliptic Curve defined by y^2 + y = x^3 + x - 9 over Rational Field
        
        sage: R.<x,y> = GF(5)[]
        sage: EllipticCurve(x^3 + x^2 + 2 - y^2 - y*x)
        Elliptic Curve defined by y^2 + x*y  = x^3 + x^2 + 2 over Finite Field of size 5

CC: @rlmill

Component: number theory

Issue created by migration from https://trac.sagemath.org/ticket/5113

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 28, 2009

comment:1

Attachment: 5113-ec-construction.patch.gz

I'm curious why you don't just do

a1 = -1*f.coefficient(x*y)
a2 = f.coefficient(x**2)

instead of iterating through f. I'm sure it doesn't matter.

The patch looks good though, positive review.

I've also fixed printing of elliptic curves, see #5118.

@rlmill rlmill mannequin added the s: positive review label Jan 28, 2009
@robertwb
Copy link
Contributor Author

comment:2

I tried that first. The problem is f.coefficient(x) returns everything divisible by one power of x, not the x (alone) term

sage: R.<x,y> = QQ[]
sage: f = x^2 + x*y + y^2*x
sage: f.coef
f.coefficient   f.coefficients  
sage: f.coefficient(x)
y^2 + y
sage: f.coefficient(y^2)
x

It is also harder to exclude bad terms using that method.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 29, 2009

comment:3

Merged in Sage 3.3.alpha3.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jan 29, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants