FormalConjectures/Wikipedia/Mersenne.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
9 declarations, 4 contain sorry, 0 declared as axioms
Conjectures about Mersenne primes
References:
Imports (1)
- def
Mersenne.Nat.GivesWagstaffPrimeA Wagstaff prime is a prime number of the form $(2^p+1)/3$ line 38 sourceSource documentation
A Wagstaff prime is a prime number of the form $(2^p+1)/3$.
standard axioms: propext what this means
Statement uses:
NatProof uses:
And,Odd,Nat.Prime,HDiv.hDiv,HAdd.hAdd,HPow.hPow,OfNat.ofNat10 instances, coercions and auxiliary constants left out.
def GivesWagstaffPrime (p : ℕ) : Prop := …
- def
Mersenne.Nat.IsSpecialFormHolds when there is exists a numberksuch that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$ line 44 sourceSource documentation
Holds when there is exists a number
ksuch that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$.standard axioms: propext what this means
Statement uses:
NatProof uses:
Exists,Or,Eq,HAdd.hAdd,HPow.hPow,OfNat.ofNat,HSub.hSub9 instances, coercions and auxiliary constants left out.
def IsSpecialForm (p : ℕ) : Prop := …
- def
Mersenne.catalanMersenneThe Catalan-Mersenne numbers, defined recursively by $c_0 = 2$ and $c_{n+1} = 2^{c_n} - 1$ line 55 sourceSource documentation
The Catalan-Mersenne numbers, defined recursively by $c_0 = 2$ and $c_{n+1} = 2^{c_n} - 1$.
standard axioms: propext what this means
Statement uses:
Nat2 instances, coercions and auxiliary constants left out.
def catalanMersenne : ℕ → ℕ | 0 => 2 | n + 1 => 2 ^ catalanMersenne n - 1 /-- A natural number `p` satisfies the statement of the New Mersenne Conjecture if whenever two of the following conditions hold, then all three must hold: 1. $2^p-1$ is prime 2. $(2^p+1)/3$ is prime 3. Exists a number `k` such that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$ -/
- def
Mersenne.NewMersenneConjectureStatementA natural numberpsatisfies the statement of the New Mersenne Conjecture if whenever two of the following conditions hold, then all three must hold: 1 line 67 sourceSource documentation
A natural number
psatisfies the statement of the New Mersenne Conjecture if whenever two of the following conditions hold, then all three must hold:- $2^p-1$ is prime
- $(2^p+1)/3$ is prime
- Exists a number
ksuch that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$
standard axioms: propext what this means
Statement uses:
NatProof uses:
And,Nat.Prime,mersenne, Mersenne.Nat.GivesWagstaffPrime, Mersenne.Nat.IsSpecialFormdef NewMersenneConjectureStatement (p : ℕ) : Prop := …
- theorem
Mersenne.new_mersenne_conjectureFor any odd natural numberpif two of the following conditions hold, then all three must hold: 1 sorry line 80 sourceSource documentation
For any odd natural number
pif two of the following conditions hold, then all three must hold:- $2^p-1$ is prime
- $(2^p+1)/3$ is prime
- Exists a number
ksuch that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$
depends on sorry what this means
Statement uses:
Nat,Odd, Mersenne.NewMersenneConjectureStatementProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem new_mersenne_conjecture (p : ℕ) (hp : Odd p) : NewMersenneConjectureStatement p := by …Mentions: Mersenne.NewMersenneConjectureStatement
- theorem
Mersenne.new_mersenne_conjecture_of_primeIt suffices to check this conjecture for odd primes line 87 sourceSource documentation
It suffices to check this conjecture for odd primes. The statement fails at
p = 2:mersenne 2 = 3is prime and2 = 2 ^ 0 + 1, but2gives no Wagstaff prime.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,Odd, Mersenne.NewMersenneConjectureStatementProof uses:
dite,Not, Mersenne.Nat.GivesWagstaffPrime,HDiv.hDiv,HAdd.hAdd,HPow.hPow,OfNat.ofNat,False,Eq,Nat.minFac,Dvd.dvd,Nat.minFac_dvd,Ne,Iff.mpr,Even,Nat.not_even_iff_odd,even_iff_two_dvd,Eq.rec,Nat.Prime.odd_of_ne_two,Nat.minFac_primeand 28 more58 instances, coercions and auxiliary constants left out.
Tactic trace: 40 steps
Open to load the checked before-and-after goal states.
theorem new_mersenne_conjecture_of_prime : (∀ p, p.Prime → Odd p → NewMersenneConjectureStatement p) → ∀ p, Odd p → NewMersenneConjectureStatement p := by …Mentions: Mersenne.NewMersenneConjectureStatement
- theorem
Mersenne.new_mersenne_conjecture.variants.primeThe New Mersenne Conjecture statement holds for odd primes sorry line 127 sourceSource documentation
The New Mersenne Conjecture statement holds for odd primes.
depends on sorry what this means
Statement uses:
Nat,Nat.Prime,Odd, Mersenne.NewMersenneConjectureStatementProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem new_mersenne_conjecture.variants.prime (p : ℕ) (hp : p.Prime) (h : Odd p) : NewMersenneConjectureStatement p := by …Mentions: Mersenne.NewMersenneConjectureStatement
- theorem
Mersenne.infinitely_many_mersenne_primesAre there infinitely many Mersenne primes? sorry line 135 sourceSource documentation
Are there infinitely many Mersenne primes?
depends on sorry what this means
Statement uses:
Iff,True,Set.Infinite,Nat,Set.ofPred,Nat.Prime,mersenneProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem infinitely_many_mersenne_primes : answer(sorry) ↔ Set.Infinite { p : ℕ | (mersenne p).Prime } := by … - theorem
Mersenne.catalans_mersenne_conjectureThe first five Catalan-Mersenne numbers $c_0, \ldots, c_4$ are known to be prime sorry line 145 sourceSource documentation
The first five Catalan-Mersenne numbers $c_0, \ldots, c_4$ are known to be prime. Catalan conjectured that they are prime "up to a certain limit". Are all Catalan-Mersenne numbers $c_n$ with $n \geq 5$ prime?
depends on sorry what this means
Statement uses:
Iff,True,Nat,GE.ge,OfNat.ofNat,Nat.Prime, Mersenne.catalanMersenneProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem catalans_mersenne_conjecture : answer(sorry) ↔ ∀ n ≥ 5, Nat.Prime (catalanMersenne n) := by …Mentions: Mersenne.catalanMersenne