1Function: ellxn
2Section: elliptic_curves
3C-Name: ellxn
4Prototype: GLDn
5Help: ellxn(E,n,{v='x}): return polynomials [A,B] in the variable v such that
6 x([n]P) = (A/B)(t) for any P = [t,u] on E outside of n-torsion.
7Doc: For any affine point $P = (t,u)$ on the curve $E$, we have
8 $$[n]P = (\phi_n(P)\psi_n(P) : \omega_n(P) : \psi_n(P)^3)$$
9 for some $\phi_n,\omega_n,\psi_n$ in $\Z[a_1,a_2,a_3,a_4,a_6][t,u]$
10 modulo the curve equation. This function returns a pair $[A,B]$ of polynomials
11 in $\Z[a_1,a_2,a_3,a_4,a_6][v]$ such that $[A(t),B(t)]
12 = [\phi_n(P),\psi_n(P)^2]$ in the function field of $E$,
13 whose quotient give the abscissa of $[n]P$. If $P$ is an $n$-torsion point,
14 then $B(t) = 0$.
15 \bprog
16 ? E = ellinit([17,42]); [t,u] = [114,1218];
17 ? T = ellxn(E, 2, 'X)
18 %2 = [X^4 - 34*X^2 - 336*X + 289, 4*X^3 + 68*X + 168]
19 ? [a,b] = subst(T,'X,t);
20 %3 = [168416137, 5934096]
21 ? a / b == ellmul(E, [t,u], 2)[1]
22 %4 = 1
23 @eprog
24