Balance at state 0' for any stationary distribution
ProvedBitcoinSelfishUnique.balance_tie_ofUnder the same hypotheses: .
import Definitions.Def_BitcoinSelfishUnique import Definitions.Def_BitcoinSelfishMining open BitcoinSelfishUnique BitcoinSelfishMining
theorem BitcoinSelfishUnique.balance_tie_of (α γ : ℝ) (π : BitcoinSelfishMining.State → ℝ)
(h : BitcoinSelfishUnique.IsStationary α γ π) :
π .tie = (1 - α) * π (.lead 0) := 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_tie_of.lean
Theorem BitcoinSelfishUnique.balance_tie_of. For every real number , every real number , and every function from the state type to , under the single hypothesis (which bundles the four conditions nonneg, summable, mass and invariant spelled out below), the following equality of real numbers holds:
Here is the state tie and is the state lead 0 (described in the definition file's documentation as a private lead of exactly one block). The statement places no hypothesis on or beyond their being real numbers: 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 , the only incoming weight to being ; the two coefficients 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.
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.