1 | initial version |
Pretty much following the this answer, we have
K.<a> = NumberField(x^2-x-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])
print( P + Q )
which gives
((r^2u + ru^2 - 2ru - su - rv - 2sv + (-131a - 205)r - s + (-131a - 205)u - v + (3516a + 5490))/(r^2 - 2ru + u^2) : (-r^2su^2 - 3rs^2u^2 - 3s^3u^2 + r^2s^2v + 3r^2suv + rs^2uv + r^2u^2v - 3rsu^2v - 5s^2u^2v + 5r^2sv^2 + 3r^2uv^2 - rsuv^2 - su^2v^2 + 3r^2v^3 + (786a + 1234)r^2su + 6rs^2u + 2s^3u + (-1179a - 1854)rsu^2 - 15s^2u^2 + 8r^2sv + 2rs^2v + 2s^3v + (1179a + 1854)r^2uv + s^2uv + (-786a - 1234)ru^2v - 8su^2v + 15r^2v^2 - rsv^2 - 6ruv^2 - 2suv^2 - 2rv^3 - 2sv^3 + (-15560a - 24297)r^2s + (262a + 409)rs^2 + (131a + 205)s^3 + (18049a + 28196)r^2u + (15691a + 24512)rsu + (-262a - 402)s^2u + (-18049a - 28196)ru^2 + (262a + 395)su^2 + (-262a - 395)r^2v + rsv + (-262a - 406)s^2v + (-15691a - 24512)ruv - suv + (15560a + 24297)u^2v + (262a + 402)rv^2 + (262a + 406)sv^2 + (-262a - 409)uv^2 + (-131a - 205)v^3 + (44370a + 69288)r^2 + (67486a + 105382)rs + (-5143a - 8031)s^2 + (137702a + 215034)su + (-44370a - 69288)u^2 + (-137702a - 215034)rv + (-67486a - 105382)uv + (5143a + 8031)v^2 + (-5689523a - 8884492)r + (-2852607a - 4454497)s + (5689523a + 8884492)u + (2852607a + 4454497)v)/(r^2s^2 - 5r^2su - 5rs^2u + 10rsu^2 + 10s^2u^2 - 10r^2uv + 5ru^2v - 10r^2v^2 + 5ruv^2 - u^2v^2 + 3r^2s + 2rs^2 + s^3 + (-1965a - 3080)r^2u - 10rsu - 5s^2u + (1965a + 3080)ru^2 + 10su^2 - 10r^2v + 10ruv - 3u^2v + 5rv^2 - 2uv^2 - v^3 + (16084a + 25116)r^2 + (262a + 412)rs + (131a + 207)s^2 - 5su + (-16084a - 25116)u^2 + 5rv + (-262a - 412)uv + (-131a - 207)v^2 + (60454a + 94404)r + (-1627a - 2539)s + (-60454a - 94404)u + (1627a + 2539)*v) : 1)
2 | No.2 Revision |
Pretty much following the this answer, we have
K.<a> = NumberField(x^2-x-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])
print( P + Q )
which gives
((r^2u + ru^2 - 2ru - su - r
((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 3 | No.3 Revision |
Pretty much following the this answer, we have
t = polygen(QQ)
K.<a> = NumberField(x^2-x-4)
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])
print( x, y, _ = P + Q )
Q
print('x =',x)
print('x =',x)
which givesprints:
((r^2*u 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) : 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) : 1)
2539)*v)
4 | No.4 Revision |
Pretty much following the 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('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)
5 | No.5 Revision |
Pretty much following the 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)