Documentation

CslibFrontier.Computability.Distributed.ABD.Impossibility

The 2t + 1 resilience threshold for asynchronous linearizable atomic registers #

This module formalizes the partition-indistinguishability lower bound and sharp process-count characterization for wait-free linearizable atomic registers over deterministic asynchronous message passing. Attiya, Bar-Noy, and Dolev ([ABND95], §1, p. 127) motivate majority resilience (⌊(n - 1)/2⌋ faults) by observing that suspending messages between two groups of fewer than a majority lets the groups operate separately and perform contradicting operations. Here we prove the quantified converse for 2 ≤ Fintype.card P ≤ 2 * t over any nontrivial value domain [Nontrivial V] (not_implementsAtomicRegister_of_partition and not_implementsAtomicRegister), and combine it with the single-process zero-message disjunct implementsAtomicRegister_local_of_card_le_one (Fintype.card P ≤ 1) and the cardinality-quorum envelope specialization implementsAtomicRegister_abd (2 * t < Fintype.card P, after [LS97], §4.1–4.2 and [ABND95], §4) into Lean's resilience characterization exists_linearizableRegister_iff.

Partition replay argument #

Partition P into two disjoint nonempty subsets A, B : Finset P with A.card ≤ t, B.card ≤ t, a₀ ∈ A, and b₀ ∈ B, and choose v₁ ≠ v₀:

  1. Run 1 (F = B crashed/delayed): starting from π.start, invoke write v₁ at a₀ ∈ A and extend via Protocol.exists_fair_omegaExecution B, delivering messages only to A. By terminates B, a₀'s write completes at some reachable state s₁ in which every p ∈ B retains its initial local state π.start.proc p and every initial boot message addressed to B is still in transit (π.start.msgs.count e ≤ s₁.msgs.count e).
  2. Run 2 (F = A crashed/delayed): starting from π.start, invoke read at b₀ ∈ B and extend via Protocol.exists_fair_omegaExecution A, delivering messages only to B. By terminates A, b₀'s read completes at some reachable state s₂ returning r, and by linearizable s₂ (with zero writes in s₂.history), r = v₀.
  3. Run 3 (combined execution): starting from s₁ (after write v₁ has already completed at step < s₁.step), replay Action.invoke b₀ .read followed by Run 2's B-only delivery prefix, holding all cross-partition A → B messages in flight. Because B's local states match π.start and all B-destined envelopes from Run 2 are available in s₁.msgs, Run 3 reaches a state u₂ where u₂.history consists of the completed write v₁ (op 0) strictly preceding in real time (prec u₂.history 0 1) a completed read returning v₀ (op 1), violating linearizable u₂.

Main results #

References #

theorem Cslib.Distributed.ABD.Protocol.not_implementsAtomicRegister_of_partition {P : Type u_1} {S : Type u_2} {M : Type u_3} {V : Type u_4} [Fintype P] [DecidableEq P] [DecidableEq M] (π : Protocol P S M V) {t : ℕ} (A B : Finset P) (hAB : Disjoint A B) (hcover : ∀ (p : P), p ∈ A ∨ p ∈ B) (hA : A.card ≤ t) (hB : B.card ≤ t) {a₀ b₀ : P} (ha₀ : a₀ ∈ A) (hb₀ : b₀ ∈ B) {v₀ v₁ : V} (hne : v₁ ≠ v₀) :

Partition impossibility for asynchronous linearizable registers (formalizing the two-group message-suspension obstruction noted in [ABND95], §1, p. 127): if P can be partitioned into two disjoint subsets A, B each of size at most t, with a₀ ∈ A and b₀ ∈ B, and there exists v₁ ≠ v₀, then π cannot implement a t-resilient wait-free linearizable atomic register initialized to v₀.

theorem Cslib.Distributed.ABD.Protocol.not_implementsAtomicRegister {P : Type u_1} {S : Type u_2} {M : Type u_3} {V : Type u_4} [Fintype P] [DecidableEq P] [DecidableEq M] (π : Protocol P S M V) [Nontrivial V] {t : ℕ} (h2 : 2 ≤ Fintype.card P) (hle : Fintype.card P ≤ 2 * t) (v₀ : V) :

No asynchronous wait-free linearizable register for 2 ≤ n ≤ 2t: over any nontrivial value domain [Nontrivial V], no deterministic asynchronous protocol on P with 2 ≤ Fintype.card P ≤ 2 * t implements a t-resilient wait-free linearizable atomic register (quantified converse to majority resilience, motivated by [ABND95], §1, p. 127).

Sharp fault-tolerance threshold (exists_linearizableRegister_iff) #

theorem Cslib.Distributed.ABD.exists_linearizableRegister_iff (P : Type u) (V : Type v) [Fintype P] [DecidableEq P] [Nontrivial V] (v₀ : V) (t : ℕ) :
(∃ (S : Type (max u v)) (M : Type (max u v)) (x : DecidableEq M) (π : Protocol P S M V), π.ImplementsAtomicRegister v₀ t) ↔ Fintype.card P ≤ 1 ∨ 2 * t < Fintype.card P

Resilience characterization for asynchronous linearizable atomic registers: over a finite process set P and nontrivial value domain V, a deterministic asynchronous message-passing protocol implementing a t-fault wait-free linearizable atomic register initialized to v₀ exists if and only if Fintype.card P ≤ 1 ∨ 2 * t < Fintype.card P:

  • for Fintype.card P ≤ 1, localRegisterProtocol executes locally in zero messages;
  • for 2 * t < Fintype.card P, abdProtocol provides sufficiency via (n - t)-cardinality envelope quorums and idle-only invocations (an independent specialization after [LS97], §4.1–4.2 and [ABND95], §4, pairing abd_linearizable with abd_terminates);
  • for 2 ≤ Fintype.card P ≤ 2 * t, Protocol.not_implementsAtomicRegister proves impossibility by two-group partition replay (motivated by [ABND95], §1, p. 127).