Wagstaff primes, special forms, the New Mersenne statement and Catalan--Mersenne numbers
DefinitionFCP_MersenneFix a natural number . We say gives a Wagstaff prime when is odd and is prime, and that has special form when or for some .
The New Mersenne statement at is the assertion that among the three conditions ( prime), ( prime) and ( of special form), any two imply the third.
The Catalan--Mersenne numbers are and .
import Mathlib namespace FCP.Mersenne /-- `GivesWagstaffPrime p` holds when `p` is odd and `(2 ^ p + 1) / 3` (natural division) is prime; such a prime is called a Wagstaff prime. -/ def GivesWagstaffPrime (p : ℕ) : Prop := Odd p ∧ Nat.Prime ((2 ^ p + 1) / 3) /-- `IsSpecialForm p` holds when `p = 2 ^ k + 1`, `p = 2 ^ k - 1`, `p = 4 ^ k + 3` or `p = 4 ^ k - 3` for some `k : ℕ` (subtraction is truncated subtraction of naturals). -/ def IsSpecialForm (p : ℕ) : Prop := ∃ k : ℕ, p = 2 ^ k + 1 ∨ p = 2 ^ k - 1 ∨ p = 4 ^ k + 3 ∨ p = 4 ^ k - 3 /-- The New Mersenne conjecture's assertion at `p`: among the three conditions "`2 ^ p - 1` is prime", "`(2 ^ p + 1) / 3` is prime" and "`p` has special form", any two imply the third. -/ def NewMersenneStatement (p : ℕ) : Prop := ((mersenne p).Prime ∧ GivesWagstaffPrime p → IsSpecialForm p) ∧ ((mersenne p).Prime ∧ IsSpecialForm p → GivesWagstaffPrime p) ∧ (GivesWagstaffPrime p ∧ IsSpecialForm p → (mersenne p).Prime) /-- The Catalan-Mersenne numbers `c 0 = 2`, `c (n+1) = 2 ^ c n - 1`. -/ def catalanMersenne : ℕ → ℕ | 0 => 2 | n + 1 => 2 ^ catalanMersenne n - 1 end FCP.Mersenne
Read-back
What the Lean code literally says, in plain math · Aristotle by Harmonic (non-blind: same agent that drafted the statements)
Non-blind read-back. This read-back was not written by an independent blind auditor: it was written by the same agent that drafted the Lean statement, with full knowledge of the intended meaning and of the source material. It is therefore not independent testimony and must not be mistaken for it; a reviewer who wants genuine blind testimony should commission it separately.
Four definitions about natural numbers.
-
Gives a Wagstaff prime at : is odd and the natural number is prime, where the division is truncating natural-number division (it discards any remainder rather than requiring ).
-
Special form at : there exists a natural number with , or , or , or ; the subtractions are truncated natural subtraction, so e.g. and .
-
New Mersenne statement at : the conjunction of three implications — if is prime and gives a Wagstaff prime then has special form; if is prime and has special form then gives a Wagstaff prime; if gives a Wagstaff prime and has special form then is prime. Here is the Mersenne number of .
-
Catalan--Mersenne numbers: the sequence with and in truncated natural subtraction.
Confirmed by the mission captain (proposal self-audit).