An iterated recurrence fixes its input
ProvedWorkbookSource.problem_45573lean-workbooksource-checked
We prove by induction that . It is true for our base case . Now suppose it is true up to . Notice that
so it is true for all natural .
Source: InternLM Lean-Workbook, record lean_workbook_45573 (Apache-2.0). The complete source proposition and its explicit variable declarations are preserved.
Preamble
import Mathlib open Real Nat
Formal statement
theorem WorkbookSource.problem_45573 (f : ℕ → ℕ → ℕ) (x : ℕ) (n : ℕ) (h₀ : ∀ x, f x 0 = x) (h₁ : ∀ x n, f x (n + 1) = f (f x n) n) : f x n = x := by sorry
Source