Ask Your Question
0

Adding two moving points on an elliptic curve

asked 2024-09-05 06:52:09 +0100

Panzós gravatar image

I have an elliptic curve, say 100.1-e2.

$y^2 + xy + y = x^3 - x^2 + (-131a - 205)x + (1758a + 2745)$

$ (a^{2} - a - 4 = 0) $

I choose a point P=(r,s) with parameters and another point Q=(u,v) with parameters. I want to add these two points in Sage and save the result in x and y. How can I do it?

:-(

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2024-09-05 20:08:20 +0100

Max Alekseyev gravatar image

updated 2024-09-06 16:06:53 +0100

Pretty much following this answer, we have

t = polygen(QQ)
K.<a> = NumberField(t^2-t-4)
f = lambda X, Y: Y^2 + X*Y + Y - (X^3 - X^2 + (-131*a - 205)*X + (1758*a + 2745))

L.<R,S,U,V> = PolynomialRing(K)
M.<r,s,u,v> = L.quotient([f(R,S),f(U,V)]) 
E = EllipticCurve( M.fraction_field(), [1, -1, 1, -131*a - 205, 1758*a + 2745] )
P = E.point([r,s])
Q = E.point([u,v])

x, y, _ = P + Q
print('x =',x)
print('y =',y)

which prints:

x = (r^2*u + r*u^2 - 2*r*u - s*u - r*v - 2*s*v + (-131*a - 205)*r - s + (-131*a - 205)*u - v + (3516*a + 5490))/(r^2 - 2*r*u + u^2)

y = (-r^2*s*u^2 - 3*r*s^2*u^2 - 3*s^3*u^2 + r^2*s^2*v + 3*r^2*s*u*v + r*s^2*u*v + r^2*u^2*v - 3*r*s*u^2*v - 5*s^2*u^2*v + 5*r^2*s*v^2 + 3*r^2*u*v^2 - r*s*u*v^2 - s*u^2*v^2 + 3*r^2*v^3 + (786*a + 1234)*r^2*s*u + 6*r*s^2*u + 2*s^3*u + (-1179*a - 1854)*r*s*u^2 - 15*s^2*u^2 + 8*r^2*s*v + 2*r*s^2*v + 2*s^3*v + (1179*a + 1854)*r^2*u*v + s^2*u*v + (-786*a - 1234)*r*u^2*v - 8*s*u^2*v + 15*r^2*v^2 - r*s*v^2 - 6*r*u*v^2 - 2*s*u*v^2 - 2*r*v^3 - 2*s*v^3 + (-15560*a - 24297)*r^2*s + (262*a + 409)*r*s^2 + (131*a + 205)*s^3 + (18049*a + 28196)*r^2*u + (15691*a + 24512)*r*s*u + (-262*a - 402)*s^2*u + (-18049*a - 28196)*r*u^2 + (262*a + 395)*s*u^2 + (-262*a - 395)*r^2*v + r*s*v + (-262*a - 406)*s^2*v + (-15691*a - 24512)*r*u*v - s*u*v + (15560*a + 24297)*u^2*v + (262*a + 402)*r*v^2 + (262*a + 406)*s*v^2 + (-262*a - 409)*u*v^2 + (-131*a - 205)*v^3 + (44370*a + 69288)*r^2 + (67486*a + 105382)*r*s + (-5143*a - 8031)*s^2 + (137702*a + 215034)*s*u + (-44370*a - 69288)*u^2 + (-137702*a - 215034)*r*v + (-67486*a - 105382)*u*v + (5143*a + 8031)*v^2 + (-5689523*a - 8884492)*r + (-2852607*a - 4454497)*s + (5689523*a + 8884492)*u + (2852607*a + 4454497)*v)/(r^2*s^2 - 5*r^2*s*u - 5*r*s^2*u + 10*r*s*u^2 + 10*s^2*u^2 - 10*r^2*u*v + 5*r*u^2*v - 10*r^2*v^2 + 5*r*u*v^2 - u^2*v^2 + 3*r^2*s + 2*r*s^2 + s^3 + (-1965*a - 3080)*r^2*u - 10*r*s*u - 5*s^2*u + (1965*a + 3080)*r*u^2 + 10*s*u^2 - 10*r^2*v + 10*r*u*v - 3*u^2*v + 5*r*v^2 - 2*u*v^2 - v^3 + (16084*a + 25116)*r^2 + (262*a + 412)*r*s + (131*a + 207)*s^2 - 5*s*u + (-16084*a - 25116)*u^2 + 5*r*v + (-262*a - 412)*u*v + (-131*a - 207)*v^2 + (60454*a + 94404)*r + (-1627*a - 2539)*s + (-60454*a - 94404)*u + (1627*a + 2539)*v)
edit flag offensive delete link more

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: 2024-09-05 06:50:01 +0100

Seen: 209 times

Last updated: Sep 06