FormalConjectures/Wikipedia/PerfectNumbers.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

5 declarations, 5 contain sorry, 0 declared as axioms

Perfect numbers

A perfect number is a positive integer that equals the sum of its proper divisors (i.e., all its positive divisors excluding the number itself).

For example, 6 is perfect because its proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6. Similarly, 28 is perfect because 1 + 2 + 4 + 7 + 14 = 28.

All known perfect numbers are even. Several open problems about perfect numbers are formalised here:

References:

Imports (1)
  1. theorem PerfectNumbers.infinitely_many_perfect Infinitely many perfect numbers conjecture sorry line 55 source

    Source documentation

    Infinitely many perfect numbers conjecture. Are there infinitely many perfect numbers?

    Reference: Wikipedia

    L4DEL explanation

    Infinitely many perfect numbers conjecture. Are there infinitely many perfect numbers? Reference: Wikipedia

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Iff, True, Set.Infinite, Nat, Set.ofPred, Nat.Perfect

    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_perfect :
        answer(sorry) ↔ {n : ℕ | Perfect n}.Infinite := by
    …
  2. theorem PerfectNumbers.infinitely_many_even_perfect Infinitely many even perfect numbers conjecture sorry line 71 source

    Source documentation

    Infinitely many even perfect numbers conjecture. Are there infinitely many even perfect numbers?

    This is equivalent to asking whether there are infinitely many Mersenne primes, since by the Euclid–Euler theorem an even number is perfect if and only if it has the form $2^{p-1}(2^p - 1)$ where $2^p - 1$ is a Mersenne prime.

    Reference: Wikipedia

    L4DEL explanation

    Infinitely many even perfect numbers conjecture. Are there infinitely many even perfect numbers? This is equivalent to asking whether there are infinitely many Mersenne primes, since by the Euclid–Euler theorem an even number is perfect if and only if it has the form $2^{p-1}(2^p - 1)$ where $2^p - 1$ is a Mersenne prime. Reference: Wikipedia

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Iff, True, Set.Infinite, Nat, Set.ofPred, And, Nat.Perfect, Even

    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 infinitely_many_even_perfect :
        answer(sorry) ↔ {n : ℕ | Perfect n ∧ Even n}.Infinite := by
    …
  3. theorem PerfectNumbers.odd_perfect_number_conjecture Odd Perfect Number Conjecture sorry line 83 source

    Source documentation

    Odd Perfect Number Conjecture. The Odd Perfect Number Conjecture states that all perfect numbers are even.

    Reference: Wikipedia

    L4DEL explanation

    Odd Perfect Number Conjecture. The Odd Perfect Number Conjecture states that all perfect numbers are even. Reference: Wikipedia

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Nat, Nat.Perfect, Even

    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 odd_perfect_number_conjecture (n : ℕ) (hn : Perfect n) : Even n := by
    …
  4. theorem PerfectNumbers.odd_perfect_number.lower_bound A known result: If an odd perfect number exists, it must be greater than $10^{1500}$ and must have at least 101 prime factors (including multiplicities) sorry line 94 source

    Source documentation

    A known result: If an odd perfect number exists, it must be greater than $10^{1500}$ and must have at least 101 prime factors (including multiplicities).

    Reference: Pascal Ochem, Michaël Rao (2012). "Odd perfect numbers are greater than 10^1500"

    depends on sorry what this means

    Statement uses: Nat, Odd, Nat.Perfect, And, GT.gt, HPow.hPow, OfNat.ofNat, GE.ge, List.length, Nat.primeFactorsList

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

    16 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem odd_perfect_number.lower_bound (n : ℕ) (hn : Odd n) (hp : Perfect n) :
        n > 10^1500 ∧ (n.primeFactorsList).length ≥ 101 := by
    …
  5. theorem PerfectNumbers.odd_perfect_number.euler_form A known result: If an odd perfect number exists, it must be of the form $p^α * m^2$ where $p$ is prime, $p \equiv 1 \pmod{4}$, $\alpha \equiv 1 \pmod{4}$, and $p \nmid m$ sorry line 108 source

    Source documentation

    A known result: If an odd perfect number exists, it must be of the form $p^α * m^2$ where $p$ is prime, $p \equiv 1 \pmod{4}$, $\alpha \equiv 1 \pmod{4}$, and $p \nmid m$.

    Reference: Euler's theorem on odd perfect numbers.

    Formal proof linked here provided by AlphaProof.

    depends on sorry what this means

    Statement uses: Nat, Odd, Nat.Perfect, Exists, And, Nat.Prime, Int.ModEq, OfNat.ofNat, Int, Not, Dvd.dvd, Eq, HMul.hMul, HPow.hPow

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

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem odd_perfect_number.euler_form (n : ℕ) (hn : Odd n) (hp : Perfect n) :
        ∃ (p m α : ℕ),
          p.Prime ∧
          p ≡ 1 [ZMOD 4] ∧
          α ≡ 1 [ZMOD 4] ∧
          ¬ p ∣ m ∧
          n = p^α * m^2 := by
    …