FormalConjectures/Wikipedia/FortuneConjecture.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, 1 contain sorry, 0 declared as axioms

Fortune's Conjecture

A Fortunate number is the smallest integer $m > 1$ such that $p_n\\# + m$ is prime, where $p_n\\#$ denotes the primorial of the $n$-th prime — equivalently, the product of the first $n$ primes.

Fortune's Conjecture asserts that every Fortunate number is prime — equivalently, that no Fortunate number is composite.

The conjecture is named after the social anthropologist Reo Fortune, who proposed it. The first few Fortunate numbers are $3, 5, 7, 13, 23, 17, 19, 23, 37, 61, \ldots$ (OEIS A005235); all known values are prime.

References:

Imports (1)
  1. lemma FortuneConjecture.exists_one_lt_prime_add For any natural number N there is some m > 1 with N + m prime; an immediate consequence of the infinitude of primes line 50 source

    Source documentation

    For any natural number N there is some m > 1 with N + m prime; an immediate consequence of the infinitude of primes.

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

    Statement uses: Nat, Exists, And, LT.lt, OfNat.ofNat, Nat.Prime, HAdd.hAdd

    Proof uses: LE.le, Nat.exists_infinite_primes, Exists.intro, HSub.hSub, And.intro, Decidable.byContradiction, Not, Eq, Eq.mpr, id, congrArg

    17 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

    Open to load the checked before-and-after goal states.

    lemma exists_one_lt_prime_add (N : ℕ) : ∃ m, 1 < m ∧ Nat.Prime (N + m) := by
    …
  2. def FortuneConjecture.fortunateNumber The $n$-th Fortunate number (0-indexed): the smallest integer $m > 1$ such that $p_{n+1}\\# + m$ is prime line 63 source

    Source documentation

    The $n$-th Fortunate number (0-indexed): the smallest integer $m > 1$ such that $p_{n+1}\\# + m$ is prime.

    Nat.nth Nat.Prime n is the $(n+1)$-st prime (0-indexed), and primorial p is the product of all primes $\le p$; when $p$ is the $(n+1)$-st prime this equals the product of the first $n+1$ primes. Thus fortunateNumber 0 corresponds to $F_1 = 3$ in the OEIS A005235 indexing.

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

    Statement uses: Nat

    Proof uses: Nat.find, And, LT.lt, OfNat.ofNat, Nat.Prime, HAdd.hAdd, primorial, Nat.nth

    8 instances, coercions and auxiliary constants left out.

    noncomputable def fortunateNumber (n : ℕ) : ℕ :=
    …
  3. lemma FortuneConjecture.fortunateNumber_spec fortunateNumber n is greater than $1$, and adding it to the primorial of the $(n+1)$-st prime yields a prime line 69 source

    Source documentation

    fortunateNumber n is greater than $1$, and adding it to the primorial of the $(n+1)$-st prime yields a prime.

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

    Statement uses: Nat, And, LT.lt, OfNat.ofNat, FortuneConjecture.fortunateNumber, Nat.Prime, HAdd.hAdd, primorial, Nat.nth

    Proof uses: Nat.find_spec, FortuneConjecture.exists_one_lt_prime_add

    11 instances, coercions and auxiliary constants left out.

    lemma fortunateNumber_spec (n : ℕ) :
        1 < fortunateNumber n ∧
          Nat.Prime (primorial (Nat.nth Nat.Prime n) + fortunateNumber n) :=
    …

    Mentions: FortuneConjecture.fortunateNumber

  4. lemma FortuneConjecture.fortunateNumber_le Minimality of fortunateNumber n: no smaller integer $m > 1$ makes primorial (Nat.nth Nat.Prime n) + m prime line 77 source

    Source documentation

    Minimality of fortunateNumber n: no smaller integer $m > 1$ makes primorial (Nat.nth Nat.Prime n) + m prime.

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Nat.Prime, HAdd.hAdd, primorial, Nat.nth, LE.le, FortuneConjecture.fortunateNumber

    Proof uses: Nat.find_min', And, FortuneConjecture.exists_one_lt_prime_add, And.intro

    12 instances, coercions and auxiliary constants left out.

    lemma fortunateNumber_le (n m : ℕ) (hm : 1 < m)
        (hp : Nat.Prime (primorial (Nat.nth Nat.Prime n) + m)) :
        fortunateNumber n ≤ m :=
    …

    Mentions: FortuneConjecture.fortunateNumber

  5. theorem FortuneConjecture.fortunateNumber_zero line 85 source

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

    Statement uses: Eq, Nat, FortuneConjecture.fortunateNumber, OfNat.ofNat

    Proof uses: primorial, Nat.nth, Nat.Prime, Eq.mpr, id, congrArg, Nat.nth_prime_zero_eq_two, of_decide_eq_true, Bool, Decidable.decide, Bool.true, Eq.refl, Nat.find, And, LT.lt, HAdd.hAdd, FortuneConjecture.exists_one_lt_prime_add, Not, propext, Nat.find_eq_iff and 23 more

    23 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

    Open to load the checked before-and-after goal states.

  6. theorem FortuneConjecture.fortunateNumber_one line 99 source

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

    Statement uses: Eq, Nat, FortuneConjecture.fortunateNumber, OfNat.ofNat

    Proof uses: primorial, Nat.nth, Nat.Prime, Eq.mpr, id, congrArg, Nat.nth_prime_one_eq_three, of_decide_eq_true, Bool, Decidable.decide, Bool.true, Eq.refl, Nat.find, And, LT.lt, HAdd.hAdd, FortuneConjecture.exists_one_lt_prime_add, Not, propext, Nat.find_eq_iff and 26 more

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

    Open to load the checked before-and-after goal states.

  7. theorem FortuneConjecture.fortunateNumber_two line 112 source

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

    Statement uses: Eq, Nat, FortuneConjecture.fortunateNumber, OfNat.ofNat

    Proof uses: primorial, Nat.nth, Nat.Prime, Eq.mpr, id, congrArg, Nat.nth_prime_two_eq_five, of_decide_eq_true, Bool, Decidable.decide, Bool.true, Eq.refl, Nat.find, And, LT.lt, HAdd.hAdd, FortuneConjecture.exists_one_lt_prime_add, Not, propext, Nat.find_eq_iff and 26 more

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

    Open to load the checked before-and-after goal states.

  8. theorem FortuneConjecture.fortunateNumber_three line 125 source

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

    Statement uses: Eq, Nat, FortuneConjecture.fortunateNumber, OfNat.ofNat

    Proof uses: primorial, Nat.nth, Nat.Prime, Eq.mpr, id, congrArg, Nat.nth_prime_three_eq_seven, of_decide_eq_true, Bool, Decidable.decide, Bool.true, Eq.refl, Nat.find, And, LT.lt, HAdd.hAdd, FortuneConjecture.exists_one_lt_prime_add, Not, propext, Nat.find_eq_iff and 27 more

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

    Open to load the checked before-and-after goal states.

  9. theorem FortuneConjecture.fortune_conjecture Fortune's Conjecture: Every Fortunate number is prime sorry line 139 source

    Source documentation

    Fortune's Conjecture: Every Fortunate number is prime.

    depends on sorry what this means

    Statement uses: Iff, True, Nat, Nat.Prime, FortuneConjecture.fortunateNumber

    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 fortune_conjecture :
        answer(sorry) ↔ (∀ n : ℕ, Nat.Prime (fortunateNumber n)) := by
    …

    Mentions: FortuneConjecture.fortunateNumber