Catalan generating function via compositional inversion
The compositional inverse of X - X² is the generating function for Catalan numbers. This is a classical application of Lagrange inversion in enumerative combinatorics, connecting formal power series inversion to Dyck pa…
Overview
Catalan generating function via compositional inversion
substInv_X_sub_X_sq_eq_catalan — a formalization challenge from the lean-eval benchmark.
Notes
The compositional inverse of X - X² is the generating function for Catalan numbers. This is a classical application of Lagrange inversion in enumerative combinatorics, connecting formal power series inversion to Dyck paths, binary trees, and triangulations.
Formal statement
theorem substInv_X_sub_X_sq_eq_catalan (n : ℕ) :
haveI : Invertible (coeff 1 ((X : ℚ⟦X⟧) - X ^ 2)) := by
simp [coeff_X, coeff_X_pow]; exact invertibleOne
coeff (n + 1) (substInv ((X : ℚ⟦X⟧) - X ^ 2)) =
(Nat.choose (2 * n) n : ℚ) / (↑n + 1) := by
sorry
Informal solution sketch
The compositional inverse C(x) satisfies C - C² = x, giving C = (1 - √(1-4x))/2. By the binomial series, its coefficients are the Catalan numbers C_n = (2n choose n)/(n+1).
Source
E. Catalan, Note sur une équation aux différences finies, 1838; J.-L. Lagrange, Nouvelle méthode pour résoudre les équations littérales, 1770.
How to submit
Challenge.lean and Solution.lean are part of the trusted benchmark and must not be modified.
Write your proof in Submission.lean (plus any local modules under Submission/).
Mathlib may be used freely; anything not in Mathlib has to be inlined into the submission.
Comparator configuration
- Solution module:
Solution - Theorems checked:
substInv_X_sub_X_sq_eq_catalan - Permitted axioms:
propext,Quot.sound,Classical.choice
Submitted by Kim Morrison.
Problems
1 problemFiles
View on GitHub- Submission
- Helpers.lean53 B
- Challenge.lean326 B
- config.json245 B
- holes.json617 B
- lakefile.toml463 B
- lean-toolchain25 B
- README.md1.4 KB
- Solution.lean388 B
- Submission.lean390 B
- WorkspaceTest.lean1.6 KB