Documentation

CslibFrontier.Computability.Distributed.FailureDetectors.Reduction

Suspect-Forwarding Gossip Reduction from Weak to Strong Completeness #

Formalizes the suspect-forwarding gossip transducer step after Chandra and Toueg, §3, Figure 3, Lemmas 3.1–3.3 and Theorem 3.4, pp. 235–238 (part of #7503).

Transducer model #

In Chandra and Toueg, §3, Figure 3, p. 236, each process p maintains an emulated suspect set output_p (initially ∅), periodically broadcasts (p, suspects_p) queried from its underlying local failure detector, and upon receiving (q, suspects_q) updates output_p ← (output_p ∪ suspects_q) \ {q}.

Here we model asynchronous suspect-forwarding runs directly via:

We prove the three key properties P1–P3 as discrete-tick gossip-transducer steps for #7503 (after Lemmas 3.1–3.3, p. 237) for every AdmissibleGossipSchedule F sched:

  1. P1 (gossipHistory_strongCompleteness): boosts WeakCompleteness F H to StrongCompleteness F (gossipHistory H sched) on finite P.
  2. P2 (gossipHistory_preserves_perpetual_notMem): if no alive process suspects p before tick t in H, then no process suspects p at tick t in gossipHistory H sched, preserving both StrongAccuracy and WeakAccuracy.
  3. P3 (gossipHistory_preserves_eventual_notMem): if no correct process suspects a correct p from t₁ onward in H, then eventually no correct process suspects p in gossipHistory H sched, preserving both EventualStrongAccuracy and EventualWeakAccuracy.

Combining P1–P3 yields all four gossip-transducer reduction steps Q → P, W → S, ◇Q → ◇P, and ◇W → ◇S (gossipHistory_isPerfect_of_isQuasiPerfect, gossipHistory_isStrong_of_isWeak, gossipHistory_isEventuallyPerfect_of_isEventuallyQuasiPerfect, gossipHistory_isEventuallyStrong_of_isEventuallyWeak, and DetectorClass.gossipHistory_sat_boost).

Main definitions #

Main results #

References #

Suspect-forwarding packets and executable transducer #

Identifier for a suspect-list broadcast (sender, H sender sendTick) emitted at global clock tick sendTick (Chandra and Toueg, §3, Figure 3, Task 1, p. 236).

  • sender : P

    Process q that queried its local failure detector and sent (q, suspects_q).

  • sendTick : ℕ

    Global clock tick at which sender queried its local failure detector.

Task-2 update of Chandra and Toueg, §3, Figure 3, p. 236: upon receiving (q, suspects_q) (pkt), process p adds H pkt.sender pkt.sendTick to its emulated suspect set and removes pkt.sender.

def Cslib.Distributed.FailureDetectors.gossipHistory {P : Type u_1} [DecidableEq P] (H : DetectorHistory P) (sched : P → ℕ → List (GossipPacket P)) (p : P) :
ℕ → Finset P

Executable discrete-tick suspect-forwarding transducer: starts with ∅ at tick 0 and folds applyGossipPacket H across the packets sched p t delivered to p during tick t.

@[simp]
theorem Cslib.Distributed.FailureDetectors.gossipHistory_zero {P : Type u_1} [DecidableEq P] (H : DetectorHistory P) (sched : P → ℕ → List (GossipPacket P)) (p : P) :
gossipHistory H sched p 0 = ∅
@[simp]
theorem Cslib.Distributed.FailureDetectors.gossipHistory_succ {P : Type u_1} [DecidableEq P] (H : DetectorHistory P) (sched : P → ℕ → List (GossipPacket P)) (p : P) (t : ℕ) :
gossipHistory H sched p (t + 1) = List.foldl (applyGossipPacket H) (gossipHistory H sched p t) (sched p t)

List-fold transfer lemmas for applyGossipPacket #

Asynchronous gossip schedule admissibility #

Asynchronous admissibility of a packet-delivery schedule sched for failure pattern F (modeling the asynchronous run assumptions of Chandra and Toueg, §2.5, p. 234; §3, pp. 236–237):

  • valid_delivery: packets delivered to p at tick t require p ∉ F t, pkt.sendTick ≤ t, and pkt.sender ∉ F pkt.sendTick.
  • unique_delivery_tick: a given packet pkt is delivered to recipient p in at most one tick.
  • fair_delivery: for any correct sender q ∈ F.Correct, correct recipient p ∈ F.Correct, and threshold t₀, some packet sent by q at t_send ≥ t₀ is delivered to p at t_recv ≥ t_send.
  • valid_delivery (p : P) (t : ℕ) (pkt : GossipPacket P) : pkt ∈ sched p t → p ∉ F.atTime t ∧ pkt.sendTick ≤ t ∧ pkt.sender ∉ F.atTime pkt.sendTick

    Only non-crashed processes receive packets, and every delivered packet was sent no later than the delivery tick by a process not yet crashed at sendTick.

  • unique_delivery_tick (p : P) (t₁ t₂ : ℕ) (pkt : GossipPacket P) : pkt ∈ sched p t₁ → pkt ∈ sched p t₂ → t₁ = t₂

    At-most-once delivery tick per (recipient, packet) pair (preventing unbounded replay of pre-crash messages).

  • fair_delivery (q : P) : q ∈ F.Correct → ∀ p ∈ F.Correct, ∀ (t₀ : ℕ), ∃ (t_send : ℕ) (t_recv : ℕ), t₀ ≤ t_send ∧ t_send ≤ t_recv ∧ { sender := q, sendTick := t_send } ∈ sched p t_recv

    Every correct process infinitely often broadcasts packets that reach every correct process.

Finite horizon for stale packet deliveries #

Lemmas 3.1, 3.2, and 3.3 of Chandra–Toueg (1996, p. 237) #

theorem Cslib.Distributed.FailureDetectors.gossipHistory_preserves_perpetual_notMem {P : Type u_1} [DecidableEq P] {F : FailurePattern P} {sched : P → ℕ → List (GossipPacket P)} (hadm : AdmissibleGossipSchedule F sched) (H : DetectorHistory P) {p : P} {t : ℕ} (hH : ∀ t' < t, ∀ r ∉ F.atTime t', p ∉ H r t') (q : P) :
p ∉ gossipHistory H sched q t

Discrete-tick gossip-transducer step for #7503 (Property P2, after Chandra and Toueg, Lemma 3.2, p. 237): in gossipHistory, if no non-crashed process suspects p strictly before tick t in H, then no process suspects p at tick t in gossipHistory H sched.

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Lemma 3.2, p. 237): gossipHistory preserves StrongAccuracy.

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Lemma 3.2, p. 237): gossipHistory preserves WeakAccuracy.

Discrete-tick gossip-transducer step for #7503 (Property P1, after Chandra and Toueg, Lemma 3.1, p. 237): on finite P, if H satisfies WeakCompleteness F H, then gossipHistory H sched satisfies StrongCompleteness F for every AdmissibleGossipSchedule F sched.

theorem Cslib.Distributed.FailureDetectors.gossipHistory_preserves_eventual_notMem {P : Type u_1} [Finite P] [DecidableEq P] {F : FailurePattern P} {sched : P → ℕ → List (GossipPacket P)} (hadm : AdmissibleGossipSchedule F sched) (H : DetectorHistory P) {p : P} (hp : p ∈ F.Correct) {t₁ : ℕ} (hH : ∀ (t' : ℕ), t₁ ≤ t' → ∀ r ∈ F.Correct, p ∉ H r t') :
∃ (T : ℕ), ∀ (t' : ℕ), T ≤ t' → ∀ q ∈ F.Correct, p ∉ gossipHistory H sched q t'

Discrete-tick gossip-transducer step for #7503 (Property P3, after Chandra and Toueg, Lemma 3.3, p. 237): on finite P, if p ∈ F.Correct and no correct process suspects p from tick t₁ onward in H, then there is a tick T from which onward no correct process suspects p in gossipHistory H sched.

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Lemma 3.3, p. 237): gossipHistory preserves EventualStrongAccuracy on finite P.

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Lemma 3.3, p. 237): gossipHistory preserves EventualWeakAccuracy on finite P.

The four completeness-boosting reductions (Q → P, W → S, ◇Q → ◇P, ◇W → ◇S) #

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Theorem 3.4, p. 237): gossipHistory upgrades IsQuasiPerfect (Q) to IsPerfect (P).

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Theorem 3.4, p. 237): gossipHistory upgrades IsWeak (W) to IsStrong (S).

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Theorem 3.4, p. 237): gossipHistory upgrades IsEventuallyQuasiPerfect (◇Q) to IsEventuallyPerfect (◇P).

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Theorem 3.4, p. 237): gossipHistory upgrades IsEventuallyWeak (◇W) to IsEventuallyStrong (◇S).

Projects each of the eight detector classes onto its strong-completeness counterpart (step map for #7503, after Chandra and Toueg, Corollary 3.5, p. 238).

Discrete-tick gossip-transducer step for #7503 (after Chandra and Toueg, Theorem 3.4, p. 237, and Corollary 3.5, p. 238): for every c : DetectorClass and every AdmissibleGossipSchedule F sched on finite P, gossipHistory H sched upgrades c to c.boost.

Non-vacuity witness for AdmissibleGossipSchedule #

Zero-delay (sendTick = t) all-to-all gossip schedule witnessing non-vacuity of AdmissibleGossipSchedule F: at each tick t, every non-crashed process p ∉ F t receives one suspect-list packet ⟨q, t⟩ from each non-crashed process q ∉ F t in procs.dedup.

Non-vacuity of AdmissibleGossipSchedule F: the zero-delay (sendTick = t) schedule syncGossipSchedule F procs satisfies AdmissibleGossipSchedule F whenever procs lists every process in P.