c0ea08d2 / statements / Collatz.lean

1/-
2Ported from google-deepmind/formal-conjectures at commit a61ab09632df039ef8381b6ac8accc5ce4d954d7,
3file FormalConjectures/Wikipedia/CollatzConjecture.lean, declaration CollatzConjecture.collatz_conjecture.
4Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0
5(https://www.apache.org/licenses/LICENSE-2.0).
6Port: `public import FormalConjecturesUtil` replaced by specific Mathlib imports; the
7`@[category …, AMS …]` attribute and the doc comments dropped. The module system is kept (Mathlib
8v4.36.0 is built for it, and without `module` Lean warns on each Mathlib import);
9`@[expose] public section` keeps both declarations public under their own names with the
10definition's body visible. The proposition is unchanged.
11-/
12module
13
14public import Mathlib.Algebra.Group.Nat.Even
15public import Mathlib.Logic.Function.Iterate
16
17@[expose] public section
18
19namespace CollatzConjecture
20
21def collatzStep (n : ℕ) : ℕ :=
22 if Even n then n / 2 else 3 * n + 1
23
24theorem collatz_conjecture (n : ℕ) (hn : n > 0) : ∃ m, collatzStep^[m] n = 1 := by
25 sorry
26
27end CollatzConjecture
28
29/-- The family's target (decision 0100), under the family's name: its type is taken from upstream's
30`CollatzConjecture.collatz_conjecture` above, so the two cannot differ. Upstream's declaration is kept for provenance; it is not a
31target. -/
32theorem Collatz : type_of% @CollatzConjecture.collatz_conjecture := by
33 sorry