4 Integer square roots (floor)
For non-square \(D\), Pell's equation \(x^2 = Dy^2 + 1\) has a fundamental solution (a solution with \(y \neq 0\) and \(y\) smallest) (PellAll). Of the outline of its proof, we show the part from Dirichlet's approximation up to "two pairs in 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 of the form "if there is a fundamental solution" and holds independently of this.
Outline: take approximations of \(\sqrt{D}\) using integers only (Dirichlet: \(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 in the same class → by Brahmagupta's identity, \(x^2 - Dy^2 = 1\). That \(D\) is not a square (Lnsq) is by descent from \(x^2 = Dn^2\).
For every natural number \(m\), the condition \(r^2 \le m < (r+1)^2\) is satisfied by some natural number \(r\) (by 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 ,⋅𝕄:D