Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Eyal–Sirer selfish-mining chain: states, transitions, stationary distribution, revenues and threshold

Definition
BitcoinSelfishMining

by pitimespi · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

bitcoineyal-sirerformal-verificationgame-theorymarkov-chainmathlibminingselfish-mining

The model of Eyal and Sirer's Section 4, over Mathlib's reals. A pool with hashrate fraction α\alphaα mines selfishly; of the honest hashrate 1−α1-\alpha1−α, a fraction γ\gammaγ mines on the pool's block during a tie.

States. State.zero (no private lead), State.tie (the paper's 0′0'0′: a public fork of two equal branches), and State.lead n, a private lead of n+1n+1n+1 blocks (lead 0 is the paper's state 1, lead 1 state 2, lead (n+2) state n+3n+3n+3). Outcomes of a step: pool (probability α\alphaα), honestOnPool ((1−α)γ(1-\alpha)\gamma(1−α)γ), honestOnOthers ((1−α)(1−γ)(1-\alpha)(1-\gamma)(1−α)(1−γ)); outcomeProb and outcomeSum name these.

step s o is the transition of Figure 1: from zero a pool block gives lead 0, an honest block stays; from lead 0 a pool block gives lead 1, an honest block gives tie; from tie every outcome returns to zero; from lead 1 a pool block gives lead 2, an honest block returns to zero; from lead (n+2) a pool block gives lead (n+3), an honest block lead (n+1). poolGain, othersGain are the blocks credited at each transition (equations (8), (9)): at a tie the pool gets 2 for its own block and 1 when honest miners extend its branch, the honest miners get 1 in that case and 2 when they win the tie; honest miners get 1 for a block found in zero; the pool gets 2 when an honest block reduces its lead of 2 and 1 when it reduces a lead of at least 3.

P α γ s t is the one-step transition probability; poolExpGain, othersExpGain the expected credited blocks from a state. stateSum f =f(zero)+f(tie)+∑n′f(lead n)= f(\text{zero}) + f(\text{tie}) + \sum'_{n} f(\text{lead } n)=f(zero)+f(tie)+∑n′​f(lead n), the tail a Mathlib tsum (0 if not summable). denom α =2α3−4α2+1= 2\alpha^3 - 4\alpha^2 + 1=2α3−4α2+1; stationary α is the paper's distribution (7): p0=(1−2α)/denomp_0 = (1-2\alpha)/\text{denom}p0​=(1−2α)/denom, p0′=(1−α)(α−2α2)/denomp_{0'} = (1-\alpha)(\alpha - 2\alpha^2)/\text{denom}p0′​=(1−α)(α−2α2)/denom, plead n=(α/(1−α))n(α−2α2)/denomp_{\text{lead } n} = (\alpha/(1-\alpha))^n (\alpha - 2\alpha^2)/\text{denom}plead n​=(α/(1−α))n(α−2α2)/denom. poolRevenue, othersRevenue are stateSum of psp_sps​ times the expected gain; relativeRevenue =rpool/(rpool+rothers)= r_{\text{pool}} / (r_{\text{pool}} + r_{\text{others}})=rpool​/(rpool​+rothers​) (10); closedForm α γ =α(1−α)2(4α+γ(1−2α))−α31−α(1+(2−α)α)= \frac{\alpha(1-\alpha)^2(4\alpha + \gamma(1-2\alpha)) - \alpha^3}{1 - \alpha(1 + (2-\alpha)\alpha)}=1−α(1+(2−α)α)α(1−α)2(4α+γ(1−2α))−α3​; profitThreshold γ =(1−γ)/(3−2γ)= (1-\gamma)/(3-2\gamma)=(1−γ)/(3−2γ) (11).

Formalization Note. Imports Mathlib. The stationary distribution is the paper's formula taken as a definition; its invariance and total mass are theorems. Real division by zero is 0, so relativeRevenue is 0 wherever the revenues sum to 0; the theorems assume 0<α<1/20 < \alpha < 1/20<α<1/2.

Definition code
import Mathlib

/-!
# Selfish mining (Eyal–Sirer 2014): the state machine, its stationary distribution and revenues

This file states the model of I. Eyal and E. G. Sirer, *Majority is not Enough: Bitcoin Mining is
Vulnerable* (Financial Cryptography 2014; arXiv:1311.0243), Section 4 ("Analysis").

A pool controlling a fraction `α` of the hashrate mines selfishly; the honest miners control `1 - α`.
When the pool publishes a block that ties with an honest block, a fraction `γ` of the honest
hashrate mines on the pool's block, the rest on the honest block.

The *state* is the pool's private lead: `State.zero` (lead 0, no fork), `State.tie` (the paper's
state `0'`: a public fork of two branches of equal height, one headed by the pool's block), and
`State.lead n` which encodes a private lead of **`n + 1`** blocks (so `lead 0` is the paper's
state `1`, `lead 1` is state `2`, `lead (n + 2)` is state `n + 3 ≥ 3`). This shift keeps the state
type free of junk constructors and of proof arguments; the paper's `p_k` for `k ≥ 1` is
`stationary α (State.lead (k - 1))`.

Each step one block is found: by the pool (`Outcome.pool`, probability `α`), by an honest miner
working on the pool's branch (`Outcome.honestOnPool`, probability `(1 - α) γ`), or by an honest
miner working on the honest branch (`Outcome.honestOnOthers`, probability `(1 - α) (1 - γ)`).
Outside the tie state both honest outcomes act alike (there is only one public branch).

The transitions and the number of blocks each side gets credited with are those of Figure 1 and
equations (8)–(9) of the paper, see `step`, `poolGain`, `othersGain`. Sums over the (countable)
state space are written with `stateSum`, which enumerates the states as
`zero, tie, lead 0, lead 1, …` and sums the tail with `tsum`.
-/

namespace BitcoinSelfishMining

/-- The state of the selfish-mining chain: the pool's private lead. `lead n` is a private lead of
`n + 1` blocks (`lead 0` = paper's state 1, `lead 1` = state 2, `lead (n+2)` = state `n+3`);
`tie` is the paper's state `0'`. -/
inductive State
  | zero
  | tie
  | lead (n : ℕ)
  deriving DecidableEq, Repr

/-- Who finds the next block: the pool, an honest miner extending the pool's branch, or an honest
miner extending the honest branch (the last two differ only in the tie state). -/
inductive Outcome
  | pool
  | honestOnPool
  | honestOnOthers
  deriving DecidableEq, Repr

/-- Probability of each outcome of a step: `α`, `(1 - α) γ` and `(1 - α) (1 - γ)`. -/
def outcomeProb (α γ : ℝ) : Outcome → ℝ
  | .pool => α
  | .honestOnPool => (1 - α) * γ
  | .honestOnOthers => (1 - α) * (1 - γ)

/-- Sum of a function over the three outcomes of a step. -/
def outcomeSum (f : Outcome → ℝ) : ℝ :=
  f .pool + f .honestOnPool + f .honestOnOthers

/-- The state transition of the selfish-mining strategy (Figure 1 of the paper):
* from `0`: pool block → lead 1 (kept private); honest block → `0`;
* from `1` (`lead 0`): pool → lead 2; honest → tie `0'` (the pool publishes its block);
* from `0'` (`tie`): every outcome resolves the fork and returns to `0`;
* from `2` (`lead 1`): pool → lead 3; honest → `0` (the pool publishes both blocks);
* from `k ≥ 3` (`lead (n+2)`): pool → lead `k+1`; honest → lead `k-1` (the pool publishes one). -/
def step : State → Outcome → State
  | .zero, .pool => .lead 0
  | .zero, _ => .zero
  | .tie, _ => .zero
  | .lead 0, .pool => .lead 1
  | .lead 0, _ => .tie
  | .lead 1, .pool => .lead 2
  | .lead 1, _ => .zero
  | .lead (n + 2), .pool => .lead (n + 3)
  | .lead (n + 2), _ => .lead (n + 1)

/-- Blocks credited to the pool at a transition (the pool's rewards in the paper's eq. (8)):
2 when it wins the tie, 1 when the honest miners extend its branch at a tie, 2 when its lead of 2
is reduced by an honest block (it publishes both), 1 when a lead `≥ 3` is reduced. -/
def poolGain : State → Outcome → ℕ
  | .tie, .pool => 2
  | .tie, .honestOnPool => 1
  | .tie, .honestOnOthers => 0
  | .lead 1, .pool => 0
  | .lead 1, _ => 2
  | .lead (_ + 2), .pool => 0
  | .lead (_ + 2), _ => 1
  | _, _ => 0

/-- Blocks credited to the honest miners at a transition (eq. (9) of the paper): 1 when they find a
block in state `0`, 1 when they extend the pool's branch at a tie, 2 when they win the tie. -/
def othersGain : State → Outcome → ℕ
  | .zero, .pool => 0
  | .zero, _ => 1
  | .tie, .honestOnPool => 1
  | .tie, .honestOnOthers => 2
  | _, _ => 0

/-- One-step transition probability `P α γ s t` from state `s` to state `t`. -/
noncomputable def P (α γ : ℝ) (s t : State) : ℝ :=
  outcomeSum fun o => if step s o = t then outcomeProb α γ o else 0

/-- Expected number of blocks credited to the pool at a step from state `s`. -/
noncomputable def poolExpGain (α γ : ℝ) (s : State) : ℝ :=
  outcomeSum fun o => outcomeProb α γ o * poolGain s o

/-- Expected number of blocks credited to the honest miners at a step from state `s`. -/
noncomputable def othersExpGain (α γ : ℝ) (s : State) : ℝ :=
  outcomeSum fun o => outcomeProb α γ o * othersGain s o

/-- Sum of a real function over all states: `zero`, `tie`, and the leads `lead 0, lead 1, …`
(the tail is a `tsum`, which is `0` if the family is not summable). -/
noncomputable def stateSum (f : State → ℝ) : ℝ :=
  f .zero + f .tie + ∑' n : ℕ, f (.lead n)

/-- The common denominator `2α³ - 4α² + 1` of the paper's stationary probabilities (eq. (7)). -/
def denom (α : ℝ) : ℝ := 2 * α ^ 3 - 4 * α ^ 2 + 1

/-- The stationary distribution claimed in the paper (eq. (7)):
`p₀ = (1 - 2α) / (2α³ - 4α² + 1)`, `p₀' = (1 - α)(α - 2α²) / (2α³ - 4α² + 1)`,
`p₁ = (α - 2α²) / (2α³ - 4α² + 1)` and `p_k = (α / (1 - α))^(k-1) p₁` for `k ≥ 1`
(recall `lead n` is the lead `k = n + 1`). -/
noncomputable def stationary (α : ℝ) : State → ℝ
  | .zero => (1 - 2 * α) / denom α
  | .tie => (1 - α) * (α - 2 * α ^ 2) / denom α
  | .lead n => (α / (1 - α)) ^ n * ((α - 2 * α ^ 2) / denom α)

/-- The pool's revenue rate (eq. (8)): expected pool blocks per transition in the stationary
regime, `Σ_s p_s · E[pool blocks at a step from s]`. -/
noncomputable def poolRevenue (α γ : ℝ) : ℝ :=
  stateSum fun s => stationary α s * poolExpGain α γ s

/-- The honest miners' revenue rate (eq. (9)). -/
noncomputable def othersRevenue (α γ : ℝ) : ℝ :=
  stateSum fun s => stationary α s * othersExpGain α γ s

/-- The pool's relative revenue `R = r_pool / (r_pool + r_others)` (eq. (10)). -/
noncomputable def relativeRevenue (α γ : ℝ) : ℝ :=
  poolRevenue α γ / (poolRevenue α γ + othersRevenue α γ)

/-- The paper's closed form for the relative revenue (eq. (10)):
`R = (α(1-α)²(4α + γ(1-2α)) - α³) / (1 - α(1 + (2-α)α))`. -/
noncomputable def closedForm (α γ : ℝ) : ℝ :=
  (α * (1 - α) ^ 2 * (4 * α + γ * (1 - 2 * α)) - α ^ 3) / (1 - α * (1 + (2 - α) * α))

/-- The profitability threshold of the paper (eq. (11)): selfish mining beats honest mining iff
`α > (1 - γ) / (3 - 2γ)`. -/
noncomputable def profitThreshold (γ : ℝ) : ℝ := (1 - γ) / (3 - 2 * γ)

end BitcoinSelfishMining
Source
I. Eyal, E. G. Sirer, Majority is not Enough: Bitcoin Mining is Vulnerable, Financial Cryptography 2014, arXiv:1311.0243, Section 4 (Figure 1, equations (7)-(11)): https://arxiv.org/abs/1311.0243
Read-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: Def_BitcoinSelfishMining.lean

This file imports all of Mathlib and places every declaration below in the namespace BitcoinSelfishMining. Throughout, "real division by zero" follows Mathlib's convention x/0=0x/0 = 0x/0=0, and ∑′\sum'∑′ denotes Mathlib's tsum, which equals the ordinary sum when the family is summable and equals 000 when the family is not summable. The file's comments describe an intended interpretation (a selfish-mining pool, states labelled 0,0′,1,2,…0, 0', 1, 2, \dots0,0′,1,2,…); the read-backs below record only what the code itself fixes, and mention the comments' labelling only where the task of unfolding the encoding requires it.

State. An inductive type with exactly three kinds of elements: a constant zero\mathrm{zero}zero, a constant tie\mathrm{tie}tie, and, for every natural number n∈N={0,1,2,… }n \in \mathbb{N} = \{0,1,2,\dots\}n∈N={0,1,2,…}, an element leadn\mathrm{lead}_nleadn​. Distinct constructors and distinct indices give distinct states, so the type is countably infinite: {zero,tie}∪{leadn:n∈N}\{\mathrm{zero}, \mathrm{tie}\} \cup \{\mathrm{lead}_n : n \in \mathbb{N}\}{zero,tie}∪{leadn​:n∈N}. The code attaches no numerical meaning to the index nnn; the file's comments say that leadn\mathrm{lead}_nleadn​ is meant to represent a private lead of n+1n+1n+1 blocks (so that lead0\mathrm{lead}_0lead0​, lead1\mathrm{lead}_1lead1​, leadn+2\mathrm{lead}_{n+2}leadn+2​ stand for the comments' "states" 111, 222, n+3n+3n+3), and that tie\mathrm{tie}tie stands for the comments' state 0′0'0′. Equality on State is decidable and the type can be printed.

Outcome. An inductive type with exactly three elements: pool\mathrm{pool}pool, honestOnPool\mathrm{honestOnPool}honestOnPool, honestOnOthers\mathrm{honestOnOthers}honestOnOthers. Equality is decidable.

outcomeProb. For real numbers α,γ∈R\alpha, \gamma \in \mathbb{R}α,γ∈R (completely unconstrained: they need not lie in [0,1][0,1][0,1]), a real-valued function on Outcome:

pα,γ(pool)=α,pα,γ(honestOnPool)=(1−α)γ,pα,γ(honestOnOthers)=(1−α)(1−γ).p_{\alpha,\gamma}(\mathrm{pool}) = \alpha,\qquad p_{\alpha,\gamma}(\mathrm{honestOnPool}) = (1-\alpha)\gamma,\qquad p_{\alpha,\gamma}(\mathrm{honestOnOthers}) = (1-\alpha)(1-\gamma).pα,γ​(pool)=α,pα,γ​(honestOnPool)=(1−α)γ,pα,γ​(honestOnOthers)=(1−α)(1−γ).

Nothing in the definition forces these three numbers to be non-negative or to sum to 111 (though algebraically they always sum to α+(1−α)γ+(1−α)(1−γ)\alpha + (1-\alpha)\gamma + (1-\alpha)(1-\gamma)α+(1−α)γ+(1−α)(1−γ), which simplifies to 111 for every real α,γ\alpha,\gammaα,γ).

outcomeSum. For a real-valued function fff on Outcome, the real number

∑of(o)  :=  f(pool)+f(honestOnPool)+f(honestOnOthers).\textstyle\sum_{o} f(o) \;:=\; f(\mathrm{pool}) + f(\mathrm{honestOnPool}) + f(\mathrm{honestOnOthers}).∑o​f(o):=f(pool)+f(honestOnPool)+f(honestOnOthers).

This is a plain three-term sum, with no weighting.

step. A function State → Outcome → State (a deterministic transition table), defined by cases, where "any other outcome" means either of the two outcomes honestOnPool\mathrm{honestOnPool}honestOnPool, honestOnOthers\mathrm{honestOnOthers}honestOnOthers:

  • from zero\mathrm{zero}zero: on pool\mathrm{pool}pool go to lead0\mathrm{lead}_0lead0​; on any other outcome stay at zero\mathrm{zero}zero;
  • from tie\mathrm{tie}tie: on every outcome (including pool\mathrm{pool}pool) go to zero\mathrm{zero}zero;
  • from lead0\mathrm{lead}_0lead0​: on pool\mathrm{pool}pool go to lead1\mathrm{lead}_1lead1​; on any other outcome go to tie\mathrm{tie}tie;
  • from lead1\mathrm{lead}_1lead1​: on pool\mathrm{pool}pool go to lead2\mathrm{lead}_2lead2​; on any other outcome go to zero\mathrm{zero}zero;
  • from leadn+2\mathrm{lead}_{n+2}leadn+2​ (i.e. leadk\mathrm{lead}_kleadk​ with k≥2k \ge 2k≥2): on pool\mathrm{pool}pool go to leadn+3\mathrm{lead}_{n+3}leadn+3​ (=leadk+1= \mathrm{lead}_{k+1}=leadk+1​); on any other outcome go to leadn+1\mathrm{lead}_{n+1}leadn+1​ (=leadk−1= \mathrm{lead}_{k-1}=leadk−1​).

In particular, in every state, honestOnPool\mathrm{honestOnPool}honestOnPool and honestOnOthers\mathrm{honestOnOthers}honestOnOthers lead to the same successor state; they are never distinguished by step.

poolGain. A function State → Outcome → ℕ (natural-number valued), defined by cases with a final catch-all:

  • (tie,pool)↦2(\mathrm{tie}, \mathrm{pool}) \mapsto 2(tie,pool)↦2; (tie,honestOnPool)↦1(\mathrm{tie}, \mathrm{honestOnPool}) \mapsto 1(tie,honestOnPool)↦1; (tie,honestOnOthers)↦0(\mathrm{tie}, \mathrm{honestOnOthers}) \mapsto 0(tie,honestOnOthers)↦0;
  • (lead1,pool)↦0(\mathrm{lead}_1, \mathrm{pool}) \mapsto 0(lead1​,pool)↦0; (lead1,honestOnPool)↦2(\mathrm{lead}_1, \mathrm{honestOnPool}) \mapsto 2(lead1​,honestOnPool)↦2; (lead1,honestOnOthers)↦2(\mathrm{lead}_1, \mathrm{honestOnOthers}) \mapsto 2(lead1​,honestOnOthers)↦2;
  • for every m∈Nm \in \mathbb{N}m∈N: (leadm+2,pool)↦0(\mathrm{lead}_{m+2}, \mathrm{pool}) \mapsto 0(leadm+2​,pool)↦0; (leadm+2,honestOnPool)↦1(\mathrm{lead}_{m+2}, \mathrm{honestOnPool}) \mapsto 1(leadm+2​,honestOnPool)↦1; (leadm+2,honestOnOthers)↦1(\mathrm{lead}_{m+2}, \mathrm{honestOnOthers}) \mapsto 1(leadm+2​,honestOnOthers)↦1;
  • every remaining pair ↦0\mapsto 0↦0; concretely, (zero,o)↦0(\mathrm{zero}, o) \mapsto 0(zero,o)↦0 and (lead0,o)↦0(\mathrm{lead}_0, o) \mapsto 0(lead0​,o)↦0 for all three outcomes ooo.

othersGain. A function State → Outcome → ℕ, defined by cases with a final catch-all:

  • (zero,pool)↦0(\mathrm{zero}, \mathrm{pool}) \mapsto 0(zero,pool)↦0; (zero,honestOnPool)↦1(\mathrm{zero}, \mathrm{honestOnPool}) \mapsto 1(zero,honestOnPool)↦1; (zero,honestOnOthers)↦1(\mathrm{zero}, \mathrm{honestOnOthers}) \mapsto 1(zero,honestOnOthers)↦1;
  • (tie,honestOnPool)↦1(\mathrm{tie}, \mathrm{honestOnPool}) \mapsto 1(tie,honestOnPool)↦1; (tie,honestOnOthers)↦2(\mathrm{tie}, \mathrm{honestOnOthers}) \mapsto 2(tie,honestOnOthers)↦2;
  • every remaining pair ↦0\mapsto 0↦0; concretely, (tie,pool)↦0(\mathrm{tie}, \mathrm{pool}) \mapsto 0(tie,pool)↦0 and (leadn,o)↦0(\mathrm{lead}_n, o) \mapsto 0(leadn​,o)↦0 for every n∈Nn \in \mathbb{N}n∈N and all three outcomes ooo.

P. For reals α,γ\alpha, \gammaα,γ and states s,ts, ts,t, the real number

Pα,γ(s,t)  :=  ∑o∈{pool, honestOnPool, honestOnOthers}[ step(s,o)=t ]⋅pα,γ(o),P_{\alpha,\gamma}(s,t) \;:=\; \sum_{o \in \{\mathrm{pool},\,\mathrm{honestOnPool},\,\mathrm{honestOnOthers}\}} \big[\,\mathrm{step}(s,o) = t\,\big]\cdot p_{\alpha,\gamma}(o),Pα,γ​(s,t):=o∈{pool,honestOnPool,honestOnOthers}∑​[step(s,o)=t]⋅pα,γ​(o),

where [⋅][\cdot][⋅] is 111 when the condition holds and 000 otherwise, and pα,γp_{\alpha,\gamma}pα,γ​ is outcomeProb. Unfolding step, for each sss the only ttt with a possibly non-zero value are: from zero\mathrm{zero}zero, t=lead0t=\mathrm{lead}_0t=lead0​ with value α\alphaα and t=zerot=\mathrm{zero}t=zero with value (1−α)γ+(1−α)(1−γ)(1-\alpha)\gamma + (1-\alpha)(1-\gamma)(1−α)γ+(1−α)(1−γ); from tie\mathrm{tie}tie, t=zerot = \mathrm{zero}t=zero with value α+(1−α)γ+(1−α)(1−γ)\alpha + (1-\alpha)\gamma + (1-\alpha)(1-\gamma)α+(1−α)γ+(1−α)(1−γ); from lead0\mathrm{lead}_0lead0​, t=lead1t=\mathrm{lead}_1t=lead1​ with value α\alphaα and t=tiet=\mathrm{tie}t=tie with value (1−α)γ+(1−α)(1−γ)(1-\alpha)\gamma + (1-\alpha)(1-\gamma)(1−α)γ+(1−α)(1−γ); from lead1\mathrm{lead}_1lead1​, t=lead2t = \mathrm{lead}_2t=lead2​ with value α\alphaα and t=zerot = \mathrm{zero}t=zero with value (1−α)γ+(1−α)(1−γ)(1-\alpha)\gamma + (1-\alpha)(1-\gamma)(1−α)γ+(1−α)(1−γ); from leadn+2\mathrm{lead}_{n+2}leadn+2​, t=leadn+3t = \mathrm{lead}_{n+3}t=leadn+3​ with value α\alphaα and t=leadn+1t = \mathrm{lead}_{n+1}t=leadn+1​ with value (1−α)γ+(1−α)(1−γ)(1-\alpha)\gamma + (1-\alpha)(1-\gamma)(1−α)γ+(1−α)(1−γ). All other entries are 000. No sign or normalisation constraint on α,γ\alpha,\gammaα,γ is imposed.

poolExpGain. For reals α,γ\alpha,\gammaα,γ and a state sss, the real number

gα,γpool(s)  :=  ∑opα,γ(o)⋅poolGain(s,o),g^{\mathrm{pool}}_{\alpha,\gamma}(s) \;:=\; \sum_{o} p_{\alpha,\gamma}(o)\cdot \mathrm{poolGain}(s,o),gα,γpool​(s):=o∑​pα,γ​(o)⋅poolGain(s,o),

with the natural number poolGain(s,o)\mathrm{poolGain}(s,o)poolGain(s,o) cast to a real. Unfolding: gα,γpool(zero)=0g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{zero}) = 0gα,γpool​(zero)=0; gα,γpool(tie)=2α+(1−α)γ⋅1+(1−α)(1−γ)⋅0g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{tie}) = 2\alpha + (1-\alpha)\gamma\cdot 1 + (1-\alpha)(1-\gamma)\cdot 0gα,γpool​(tie)=2α+(1−α)γ⋅1+(1−α)(1−γ)⋅0; gα,γpool(lead0)=0g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{lead}_0) = 0gα,γpool​(lead0​)=0; gα,γpool(lead1)=α⋅0+(1−α)γ⋅2+(1−α)(1−γ)⋅2g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{lead}_1) = \alpha\cdot 0 + (1-\alpha)\gamma\cdot 2 + (1-\alpha)(1-\gamma)\cdot 2gα,γpool​(lead1​)=α⋅0+(1−α)γ⋅2+(1−α)(1−γ)⋅2; gα,γpool(leadm+2)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅1g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{lead}_{m+2}) = \alpha\cdot 0 + (1-\alpha)\gamma\cdot 1 + (1-\alpha)(1-\gamma)\cdot 1gα,γpool​(leadm+2​)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅1.

othersExpGain. For reals α,γ\alpha,\gammaα,γ and a state sss, the real number

gα,γoth(s)  :=  ∑opα,γ(o)⋅othersGain(s,o).g^{\mathrm{oth}}_{\alpha,\gamma}(s) \;:=\; \sum_{o} p_{\alpha,\gamma}(o)\cdot \mathrm{othersGain}(s,o).gα,γoth​(s):=o∑​pα,γ​(o)⋅othersGain(s,o).

Unfolding: gα,γoth(zero)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅1g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{zero}) = \alpha\cdot 0 + (1-\alpha)\gamma\cdot 1 + (1-\alpha)(1-\gamma)\cdot 1gα,γoth​(zero)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅1; gα,γoth(tie)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅2g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{tie}) = \alpha\cdot 0 + (1-\alpha)\gamma\cdot 1 + (1-\alpha)(1-\gamma)\cdot 2gα,γoth​(tie)=α⋅0+(1−α)γ⋅1+(1−α)(1−γ)⋅2; gα,γoth(leadn)=0g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{lead}_n) = 0gα,γoth​(leadn​)=0 for every nnn.

stateSum. For a real-valued function fff on State, the real number

ΣState(f)  :=  f(zero)+f(tie)+∑n=0∞′f(leadn),\Sigma_{\mathrm{State}}(f) \;:=\; f(\mathrm{zero}) + f(\mathrm{tie}) + \sum_{n=0}^{\infty}{}' f(\mathrm{lead}_n),ΣState​(f):=f(zero)+f(tie)+n=0∑∞​′f(leadn​),

where the last term is Mathlib's tsum over n∈Nn \in \mathbb{N}n∈N: it is the value of the (unconditionally convergent) sum when the family n↦f(leadn)n \mapsto f(\mathrm{lead}_n)n↦f(leadn​) is summable, and it is 000 when the family is not summable. No summability requirement is built into the definition, so ΣState(f)\Sigma_{\mathrm{State}}(f)ΣState​(f) is a well-defined real number for every fff, possibly with a silently zeroed tail.

denom. For a real α\alphaα, the real polynomial value

D(α)  :=  2α3−4α2+1.D(\alpha) \;:=\; 2\alpha^3 - 4\alpha^2 + 1 .D(α):=2α3−4α2+1.

No positivity or non-vanishing is asserted here.

stationary. For a real α\alphaα (unconstrained), a real-valued function πα\pi_\alphaπα​ on State:

πα(zero)=1−2αD(α),πα(tie)=(1−α)(α−2α2)D(α),πα(leadn)=(α1−α)n⋅α−2α2D(α)(n∈N),\pi_\alpha(\mathrm{zero}) = \frac{1-2\alpha}{D(\alpha)},\qquad \pi_\alpha(\mathrm{tie}) = \frac{(1-\alpha)(\alpha - 2\alpha^2)}{D(\alpha)},\qquad \pi_\alpha(\mathrm{lead}_n) = \left(\frac{\alpha}{1-\alpha}\right)^{n}\cdot\frac{\alpha - 2\alpha^2}{D(\alpha)}\quad (n\in\mathbb{N}),πα​(zero)=D(α)1−2α​,πα​(tie)=D(α)(1−α)(α−2α2)​,πα​(leadn​)=(1−αα​)n⋅D(α)α−2α2​(n∈N),

with D(α)=2α3−4α2+1D(\alpha) = 2\alpha^3 - 4\alpha^2 + 1D(α)=2α3−4α2+1. Division is real division with the convention x/0=0x/0 = 0x/0=0: if D(α)=0D(\alpha) = 0D(α)=0 then all three formulas give 000; if α=1\alpha = 1α=1 then α/(1−α)=0\alpha/(1-\alpha) = 0α/(1−α)=0, so π1(lead0)=1⋅(α−2α2)/D(α)\pi_1(\mathrm{lead}_0) = 1\cdot(\alpha-2\alpha^2)/D(\alpha)π1​(lead0​)=1⋅(α−2α2)/D(α) (since 00=10^0 = 100=1) while π1(leadn)=0\pi_1(\mathrm{lead}_n) = 0π1​(leadn​)=0 for n≥1n \ge 1n≥1. The definition does not assert that these numbers are non-negative, sum to 111, or are invariant under any transition; it is just this family of formulas. In terms of the comments' labelling, the comments' pkp_kpk​ for k≥1k\ge 1k≥1 corresponds to πα(leadk−1)\pi_\alpha(\mathrm{lead}_{k-1})πα​(leadk−1​).

poolRevenue. For reals α,γ\alpha,\gammaα,γ, the real number

rα,γpool  :=  ΣState(s↦πα(s)⋅gα,γpool(s))=πα(zero) gα,γpool(zero)+πα(tie) gα,γpool(tie)+∑n=0∞′ πα(leadn) gα,γpool(leadn),r^{\mathrm{pool}}_{\alpha,\gamma} \;:=\; \Sigma_{\mathrm{State}}\big(s \mapsto \pi_\alpha(s)\cdot g^{\mathrm{pool}}_{\alpha,\gamma}(s)\big) = \pi_\alpha(\mathrm{zero})\,g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{zero}) + \pi_\alpha(\mathrm{tie})\,g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{tie}) + \sum_{n=0}^{\infty}{}'\,\pi_\alpha(\mathrm{lead}_n)\,g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{lead}_n),rα,γpool​:=ΣState​(s↦πα​(s)⋅gα,γpool​(s))=πα​(zero)gα,γpool​(zero)+πα​(tie)gα,γpool​(tie)+n=0∑∞​′πα​(leadn​)gα,γpool​(leadn​),

where the tail is a tsum (equal to 000 if the family n↦πα(leadn) gα,γpool(leadn)n \mapsto \pi_\alpha(\mathrm{lead}_n)\,g^{\mathrm{pool}}_{\alpha,\gamma}(\mathrm{lead}_n)n↦πα​(leadn​)gα,γpool​(leadn​) is not summable). By the unfolding of poolExpGain, the zero\mathrm{zero}zero term and the n=0n=0n=0 tail term are identically 000.

othersRevenue. For reals α,γ\alpha,\gammaα,γ, the real number

rα,γoth  :=  ΣState(s↦πα(s)⋅gα,γoth(s))=πα(zero) gα,γoth(zero)+πα(tie) gα,γoth(tie)+∑n=0∞′ πα(leadn) gα,γoth(leadn).r^{\mathrm{oth}}_{\alpha,\gamma} \;:=\; \Sigma_{\mathrm{State}}\big(s \mapsto \pi_\alpha(s)\cdot g^{\mathrm{oth}}_{\alpha,\gamma}(s)\big) = \pi_\alpha(\mathrm{zero})\,g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{zero}) + \pi_\alpha(\mathrm{tie})\,g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{tie}) + \sum_{n=0}^{\infty}{}'\,\pi_\alpha(\mathrm{lead}_n)\,g^{\mathrm{oth}}_{\alpha,\gamma}(\mathrm{lead}_n).rα,γoth​:=ΣState​(s↦πα​(s)⋅gα,γoth​(s))=πα​(zero)gα,γoth​(zero)+πα​(tie)gα,γoth​(tie)+n=0∑∞​′πα​(leadn​)gα,γoth​(leadn​).

By the unfolding of othersExpGain, every tail term is 000, so the tail tsum is the sum of the zero family, i.e. 000.

relativeRevenue. For reals α,γ\alpha,\gammaα,γ, the real number

Rα,γ  :=  rα,γpoolrα,γpool+rα,γoth,R_{\alpha,\gamma} \;:=\; \frac{r^{\mathrm{pool}}_{\alpha,\gamma}}{r^{\mathrm{pool}}_{\alpha,\gamma} + r^{\mathrm{oth}}_{\alpha,\gamma}},Rα,γ​:=rα,γpool​+rα,γoth​rα,γpool​​,

with the convention that the quotient is 000 whenever rα,γpool+rα,γoth=0r^{\mathrm{pool}}_{\alpha,\gamma} + r^{\mathrm{oth}}_{\alpha,\gamma} = 0rα,γpool​+rα,γoth​=0.

closedForm. For reals α,γ\alpha,\gammaα,γ, the real number

C(α,γ)  :=  α(1−α)2(4α+γ(1−2α))−α31−α(1+(2−α)α),C(\alpha,\gamma) \;:=\; \frac{\alpha(1-\alpha)^2\big(4\alpha + \gamma(1-2\alpha)\big) - \alpha^3}{1 - \alpha\big(1 + (2-\alpha)\alpha\big)},C(α,γ):=1−α(1+(2−α)α)α(1−α)2(4α+γ(1−2α))−α3​,

whose denominator expands to 1−α−2α2+α31 - \alpha - 2\alpha^2 + \alpha^31−α−2α2+α3; by the division convention, C(α,γ)=0C(\alpha,\gamma) = 0C(α,γ)=0 whenever that denominator vanishes. (Note that this denominator is a different polynomial from D(α)=2α3−4α2+1D(\alpha) = 2\alpha^3 - 4\alpha^2 + 1D(α)=2α3−4α2+1 used in stationary.)

profitThreshold. For a real γ\gammaγ, the real number

τ(γ)  :=  1−γ3−2γ,\tau(\gamma) \;:=\; \frac{1-\gamma}{3-2\gamma},τ(γ):=3−2γ1−γ​,

which by the division convention equals 000 when γ=3/2\gamma = 3/2γ=3/2. No constraint on γ\gammaγ is imposed by the definition.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by pitimespi · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me