# Three points on a line after homomorphism (elementary algebra)

While going through the proof of Mordell's theorem on elliptic curves, I came across a certain homomorphism, and the problem is showing that this is indeed a homomorphism. I assure anyone reading this that NO elliptic curve knowledge is required since this is only an elementary algebra question. Let me introduce the map.

Background (Begin)

Let $$E$$ and $$\overline{E}$$ be elliptic curves given by the equations \begin{align*} E:y^2=x^3+ax^2+bx\quad\text{and}\quad\overline{E}:y^2=x^3+\overline{a}x^2+\overline{b}x,\quad a,b\in\mathbb{Q} \end{align*} where $$\overline{a}=-2a$$ and $$\overline{b}=a^2-4b$$. We define $$T=(0,0)\in E$$.

Then there is a homomorphism $$\varphi:E\to\overline{E}$$ defined by \begin{align*} \varphi(P)= \begin{cases} \left(\frac{y^2}{x^2},\frac{y(x^2-b)}{x^2}\right),\quad&\text{if }P=(x,y)\neq\mathscr{O},T\\ \overline{\mathscr{O}},&\text{if }P=\mathscr{O},T \end{cases} \end{align*} where $$\ker(\varphi)=\{\mathscr{O},T\}$$.

I already showed that the map is well-defined. No problem not knowing what $$\mathscr{O}$$ is since I already showed that \begin{align*} \varphi(P+Q)=\varphi(P)+\varphi(Q),\quad\forall P,Q\in\{\mathscr{O},T\}\text{ and for all }P\in E\text{ and all }Q\in\{\mathscr{O},T\}. \end{align*} So nothing with $$T$$ nor $$\mathscr{O}$$ is to be computed. Now it remains for me to show that \begin{align*} \varphi(P+Q)=\varphi(P)+\varphi(Q),\quad\forall P,Q\in E-\{\mathscr{O},T\} \end{align*} and I'm going to show this, knowing that $$\varphi(-P)=-\varphi(P)$$ for all $$P\in E$$ (without knowledge of elliptic curves, we can assume), by taking three points $$P,Q,R\in E$$ such that $$P+Q+R=\mathscr{O}$$ and show that \begin{align*} \varphi(P+Q)=\varphi(-R)=-\varphi(R)=\varphi(P)+\varphi(Q) \end{align*} which means exactly the same as showing that for three collinear points $$P,Q,R$$, that then $$\varphi(P),\varphi(Q),\varphi(R)$$ are also collinear.

Background (End)

Let's start. Let $$y=\beta x+\gamma$$ be the line on which $$P=(x_p,y_p),Q=(x_q,y_q),R=(x_r,y_r)$$ lie where $$\beta=\frac{y_p-y_q}{x_p-x_q}$$, $$\gamma=y_p-\beta x_p$$ and additionally we know that $$R=(\beta^2-(a+x_p+x_q),\beta x_r+\gamma)$$ by earlier computations I did for myself and I know they're true. Know I compute the points after applying $$\varphi$$: \begin{align*} P'=(X_P,Y_P)=\varphi(x_p,y_p)\\ Q'=(X_Q,Y_Q)=\varphi(x_q,y_q)\\ R'=(X_R,Y_R)=\varphi(x_r,y_r) \end{align*} Let $$y=\delta x+\eta$$ be the line on which both $$P'$$ and $$Q'$$ lie and thus $$\delta=\frac{Y_P-Y_Q}{X_P-X_Q}$$ and $$\eta=Y_P-\delta X_P$$. If I know compute $$Y_R-(\delta X_R+\eta)$$ with Mathematica, I don't get zero but it should be that $$R'$$ lies on the line $$y=\delta x+\eta$$ because it's in my book and John Tate said so... I even gave Mathematica extra assumptions on the points $$P,Q,R,P',Q',R'$$, the equations for the elliptic curves $$E$$. (Note that $$P',Q',R'$$ lie on $$\overline{E}$$ because the map is well-defined.) This should be easy but somehow it's also not since I don't get a proper result. Any help or suggestion is appreciated!

The following Mathematica code easily solves your problem in two ways.

(1) Using slope intercept given two points to find equation of line.

(2) Using the determinant of a $$3\times 3$$ matrix equaling zero.

ClearAll[a, b, phi, testE, testE2, rule, xp, yp, xq, yq, xr, yr];
a2 = -2*a; b2 = a^2 - 4*b;
phi[{x_, y_}] := {y^2, y (x^2 - b)}/x^2 // Simplify;
testE[{x_, y_}] := -y^2 + x^3 + a*x^2 + b*x;
testE2[{x_, y_}] := -y^2 + x^3 + a2*x^2 + b2*x;

rules = {yp -> Sqrt[xp^3 + a*xp^2 + b*xp],
yq -> Sqrt[xq^3 + a*xq^2 + b*xq]};
(*" compute point R "*)
be = (yp - yq)/(xp - xq); ga = yp - be*xp;
xr = be^2 - (a + xp + xq); yr = be*xr + ga;
P = {xp, yp}; Q = {xq, yq}; R = {xr, yr};
M = {Ph = {xp, yp, 1}, Qh = {xq, yq, 1}, Rh = {xr, yr, 1}};

Print["P,Q,R collinear via Det[] is ", 0 == Det[M] /. rules // Simplify];
Print["P,Q,R on curve E is ", {0, 0, 0} == testE /@ {P, Q, R} /. rules // Simplify];

(*" collinearity coefficients for P,Q,R "*)
Sp = (xp - xq)^2*(a + xp + 2*xq) - (yp - yq)^2;
Sq = (xp - xq)^2*(a + 2*xp + xq) - (yp - yq)^2;
Sr = (xp - xq)^3;

Print["P,Q,R collinear via Sp,Sq,Sr is ", {0, 0, 0} ==
Sp*Ph - Sq*Qh + Sr*Rh // Simplify];

(*" get P2,Q2,R2 via homomorphism phi[] "*)
P2 = phi[P]; Q2 = phi[Q]; R2 = phi[R];
Print["P2,Q2,R2 on curve E2 is  ", {0, 0, 0} == testE2 /@
{P2, Q2, R2} /. rules // Simplify]
(*" get coordinate for P2,Q2,R2 "*)
{Xp, Yp} = P2; {Xq, Yq} = Q2; {Xr, Yr} = R2;
M2 = {{Xp, Yp, 1}, {Xq, Yq, 1}, {Xr, Yr, 1}};
Print["P2,Q2,R2 collinear via Det[] is ", 0 == Det[M2] /. rules // Simplify];

(*" get slope and intercept "*)
de = (Yp - Yq)/(Xp - Xq) // Factor;
et = Yp - de*Xp // Factor;
Print["R2 is on line y=de*x+et: ", Yr == de*Xr + et /. rules // Simplify];

• Nice! I will give it a good look tomorrow. Thanks for your time and answer! – Algebear May 2 '19 at 20:34
• Thanks for your code! The part about the collinearity looks extensive; I'll stick to the original approach. Why does taking the rules to be $y=\sqrt{x^3+ax^2+bx}$ work, but taking $y^2=x^3+ax^2+bx$ does not work? Because the point $P$ may also satisfy $y_p=-\sqrt{x_p^3+ax_p^2+bx_p}$. – Algebear May 3 '19 at 21:29
• The way that Mathematica works is complicated. Sometimes instead of a = b you should use a -> b instead. In the case of y -> Sqrt[...], I could have used y^2 -> x^3 ... but it would not do the job. it is trial and error here. – Somos May 3 '19 at 22:51
• The post on Mathematica SE I posted yesterday (and already deleted) included a question about me being dissatisfied with taking square roots. I found a list of rules that works! A slight improvement: now I include all powers from 2 upto 8 (also odd ones) of yp and yq. e.g. yp^5 -> (xp^3 + a*xp^2 + b*xp)^2 yp had to be included plus the other powers. Then there were some struggles with ExpandAll, Simplify and more of that... But it worked. Still, your code forms most of the structure in my current code. Thanks again! – Algebear Jun 12 '19 at 16:43
• @Algebear Your comment "Then there were some struggles ..." is how I usually experience Mathematica. Glad that I could help you out. – Somos Jun 12 '19 at 17:14