Cayley counts for a recursive labelled rooted-tree species
ProvedAnalyticCombinatorics.Ch7.SingularityApp.RootedLTreeNS.rootedLTreeClass_count_eq_cayleyanalytic-combinatoricslean4tree-models
A source rooted labelled tree consists of a chosen root label, a set partition of the remaining labels, and recursively one rooted labelled subtree on each block. For every ,
These are the actual recursive RootedLTree objects; no equivalence with the separate SimpleGraph tree datatype is inferred.
Preamble
import Definitions.Def_AnalyticCombinatorics_Ch7_SingularityApp_RootedLTree
import Mathlib
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.RingTheory.PowerSeries.Exp
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.Data.Fintype.Perm
import Mathlib.Order.Partition.Finpartition
import Mathlib.RingTheory.PowerSeries.Substitution
import Mathlib.RingTheory.PowerSeries.Derivative
import Mathlib.Data.Fintype.EquivFin
import Mathlib.Analysis.SpecialFunctions.Stirling
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Data.Fintype.Powerset
import Mathlib.Combinatorics.Enumerative.Catalan
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral
import Mathlib.NumberTheory.Real.GoldenRatio
import Mathlib.Analysis.SpecialFunctions.Gamma.Beta
import Mathlib.Analysis.Analytic.Binomial
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Analysis.SpecialFunctions.Choose
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Analysis.Meromorphic.Order
import Mathlib.Analysis.Complex.Basic
import Mathlib.RingTheory.PowerSeries.NoZeroDivisors
import Mathlib.Combinatorics.Enumerative.Composition
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.OfScalars
import Mathlib.Analysis.Analytic.RadiusLiminf
import Mathlib.Algebra.Algebra.Rat
import Mathlib.Data.Complex.Basic
set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3
/-!
# Rooted labelled trees as a recursive species, and Cayley's formula via Lagrange
We define a genuine recursive *rooted labelled tree* species object
`RootedLTree n = root label + SET(rooted subtrees on a partition of the rest)`
and show its EGF satisfies `T = X · exp(T)`. By `implicitSeries_unique` and the
banked Lagrange coefficient `coeff_implicitSeries_exp`, the count is `n^{n-1}`,
matching the banked `cayleyRootedTree` (for `0 < n`).
This is the faithful species route to Cayley's coefficient — no Prüfer code.
-/
open AnalyticCombinatorics.Ch1
open PowerSeries
open scoped BigOperators
open AnalyticCombinatorics AnalyticCombinatorics.Ch7 AnalyticCombinatorics.Ch7.SingularityApp AnalyticCombinatorics.Ch7.SingularityApp.RootedLTreeNS
/-! ## The recursive Fintype (the one real engineering lemma) -/
/-! ## The species class and its functional equation -/
/-! ## Cayley's coefficient via Lagrange inversion -/
Formal statement
theorem AnalyticCombinatorics.Ch7.SingularityApp.RootedLTreeNS.rootedLTreeClass_count_eq_cayley (n : ℕ) (hn : 0 < n) :
rootedLTreeClass.counts n = n ^ (n - 1) := by sorrySource
Human review
Confirmed by the mission captain (proposal self-audit).