Lemma 5.7.5 — Rational approximation with a bounded denominator
ProvedSteinENT.bounded_rational_approximationFor a real number and a positive integer , there is a reduced fraction with
The simultaneous denominator and error bounds provide the approximation input to the two-squares argument.
Formalization Note A rational number carries a reduced numerator and a positive denominator. Stein defines natural numbers as , so the Lean statement makes explicit.
import Mathlib.NumberTheory.SumTwoSquares import Mathlib.NumberTheory.DiophantineApproximation.Basic import Mathlib.Tactic
namespace SteinENT
theorem bounded_rational_approximation (x : ℝ) (n : ℕ) (hn : 0 < n) :
∃ q : ℚ, 0 < q.den ∧ q.den ≤ n ∧
|x - q| ≤ 1 / ((q.den : ℝ) * (n + 1)) := by sorry
end SteinENTRead-back
What the Lean code literally says, in plain math · Codex (exact model identifier unavailable in auditor runtime)
Read-back model: unavailable (the exact runtime model identifier is not exposed).
For every real number and every natural number satisfying , there exists a rational number such that, writing , one has , , and . The denominator is a natural number: it is the positive denominator in the canonical reduced expression , where , , , and the natural-number gcd of and is ; in particular the denominator of every integer rational, including , is . The bounds on are natural-number inequalities, whereas , , and are interpreted as real numbers in the absolute-value inequality, whose division and addition are real operations. Positivity of is explicitly included in the conclusion and also holds for every rational number by its representation; together with it makes the real denominator positive. The number may be any real number, rational or irrational and of any sign, and the existentially quantified has no imposed sign or numerator bound. The case is excluded; is included and requires and . The error bound is non-strict, and neither uniqueness nor infinitely many choices of is asserted. There are no further assumptions.
Confirmed by the mission captain (proposal self-audit).