Square-class index formula for two-isogeny descent (source code)

= Square-class index formula for two-isogeny descent
{title2=$2^r=\#\alpha(E)\,\#\alpha'(E')/4$}

For $E:y^2=x(x^2+ax+b)$ and $E':y^2=x(x^2-2ax+a^2-4b)$ over $\mathbb Q$, define the square-class homomorphisms by $\alpha(x,y)=[x]$, $\alpha(O)=1$, $\alpha((0,0))=[b]$, and similarly $\alpha'$ with $b'=a^2-4b$. Their kernels are the images of the dual degree-two <isogenies of elliptic curves>. If $r$ is the <rank of an abelian group> of $E(\mathbb Q)$, then $2^r=\#\alpha(E)\#\alpha'(E')/4$. To check the factor four, put $\delta=[\ker\widehat\phi:\ker\widehat\phi\cap\phi E]$. The index of $2E$ in $E$ is $\#\alpha(E)\#\alpha'(E')/\delta$. If $b'$ is a square, $\delta=1$ and $\#E(\mathbb Q)[2]=4$; otherwise $\delta=2$ and $\#E(\mathbb Q)[2]=2$. In either case $\delta\#E(\mathbb Q)[2]=4$.