OctoInform Beta

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

Lemma 3.4: Signed reference-path totals, partial branching weights κm(T,R)\kappa_m(T, R), and factorization of reference-history expectations on finite trees

Exact signed totals for prescribed reference trees.

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 finite-tree calculus for diluted spin glasses, expectations of multioverlaps are computed by adding replica colors one at a time to an existing finite tree of reference paths. At each step, the newly added color is required to match prescribed split depths with the already placed reference leaves. It may either reuse an existing leaf of the current tree with unit weight or sprout a fresh branch from an internal vertex at depth dd with a signed weight md−kmd+1m_d - k m_{d+1} determined by the vertex’s child count kk.

Lemma 3.4 evaluates these signed totals exactly. Because the weights over all unused child subtrees telescope to md+1m_{d+1} per subtree, the sum over all allowed choices at a depth-dd branching vertex reduces to md−jmd+1m_d - j m_{d+1}, where jj is the number of occupied child subtrees. Iterating this one-step identity expresses the signed step total for a new color as a ratio of partial branching products κm(T,R)\kappa_m(T, R) and factors the product of step coefficients out of expectations under finite kernel towers.

Prescribed trees and fresh branches

A prescribed finite tree SS of height n∈ℕn \in \mathbb{N} is defined recursively: for n=0n = 0 it is a single leaf, and for n+1n + 1 it is an internal root with a positive integer number k≥1k \ge 1 of ordered children C0,…,Ck−1C_0, \dots, C_{k-1}, each of which is a prescribed finite tree of height nn.✦

The leaf set ℒ(S)\mathcal{L}(S) of a prescribed finite tree SS is a singleton when n=0n = 0, and for a root with children C0,…,Ck−1C_0, \dots, C_{k-1} it 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).✦ The number of leaves Λ(S)∈ℕ\Lambda(S) \in \mathbb{N} is 11 at a leaf and ∑i=0k−1Λ(Ci)\sum_{i=0}^{k-1} \Lambda(C_i) at an internal root.✦ The set ℐ(S)\mathcal{I}(S) of internal vertices of SS is empty when n=0n = 0, and at a root with children C0,…,Ck−1C_0, \dots, C_{k-1} it consists of the root itself together with pairs (i,v)(i, v) where i∈{0,…,k−1}i \in \{0, \dots, k - 1\} and v∈ℐ(Ci)v \in \mathcal{I}(C_i).✦

The leaf split depth sd⁡S(a,b)∈ℕ\operatorname{sd}_S(a, b) \in \mathbb{N} of two leaves a,b∈ℒ(S)a, b \in \mathcal{L}(S) is 00 when n=0n = 0; at an internal root with children C0,…,Ck−1C_0, \dots, C_{k-1}, it equals 1+sd⁡Ci(a′,b′)1 + \operatorname{sd}_{C_i}(a', b') if a=(i,a′)a = (i, a') and b=(i,b′)b = (i, b') lie in the same child subtree, and 00 otherwise.✦

Given an internal vertex v∈ℐ(S)v \in \mathcal{I}(S) of a prescribed finite tree SS of height n≥1n \ge 1 with children C0,…,Ck−1C_0, \dots, C_{k-1}, attaching a fresh branch at vv produces a prescribed finite tree S⊕vS \oplus v of the same height nn. When vv is the root, S⊕vS \oplus v has k+1k + 1 children obtained by prepending a unary chain of height n−1n - 1 with a single leaf at child index 00 and shifting each original child CiC_i to index i+1i + 1; when v=(i,v′)v = (i, v') lies in child CiC_i, the tree S⊕vS \oplus v replaces CiC_i by Ci⊕v′C_i \oplus v' and leaves all other children unchanged.✦

This growth operation determines a newly attached leaf νv∈ℒ(S⊕v)\nu_v \in \mathcal{L}(S \oplus v) and an embedding ιv:ℒ(S)→ℒ(S⊕v)\iota_v : \mathcal{L}(S) \to \mathcal{L}(S \oplus v) of retained old leaves. At the root, νv\nu_v is the unique leaf of the prepended child at index 00, and ιv(i,a′)=(i+1,a′)\iota_v(i, a') = (i + 1, a'). At v=(i,v′)v = (i, v'), the new leaf is (i,νv′)(i, \nu_{v'}), while ιv(j,a′)\iota_v(j, a') equals (i,ιv′(a′))(i, \iota_{v'}(a')) for j=ij = i and (j,a′)(j, a') for j≠ij \ne i.

The fresh-branch split depth fsd⁡S(v,a)∈ℕ\operatorname{fsd}_S(v, a) \in \mathbb{N} of an internal vertex v∈ℐ(S)v \in \mathcal{I}(S) and a leaf a∈ℒ(S)a \in \mathcal{L}(S) is 00 when vv is the root; when v=(i,v′)v = (i, v') and a=(j,a′)a = (j, a'), it equals 1+fsd⁡Ci(v′,a′)1 + \operatorname{fsd}_{C_i}(v', a') if j=ij = i and 00 otherwise.✦

Branching weights and history covers

Let m=(m0,…,mn)m = (m_0, \dots, m_n) be a sequence of real numbers. For an internal vertex v∈ℐ(S)v \in \mathcal{I}(S) of a prescribed finite tree SS of height nn, the fresh-branch weight γm(S,v)∈ℝ\gamma_m(S, v) \in \mathbb{R} is defined recursively: if vv is the root of SS with kk children, then γm(S,v)=m0−km1\gamma_m(S, v) = m_0 - k m_1; if v=(i,v′)v = (i, v') lies in child CiC_i, then γm(S,v)=γm+(Ci,v′)\gamma_m(S, v) = \gamma_{m^+}(C_i, v'), where m+m^+ is the shifted sequence (m1,…,mn)(m_1, \dots, m_n).✦

For a real sequence m=(mr)r≥0m = (m_r)_{r \ge 0}, a base depth d∈ℕd \in \mathbb{N}, and a prescribed finite tree SS of height nn, the total fresh-branch weight Fm(d,S)∈ℝF_m(d, S) \in \mathbb{R} is 00 when n=0n = 0, and at an internal root with children T0,…,Tk−1T_0, \dots, T_{k-1} it is given by Fm(d,S)=md−kmd+1+∑i=0k−1Fm(d+1,Ti).F_m(d, S) = m_d - k m_{d+1} + \sum_{i=0}^{k-1} F_m(d + 1, T_i).(1)✦

The partial branching product tracks the signed total weight accumulated as colors are added sequentially to realize a prescribed reference tree. For a prescribed finite tree SS of height nn, a real sequence m=(m0,…,mn)m = (m_0, \dots, m_n), and a finite subset R⊆ℒ(S)R \subseteq \mathcal{L}(S), the partial branching product κm(S,R)∈ℝ\kappa_m(S, R) \in \mathbb{R} is 11 when n=0n = 0. At an internal root with children C0,…,Ck−1C_0, \dots, C_{k-1}, let aa be the number of child indices ii such that RR contains at least one leaf in CiC_i; then κm(S,R)=β(m0,m1,a)∏i=0k−1κm+(Ci,Ri),\kappa_m(S, R) = \beta(m_0, m_1, a) \prod_{i=0}^{k-1} \kappa_{m^+}(C_i, R_i),(2) where the local branching factor β(m0,m1,a)\beta(m_0, m_1, a) equals ∏j=1a−1(m0−jm1)\prod_{j=1}^{a-1}(m_0 - j m_1) (taken to be 11 when a≤1a \le 1) and Ri⊆ℒ(Ci)R_i \subseteq \mathcal{L}(C_i) is the set of leaves in CiC_i corresponding to leaves of RR whose first coordinate is ii.

Let SS be a prescribed finite tree of height nn, let II and CC be index sets, let U⊆IU \subseteq I and P⊆CP \subseteq C be finite subsets, and let loc:I→ℒ(S)\mathrm{loc} : I \to \mathcal{L}(S) and pos:C→ℒ(S)\mathrm{pos} : C \to \mathcal{L}(S) be leaf assignments. The tuple (U,loc,P,pos)(U, \mathrm{loc}, P, \mathrm{pos}) is a valid history assignment on SS if loc\mathrm{loc} is injective on II, pos\mathrm{pos} is injective on PP, and loc(i)≠pos(c)\mathrm{loc}(i) \ne \mathrm{pos}(c) for all i∈Ui \in U and c∈Pc \in P.✦ It is a complete history leaf cover of SS if it is a valid history assignment and every leaf b∈ℒ(S)b \in \mathcal{L}(S) satisfies either b=loc(i)b = \mathrm{loc}(i) for some i∈Ui \in U or b=pos(c)b = \mathrm{pos}(c) for some c∈Pc \in P.✦

Kernel towers and reference plans

Let Ω\Omega be a finite state space. A finite probability law μ\mu on Ω\Omega is a nonnegative function μ:Ω→ℝ\mu : \Omega \to \mathbb{R} with ∑x∈Ωμ(x)=1\sum_{x \in \Omega} \mu(x) = 1✦, and the expectation of a function f:Ω→ℝf : \Omega \to \mathbb{R} under μ\mu is 𝔼μ[f]=∑x∈Ωμ(x)f(x)\mathbb{E}_\mu[f] = \sum_{x \in \Omega} \mu(x) f(x).✦ A tower of finite kernels KK of depth n∈ℕn \in \mathbb{N} on Ω\Omega is trivial when n=0n = 0, and for depth n+1n + 1 consists of an initial finite probability law μ0\mu_0 on Ω\Omega together with a continuation tower KxK_x of depth nn for each x∈Ωx \in \Omega.✦

For a prescribed finite tree SS of height nn, a prescribed tree sample in Ω\Omega indexed by SS is an element of the space 𝒳(Ω,S)\mathcal{X}(\Omega, S) defined recursively as a singleton when n=0n = 0, and at an internal root with children C0,…,Ck−1C_0, \dots, C_{k-1} as a family indexed by i∈{0,…,k−1}i \in \{0, \dots, k - 1\} of pairs (xi,yi)(x_i, y_i) with xi∈Ωx_i \in \Omega and yi∈𝒳(Ω,Ci)y_i \in \mathcal{X}(\Omega, C_i).✦ The prescribed tree sample law QS,KQ_{S, K} on 𝒳(Ω,S)\mathcal{X}(\Omega, S) is the finite probability law defined recursively as the unit mass on the singleton when n=0n = 0, and at an internal root 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\} of the law obtained by sampling x∈Ωx \in \Omega from the top law μ0\mu_0 of KK and then drawing a prescribed tree sample from QCi,KxQ_{C_i, K_x}.✦

Let TT be a prescribed finite tree of height nn and let s=(s0,…,st)s = (s_0, \dots, s_t) be a tuple of t+1t + 1 leaves of TT for some t∈ℕt \in \mathbb{N}. A reference color plan Π\Pi for TT starting from ss is built recursively: it is either empty, or it prepends a target leaf b∈ℒ(T)b \in \mathcal{L}(T) together with an anchor index a∈{0,…,t}a \in \{0, \dots, t\} such that b≠sib \ne s_i and sd⁡T(b,si)≤sd⁡T(b,sa)\operatorname{sd}_T(b, s_i) \le \operatorname{sd}_T(b, s_a) for every i∈{0,…,t}i \in \{0, \dots, t\}, followed by a reference color plan Π′\Pi' starting from (b,s0,…,st)(b, s_0, \dots, s_t).✦

For a real sequence m=(m0,…,mn)m = (m_0, \dots, m_n), the reference plan normalizer ZT,m(Π)∈ℝZ_{T, m}(\Pi) \in \mathbb{R} is 11 for the empty plan, and for a nonempty plan prepending (b,a)(b, a) followed by Π′\Pi' it is ZT,m(Π)=cm(T,sa,d,{s0,…,st})ZT,m(Π′),Z_{T, m}(\Pi) = c_m\bigl(T, s_a, d, \{s_0, \dots, s_t\}\bigr) \, Z_{T, m}(\Pi'),(3)✦ where d=sd⁡T(b,sa)<nd = \operatorname{sd}_T(b, s_a) < n and the step coefficient cm(T,sa,d,{s0,…,st})c_m(T, s_a, d, \{s_0, \dots, s_t\}) is md−jmd+1m_d - j m_{d+1} with jj the number of child subtrees of the depth-dd ancestor of sas_a that contain at least one leaf from {s0,…,st}\{s_0, \dots, s_t\}.

Given a tower of finite kernels KK of depth nn on Ω\Omega, a prescribed finite tree SS of height nn, a tuple r=(r0,…,rt)r = (r_0, \dots, r_t) of leaves of SS, and a function H:𝒳(Ω,S)→ℝH : \mathcal{X}(\Omega, S) \to \mathbb{R}, the signed reference-history expectation ℰT,m,K(Π,S,r,H)∈ℝ\mathcal{E}_{T, m, K}(\Pi, S, r, H) \in \mathbb{R} is defined recursively over Π\Pi. For the empty plan it equals 𝔼QS,K[H]\mathbb{E}_{Q_{S, K}}[H]. For a nonempty plan prepending (b,a)(b, a) followed by Π′\Pi', it is ℰT,m,K(Π,S,r,H)=∑x∈ℒoldℰT,m,K(Π′,S,(x,r),H)+∑v∈ℐfreshγm(S,v)ℰT,m,K(Π′,S⊕v,(νv,ιv∘r),H∘πv),\begin{aligned} \mathcal{E}_{T, m, K}(\Pi, S, r, H) &= \sum_{x \in \mathcal{L}_{\mathrm{old}}} \mathcal{E}_{T, m, K}\bigl(\Pi', S, (x, r), H\bigr) \\ &\quad + \sum_{v \in \mathcal{I}_{\mathrm{fresh}}} \gamma_m(S, v)\, \mathcal{E}_{T, m, K}\bigl(\Pi', S \oplus v, (\nu_v, \iota_v \circ r), H \circ \pi_v\bigr), \end{aligned}(4)✦ where ℒold\mathcal{L}_{\mathrm{old}} is the set of leaves x∈ℒ(S)x \in \mathcal{L}(S) satisfying sd⁡S(x,ri)=sd⁡T(b,si)\operatorname{sd}_S(x, r_i) = \operatorname{sd}_T(b, s_i) for all ii, ℐfresh\mathcal{I}_{\mathrm{fresh}} is the set of internal vertices v∈ℐ(S)v \in \mathcal{I}(S) satisfying fsd⁡S(v,ri)=sd⁡T(b,si)\operatorname{fsd}_S(v, r_i) = \operatorname{sd}_T(b, s_i) for all ii, and πv:𝒳(Ω,S⊕v)→𝒳(Ω,S)\pi_v : \mathcal{X}(\Omega, S \oplus v) \to \mathcal{X}(\Omega, S) restricts a sample on S⊕vS \oplus v to SS by discarding the newly attached branch.

The claim

Lemma 3.4. Let n∈ℕn \in \mathbb{N}.

  1. For every positive integer k≥1k \ge 1, every family T0,…,Tk−1T_0, \dots, T_{k-1} of prescribed finite trees of height nn, every real sequence m=(mr)r≥0m = (m_r)_{r \ge 0}, every d∈ℕd \in \mathbb{N} with md+1+n=1m_{d + 1 + n} = 1, and every subset J⊆{0,…,k−1}J \subseteq \{0, \dots, k - 1\}, md−kmd+1+∑i∈{0,…,k−1}\J(Λ(Ti)+Fm(d+1,Ti))=md−|J|md+1.\begin{aligned} &m_d - k m_{d+1} + \sum_{i \in \{0, \dots, k - 1\} \setminus J} \bigl(\Lambda(T_i) + F_m(d + 1, T_i)\bigr) \\ &\quad = m_d - |J| m_{d+1}. \end{aligned}(5)✦

  2. For every prescribed finite tree SS of height nn, every leaf a∈ℒ(S)a \in \mathcal{L}(S), every d∈ℕd \in \mathbb{N} with d<nd < n, and every real sequence m=(m0,…,mn)m = (m_0, \dots, m_n) with mn=1m_n = 1, ∑b∈ℒ(S)sd⁡S(a,b)=d1+∑v∈ℐ(S)sd⁡S⊕v(ιv(a),νv)=dγm(S,v)=md−md+1.\begin{aligned} &\sum_{\substack{b \in \mathcal{L}(S) \\ \operatorname{sd}_S(a, b) = d}} 1 + \sum_{\substack{v \in \mathcal{I}(S) \\ \operatorname{sd}_{S \oplus v}(\iota_v(a), \nu_v) = d}} \gamma_m(S, v) \\ &\quad = m_d - m_{d+1}. \end{aligned}(6)✦

  3. Let TT and SS be prescribed finite trees of height nn, let CC be a finite index set and let II be an index set, let q:C→ℒ(T)q : C \to \mathcal{L}(T) be injective, let P⊆CP \subseteq C be a nonempty finite subset, and let c∈C\Pc \in C \setminus P. Let U⊆IU \subseteq I be a finite subset and let loc:I→ℒ(S)\mathrm{loc} : I \to \mathcal{L}(S) and pos:C→ℒ(S)\mathrm{pos} : C \to \mathcal{L}(S) form a complete history leaf cover of SS such that sd⁡S(pos(a),pos(b))=sd⁡T(q(a),q(b))\operatorname{sd}_S(\mathrm{pos}(a), \mathrm{pos}(b)) = \operatorname{sd}_T(q(a), q(b)) for all a,b∈Pa, b \in P. For every strictly increasing sequence m=(m0,…,mn)m = (m_0, \dots, m_n) of nonnegative real numbers with mn=1m_n = 1, ∑i∈U∀a∈P,sd⁡S(loc(i),pos(a))=sd⁡T(q(c),q(a))1+∑v∈ℐ(S)∀a∈P,fsd⁡S(v,pos(a))=sd⁡T(q(c),q(a))γm(S,v)=κm(T,q(P∪{c}))κm(T,q(P)).\begin{aligned} &\sum_{\substack{i \in U \\ \forall a \in P,\; \operatorname{sd}_S(\mathrm{loc}(i), \mathrm{pos}(a)) = \operatorname{sd}_T(q(c), q(a))}} 1 \\ &\quad + \sum_{\substack{v \in \mathcal{I}(S) \\ \forall a \in P,\; \operatorname{fsd}_S(v, \mathrm{pos}(a)) = \operatorname{sd}_T(q(c), q(a))}} \gamma_m(S, v) \\ &\quad = \frac{\kappa_m\bigl(T, q(P \cup \{c\})\bigr)}{\kappa_m(T, q(P))}. \end{aligned}(7)✦

  4. Let Ω\Omega be a finite state space, let TT and SS be prescribed finite trees of height nn, let m=(m0,…,mn)m = (m_0, \dots, m_n) be a real sequence with mn=1m_n = 1, and let KK be a tower of finite kernels of depth nn on Ω\Omega. For every t∈ℕt \in \mathbb{N}, every tuple s=(s0,…,st)s = (s_0, \dots, s_t) of leaves of TT, every reference color plan Π\Pi for TT starting from ss, every tuple r=(r0,…,rt)r = (r_0, \dots, r_t) of leaves of SS satisfying sd⁡S(ri,rj)=sd⁡T(si,sj)\operatorname{sd}_S(r_i, r_j) = \operatorname{sd}_T(s_i, s_j) for all i,j∈{0,…,t}i, j \in \{0, \dots, t\}, and every function H:𝒳(Ω,S)→ℝH : \mathcal{X}(\Omega, S) \to \mathbb{R}, ℰT,m,K(Π,S,r,H)=ZT,m(Π)𝔼QS,K[H].\mathcal{E}_{T, m, K}(\Pi, S, r, H) = Z_{T, m}(\Pi) \, \mathbb{E}_{Q_{S, K}}[H].(8)✦

What is checked

In the Lean library, Lemma 3.4 is stated over prescribed finite trees of height nn, their leaf and internal vertex sets, split depths and fresh-branch growth operations, signed branching weights γm\gamma_m and FmF_m, partial branching products κm\kappa_m, complete history leaf covers, towers of finite kernels on a finite state space Ω\Omega with their prescribed tree sample laws, and reference color plans with their normalizers and signed reference-history expectations. The four identities (5), (6), (7), and (8) capture the local subtree cancellation, the single-anchor split total, the multi-reference step ratio, and the factorization of reference-history expectations.