Tree #
Complete dyadic trees #
Nodes at depth d are numbered from left to right by Fin (2 ^ d).
The module supplies the finite-tree bookkeeping used by the hazard and
Bellman arguments. All global estimates are consequences of explicit local
hypotheses; no policy-specific algebra is hidden here.
Nodes of the complete dyadic tree at depth d.
Equations
- FD1D.DyadicNode d = Fin (2 ^ d)
Instances For
The unique node at depth zero.
Equations
Instances For
Splitting a level into the two children of every node.
Equations
Instances For
The left child of a dyadic node.
Equations
- FD1D.leftChild v = (FD1D.childrenEquiv d) (v, 0)
Instances For
The right child of a dyadic node.
Equations
- FD1D.rightChild v = (FD1D.childrenEquiv d) (v, 1)
Instances For
The parent of a nonroot node.
Equations
- FD1D.parent v = ((FD1D.childrenEquiv d).symm v).1
Instances For
Every node at level d+1 occurs exactly once as a left or right child.
This is the basic child-partition identity for finite sums.
The leaf with offset j in the block below v.
Equations
- FD1D.descendantLeaf hdL v j = (FD1D.descendantsEquiv hdL) (v, j)
Instances For
Descendant blocks are consecutive in the left-to-right leaf numbering.
The embedding of offsets into the leaf block below one node.
Equations
- FD1D.descendantEmbedding hdL v = { toFun := FD1D.descendantLeaf hdL v, inj' := ⋯ }
Instances For
The consecutive block of depth-L leaves below v.
Equations
- FD1D.leafBlock hdL v = Finset.map (FD1D.descendantEmbedding hdL v) Finset.univ
Instances For
Distinct nodes at one level have disjoint descendant leaf blocks.
Every leaf belongs to a unique block at every shallower level.
A parent's leaf block is the disjoint union of its children's blocks.
Each child has half its parent's interval mass.
Node masses at every complete level sum to one.
Inventory and coherent labels #
A leaf inventory vector with a prescribed total inventory m.
- count : DyadicNode L → ℕ
Number of inventory items in each leaf of the dyadic tree.
Instances For
Aggregated counts at every level. The explicit child equation states exactly that each internal count is the sum of the inventory in its two child blocks.
- leaf : LeafInventory L m
Inventory at the finest dyadic level.
- count (d : ℕ) : DyadicNode d → ℕ
Aggregated inventory count at each dyadic level and node.
Instances For
Concrete aggregate of a leaf inventory over one descendant block.
Equations
- I.nodeCount hdL v = ∑ w ∈ FD1D.leafBlock hdL v, I.count w
Instances For
Aggregated inventory counts satisfy the parent/children count identity.
Every fixed-total leaf vector has canonical coherent aggregate counts.
Equations
Instances For
An abstract additive tree labeling. It is useful for q, inventory counts,
or any other quantity whose parent is the sum of its children.
- value (d : ℕ) : DyadicNode d → A
Node labels whose parent value is the sum of its child values.
Instances For
Sum of a depth-indexed label over one complete level.
Equations
- FD1D.levelSum f d = ∑ v : FD1D.DyadicNode d, f d v
Instances For
Weighted telescopes #
Mass-weighted sum of a real label over one complete level.
Equations
- FD1D.weightedLevel f d = ∑ v : FD1D.DyadicNode d, FD1D.nodeMass d v * f d v
Instances For
Arithmetic mean of a real label over the two children of v.
Equations
- FD1D.childAverage f d v = (f (d + 1) (FD1D.leftChild v) + f (d + 1) (FD1D.rightChild v)) / 2
Instances For
A child average weighted at the parent equals the next weighted level.
Generic mass-weighted telescope over all internal nodes.
Sum of a mass-weighted label over all nonroot levels through L.
Equations
- FD1D.nonrootWeightedSum f L = ∑ d ∈ Finset.range L, FD1D.weightedLevel f (d + 1)
Instances For
Sum of a mass-weighted label over all internal levels before L.
Equations
- FD1D.internalWeightedSum f L = ∑ d ∈ Finset.range L, FD1D.weightedLevel f d
Instances For
The hazard energy H_d = ∑_{depth(v)=d} p_v h_v².
Equations
- FD1D.hazardEnergy h d = FD1D.weightedLevel (fun (d : ℕ) (v : FD1D.DyadicNode d) => h d v ^ 2) d
Instances For
Exact hazard-energy telescope behind equations (1) and (2).
Summing the local hazard inequality gives equation (2), before substituting
the root value h_root = 1/m.
Equation (2) directly from equation (1), with the latter stated in its displayed divided form.
Equation (2) with H₀ = m⁻².
Bellman telescope and deterministic estimate #
The exact generic Bellman telescope. c is the child cost (t Z in the
paper), while B is any node potential.
Global form of the local Bellman inequality (7). This is the telescope used immediately before equation (9).
The drift quantity D from equation (9).
Equations
- FD1D.bellmanDrift L a N q = ∑ d ∈ Finset.range L, ∑ v : FD1D.DyadicNode (d + 1), FD1D.nodeMass (d + 1) v ^ 2 * (FD1D.nodeMass (d + 1) v - q (d + 1) v) / (N (d + 1) v + a)
Instances For
The deterministic Bellman estimate (9). The hypotheses are exactly the
local certificate (7), the definitions of t and Z, and the terminal/root
sign bounds proved in the paper.
Squared masses #
Squared interval masses on level d sum to 2⁻ᵈ.
Sum of p_v² over every nonroot node through depth L.
Equations
- FD1D.nonrootMassSqSum L = ∑ d ∈ Finset.range L, ∑ v : FD1D.DyadicNode (d + 1), FD1D.nodeMass (d + 1) v ^ 2
Instances For
∑_{v ≠ root} p_v² = 1 - 1/n for n = 2^L.