4 Integer square roots (floor)
For non-square \(D\), Pell's equation \(x^2 = Dy^2 + 1\) has a fundamental solution (the solution with \(y \neq 0\) and smallest \(y\)) (PellAll). Of the outline of its proof, we show the part from Dirichlet's approximation to "two pairs of the same class" (Ltwo). The last step, Brahmagupta's identity (which needs signed differences), is not yet ported (see the note in the section "D is not a square"). The main theorem of §1 is in the form "if there is a fundamental solution" and holds independently of this.
Outline: obtain approximations of \(\sqrt{D}\) using integers only (Dirichlet: put \(N+1\) values of \(k\) into \(N\) boxes = pigeonhole) → there are infinitely many solutions of \(|p^2 - Dq^2| \le 2(s+1)\) → by a pigeonhole on values and remainders, two pairs of the same class → by Brahmagupta's identity, \(x^2 - Dy^2 = 1\). That \(D\) is not a square (Lnsq) is a descent from \(x^2 = Dn^2\).
For every natural number \(m\) there is a natural number with \(r^2 \le m < (r+1)^2\), namely \(r\) (induction on \(m\): if \(m + 1 = (r+1)^2\), take \(r + 1\)).
Lisq …
\(m \in \mathbb{M} \Longrightarrow \exists r \in \mathbb{M} . r \cdot r \le m , m < ( r + 1 ) \cdot ( r + 1 )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,Axℤ ,⋅0X