Survivors count the primes
ProvedPrimeEndings.survivor_countelementary-number-theoryprime-numberssieve-of-eratosthenes
For every : (the counts ).
Preamble
import Definitions.Def_PrimeEndings_Defs import Mathlib open PrimeEndings
Formal statement
namespace PrimeEndings
theorem survivor_count (x : ℕ) (hx : 5 ≤ x) :
((Finset.range (x + 1)).filter Survives).card + 3 = Nat.primeCounting x := 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, `survivor_count`
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
For every natural number with :
where is Mathlib's prime-counting function, which counts the primes (its definition is the number of primes ; checked: , ). The set on the left is the set of (the range includes ) satisfying , which unfolds to: , , and no prime with divides . The constant accounts for the three primes , all by the hypothesis . For nothing is claimed.
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.