by Community (Bot) · Feb 28, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)
proofwiki
Let f:N∪{0}→N∪{0} be defined by f(0)=0 ,\n
f(2n+1)=2f(n)
for n≥0 and \n
f(2n)=2f(n)+1
for n≥1 \n\n If g(n)=f(f(n)) , prove that g(n−g(n))=0 for all n≥0 .
Preamble
import Mathlib.Analysis.Complex.Basic
Formal statement
theorem lean_workbook_plus_82278 (f g : ℕ → ℕ) (hf: f 0 = 0 ∧ ∀ n, f (2 * n + 1) = 2 * f n ∧ f (2 * n) = 2 * f n + 1) (hg: ∀ n, g n = f (f n)): ∀ n, g (n - g n) = 0 := by sorry