FormalConjectures/Wikipedia/Mersenne.lean

GitHub source file

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)
  1. def Mersenne.Nat.GivesWagstaffPrime A Wagstaff prime is a prime number of the form $(2^p+1)/3$ line 38 source

    Source documentation

    A Wagstaff prime is a prime number of the form $(2^p+1)/3$.

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: And, Odd, Nat.Prime, HDiv.hDiv, HAdd.hAdd, HPow.hPow, OfNat.ofNat

    10 instances, coercions and auxiliary constants left out.

    def GivesWagstaffPrime (p : ℕ) : Prop :=
    …
  2. def Mersenne.Nat.IsSpecialForm Holds when there is exists a number k such that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$ line 44 source

    Source documentation

    Holds when there is exists a number k such that $p = 2^k \\pm 1$ or $p = 4^k \\pm 3$.

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: Exists, Or, Eq, HAdd.hAdd, HPow.hPow, OfNat.ofNat, HSub.hSub

    9 instances, coercions and auxiliary constants left out.

    def IsSpecialForm (p : ℕ) : Prop :=
    …
  3. def Mersenne.catalanMersenne The Catalan-Mersenne numbers, defined recursively by $c_0 = 2$ and $c_{n+1} = 2^{c_n} - 1$ line 55 source

    Source 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: Nat

    2 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$
    -/
  4. def Mersenne.NewMersenneConjectureStatement 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 line 67 source

    Source documentation

    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$

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: And, Nat.Prime, mersenne, Mersenne.Nat.GivesWagstaffPrime, Mersenne.Nat.IsSpecialForm

    def NewMersenneConjectureStatement (p : ℕ) : Prop :=
    …
  5. theorem Mersenne.new_mersenne_conjecture For any odd natural number p if two of the following conditions hold, then all three must hold: 1 sorry line 80 source

    Source documentation

    For any odd natural number p if 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$

    depends on sorry what this means

    Statement uses: Nat, Odd, Mersenne.NewMersenneConjectureStatement

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    3 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

  6. theorem Mersenne.new_mersenne_conjecture_of_prime It suffices to check this conjecture for odd primes line 87 source

    Source documentation

    It suffices to check this conjecture for odd primes. The statement fails at p = 2: mersenne 2 = 3 is prime and 2 = 2 ^ 0 + 1, but 2 gives no Wagstaff prime.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Nat.Prime, Odd, Mersenne.NewMersenneConjectureStatement

    Proof 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_prime and 28 more

    58 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

  7. theorem Mersenne.new_mersenne_conjecture.variants.prime The New Mersenne Conjecture statement holds for odd primes sorry line 127 source

    Source documentation

    The New Mersenne Conjecture statement holds for odd primes.

    depends on sorry what this means

    Statement uses: Nat, Nat.Prime, Odd, Mersenne.NewMersenneConjectureStatement

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    3 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

  8. theorem Mersenne.infinitely_many_mersenne_primes Are there infinitely many Mersenne primes? sorry line 135 source

    Source documentation

    Are there infinitely many Mersenne primes?

    depends on sorry what this means

    Statement uses: Iff, True, Set.Infinite, Nat, Set.ofPred, Nat.Prime, mersenne

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    1 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
    …
  9. theorem Mersenne.catalans_mersenne_conjecture The first five Catalan-Mersenne numbers $c_0, \ldots, c_4$ are known to be prime sorry line 145 source

    Source 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.catalanMersenne

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    4 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