Exercise 5.11 — Every four consecutive integers contain a two-square gap
ProvedSteinENT.four_consecutive_gapFor every integer , at least one member of the block is not a sum of two integer squares:
This gives a uniform bound on the length of consecutive runs of represented integers.
import Mathlib.NumberTheory.SumTwoSquares import Mathlib.NumberTheory.DiophantineApproximation.Basic import Mathlib.Tactic
namespace SteinENT
theorem four_consecutive_gap (n : ℤ) :
∃ k : ℤ, 0 ≤ k ∧ k < 4 ∧ ¬ ∃ x y : ℤ, n + k = x ^ 2 + y ^ 2 := 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 integer , there exists an integer such that , , and there do not exist integers with . Thus the asserted witness is one of , and at least one of the four integers has no representation as a sum of the squares of two integers. The starting integer is unrestricted, including and negative integers; neither nor is required to be positive or nonnegative. The integers range over all integers, including zero and negative values, with no coprimality or distinctness condition. Existence of at least one such offset is asserted, without uniqueness and without requiring every offset to have the stated property; there are no hypotheses or further assumptions.
Confirmed by the mission captain (proposal self-audit).