Balance at states k ≥ 3 for any stationary distribution
ProvedBitcoinSelfishUnique.balance_lead_ofUnder the same hypotheses, for every : .
import Definitions.Def_BitcoinSelfishUnique import Definitions.Def_BitcoinSelfishMining open BitcoinSelfishUnique BitcoinSelfishMining
theorem BitcoinSelfishUnique.balance_lead_of (α γ : ℝ) (π : BitcoinSelfishMining.State → ℝ)
(h : BitcoinSelfishUnique.IsStationary α γ π) (n : ℕ) :
π (.lead (n + 2)) = α * π (.lead (n + 1)) + (1 - α) * π (.lead (n + 3)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-1 (independent sub-agent, blind: Lean code + auditor instructions only)
Read-back: Thm_BitcoinSelfishUnique_balance_lead_of.lean
Theorem BitcoinSelfishUnique.balance_lead_of. For every real number , every real number , every function from the state type to , under the single hypothesis (which bundles the four conditions nonneg, summable, mass and invariant spelled out below), and for every natural number , the following equality of real numbers holds:
Here is the state lead k (described in the definition file's documentation as a private lead of blocks, so the equation relates the states the documentation calls "lead ", "lead " and "lead "). The statement places no hypothesis on or beyond their being real numbers: there is no assumption , , , or anything about . The conclusion is written with the literal coefficient , whereas the invariant condition at the state (see below) is written with the coefficient ; these are equal as polynomials for all real . The conclusion involves no division and no infinite sum. All four fields of are available as hypotheses; the statement itself does not indicate which of them (in particular whether nonneg, summable or mass) are needed. The statement covers , giving , and says nothing about or on the left-hand side.
Setting and unfolded definitions (as they are actually defined in the bundle)
Throughout, and are real numbers. Unless a hypothesis is listed explicitly for the declaration below, nothing restricts them: they need not lie in , so the "probabilities" below are simply real numbers that may be negative or exceed .
States. The state type has exactly these elements: a state (the constructor zero), a state (the constructor tie), and, for every natural number , a state (the constructor lead n). The documentation in the definition file says that encodes a private lead of blocks, so is "lead ", is "lead ", and is "lead "; the code itself only ever works with the index .
Outcomes and their weights. There are exactly three outcomes, , (honest miner on the pool's branch) and (honest miner on the honest branch), with real weights
Write for the sum of the two honest weights. As a polynomial identity, valid for all real , one has and ; the definitions, however, are written with the unsimplified expressions.
One-step map. The function sends a state and an outcome to a state:
- ; ;
- for each of the three outcomes ;
- ; ;
- ; ;
- for every : ; .
Transition kernel. For states ,
where is if the equality holds and otherwise (the three-term sum is taken in the order pool, hP, hO). Reading off the step map, the only entries that are not literally a sum of three zeros are:
| from | to | |
|---|---|---|
| () | ||
| () |
Every other pair has .
Sums over all states. For a real-valued function on states,
where is Mathlib's tsum: if the family is summable (unconditionally summable in , which for real numbers is the same as absolute convergence), it is the ordinary infinite sum; if the family is not summable, the tail is defined to be . A family with only finitely many nonzero terms is summable and its tsum is the finite sum of those terms.
The predicate "IsStationary". For real and a function from states to , is the conjunction of the following four conditions (it is a structure with four fields; being given it as a hypothesis means all four are available, and the statement of a theorem does not say which of them its proof uses):
- nonneg: for every state , .
- summable: the family is summable in .
- mass: , i.e. . (Because of condition 2 the tail here is the genuine infinite sum, not the fallback.)
- invariant: for every state ,
By the table above, for each fixed target the family has at most one nonzero term, so this tail is always a genuine (finite) sum. Unfolding the table, condition 4 says exactly the following five families of equations, where :
- at : ;
- at : ;
- at : ;
- at : ;
- at for every : .
Note that the invariant condition does not mention except through and , which simplify to and for every real .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.