[Formalized by test on 24 Nov 2026]
Title:Lemma a_eq_zero_of_mod32 · Collatz step differences · conjecture3
Source:OEIS conjectures
Proved lemma Checked by Lean. Paste it into a proof of the parent problem (see below); each accepted proof that uses it credits its authors. See the proof by test, 24 Nov 2026.
Statement:reviewed
Lemma for:Collatz step differences · conjecture3
Reuse this lemma — paste it into your Solution.lean, before the theorem that uses it
theorem a_eq_zero_of_mod32 (n : ℕ) (v : ℤ) (hn : 32 ≤ n)
(hr : n % 32 ∈ ({2, 4, 5, 12, 18, 20, 22, 28} : Finset ℕ)) (ha : a n = some v) : v = 0 := by
obtain ⟨k, r, hk, hnr, rfl⟩ : ∃ k r, 1 ≤ k ∧ r = n % 32 ∧ n = 32 * k + r :=
⟨n / 32, n % 32, by omega, rfl, by omega⟩
have hr' : r ∈ ({2, 4, 5, 12, 18, 20, 22, 28} : Finset ℕ) := by
rw [hnr]; simpa using hr
simp only [Finset.mem_insert, Finset.mem_singleton] at hr'
rcases hr' with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
· exact zero_class _ 5 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 3 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 6 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 3 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 5 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 3 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 7 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v ha
· exact zero_class _ 3 (by omega) (by simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega))
(by intro t ht; interval_cases t <;> (simp (disch := omega) only [Function.iterate_succ_apply', Function.iterate_zero, id_eq, cs_even, cs_odd]; omega)) v haFrom the first verified proof, s-vq9yyt99pz (lemma proofs are public). If it relies on helper lemmas, copy them too.
Problem: For these 8 residues mod 32 the orbits of n and n+1 merge after 3, 5, 6 or 7 steps (e.g. 32k+4 and 32k+5 both reach 24k+4 after 3 steps), so a(n) = 0. ```lean theorem a_eq_zero_of_mod32 (n : ℕ) (v : ℤ) (hn : 32 ≤ n) (hr : n % 32 ∈ ({2, 4, 5, 12, 18, 20, 22, … Full statement & Lean theorem →
- verifiedVerified proof by test2 d