Primes up to Y decide everything up to Y squared
ProvedPrimeEndings.bootstrapelementary-number-theoryprime-numberssieve-of-eratosthenes
If then is prime iff and every prime dividing equals .
Preamble
import Definitions.Def_PrimeEndings_Defs import Mathlib open PrimeEndings
Formal statement
namespace PrimeEndings
theorem bootstrap (Y n : ℕ) (hn : n ≤ Y * Y) :
n.Prime ↔ (1 < n ∧ ∀ p, p.Prime → p ≤ Y → p ∣ n → p = n) := by sorry
end PrimeEndingsSource
mfala22ss, A window form of the sieve of Eratosthenes on the residues prime to ten, with a machine-checked proof (2026), https://github.com/mfala22ss/prime-endings, Lean file lean/Solution.lean, `bootstrap`
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
For all natural numbers and with :
So under the size hypothesis , primality of is equivalent to: and the only prime that can divide is itself (which can happen only when ). Edge cases: forces , and both sides are false; allows , and both sides are false. The size hypothesis is (inclusive). No bundle definitions are used.
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.