Documentation

CslibFrontier.Computability.Distributed.FailureDetectors.Hierarchy

Unreliable Failure Detector Classes and Inclusion Hierarchy #

Formalizes crash failure patterns, suspect-set failure detector histories, completeness and accuracy properties, the eight failure detector classes of Chandra and Toueg, §§2.1–2.4, and the Ω eventual-leader history predicate and pure history-map step LeaderHistory.toDetectorHistory toward #7503 (after Chandra, Hadzilacos and Toueg, §5; their asynchronous automaton transformation T_{Ω → ◇W} is not formalized here).

Mathematical overview #

Over a process type P and discrete global clock ticks t : ℕ:

Main definitions #

Main results #

References #

Failure patterns and finite-time crash stabilization #

A crash failure pattern over process set P (Chandra and Toueg, §2.1, p. 231): atTime t is the finite set of processes that have crashed through global clock tick t, and crashed processes never recover (mono).

Instances For
    def Cslib.Distributed.FailureDetectors.FailurePattern.ofSucc {P : Type u_1} (f : ℕ → Finset P) (h : ∀ (t : ℕ), f t ⊆ f (t + 1)) :

    Step-wise constructor from one-tick monotonicity ∀ t, f t ⊆ f (t + 1) (Chandra and Toueg, §2.1, p. 231).

    @[simp]
    theorem Cslib.Distributed.FailureDetectors.FailurePattern.ofSucc_apply {P : Type u_1} (f : ℕ → Finset P) (h : ∀ (t : ℕ), f t ⊆ f (t + 1)) (t : ℕ) :
    (ofSucc f h).atTime t = f t

    Static failure pattern in which S crashes at tick 0 and no other process ever crashes.

    theorem Cslib.Distributed.FailureDetectors.FailurePattern.mem_of_le {P : Type u_1} (F : FailurePattern P) {t t' : ℕ} {p : P} (hle : t ≤ t') (hp : p ∈ F.atTime t) :
    p ∈ F.atTime t'

    If p has crashed by tick t and t ≤ t', then p remains crashed at tick t'.

    Set of processes that crash at some finite tick in F (crashed(F) in Chandra and Toueg, §2.1, p. 231).

    Set of processes that never crash in F (correct(F) in Chandra and Toueg, §2.1, p. 231).

    @[simp]
    theorem Cslib.Distributed.FailureDetectors.FailurePattern.exists_stabilize {P : Type u_1} [Finite P] (F : FailurePattern P) :
    ∃ (t₀ : ℕ), ∀ (t : ℕ), t₀ ≤ t → (∀ (p : P), p ∈ F.atTime t ↔ p ∈ F.Crashed) ∧ ∀ (p : P), p ∉ F.atTime t ↔ p ∈ F.Correct

    Interface characterization of FailurePattern on a finite process set P (capturing the stabilization remark in Chandra and Toueg, §2.3, p. 233): there is a tick t₀ from which onward F t contains every process in F.Crashed (equivalently p ∉ F t ↔ p ∈ F.Correct).

    theorem Cslib.Distributed.FailureDetectors.FailurePattern.card_correct_ge_of_card_le {P : Type u_1} [Fintype P] (F : FailurePattern P) {bound : ℕ} (hF : ∀ (t : ℕ), (F.atTime t).card ≤ bound) :
    ∃ (C : Finset P), ↑C = F.Correct ∧ Fintype.card P - bound ≤ C.card

    If ∀ t, (F t).card ≤ bound on finite P, then at least Fintype.card P - bound processes are correct in F (in particular, F.Correct.Nonempty whenever bound < Fintype.card P).

    Failure detector histories, completeness, and accuracy #

    @[reducible, inline]

    A suspect-set failure detector history (Chandra and Toueg, §2.2, p. 231): q ∈ H p t means process p's local detector module suspects process q at clock tick t.

    Strong completeness (Chandra and Toueg, §2.3, p. 232): eventually every process that crashes is permanently suspected by every correct process.

    Weak completeness (Chandra and Toueg, §2.3, p. 232): eventually every process that crashes is permanently suspected by some correct process.

    Strong accuracy (Chandra and Toueg, §2.3, p. 232): no process is suspected before it crashes (∀ t, ∀ p ∉ F t, ∀ q ∉ F t, p ∉ H q t).

    Weak accuracy (Chandra and Toueg, §2.3, p. 233): some correct process is never suspected by any non-crashed process.

    Eventual strong accuracy (Chandra and Toueg, §2.3, p. 233): there is a time after which correct processes are never suspected by any correct process.

    Eventual weak accuracy (Chandra and Toueg, §2.3, p. 233): there is a time after which some correct process is never suspected by any correct process.

    Equivalence of alive-process and correct-process eventual accuracy on finite P #

    theorem Cslib.Distributed.FailureDetectors.eventualStrongAccuracy_iff_alive {P : Type u_1} [Finite P] (F : FailurePattern P) (H : DetectorHistory P) :
    EventualStrongAccuracy F H ↔ ∃ (t : ℕ), ∀ (t' : ℕ), t ≤ t' → ∀ p ∉ F.atTime t', ∀ q ∉ F.atTime t', p ∉ H q t'

    Interface characterization of EventualStrongAccuracy on finite P (capturing the definition equivalence noted in Chandra and Toueg, §2.3, p. 233): quantifying over F.Correct is equivalent to quantifying over processes alive at t' (p ∉ F t', q ∉ F t').

    theorem Cslib.Distributed.FailureDetectors.eventualWeakAccuracy_iff_alive {P : Type u_1} [Finite P] (F : FailurePattern P) (H : DetectorHistory P) :
    EventualWeakAccuracy F H ↔ ∃ (t : ℕ), ∃ p ∈ F.Correct, ∀ (t' : ℕ), t ≤ t' → ∀ q ∉ F.atTime t', p ∉ H q t'

    Interface characterization of EventualWeakAccuracy on finite P (analogous to eventualStrongAccuracy_iff_alive, Chandra and Toueg, §2.3, p. 233): quantifying over correct observers q ∈ F.Correct is equivalent to quantifying over alive observers q ∉ F t'.

    Implications among completeness and accuracy properties #

    The eight Chandra–Toueg failure detector classes #

    Perfect (P) failure detector history: strong completeness and strong accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234).

    Strong (S) failure detector history: strong completeness and weak accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234).

    Eventually Perfect (◇P) failure detector history: strong completeness and eventual strong accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234).

    Eventually Strong (◇S) failure detector history: strong completeness and eventual weak accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234).

    Quasi-Perfect (Q) failure detector history: weak completeness and strong accuracy (denoted 𝒬 without an English adjective in Chandra and Toueg, §2.4, Figure 1, p. 234).

    Weak (W) failure detector history: weak completeness and weak accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234).

    Eventually Quasi-Perfect (◇Q) failure detector history: weak completeness and eventual strong accuracy (denoted ◇𝒬 without an English adjective in Chandra and Toueg, §2.4, Figure 1, p. 234).

    Eventually Weak (◇W) failure detector history: weak completeness and eventual weak accuracy (Chandra and Toueg, §2.4, Figure 1, p. 234; Chandra, Hadzilacos and Toueg, §2.2, pp. 689–690).

    Covering inclusions among the eight classes #

    Complete Boolean lattice of the eight detector classes #

    Enumeration of the eight Chandra–Toueg failure detector classes (Chandra and Toueg, §2.4, Figure 1, p. 234), ordered by raw-history set inclusion (⊥ = .P, ⊤ = .EW).

    Instances For

      Coordinates (weakCompleteness, eventualAccuracy, weakScope) in the 3-cube Bool × Bool × Bool with false ≤ true, sending .P ↦ (false, false, false) and .EW ↦ (true, true, true).

      Satisfaction predicate mapping each DetectorClass to its corresponding Chandra–Toueg property pair on (F, H).

      theorem Cslib.Distributed.FailureDetectors.DetectorClass.sat_mono {P : Type u_1} {c₁ c₂ : DetectorClass} (hle : c₁ ≤ c₂) {F : FailurePattern P} (hcorr : F.Correct.Nonempty) {H : DetectorHistory P} (hsat : c₁.Sat F H) :
      c₂.Sat F H

      Original soundness of the 8-class raw-history inclusion lattice: over any admissible failure pattern (F.Correct.Nonempty), c₁ ≤ c₂ implies c₁.Sat F H → c₂.Sat F H.

      Explicit separating detector histories and collapse for |P| ≤ 2 #

      Original two-process boundary characterization: when at most two processes exist (Fintype.card P ≤ 2) and at least one is correct, weak and strong completeness coincide as raw history properties (either no process crashes or the unique correct process is the sole witness in F.Correct).

      Original raw-history coatom witness 1 (◇P \ W): on any finite nonempty P, suspecting everyone at tick 0 and nobody at ticks t ≥ 1 under the crash-free pattern const ∅ satisfies IsEventuallyPerfect (hence ◇P, ◇S, ◇Q, ◇W) while violating WeakAccuracy (hence P, S, Q, W).

      Original raw-history coatom witness 2 (S \ ◇Q): on any [Nontrivial P], permanently suspecting one fixed correct process p₁ while never suspecting a distinct correct process p₀ ≠ p₁ under const ∅ satisfies IsStrong (hence S, W, ◇S, ◇W) while violating EventualStrongAccuracy (hence P, ◇P, Q, ◇Q).

      Original raw-history coatom witness 3 (Q \ ◇S): when 3 ≤ Fintype.card P, crashing one process f while one correct process c₁ permanently suspects f and a second correct process c₂ never suspects anyone satisfies IsQuasiPerfect (hence Q, W, ◇Q, ◇W) while violating StrongCompleteness (hence P, S, ◇P, ◇S) prior to gossip reduction.

      theorem Cslib.Distributed.FailureDetectors.DetectorClass.forall_sat_imp_iff_le {P : Type u_1} [Fintype P] (hcard : 3 ≤ Fintype.card P) (c₁ c₂ : DetectorClass) :
      (∀ (F : FailurePattern P), F.Correct.Nonempty → ∀ (H : DetectorHistory P), c₁.Sat F H → c₂.Sat F H) ↔ c₁ ≤ c₂

      Original exact completeness of the 8-class raw-history lattice (3 ≤ Fintype.card P): over a type P with at least three processes, raw history inclusion c₁.Sat F H → c₂.Sat F H holds across all admissible failure patterns F (F.Correct.Nonempty) if and only if c₁ ≤ c₂ in DetectorClass, establishing all 28 strict inclusions and all 28 non-inclusions among P, S, ◇P, ◇S, Q, W, ◇Q, ◇W prior to distributed gossip reduction.

      The Ω Eventual-Leader Oracle and Complement Transformation ([CHT 1996, §5]) #

      @[reducible, inline]

      History of a single-leader oracle Ω (Chandra, Hadzilacos and Toueg, §5, p. 694): L p t is the single process currently trusted by p at tick t.

      Ω eventual-leader property (Chandra, Hadzilacos and Toueg, §5, p. 694): there is a time after which all correct processes permanently trust the same correct process q*.

      Pure history-level complement map H p t = univ \ {L p t} (step for #7503, after T_{Ω → ◇W} in Chandra, Hadzilacos and Toueg, Theorem 5.1, p. 694): at tick t, process p suspects every process except its currently trusted leader L p t.

      Pure history-map step for #7503 (after the history map behind T_{Ω → ◇W} in Chandra, Hadzilacos and Toueg, Theorem 5.1, p. 694; their full theorem is stated over event-driven asynchronous automata (F, H_Ω, I, S, T)): suspecting univ \ {L p t} via LeaderHistory.toDetectorHistory converts any Ω history L into an IsEventuallyStrong (◇S) detector history.