3.2. Source Entries
Definition3.2.1
group
used by 1✓L∃∀N
Statement uses 2
Associated Lean declarations
-
collatzStep[complete] -
collatzTerminatesAtOne[complete]
The Collatz step sends an even natural number n to n / 2 and an odd one
to 3 * n + 1. The odd branch combines Definition 2.1 with
Definition 1.1.
Lean code for Definition3.2.1
Associated Lean declarations
-
collatzStep[complete]
-
collatzTerminatesAtOne[complete]
Associated Lean declarations
-
collatzStep[complete] -
collatzTerminatesAtOne[complete]
def collatzStep (n : Nat) : Nat :=
if n % 2 == 0 then n / 2 else 3 * n + 1
def collatzTerminatesAtOne (n : Nat) : Prop :=
∃ steps : Nat, Nat.repeat collatzStep steps n = 1
Theorem3.2.2
For every positive natural number n, repeated application of the Collatz
step eventually reaches 1.
This is the usual termination statement of the Collatz conjecture, phrased in
terms of Definition 3.2.1.
Proof for Theorem 3.2.2
uses 0
No proof is currently known. This theorem is intentionally left unfinished in the starter template so the generated graph and summary show an in-progress goal immediately.
Lean code for Theorem3.2.2
Associated Lean declarations
-
collatz_conjecture[sorry in proof]
Associated Lean declarations
-
collatz_conjecture[sorry in proof]
theorem collatz_conjecture (n : Nat) (hn : 0 < n) :
collatzTerminatesAtOne n := n:Nathn:0 < n⊢ collatzTerminatesAtOne n
n:Nathn:0 < nhn':0 < n⊢ collatzTerminatesAtOne n
All goals completed! 🐙