Trace vocabulary for the leaf statistics #
MCB's vocabulary over the generic measures of Counting.lean: the letter names
(accCount for numEdges; b₀, alpha, sigma for the forest measures), the
p-discounted measures (accCountP, alphaP, sigmaP), and their instantiations at
the trace-marker color class Sum.isRight (traceLeafCount, traceDepthSum,
accCountC, alphaC, sigmaC).
Domain vocabulary over the generic substrate of Core/Data/RoseTree/Count.lean;
consumed by the workspace conservation laws (Workspace/Conservation.lean) and the
Merge economy files.
The number of Sum.inr-labeled (trace-marker) leaves in a tree.
Equations
- t.traceLeafCount = RoseTree.leafCountP (fun (x : α ⊕ β) => x.isRight = true) t
Instances For
Sum of root-distances of the Sum.inr-labeled (trace-marker) leaves.
Equations
- t.traceDepthSum = RoseTree.leafDepthSumP (fun (x : α ⊕ β) => x.isRight = true) t
Instances For
MCB's letter vocabulary for the generic measures #
MCB's accessible-term count: the edge count (every non-root vertex is an accessible term).
Instances For
Accessible terms discounting the p-leaves. Truncated subtraction covers the
single-p-leaf tree, whose root is its one leaf.
Equations
Instances For
Adjoining a root (not counted by p) above a pair adds two discounted
accessible terms.
The number of Sum.inr-labeled (trace-marker) leaves of a nonplanar tree.
Equations
- RootedTree.Nonplanar.traceLeafCount = RootedTree.Nonplanar.leafCountP fun (x : α ⊕ β) => x.isRight = true
Instances For
The depth-weighted trace-marker count of a nonplanar tree.
Equations
- RootedTree.Nonplanar.traceDepthSum = RootedTree.Nonplanar.leafDepthSumP fun (x : α ⊕ β) => x.isRight = true
Instances For
The trace-excluding accessible-term count αᶜ(T) = α(T) − #traceLeaves(T).
Equations
- RootedTree.Nonplanar.accCountC = RootedTree.Nonplanar.accCountP fun (x : α ⊕ β) => x.isRight = true
Instances For
External Merge adds two accessible terms in the trace-aware count (MCB Lemma 1.6.3, eq. 1.6.5).
MCB's letter vocabulary for the forest measures #
The number of component trees of a workspace (MCB's zeroth Betti number).
Equations
- RootedTree.Forest.b₀ = Multiset.card
Instances For
MCB's workspace measure α: the total accessible-term (edge) count.
Instances For
MCB's workspace size σ = b₀ + α: the total vertex count
(sigma_eq_sum_numNodes).
Equations
Instances For
sigma is the total vertex count: the forest case of #V = b₀ + #E.
Discounted accessible terms across a workspace.
Equations
- RootedTree.Forest.alphaP p F = (Multiset.map (RootedTree.Nonplanar.accCountP p) F).sum
Instances For
Discounted workspace size: components plus discounted accessible terms. Unlike
sigma, this is not the vertex count when counted leaves exist.
Equations
Instances For
Trace-excluding accessible terms across a workspace, αᶜ(F) = Σ αᶜ(Tᵢ).
Equations
- RootedTree.Forest.alphaC F = RootedTree.Forest.alphaP (fun (x : α ⊕ β) => x.isRight = true) F
Instances For
Trace-aware workspace size σᶜ(F) = b₀(F) + αᶜ(F); not the vertex count for
contraction quotients (σᶜ ≠ #V, MCB p. 66).
Equations
- RootedTree.Forest.sigmaC F = RootedTree.Forest.sigmaP (fun (x : α ⊕ β) => x.isRight = true) F