ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 28 Oct 2021 02:19:37 +0200Symbolic computation of multiples of a point in elliptic curve.https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/ Suppose we have an elliptic curve over the rational field $E(\mathbb{Q}).$ Let $P = (s,t)\in E(\mathbb{Q})$ be a point with $s,t$ being symbolic variables.
Then we see that $n*P = (f_{n1}/g_{n1}, f_{n2}/g_{n2})$, where $f_{ni}, g_{ni}$ are polynomials in the variables $s,t.$ In SageMath after defining the curve and the symbolic variables $s$ and $t$ if I write $P = E(s,t)$, it is giving error. I am looking for method by which I can find all these polynomials in the variabls $s,t$ using SageMath.Tue, 26 Oct 2021 11:55:03 +0200https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/Comment by nbruin for <p>Suppose we have an elliptic curve over the rational field $E(\mathbb{Q}).$ Let $P = (s,t)\in E(\mathbb{Q})$ be a point with $s,t$ being symbolic variables.
Then we see that $n*P = (f_{n1}/g_{n1}, f_{n2}/g_{n2})$, where $f_{ni}, g_{ni}$ are polynomials in the variables $s,t.$ In SageMath after defining the curve and the symbolic variables $s$ and $t$ if I write $P = E(s,t)$, it is giving error. I am looking for method by which I can find all these polynomials in the variabls $s,t$ using SageMath.</p>
https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?comment=59488#post-id-59488Note that if $s,t$ are symbolic variables, then $(s,t)$ is not a pair of rational numbers, so it does not lie in $E(\mathbb{Q})$. Furthermore, if $s,t$ are just symbolic variables then $t^2\neq s^3+c_4s+c_6$ identically, since they are just independent variables. You'd want to work in a ring or field where you actually have $s,t$ that satisfy the relation required. The function field of $E$ would do.Tue, 26 Oct 2021 20:43:52 +0200https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?comment=59488#post-id-59488Comment by tmonteil for <p>Suppose we have an elliptic curve over the rational field $E(\mathbb{Q}).$ Let $P = (s,t)\in E(\mathbb{Q})$ be a point with $s,t$ being symbolic variables.
Then we see that $n*P = (f_{n1}/g_{n1}, f_{n2}/g_{n2})$, where $f_{ni}, g_{ni}$ are polynomials in the variables $s,t.$ In SageMath after defining the curve and the symbolic variables $s$ and $t$ if I write $P = E(s,t)$, it is giving error. I am looking for method by which I can find all these polynomials in the variabls $s,t$ using SageMath.</p>
https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?comment=59485#post-id-59485Could you please provide your current code so that we could understand the issue ?Tue, 26 Oct 2021 12:05:22 +0200https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?comment=59485#post-id-59485Answer by Max Alekseyev for <p>Suppose we have an elliptic curve over the rational field $E(\mathbb{Q}).$ Let $P = (s,t)\in E(\mathbb{Q})$ be a point with $s,t$ being symbolic variables.
Then we see that $n*P = (f_{n1}/g_{n1}, f_{n2}/g_{n2})$, where $f_{ni}, g_{ni}$ are polynomials in the variables $s,t.$ In SageMath after defining the curve and the symbolic variables $s$ and $t$ if I write $P = E(s,t)$, it is giving error. I am looking for method by which I can find all these polynomials in the variabls $s,t$ using SageMath.</p>
https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?answer=59506#post-id-59506Here a code that for a given elliptic curve $E$ and an integer $n$ returns polynomials $f_{n1}, g_{n1}, f_{n2}, g_{n2}$:
def get_poly(E, n):
P.<s,t> = PolynomialRing(E.base_ring())
a = E.a_invariants()
R = P.quotient_ring(t^2 + (a[0]*s + a[2])*t - (s^3 + a[1]*s^2 + a[3]*s + a[4])).fraction_field()
Q = E.change_ring(R)(s,t) * n
return Q[0].numerator().lift(), Q[0].denominator().lift(), Q[1].numerator().lift(), Q[1].denominator().lift()
For example, `get_poly( EllipticCurve(QQ,[1,2]), 2 )` gives:
(s*t^2 - 3*s^2 - 18*s + 1, 4*t^2, t^4 + 3*s*t^2 - 9*s^2 + 36*t^2 - 54*s - 109, 8*t^3)Thu, 28 Oct 2021 02:19:37 +0200https://ask.sagemath.org/question/59484/symbolic-computation-of-multiples-of-a-point-in-elliptic-curve/?answer=59506#post-id-59506