FormalConjectures/ErdosProblems/1074.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

14 declarations, 9 contain sorry, 0 declared as axioms

Erdős Problem 1074

Reference: erdosproblems.com/1074

Imports (1)
Imported by 2 files
  1. abbrev Erdos1074.EHSNumbers The EHS numbers (after Erdős, Hardy, and Subbarao) are those $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$ line 35 source

    Source documentation

    The EHS numbers (after Erdős, Hardy, and Subbarao) are those $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$.

    standard axioms: propext what this means

    Statement uses: Set, Nat

    Proof uses: Set.ofPred, And, LE.le, OfNat.ofNat, Exists, Nat.Prime, Not, Nat.ModEq, Dvd.dvd, HAdd.hAdd, Nat.factorial

    5 instances, coercions and auxiliary constants left out.

    abbrev EHSNumbers : Set ℕ := {m | 1 ≤ m ∧ ∃ p, p.Prime ∧ ¬p ≡ 1 [MOD m] ∧ p ∣ m ! + 1}
  2. abbrev Erdos1074.PillaiPrimes The Pillai primes are those primes $p$ such that there exists an $m \ge 1$ with $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$ line 39 source

    Source documentation

    The Pillai primes are those primes $p$ such that there exists an $m \ge 1$ with $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$

    standard axioms: propext what this means

    Statement uses: Set, Nat

    Proof uses: Set.ofPred, And, Nat.Prime, Exists, GE.ge, OfNat.ofNat, Not, Nat.ModEq, Dvd.dvd, HAdd.hAdd, Nat.factorial

    5 instances, coercions and auxiliary constants left out.

    abbrev PillaiPrimes : Set ℕ := {p | p.Prime ∧ ∃ m ≥ 1, ¬p ≡ 1 [MOD m] ∧ p ∣ m ! + 1}
    …
  3. theorem Erdos1074.two_not_mem_pillaiPrimes line 42 source

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

    Statement uses: Not, Membership.mem, Nat, Set, Erdos1074.PillaiPrimes, OfNat.ofNat

    Proof uses: Eq.mpr, LE.le, Nat.ModEq, Eq, HMod.hMod, HAdd.hAdd, Nat.factorial, id, Eq.trans, And, Dvd.dvd, Exists, congrArg, Nat.Prime, GE.ge, True, congr, eq_true, Mathlib.Meta.NormNum.isNat_prime_2, Mathlib.Meta.NormNum.isNat_ofNat and 20 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

  4. theorem Erdos1074.twentyThree_mem_pillaiPrimes line 48 source

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

    Statement uses: Membership.mem, Nat, Set, Erdos1074.PillaiPrimes, OfNat.ofNat

    Proof uses: Eq.mpr, Exists, And, LE.le, Not, Nat.ModEq, Dvd.dvd, HAdd.hAdd, Nat.factorial, id, Eq, Eq.trans, Nat.Prime, GE.ge, True, congr, congrArg, eq_true, Mathlib.Meta.NormNum.isNat_prime_2, Mathlib.Meta.NormNum.isNat_ofNat and 14 more

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  5. theorem Erdos1074.erdos_1074.parts.i Let $S$ be the set of all $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$ sorry line 60 source

    Source documentation

    Let $S$ be the set of all $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$. Does $$ \lim\frac{|S\cap[1, x]|}{x} $$ exist?

    depends on sorry what this means

    Statement uses: Iff, True, Exists, Real, Set.HasDensity, Nat, Erdos1074.EHSNumbers, Set.univ

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

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.parts.i : answer(sorry) ↔ ∃ c, EHSNumbers.HasDensity c := by
    …

    Mentions: c

  6. theorem Erdos1074.erdos_1074.parts.ii Let $S$ be the set of all $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$ sorry line 69 source

    Source documentation

    Let $S$ be the set of all $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$. What is $$ \lim\frac{|S\cap[1, x]|}{x}? $$

    depends on sorry what this means

    Statement uses: Set.HasDensity, Nat, Erdos1074.EHSNumbers, sorryAx, Real, Bool.false, Set.univ

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

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.parts.ii : EHSNumbers.HasDensity answer(sorry) := by
    …
  7. theorem Erdos1074.erdos_1074.parts.iii Documented declaration: iii sorry line 79 source

    Source documentation

    Similarly, if $P$ is the set of all primes $p$ such that there exists an $m$ with $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$, then does $$ \lim\frac{|P\cap[1, x]|}{\pi(x)} $$ exist?

    depends on sorry what this means

    Statement uses: Iff, True, Exists, Real, Set.HasDensity, Nat, Erdos1074.PillaiPrimes, Set.ofPred, Nat.Prime

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

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.parts.iii : answer(sorry) ↔ ∃ c, PillaiPrimes.HasDensity c {p | p.Prime} := by
    …

    Mentions: c

  8. theorem Erdos1074.erdos_1074.parts.iv Documented declaration: iv sorry line 88 source

    Source documentation

    Similarly, if $P$ is the set of all primes $p$ such that there exists an $m$ with $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$, then what is $$ \lim\frac{|P\cap[1, x]|}{\pi(x)}? $$

    depends on sorry what this means

    Statement uses: Set.HasDensity, Nat, Erdos1074.PillaiPrimes, sorryAx, Real, Bool.false, Set.ofPred, Nat.Prime

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

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.parts.iv :
        PillaiPrimes.HasDensity answer(sorry) {p | p.Prime} := by
    …
  9. theorem Erdos1074.erdos_1074.variants.mem_pillaiPrimes Pillai [Pi30] raised the question of whether there exist any primes in $P$ line 95 source

    Source documentation

    Pillai [Pi30] raised the question of whether there exist any primes in $P$. This was answered by Chowla, who noted that, for example, $14! + 1 \equiv 18! + 1 \equiv 0 \pmod{23}$.

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

    Statement uses: Membership.mem, Nat, Set, Erdos1074.PillaiPrimes, OfNat.ofNat

    Proof uses: Eq.mpr, Exists, And, LE.le, Not, Nat.ModEq, Dvd.dvd, HAdd.hAdd, Nat.factorial, id, Eq, Eq.trans, Nat.Prime, GE.ge, True, congr, congrArg, eq_true, Mathlib.Meta.NormNum.isNat_prime_2, Mathlib.Meta.NormNum.isNat_ofNat and 14 more

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

    theorem erdos_1074.variants.mem_pillaiPrimes : 23 ∈ PillaiPrimes := by
    …

    Mentions: Erdos1074.PillaiPrimes

  10. theorem Erdos1074.erdos_1074.variants.EHSNumbers_infinite sorry line 106 source

    depends on sorry what this means

    Statement uses: Set.Infinite, Nat, Erdos1074.EHSNumbers

    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.

  11. theorem Erdos1074.erdos_1074.variants.PillaiPrimes_infinite Erdős, Hardy, and Subbarao proved that $P$ is infinite sorry line 111 source

    Source documentation

    Erdős, Hardy, and Subbarao proved that $P$ is infinite.

    depends on sorry what this means

    Statement uses: Set.Infinite, Nat, Erdos1074.PillaiPrimes

    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 erdos_1074.variants.PillaiPrimes_infinite : PillaiPrimes.Infinite := by
    …
  12. theorem Erdos1074.erdos_1074.variants.EHSNumbers_init The sequence $S$ begins $8, 9, 13, 14, 15, 16, 17, ...$ sorry line 116 source

    Source documentation

    The sequence $S$ begins $8, 9, 13, 14, 15, 16, 17, ...$

    depends on sorry what this means

    Statement uses: Eq, Set, Nat, Set.image, Nat.nth, Erdos1074.EHSNumbers, Set.Icc, OfNat.ofNat, Insert.insert, Singleton.singleton

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

    8 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.variants.EHSNumbers_init :
        nth EHSNumbers '' (Set.Icc 0 6) = {8, 9, 13, 14, 15, 16, 17} := by
    …

    Mentions: Erdos1074.EHSNumbers

  13. theorem Erdos1074.erdos_1074.variants.PillaiPrimes_init The sequence $P$ begins $23, 29, 59, 61, 67, 71, ...$ sorry line 122 source

    Source documentation

    The sequence $P$ begins $23, 29, 59, 61, 67, 71, ...$

    depends on sorry what this means

    Statement uses: Eq, Set, Nat, Set.image, Nat.nth, Erdos1074.PillaiPrimes, Set.Icc, OfNat.ofNat, Insert.insert, Singleton.singleton

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

    8 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.variants.PillaiPrimes_init :
        nth PillaiPrimes '' (Set.Icc 0 5) = {23, 29, 59, 61, 67, 71} := by
    …

    Mentions: Erdos1074.PillaiPrimes

  14. theorem Erdos1074.erdos_1074.variants.EHSNumbers_one Documented declaration: EHSNumbers_one sorry line 132 source

    Source documentation

    Regarding the first question, Hardy and Subbarao computed all EHS numbers up to $2^{10}$, and write "...if this trend conditions we expect [the limit] to be around 0.5, if it exists. The frequency with which the EHS numbers occur - most often in long sequences of consecutive integers - makes us believe that their asymptotic density exists and is unity. Erdős, though initially hesitant, later agreed with this view." That is, the conjecture is that $S$ has density $1$.

    depends on sorry what this means

    Statement uses: Set.HasDensity, Nat, Erdos1074.EHSNumbers, OfNat.ofNat, Real, Set.univ

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

    13 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_1074.variants.EHSNumbers_one : EHSNumbers.HasDensity 1 := by
    …