Lean, informalized

Nielsen & Chuang · Chapter 5, The quantum Fourier transform and its applications · p. 229

Theorem 5.1 - A rational number within the book's bound of a real number, yet missed by that number's continued fraction

A close fraction that is not a convergent.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

Let φ\varphi be a real number and s/rs/r a rational number in lowest terms, with r≥1r \ge 1. The theorem says that if |φ−s/r|≤1/(2r2)|\varphi - s/r| \le 1/(2r^2), then s/rs/r is one of the rational numbers obtained by truncating, at some step, the expansion of φ\varphi into integer parts described below. The bound 1/(2r2)1/(2r^2) is the one in Legendre’s theorem.

Continued Fractions

The continued fraction of a real number φ\varphi is the sequence of integers a0,a1,a2,…a_0, a_1, a_2, \dots obtained by taking integer parts and inverting remainders: starting from φ0=φ\varphi_0 = \varphi, ak=⌊φk⌋,φk+1=1φk−ak,a_k = \lfloor \varphi_k \rfloor, \qquad \varphi_{k+1} = \frac{1}{\varphi_k - a_k},(1) and the sequence ends at aka_k when φk\varphi_k is an integer.

The nnth convergent of φ\varphi is the rational number obtained by stopping the expansion at ana_n, [a0;a1,…,an]=a0+1a1+1⋱+1an.[a_0; a_1, \dots, a_n] = a_0 + \dfrac{1}{a_1 + \dfrac{1}{\;\ddots\; + \dfrac{1}{a_n}}}.(2)

The Claim

Theorem 1. There are a real number φ\varphi, with continued fraction a0,a1,…a_0, a_1, \dots, and a rational number s/rs/r in lowest terms such that |φ−sr|≤12r2andsr≠[a0;a1,…,an]for every n.\left|\varphi - \frac{s}{r}\right| \le \frac{1}{2r^2} \qquad\text{and}\qquad \frac{s}{r} \neq [a_0; a_1, \dots, a_n] \quad\text{for every } n.(3)✦

This is the negation of the book’s theorem, with its bound exactly as the book writes it.

What Is Checked

The claim is stated over the real numbers, the rational numbers with their denominators in lowest terms, and the continued fraction (1) of a real number with its convergents (2). What the library proves about these constructions is the existence of the counterexample (3).