Lefebvre's variations, No. 51 — on a theme by Twin primes: Clement's Wilson-type criterion for twin primes
ProvedLefebvreVariations.clement_twin_primesThis is Clement's Wilson-type criterion for twin primes.
For every integer ,
It is the analogue for twin primes of Wilson's theorem, which characterises a single prime by . The twin prime conjecture asserts that there are infinitely many with both and prime; this criterion turns the conjecture into a statement about divisibility of factorials.
Formalization Note The case is excluded: holds although is not prime.
Why this is a variation. This varies the twin prime conjecture, on the infinitude of primes with prime. It is a key lemma of Wilson type: for , both and are prime if and only if . Using it recasts twin primality as a single divisibility condition, which does not by itself settle the parent but gives it an exact arithmetic formulation.
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
/-- Clement's criterion for twin primes (a Wilson-type characterisation): for `n ≥ 2`,
`n` and `n + 2` are both prime iff `n (n + 2) ∣ 4 ((n - 1)! + 1) + n`.
(`n = 1` is the one exception: `3 ∣ 9`.)
P. A. Clement, "Congruences for sets of primes", Amer. Math. Monthly 56 (1949), 23–25. -/
theorem clement_twin_primes (n : ℕ) (hn : 2 ≤ n) :
(n.Prime ∧ (n + 2).Prime) ↔ n * (n + 2) ∣ 4 * ((n - 1).factorial + 1) + n := by
sorry
end LefebvreVariations