Solution (source code)

= Solution

Since $\widehat h-h$ is bounded, a bound on $\widehat h(P)$ bounds the <projective height> of $x(P)$. The <Northcott theorem> gives only finitely many possible rational $x$-coordinates, and each has at most two points above it. Hence
$$
\boxed{N(B)<\infty.}
$$

By the <Mordell-Weil theorem>, $E(\mathbb Q)\cong\mathbb Z^r\oplus E(\mathbb Q)_{\mathrm{tors}}$. The canonical height is a positive-definite <quadratic form> on the lattice $\mathbb Z^r$, so <canonical-height lattice-point growth> gives
$$
N(B)=O(B^{r/2}).
$$
If $r=0$, this count is bounded; if $r=1$, it is $O(\sqrt B)$. Consequently
$$
\boxed{\frac{N(B)}{\sqrt B}\longrightarrow\infty\quad\Longrightarrow\quad\operatorname{rank}E(\mathbb Q)\geq2.}
$$