OctoInform Beta

OpenAI preprint, September 2026 · §3. Calculus on finite trees

Lemma 3.3: Diagonal derivatives, colored extension histories, and uniform Taylor bounds for tilted tree expectations

Canceled-anchor tree expansion and Taylor remainder bound.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

In the cavity analysis of diluted spin glasses on finite hierarchical trees, one compares a tilted tree expectation with an uncanceled factor at a designated anchor leaf against a perturbative expansion in the tilting parameter. When a path function is perturbed linearly by At=1+tDA_t = 1 + t D around the constant function 11, differentiating the tilted expectation of G/Ata*G / A_t^{a_*} at t=0t = 0 produces a signed sum over sequential extensions of the underlying tree. At each step, the differentiation rule either marks an unused old leaf other than the anchor leaf a*a_* with weight 11, or attaches a fresh branch at an internal vertex of the current tree with a branching weight determined by the power-mean exponents.

This page states the three results that make up the canceled-anchor expansion in the Lean library: the diagonal Fréchet derivative formula in terms of ordered extension iterates, the identification of the colored extension calculus at A≡1A \equiv 1 with a signed sum over labeled extension histories, and a uniform Taylor remainder bound on [0,1/2][0, 1/2] controlled by a depth-independent combinatorial factor.

Kernel towers and prescribed trees

Let Ω\Omega be a finite state space. A finite probability law ν\nu on Ω\Omega is a function ν:Ω→ℝ\nu : \Omega \to \mathbb{R} satisfying ν(x)≥0\nu(x) \ge 0 for all x∈Ωx \in \Omega and ∑x∈Ων(x)=1\sum_{x \in \Omega} \nu(x) = 1.✦ The expectation of a real-valued function f:Ω→ℝf : \Omega \to \mathbb{R} under ν\nu is 𝔼ν[f]=∑x∈Ων(x)f(x).\mathbb{E}_\nu[f] = \sum_{x \in \Omega} \nu(x)\, f(x).(1)✦

For a natural number nn, the finite path space 𝒫n(Ω)\mathcal{P}_n(\Omega) of length nn over Ω\Omega is a singleton when n=0n = 0 and the Cartesian product Ω×𝒫n−1(Ω)\Omega \times \mathcal{P}_{n-1}(\Omega) when n≥1n \ge 1.✦ A tower of finite kernels TT of depth nn on Ω\Omega is trivial for n=0n = 0, and for n≥1n \ge 1 consists of an initial finite probability law T0T_0 on Ω\Omega together with a continuation tower T(x)T(x) of depth n−1n - 1 for each x∈Ωx \in \Omega.✦

Given a tower of finite kernels TT of depth nn on Ω\Omega, a tuple of real exponents m′=(m0′,…,mn−1′)∈ℝnm' = (m'_0, \dots, m'_{n-1}) \in \mathbb{R}^n, and a potential f:𝒫n(Ω)→ℝf : \mathcal{P}_n(\Omega) \to \mathbb{R}, the tilted kernel tower Tm′,fT^{m', f} of depth nn is defined recursively on nn. At depth 00 it is trivial. At depth n≥1n \ge 1, its top law is obtained by exponentially tilting T0T_0 by m0′m'_0 times the backward logarithmic potential of the continuation tower T(x)T(x) at each first-step state x∈Ωx \in \Omega, while its continuation at xx is the recursively tilted subtower T(x)(m1′,…,mn−1′),fxT(x)^{(m'_1, \dots, m'_{n-1}), f_x} for the tail potential fx(y)=f(x,y)f_x(y) = f(x, y).

A prescribed finite tree SS of height n∈ℕn \in \mathbb{N} is either a single leaf when n=0n = 0, or an internal root of height n≥1n \ge 1 with a positive integer kk of ordered children C0,…,Ck−1C_0, \dots, C_{k-1}, each a prescribed finite tree of height n−1n - 1.✦ The set of leaves ℒ(S)\mathcal{L}(S) and the number of leaves ℓ(S)∈ℕ\ell(S) \in \mathbb{N} are defined recursively: at a single leaf, ℒ(S)\mathcal{L}(S) is a singleton and ℓ(S)=1\ell(S) = 1; at a node with children C0,…,Ck−1C_0, \dots, C_{k-1}, ℒ(S)\mathcal{L}(S) consists of pairs (i,a′)(i, a') with i∈{0,…,k−1}i \in \{0, \dots, k - 1\} and a′∈ℒ(Ci)a' \in \mathcal{L}(C_i), and ℓ(S)=∑i=0k−1ℓ(Ci).\ell(S) = \sum_{i=0}^{k-1} \ell(C_i).(2)

The space 𝒮(Ω,S)\mathcal{S}(\Omega, S) of prescribed tree samples in Ω\Omega indexed by SS is a singleton at a leaf, and at a node with children C0,…,Ck−1C_0, \dots, C_{k-1} consists of tuples (ωi,xi)i=0k−1(\omega_i, x_i)_{i=0}^{k-1} with ωi∈Ω\omega_i \in \Omega and xi∈𝒮(Ω,Ci)x_i \in \mathcal{S}(\Omega, C_i).✦ Given a tower of finite kernels TT of depth nn on Ω\Omega, the prescribed tree sample law μS,T\mu_{S, T} is the finite probability law on 𝒮(Ω,S)\mathcal{S}(\Omega, S) defined recursively as the unit law at a leaf, and at a node with children C0,…,Ck−1C_0, \dots, C_{k-1} as the product law over i∈{0,…,k−1}i \in \{0, \dots, k - 1\} where each factor samples ωi∈Ω\omega_i \in \Omega from the top law T0T_0 and then draws xix_i from μCi,T(ωi)\mu_{C_i, T(\omega_i)}.✦ Write 𝔼S,T[⋅]\mathbb{E}_{S, T}[\,\cdot\,] for expectation under μS,T\mu_{S, T}.

For a leaf a∈ℒ(S)a \in \mathcal{L}(S) and a sample x∈𝒮(Ω,S)x \in \mathcal{S}(\Omega, S), the path πS(a,x)∈𝒫n(Ω)\pi_S(a, x) \in \mathcal{P}_n(\Omega) to aa is the unique empty path at a leaf, and (ωi,πCi(a′,xi))(\omega_i, \pi_{C_i}(a', x_i)) at a node when a=(i,a′)a = (i, a').✦ For a path function f:𝒫n(Ω)→ℝf : \mathcal{P}_n(\Omega) \to \mathbb{R}, the sum of leaf marks ΣS(f,x)\Sigma_S(f, x) is defined recursively as ff evaluated at the empty path when SS is a leaf, and at a node with children C0,…,Ck−1C_0, \dots, C_{k-1} by ΣS(f,x)=∑i=0k−1ΣCi(fωi,xi),\Sigma_S(f, x) = \sum_{i=0}^{k-1} \Sigma_{C_i}(f_{\omega_i}, x_i),(3)✦ where fωi(y)=f(ωi,y)f_{\omega_i}(y) = f(\omega_i, y).

Canceled-anchor expectations and tree extensions

Fix a natural number nn, a tower of finite kernels TT of depth nn on Ω\Omega, a prescribed finite tree SS of height nn, and real exponents m=(m0,m1,…,mn)∈ℝn+1m = (m_0, m_1, \dots, m_n) \in \mathbb{R}^{n+1}. Write m+=(m1,…,mn)m^+ = (m_1, \dots, m_n) for the shifted tuple of exponents. For G:𝒮(Ω,S)→ℝG : \mathcal{S}(\Omega, S) \to \mathbb{R} and A:𝒫n(Ω)→ℝA : \mathcal{P}_n(\Omega) \to \mathbb{R}, the protected-leaf expectation is ℰS,T,mprot(G;A)=𝔼S,Tm+,log⁡A[G(x)exp(−ΣS(logA,x))].\mathcal{E}^{\mathrm{prot}}_{S, T, m}(G; A) = \mathbb{E}_{S, T^{m^+, \log A}}\!\left[ G(x)\exp\bigl(-\Sigma_S(\log A, x)\bigr) \right].(4)✦ Given a finite set UU of indices in a type ι\iota and a family of path maps ρ=(ρi)i∈ι\rho = (\rho_i)_{i \in \iota} with ρi:𝒮(Ω,S)→𝒫n(Ω)\rho_i : \mathcal{S}(\Omega, S) \to \mathcal{P}_n(\Omega), the partially canceled anchor expectation is ℰS,T,manc(U,ρ,G;A)=ℰS,T,mprot(x↦G(x)∏i∈UA(ρi(x));A).\mathcal{E}^{\mathrm{anc}}_{S, T, m}(U, \rho, G; A) = \mathcal{E}^{\mathrm{prot}}_{S, T, m}\!\left( x \mapsto G(x)\prod_{i \in U} A(\rho_i(x));\, A \right).(5) For a single anchor leaf a∈ℒ(S)a \in \mathcal{L}(S), the canceled-anchor insertion is ℐS,T,m(a,G;A)=𝔼S,Tm+,log⁡A[G(x)A(πS(a,x))].\mathcal{I}_{S, T, m}(a, G; A) = \mathbb{E}_{S, T^{m^+, \log A}}\!\left[ \frac{G(x)}{A(\pi_S(a, x))} \right].(6)✦

Let 𝒱(S)\mathcal{V}(S) denote the set of internal vertices of SS. For each v∈𝒱(S)v \in \mathcal{V}(S), growing a fresh branch from vv produces a prescribed finite tree SvS_v of height nn with branching weight γv(S,m)∈ℝ\gamma_v(S, m) \in \mathbb{R}, given by γv(S,m)=md−kvmd+1\gamma_v(S, m) = m_d - k_v m_{d+1} when vv lies at depth d∈{0,…,n−1}d \in \{0, \dots, n - 1\} (with the root at depth 00) and has kvk_v children (equivalently, m0−km1m_0 - k m_1 at the root with kk children, and γv′(Ci,m+)\gamma_{v'}(C_i, m^+) at an internal vertex v′v' in the ii-th child subtree CiC_i). Every sample x∈𝒮(Ω,Sv)x \in \mathcal{S}(\Omega, S_v) restricts to an old sample rS,v(x)∈𝒮(Ω,S)r_{S, v}(x) \in \mathcal{S}(\Omega, S) and determines a fresh path πS,vnew(x)∈𝒫n(Ω)\pi^{\mathrm{new}}_{S, v}(x) \in \mathcal{P}_n(\Omega) along the added branch. Each leaf b∈ℒ(S)b \in \mathcal{L}(S) embeds as a leaf ιS,v(b)∈ℒ(Sv)\iota_{S, v}(b) \in \mathcal{L}(S_v), and the added branch ends at a new leaf aS,vnew∈ℒ(Sv)a^{\mathrm{new}}_{S, v} \in \mathcal{L}(S_v).

Given a direction D:𝒫n(Ω)→ℝD : \mathcal{P}_n(\Omega) \to \mathbb{R}, the anchor ordered-history iterate 𝒜T,m,D(k)(S,U,ρ,G;t)\mathcal{A}^{(k)}_{T, m, D}(S, U, \rho, G; t) for k∈ℕk \in \mathbb{N} and t∈ℝt \in \mathbb{R} is defined recursively on kk. At k=0k = 0, it evaluates the partially canceled anchor expectation at A=1+tDA = 1 + t D, namely 𝒜T,m,D(0)(S,U,ρ,G;t)=ℰS,T,manc(U,ρ,G;1+tD)\mathcal{A}^{(0)}_{T, m, D}(S, U, \rho, G; t) = \mathcal{E}^{\mathrm{anc}}_{S, T, m}(U, \rho, G; 1 + t D). At k+1k + 1, it is given by 𝒜T,m,D(k+1)(S,U,ρ,G;t)=∑i∈U𝒜T,m,D(k)(S,U\{i},ρ,Gi;t)+∑v∈𝒱(S)γv(S,m)𝒜T,m,D(k)(Sv,U,ρ∘rS,v,Gv;t),\begin{aligned} \mathcal{A}^{(k+1)}_{T, m, D}(S, U, \rho, G; t) &= \sum_{i \in U} \mathcal{A}^{(k)}_{T, m, D}\bigl( S, U \setminus \{i\}, \rho, G_i;\, t \bigr) \\ &\quad + \sum_{v \in \mathcal{V}(S)} \gamma_v(S, m)\, \mathcal{A}^{(k)}_{T, m, D}\bigl( S_v, U, \rho \circ r_{S, v}, G_v;\, t \bigr), \end{aligned}(7)✦ where Gi(x)=G(x)D(ρi(x))G_i(x) = G(x) D(\rho_i(x)) and Gv(x)=G(rS,v(x))D(πS,vnew(x))G_v(x) = G(r_{S, v}(x)) D(\pi^{\mathrm{new}}_{S, v}(x)). For an anchor leaf a∈ℒ(S)a \in \mathcal{L}(S), let Ua=ℒ(S)\{a}U_a = \mathcal{L}(S) \setminus \{a\} and write πS\pi_S for the family b↦πS(b,⋅)b \mapsto \pi_S(b, \,\cdot\,). The kk-th anchor Taylor coefficient is ck(S,T,m,D,a,G)=1k!𝒜T,m,D(k)(S,Ua,πS,G;0).c_k(S, T, m, D, a, G) = \frac{1}{k!}\, \mathcal{A}^{(k)}_{T, m, D}(S, U_a, \pi_S, G; 0).(8)✦

Differentiating a tilted tree expectation with an uncanceled anchor leaf produces a signed sum over sequential extensions that either mark an unused old leaf or graft a fresh branch at an internal vertex of the current tree.

For a finite list 𝑫\mathbf{D} of path functions on 𝒫n(Ω)\mathcal{P}_n(\Omega), the colored extension calculus 𝒞T,m(𝑫;S,U,ρ,G;A)\mathcal{C}_{T, m}(\mathbf{D}; S, U, \rho, G; A) is defined recursively on 𝑫\mathbf{D}. On the empty list ()(), it equals ℰS,T,manc(U,ρ,G;A)\mathcal{E}^{\mathrm{anc}}_{S, T, m}(U, \rho, G; A). On a nonempty list (D,𝒅)(D, \mathbf{d}), it is given by 𝒞T,m((D,𝒅);S,U,ρ,G;A)=∑i∈U𝒞T,m(𝒅;S,U\{i},ρ,Gi;A)+∑v∈𝒱(S)γv(S,m)𝒞T,m(𝒅;Sv,U,ρ∘rS,v,Gv;A),\begin{aligned} \mathcal{C}_{T, m}\bigl((D, \mathbf{d}); S, U, \rho, G; A\bigr) &= \sum_{i \in U} \mathcal{C}_{T, m}\bigl( \mathbf{d}; S, U \setminus \{i\}, \rho, G_i;\, A \bigr) \\ &\quad + \sum_{v \in \mathcal{V}(S)} \gamma_v(S, m)\, \mathcal{C}_{T, m}\bigl( \mathbf{d}; S_v, U, \rho \circ r_{S, v}, G_v;\, A \bigr), \end{aligned}(9)✦ with GiG_i and GvG_v as in (7).

Let CC be a set of colors, and let VV be a functional assigning a real number V(S′,ϕ′,f′)V(S', \phi', f') to each prescribed tree S′S' of height nn, color placement ϕ′:C→ℒ(S′)\phi' : C \to \mathcal{L}(S'), and sample function f′:𝒮(Ω,S′)→ℝf' : \mathcal{S}(\Omega, S') \to \mathbb{R}. Given a list 𝒄\mathbf{c} of colors in CC, a finite set UU of indices in ι\iota with a leaf map λ:ι→ℒ(S)\lambda : \iota \to \mathcal{L}(S), a placement ϕ:C→ℒ(S)\phi : C \to \mathcal{L}(S), and f:𝒮(Ω,S)→ℝf : \mathcal{S}(\Omega, S) \to \mathbb{R}, the signed labeled-history sum ℋm,V(𝒄;S,U,λ,ϕ,f)\mathcal{H}_{m, V}(\mathbf{c}; S, U, \lambda, \phi, f) is defined recursively on 𝒄\mathbf{c}. On the empty list ()(), it equals V(S,ϕ,f)V(S, \phi, f). On (c,𝒄′)(c, \mathbf{c}'), it is given by ℋm,V((c,𝒄′);S,U,λ,ϕ,f)=∑i∈Uℋm,V(𝒄′;S,U\{i},λ,ϕ[c↦λ(i)],f)+∑v∈𝒱(S)γv(S,m)ℋm,V(𝒄′;Sv,U,ιS,v∘λ,ϕv,c,f∘rS,v),\begin{aligned} \mathcal{H}_{m, V}\bigl((c, \mathbf{c}'); S, U, \lambda, \phi, f\bigr) &= \sum_{i \in U} \mathcal{H}_{m, V}\bigl( \mathbf{c}'; S, U \setminus \{i\}, \lambda, \phi[c \mapsto \lambda(i)], f \bigr) \\ &\quad + \sum_{v \in \mathcal{V}(S)} \gamma_v(S, m)\, \mathcal{H}_{m, V}\bigl( \mathbf{c}'; S_v, U, \iota_{S, v} \circ \lambda, \phi_{v, c}, f \circ r_{S, v} \bigr), \end{aligned}(10)✦ where ϕ[c↦b]\phi[c \mapsto b] agrees with ϕ\phi except at cc, where it takes value bb, and ϕv,c=(ιS,v∘ϕ)[c↦aS,vnew]\phi_{v, c} = (\iota_{S, v} \circ \phi)[c \mapsto a^{\mathrm{new}}_{S, v}].

Finally, the depth-independent derivative bound M(q,k)M(q, k) for q,k∈ℕq, k \in \mathbb{N} is defined recursively by M(q,0)=2q,M(q,k+1)=qM(q+1,k).\begin{aligned} M(q, 0) &= 2^q, \\ M(q, k + 1) &= q\, M(q + 1, k). \end{aligned}(11)✦

The claim

Lemma 3.3. Let Ω\Omega be a finite state space, let n∈ℕn \in \mathbb{N}, let TT be a tower of finite kernels of depth nn on Ω\Omega, and let m=(m0,m1,…,mn)∈ℝn+1m = (m_0, m_1, \dots, m_n) \in \mathbb{R}^{n+1} satisfy mj≠0m_j \neq 0 for all j∈{1,…,n}j \in \{1, \dots, n\}. Let SS be a prescribed finite tree of height nn.

  1. Suppose m0=0m_0 = 0 and mn=1m_n = 1. For any k∈ℕk \in \mathbb{N}, any path function D:𝒫n(Ω)→ℝD : \mathcal{P}_n(\Omega) \to \mathbb{R}, any finite index set UU with path maps ρ=(ρi)\rho = (\rho_i), and any G:𝒮(Ω,S)→ℝG : \mathcal{S}(\Omega, S) \to \mathbb{R}, the kk-th iterated Fréchet derivative of A↦ℰS,T,manc(U,ρ,G;A)A \mapsto \mathcal{E}^{\mathrm{anc}}_{S, T, m}(U, \rho, G; A) at the constant function 11 along the diagonal direction (D,…,D)(D, \dots, D) satisfies Dk(A↦ℰS,T,manc(U,ρ,G;A))(1)(D,…,D)=𝒜T,m,D(k)(S,U,ρ,G;0).\mathrm{D}^k \bigl(A \mapsto \mathcal{E}^{\mathrm{anc}}_{S, T, m}(U, \rho, G; A)\bigr)(1)(D, \dots, D) = \mathcal{A}^{(k)}_{T, m, D}(S, U, \rho, G; 0).(12)✦

  2. Let CC be a finite set of colors with path functions Dc:𝒫n(Ω)→ℝD_c : \mathcal{P}_n(\Omega) \to \mathbb{R} for c∈Cc \in C, let 𝒄=(c1,…,cr)\mathbf{c} = (c_1, \dots, c_r) be a list of distinct elements of CC, and let P⊆CP \subseteq C be disjoint from {c1,…,cr}\{c_1, \dots, c_r\} with P∪{c1,…,cr}=CP \cup \{c_1, \dots, c_r\} = C. For any finite set UU of indices in a type ι\iota with leaf map λ:ι→ℒ(S)\lambda : \iota \to \mathcal{L}(S), any placement ϕ:C→ℒ(S)\phi : C \to \mathcal{L}(S), and any f:𝒮(Ω,S)→ℝf : \mathcal{S}(\Omega, S) \to \mathbb{R}, write 𝑫𝒄=(Dc1,…,Dcr)\mathbf{D}_{\mathbf{c}} = (D_{c_1}, \dots, D_{c_r}), ρλ,i(x)=πS(λ(i),x)\rho_{\lambda, i}(x) = \pi_S(\lambda(i), x), and fP(x)=f(x)∏c∈PDc(πS(ϕ(c),x))f_P(x) = f(x) \prod_{c \in P} D_c(\pi_S(\phi(c), x)). Then 𝒞T,m(𝑫𝒄;S,U,ρλ,fP;1)=ℋm,VT(𝒄;S,U,λ,ϕ,f),\mathcal{C}_{T, m}\bigl(\mathbf{D}_{\mathbf{c}}; S, U, \rho_\lambda, f_P; 1\bigr) = \mathcal{H}_{m, V_T}(\mathbf{c}; S, U, \lambda, \phi, f),(13)✦ where VT(S′,ϕ′,f′)=𝔼S′,T[f′(x)∏c∈CDc(πS′(ϕ′(c),x))]V_T(S', \phi', f') = \mathbb{E}_{S', T}\bigl[f'(x) \prod_{c \in C} D_c(\pi_{S'}(\phi'(c), x))\bigr].

  3. Suppose mm is nondecreasing and nonnegative with m0=0m_0 = 0 and mn=1m_n = 1. Let D:𝒫n(Ω)→ℝD : \mathcal{P}_n(\Omega) \to \mathbb{R} satisfy |D(y)|≤1|D(y)| \le 1 for all y∈𝒫n(Ω)y \in \mathcal{P}_n(\Omega), let a∈ℒ(S)a \in \mathcal{L}(S) be an anchor leaf, and let G:𝒮(Ω,S)→ℝG : \mathcal{S}(\Omega, S) \to \mathbb{R} and B≥0B \ge 0 satisfy |G(x)|≤B|G(x)| \le B for all x∈𝒮(Ω,S)x \in \mathcal{S}(\Omega, S). Then for every t∈[0,1/2]t \in [0, 1/2] and every k∈ℕk \in \mathbb{N}, setting q=ℓ(S)+|ℒ(S)\{a}|q = \ell(S) + |\mathcal{L}(S) \setminus \{a\}|, |ℐS,T,m(a,G;1+tD)−∑j=0kcj(S,T,m,D,a,G)tj|≤BM(q,k+1)k!tk+1.\begin{aligned} &\left| \mathcal{I}_{S, T, m}(a, G; 1 + t D) - \sum_{j=0}^{k} c_j(S, T, m, D, a, G)\, t^j \right| \\ &\qquad \le \frac{B\, M(q, k + 1)}{k!}\, t^{k+1}. \end{aligned}(14)✦

What is checked

Lemma 3.3 is stated in the Lean library over finite state spaces Ω\Omega, towers of finite kernels TT of depth nn, prescribed finite trees SS of height nn, and real exponent tuples m=(m0,…,mn)m = (m_0, \dots, m_n) with nonzero entries m1,…,mnm_1, \dots, m_n: (12) further assumes m0=0m_0 = 0 and mn=1m_n = 1 for the diagonal Fréchet derivatives of the partially canceled anchor expectation, (13) relates the colored extension calculus at A≡1A \equiv 1 to the signed labeled-history sum over any partition of a finite color set CC into a set PP and a duplicate-free list 𝒄\mathbf{c}, and (14) additionally assumes mm is nondecreasing and nonnegative, |D|≤1|D| \le 1, |G|≤B|G| \le B with B≥0B \ge 0, and t∈[0,1/2]t \in [0, 1/2] for the uniform Taylor remainder bound on the canceled-anchor insertion.