Pre-coin phase-scheduler termination step for Ben-Or's binary consensus #
This module proves a pre-coin phase-scheduler probabilistic termination step for the
quorum-phase transition of CslibFrontier.Computability.Distributed.BenOr.Basic (after
[BO83], §3, Protocol A, printed p. 28, toward Theorem 1(i) on printed p. 29; termination in
Ben-Or's full asynchronous scheduler model remains open in #7120).
Scheduling restriction (#7120): In [BO83], §2 (printed pp. 27–28), an adversary schedule
chooses each primitive process step and message delivery using the current configuration and full
execution history, including outcomes of earlier local coin flips by processes that have already
completed step 3(c) of a round while slower processes are still collecting that round's n - t
messages. Here probRun instead models a pre-coin per-phase state-adaptive scheduler
strat : ℕ → (P → ProcState) → PhaseSchedule P that commits the entire phase-r quorum schedule
strat r st from the phase-r boundary state st before sampling the entire phase-r coin
vector from coinLaw, and bounds the non-decision marginal of that phased Markov process. Neither
probRun nor CrashSchedule in Basic.lean extends the probabilistic termination bound to §2
schedulers with arbitrary cross-round step/message interleavings (#7120).
Whenever coinLaw : PMF (P → Bool) places mass at least p on both unanimous coin vectors
fun _ => true and fun _ => false:
phaseStep_lucky_coinguarantees at least one of those two constant vectors aligns every process onto a common estimate at the end of phaser, bounding single-phase non-unanimity probability by1 - p(and by0once estimates are already unanimous).- By induction over
kphases (probRun_not_unanimous_le), the probability that estimates are not yet unanimous afterkphases is at most(1 - p) ^ k. - One additional valid phase deterministically turns unanimous estimates into unanimous decisions
(
probRun_not_allDecided_le), bounding the probability of¬ AllDecidedafterk + 1phases by(1 - p) ^ k, which converges to0as the phase count grows whenever0 < p(tendsto_probRun_not_allDecided).
Instantiating coinLaw gives two distinct coin regimes under this pre-coin phase-scheduler model:
- Independent local fair coins (
localCoinLaw P, step after [BO83], §3, Protocol A): restricted to pre-coin phase-boundary schedulers (#7120), samplingcoinLaw = uniformOfFintype (P → Bool)(Protocol A step 3(c), printed p. 28) givesp = (1 / 2) ^ |P|, bounding non-decision probability afterk + 1phases by(1 - (1 / 2) ^ |P|) ^ k(probRun_localCoin_not_allDecided_le) and tending to0asm → ∞(tendsto_probRun_localCoin_not_allDecided). - Common fair coin (
commonCoinLaw P, separate shared-coin variant): a separate variant not in [BO83] (where coins are local to each process), supplying one shared uniform bitbto all processes per phase (p = 1 / 2) so non-decision probability afterk + 1phases is at most(1 / 2) ^ k(probRun_commonCoin_not_allDecided_le,tendsto_probRun_commonCoin_not_allDecided).
Main definitions #
Cslib.Distributed.BenOr.probRun: state distribution afterkphases under a pre-coin per-phase state-adaptive schedulerstratand per-phase coin distributioncoinLaw.Cslib.Distributed.BenOr.commonCoinLaw: separate shared-coin variantPMF (P → Bool)assigning1 / 2to each constant vectorfun _ => b.Cslib.Distributed.BenOr.localCoinLaw: independent local fair coinsuniformOfFintype (P → Bool)(after [BO83], §3, Protocol A, step 3(c)).
Main results #
Cslib.Distributed.BenOr.probRun_not_unanimous_le: pre-coin phase-scheduler parametric bound(1 - p) ^ kon non-unanimity afterkphases whenever∀ b, p ≤ coinLaw (fun _ => b).Cslib.Distributed.BenOr.probRun_not_allDecided_le: pre-coin phase-scheduler parametric bound(1 - p) ^ kon¬ AllDecidedafterk + 1phases.Cslib.Distributed.BenOr.tendsto_probRun_not_allDecided: under a pre-coin phase-boundary scheduler, non-decision probability tends to0as the phase count tends to∞whenever0 < p.Cslib.Distributed.BenOr.probRun_commonCoin_not_allDecided_le,Cslib.Distributed.BenOr.tendsto_probRun_commonCoin_not_allDecided:(1 / 2) ^ ktail bound and limit0for the separate common-coin variant under pre-coin phase-boundary schedulers.Cslib.Distributed.BenOr.probRun_localCoin_not_allDecided_le,Cslib.Distributed.BenOr.tendsto_probRun_localCoin_not_allDecided: pre-coin phase-scheduler step after [BO83], §3 ((1 - (1 / 2) ^ |P|) ^ ktail bound and limit0forprobRun; full §2 asynchronous schedulers tracked in #7120).
References #
Sequential probabilistic execution and coin laws #
State distribution after k phases of Ben-Or's protocol from initial inputs inp. At the
boundary of each phase r, the pre-coin per-phase state-adaptive scheduler strat r st commits
all processes' Stage-1 and Stage-2 quorums from the current global state st, before the phase-r
coin vector is sampled from coinLaw.
Under commonCoinLaw P, each constant coin vector fun _ => b has mass at least 1 / 2
(including when P is empty, where both constant vectors coincide and have mass 1).
On a nonempty process set P, commonCoinLaw P assigns probability 1 / 2 to each constant
coin vector fun _ => b.
Under localCoinLaw P, every coin assignment c : P → Bool has probability (1 / 2) ^ |P|.
Support invariants and single-phase probability bounds #
Parametric multi-phase tail bounds under pre-coin phase schedulers #
Pre-coin phase-scheduler non-unanimity step: when each phase's PhaseSchedule is committed
from the phase boundary state before coinLaw is sampled, if coinLaw assigns mass at least p
to both constant coin vectors fun _ => true and fun _ => false and 2 * t < |P|, the
probability under probRun that process estimates are not unanimous after k phases is at most
(1 - p) ^ k.
Pre-coin phase-scheduler non-decision tail step: when each phase's PhaseSchedule is committed
from the phase boundary state before coinLaw is sampled, after k + 1 phases (k coin-alignment
phases plus one deterministic decision phase) the probability under probRun that processes have
not all decided a common value is at most (1 - p) ^ k.
Pre-coin phase-scheduler convergence step: whenever 0 < p, ∀ b, p ≤ coinLaw (fun _ => b),
and strat commits valid n - t phase quorums from each phase boundary state before coinLaw is
sampled, the non-decision marginal of probRun after m phases converges to 0 as m → ∞.
Separate common-coin variant (≤ (1 / 2) ^ k) #
Pre-coin phase-scheduler tail bound for the separate common-coin variant (commonCoinLaw P,
not in [BO83]): when each phase's quorums are committed from the phase boundary state before
sampling the shared coin and 2 * t < |P|, the non-decision probability under probRun after
k + 1 phases is at most (1 / 2) ^ k.
Pre-coin phase-scheduler convergence for the separate common-coin variant (commonCoinLaw P,
not in [BO83]): when each phase's quorums are committed from the phase boundary state before
sampling the shared coin and 2 * t < |P|, the non-decision marginal of probRun after m phases
tends to 0 as m → ∞.
Independent local fair coins: pre-coin phase-scheduler step (≤ (1 - (1 / 2) ^ |P|) ^ k) #
Pre-coin phase-scheduler termination step (not the full asynchronous scheduler theorem of
[BO83]; see #7120), after [BO83], §3, Protocol A (printed p. 28): when each phase's
quorum schedule strat r st is committed from the phase boundary state st before sampling the
entire independent local coin vector localCoinLaw P and 2 * t < |P|, the probability under
probRun that processes have not all decided a common value after k + 1 phases is at most
(1 - (1 / 2) ^ |P|) ^ k.
Pre-coin phase-scheduler convergence step toward Theorem 1(i) of [BO83] (§3, Protocol A,
printed pp. 28–29; full history-dependent asynchronous step/delivery schedulers of §2 remain
tracked in #7120): when each phase's quorum schedule strat r st is committed from the phase
boundary state st before sampling localCoinLaw P and 2 * t < |P|, the non-decision marginal
of probRun after m phases tends to 0 as m → ∞.