FormalConjectures/Wikipedia/CollatzConjecture.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
2 declarations, 1 contain sorry, 0 declared as axioms
Collatz conjecture
References:
- Wikipedia
- erdosproblems.com/1135
- [Gu04] Guy, Richard K., Unsolved problems in number theory. (2004), xviii+437.
- [La10] Lagarias, Jeffrey C., The {$3x+1$} problem: an overview. (2010), 3--29.
- [La16] Lagarias, Jeffrey C., Erdős, Klarner, and the {$3x+1$} problem. Amer. Math. Monthly (2016), 753--776.
- [La85] Lagarias, Jeffrey C., The {$3x+1$} problem and its generalizations. Amer. Math. Monthly (1985), 3--23.
Imports (1)
Imported by 1 file
- def
CollatzConjecture.collatzStepOne step of the Collatz map line 43 sourceSource documentation
Consider the following operation on the natural numbers: If the number is even, divide it by two. If the number is odd, triple it and add one.
L4DEL explanation
Halve an even number, and triple an odd number then add one.
- If n is even the result is n / 2 (natural-number division).
- Otherwise the result is 3 * n + 1.
Sources and attribution: Pinned Lean source (1646ca16afd6)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
ite,Even,HDiv.hDiv,OfNat.ofNat,HAdd.hAdd,HMul.hMul8 instances, coercions and auxiliary constants left out.
def collatzStep (n : ℕ) : ℕ := …
- theorem
CollatzConjecture.collatz_conjectureThe Collatz conjecture sorry line 53 sourceSource documentation
Now form a sequence beginning with any positive integer, where each subsequent term is obtained by applying the operation defined above to the previous term. The Collatz conjecture states that for any positive integer $n$, there exists a natural number $m$ such that the $m$-th term of the sequence is 1.
L4DEL explanation
Starting from any positive integer and repeating the Collatz step, you eventually reach 1; the file marks this as open.
- The attribute reads category research open, so the proof body is sorry.
- The statement quantifies over every n greater than 0 and asserts some m with collatzStep iterated m times on n equal to 1.
Prerequisites: CollatzConjecture.collatzStep
Sources and attribution: Pinned Lean source (1646ca16afd6)
depends on sorry what this means
Statement uses:
Nat,GT.gt,OfNat.ofNat,Exists,Eq,Nat.iterate, CollatzConjecture.collatzStepProof 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 collatz_conjecture (n : ℕ) (hn : n > 0) : ∃ m, collatzStep^[m] n = 1 := by …
Mentions: CollatzConjecture.collatzStep