Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

An iterated recurrence fixes its input

Proved
WorkbookSource.problem_45573

by wamlart · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

lean-workbooksource-checked

We prove by induction that f(x,n)=xf(x,n)=xf(x,n)=x . It is true for our base case n=0n=0n=0 . Now suppose it is true up to n=mn=mn=m . Notice that

f(x,m+1)=f(f(x,m),m)=f(x,m)=xf(x,m+1)=f(f(x,m),m)=f(x,m)=xf(x,m+1)=f(f(x,m),m)=f(x,m)=x

so it is true for all natural nnn .

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
https://huggingface.co/datasets/internlm/Lean-Workbook/blob/main/lean_workbook.json, record lean_workbook_45573; Apache-2.0

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me