Solution (source code)

= Solution

The <Mordell-Weil theorem> gives $E(\mathbb Q)\cong E(\mathbb Q)_{\rm tors}\oplus\mathbb Z^r$. Move the rational point of order two to $(0,0)$ and clear denominators to obtain an integral <Weierstrass equation of an elliptic curve>
$$
E:y^2=x(x^2+ax+b),\qquad b(a^2-4b)\ne0.
$$
The <two-isogeny formula> gives $E':Y^2=X(X^2-2aX+a^2-4b)$ and <dual isogenies> $\phi:E\to E'$, $\widehat\phi:E'\to E$ with $\widehat\phi\phi=[2]$. Compute the <torsion subgroup> using <reduction of torsion points on an elliptic curve> at several good primes, followed by <division polynomials of an elliptic curve> to identify the possible points.

For the free part, use <two-isogeny descent>. The <two-torsion square-class homomorphism> is
$$
\alpha(O)=1,\qquad \alpha((0,0))=[b],\qquad \alpha((x,y))=[x]
$$
in $\mathbb Q^*/\mathbb Q^{*2}$, with <kernel> $\widehat\phi E'(\mathbb Q)$; define $\alpha'$ on $E'$ similarly. The <prime-support bound in two-isogeny descent> restricts the first image to signed square-free divisors of $b$ and the second to those of $a^2-4b$. For each candidate $d$, solve its <two-isogeny descent quartic>
$$
N^2=dU^4+aU^2V^2+\frac bd V^4.
$$
Test <local solubility> at the real place and the relevant <p-adic fields>, discard impossible classes, and search the surviving coverings for <rational points>. A point with $UV\ne0$ gives $x=d(U/V)^2$, $y=dUN/V^3$. Include the identity and rational <2-torsion> cases separately. Once both rational images are determined, the <two-isogeny rank formula> gives
$$
2^r=\frac{\#\alpha(E(\mathbb Q))\,\#\alpha'(E'(\mathbb Q))}{4}.
$$
The point searches give explicit candidates for a basis. Their <canonical height pairing> can certify independence; <Mordell-Weil saturation> and effective height bounds then certify that they generate the full free part. Rank alone does not certify generators of the whole <Mordell-Weil group>. If the rational images are not fully determined, the procedure instead supplies lower and upper bounds on the <rank of an elliptic curve>.