Proveddrift-lawdecodesum-treeexactness
Sum-tree branch probabilities are a distribution: left/(left+right) ≥ 0 and the two branch probabilities sum to 1
For all , if , and , then
What the notation means · or point at any symbol
- RReal numbers
- The real numbers: every point on the number line. (
ℝ) - x ∈ TVariables
- left, right range over real numbers: the statement must hold for every choice. (
(left right : ℝ)) - ≤At most
- 0 is less than or equal to left. (
0 ≤ left) - <Less than
- 0 is strictly smaller than left + right. (
0 < left + right) - ∧And
- Both hold: 0 ≤ left/(left + right), and left/(left + right) + right/(left + right) = 1. (
0 ≤ left / (left + right) ∧ left / (lef…) - +Addition
- left plus right. (
left + right) - a/bDivision
- left divided by left + right. In Lean, dividing by 0 gives 0. (
left / (left + right)) - =Equality
- left/(left + right) + right/(left + right) and 1 are the same. (
left / (left + right) + right / (left +…)
theorem st-sumtree-branch-probability (left right : ℝ) (hl : 0 ≤ left) (hr : 0 ≤ right) (hpos : 0 < left + right) :
0 ≤ left / (left + right) ∧ left / (left + right) + right / (left + right) = 1Each node's branch choice is a valid two-point distribution whenever the node's mass is positive. Part of 'The Drift Law' (persistent snapshot data structure: the sum-tree that keeps a snapshot sampleable as keys are appended).
How it was proved
- Proved
- 5 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 11 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.