Every prime above 5 ends in 1, 3, 7 or 9
ProvedPrimeEndings.prime_endingelementary-number-theoryprime-numberssieve-of-eratosthenes
Every prime satisfies .
Preamble
import Definitions.Def_PrimeEndings_Defs import Mathlib open PrimeEndings
Formal statement
namespace PrimeEndings
theorem prime_ending (p : ℕ) (hp : p.Prime) (h5 : 5 < p) :
p % 10 = 1 ∨ p % 10 = 3 ∨ p % 10 = 7 ∨ p % 10 = 9 := 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, `prime_ending`
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
For every natural number : if is prime and , then the last decimal digit of is , , or , i.e.
No defined symbols from the bundle are used. The primes are excluded by the hypothesis (note itself would satisfy the conclusion but is excluded anyway).
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.