Sierpiński's covering lemma for
ProvedSierpinski1960.key_lemmaLet , where . Let be a natural number with satisfying the two congruences
Then for every integer the number is composite, i.e.
This is the central claim of Sierpiński's proof: every is covered by one of the primes , , , each of which divides for the in its residue class.
Formalization Note The first congruence is Nat.ModEq; the second is Int.ModEq applied to the integer cast of , so that is literal. is written fermatNumber 5 / 641.
import Mathlib.NumberTheory.Fermat import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.ModEq import Mathlib.Data.Set.Finite.Basic import Mathlib.Tactic.NormNum.Prime open Nat
namespace Sierpinski1960
theorem key_lemma (k : ℕ) (hkp : fermatNumber 5 / 641 < k)
(h₁ : k ≡ 1 [MOD (2 ^ 32 - 1) * 641])
(h₂ : (k : ℤ) ≡ -1 [ZMOD ((fermatNumber 5 / 641 : ℕ) : ℤ)]) :
∀ n : ℕ, 1 ≤ n → 1 < k * 2 ^ n + 1 ∧ ¬ (k * 2 ^ n + 1).Prime := by sorry
end Sierpinski1960Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Read-back of key_lemma (namespace Sierpinski1960).
Notation: is the Mathlib Fermat number, and
is its natural-number (rounded-down) quotient by . Let
where is natural-number subtraction (it does not truncate here since ). Computed with Python for orientation: (the division is exact), , .
Variable and hypotheses. Let be a natural number satisfying all three of:
- (strict), so ;
- , meaning (natural numbers; since this is ordinary congruence to );
- as integers: the integer and the integer have the same remainder modulo the integer (Mathlib's integer remainder, non-negative for a nonzero modulus), i.e. .
Conclusion. For every natural number with (so is excluded), both
hold, all quantities being natural numbers.
Edge cases and satisfiability. The hypotheses are not vacuous: computed with Python, , and the least natural number satisfying both congruences is , which is larger than , so it satisfies all three hypotheses; the solutions are exactly the in that residue class modulo (which equals , computed). Every admissible is therefore at least . The first conjunct is automatic once and is stated separately. Nothing is said about , i.e. about .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.