Documentation

CslibFrontier.Computability.Distributed.SetAgreement.Impossibility

Combinatorial Sperner Parity and Wait-Free k-Set Agreement Impossibility in IIS #

As an R-round Iterated Immediate Snapshot (IIS) step toward #7504 (leaving the general asynchronous read/write shared-memory to IIS simulation open in #7504), this module proves the impossibility of wait-free k-set agreement for R-round deterministic IIS protocols (after [HS99], §3.3, Lemma 3.2 and Theorem 3.3, pp. 880–881; [BG93b]; [SZ00]; [BG97], §3.5), via a purely combinatorial interior-facet involution paired with Cslib.Sperner.odd_card_doors_iff_surjective.

Model scope #

The impossibility theorem not_solvesSetAgreement_iis applies to deterministic full-information protocols in the R-round Iterated Immediate Snapshot (IIS) model (IISProtocol V Val R) as a step toward #7504. The asynchronous read/write shared-memory to IIS simulation ([BG93b]; [BG97]; [HS99]) is tracked separately in #7504.

Main definitions #

Main results #

References #

Part 1: One-shot IS split/merge involution and boundary equivalence #

Block-level split/merge involution at process q:

  • [B]: fixed if B = {q}, else split into [{q}, B.erase q];
  • B :: C :: rest with q ∈ B: if B = {q} merge into insert q C :: rest, else split into {q} :: B.erase q :: C :: rest;
  • B :: C :: rest with q ∉ B: recurse on C :: rest.

A one-shot IS schedule π : ISSchedule U lies on the q-boundary when {q} is the unique final block of π.blocks (so no process p ≠ q observes q).

Instances For
    @[instance_reducible]
    def Cslib.Distributed.SetAgreement.ISSchedule.flip {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π : ISSchedule U) :

    One-shot split/merge involution on ISSchedule U at q ∈ U.

    @[simp]
    theorem Cslib.Distributed.SetAgreement.ISSchedule.blocks_flip {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π : ISSchedule U) :
    @[simp]
    theorem Cslib.Distributed.SetAgreement.ISSchedule.flip_flip {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π : ISSchedule U) :
    flip hq (flip hq π) = π
    theorem Cslib.Distributed.SetAgreement.ISSchedule.flip_eq_self_iff {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π : ISSchedule U) :
    flip hq π = π ↔ π.IsBoundaryAt q
    theorem Cslib.Distributed.SetAgreement.ISSchedule.snapshot_flip_of_ne {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π : ISSchedule U) {p : V} (hpq : p ≠ q) :
    (flip hq π).snapshot p = π.snapshot p

    Drop the trailing singleton {q} from a q-boundary schedule on U, producing a schedule on U.erase q.

    def Cslib.Distributed.SetAgreement.ISSchedule.snocSingleton {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (π₀ : ISSchedule (U.erase q)) :

    Append trailing singleton {q} to a schedule on U.erase q (q ∈ U), producing a q-boundary schedule on U.

    theorem Cslib.Distributed.SetAgreement.ISSchedule.snapshot_dropBoundary_of_ne {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (π : ISSchedule U) (hb : π.IsBoundaryAt q) {p : V} (hpq : p ≠ q) :
    theorem Cslib.Distributed.SetAgreement.ISSchedule.notMem_snapshot_of_isBoundaryAt {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (π : ISSchedule U) (hb : π.IsBoundaryAt q) {p : V} (hpq : p ≠ q) :
    q ∉ π.snapshot p

    Exact equivalence between q-boundary schedules on U (q ∈ U) and all schedules on U.erase q.

    Part 2: R-round IIS backwards-from-R interior-facet involution #

    def Cslib.Distributed.SetAgreement.IsBoundaryExecAt {V : Type u_1} [DecidableEq V] {U : Finset V} (q : V) {R : ℕ} (E : Fin R → ISSchedule U) :

    An R-round IIS execution E lies on the q-boundary when {q} runs last alone in every round r : Fin R.

    Instances For
      @[instance_reducible]
      def Cslib.Distributed.SetAgreement.flipIISExec {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) {R : ℕ} :
      (Fin R → ISSchedule U) → Fin R → ISSchedule U

      Backwards-from-R interior-facet involution on R-round IIS executions: scan from the final round Fin.last (R - 1) down to 0, and apply the one-shot split/merge involution ISSchedule.flip at the largest round r where E r is not q-boundary.

      theorem Cslib.Distributed.SetAgreement.flipIISExec_succ_of_isBoundaryAt {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) {R : ℕ} {E : Fin (R + 1) → ISSchedule U} (hb : (E (Fin.last R)).IsBoundaryAt q) :
      theorem Cslib.Distributed.SetAgreement.flipIISExec_succ_of_not_isBoundaryAt {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) {R : ℕ} {E : Fin (R + 1) → ISSchedule U} (hb : ¬(E (Fin.last R)).IsBoundaryAt q) :
      @[simp]
      theorem Cslib.Distributed.SetAgreement.flipIISExec_flipIISExec {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) {R : ℕ} (E : Fin R → ISSchedule U) :
      theorem Cslib.Distributed.SetAgreement.flipIISExec_eq_self_iff {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) {R : ℕ} (E : Fin R → ISSchedule U) :
      theorem Cslib.Distributed.SetAgreement.iisRun_flipIISExec_of_ne {V : Type u_1} [DecidableEq V] {Input : Type u_2} [DecidableEq Input] {U : Finset V} {q : V} (hq : q ∈ U) (inp : V → Input) {R : ℕ} (E : Fin R → ISSchedule U) {p : V} :
      p ≠ q → iisRun inp (flipIISExec hq E) p = iisRun inp E p

      View invariance under flipIISExec: flipping at q preserves the R-round IIS view of every process p ≠ q.

      def Cslib.Distributed.SetAgreement.boundaryExecEquiv {V : Type u_1} [DecidableEq V] {U : Finset V} {q : V} (hq : q ∈ U) (R : ℕ) :
      { E : Fin R → ISSchedule U // IsBoundaryExecAt q E } ≃ (Fin R → ISSchedule (U.erase q))

      Equivalence between q-boundary R-round IIS executions on U (q ∈ U) and all R-round IIS executions on U.erase q.

      theorem Cslib.Distributed.SetAgreement.iisRun_dropBoundary_of_ne {V : Type u_1} [DecidableEq V] {Input : Type u_2} [DecidableEq Input] {U : Finset V} {q : V} (inp : V → Input) {R : ℕ} (E : Fin R → ISSchedule U) (hb : IsBoundaryExecAt q E) {p : V} :
      p ≠ q → iisRun inp (fun (r : Fin R) => (E r).dropBoundary ⋯) p = iisRun inp E p

      Part 3: Combinatorial Sperner Parity for R-Round IIS Executions #

      def Cslib.Distributed.SetAgreement.IsCarrierColoring {V : Type u_1} {Input : Type u_2} [DecidableEq V] {R : ℕ} (c : IISView V Input R → V) :

      Global carrier-validity of an R-round IIS view coloring (Sperner condition on the iterated chromatic subdivision): every view v is colored by a process in v.carrier.

      def Cslib.Distributed.SetAgreement.IsPanchromaticIIS {V : Type u_1} {Input : Type u_2} [DecidableEq V] [DecidableEq Input] (U : Finset V) (inp : V → Input) {R : ℕ} (c : IISView V Input R → V) (E : Fin R → ISSchedule U) :

      An R-round IIS execution E on U is panchromatic under coloring c at input inp when every process color b ∈ U is decided by some active process p ∈ U.

      Instances For
        @[instance_reducible]
        instance Cslib.Distributed.SetAgreement.instDecidableIsPanchromaticIIS {V : Type u_1} {Input : Type u_2} [DecidableEq V] [DecidableEq Input] (U : Finset V) (inp : V → Input) {R : ℕ} (c : IISView V Input R → V) (E : Fin R → ISSchedule U) :
        theorem Cslib.Distributed.SetAgreement.odd_card_panchromatic_iis {V : Type u_1} {Input : Type u_2} [DecidableEq V] [DecidableEq Input] {R : ℕ} {c : IISView V Input R → V} (hc : IsCarrierColoring c) (U : Finset V) (inp : V → Input) :
        Odd {E : Fin R → ISSchedule U | IsPanchromaticIIS U inp c E}.card

        Iterated immediate snapshot (IIS) chromatic-subdivision Sperner parity step for #7504 (after Herlihy and Shavit, Lemma 3.2, p. 880, and §5.2, Definitions 5.3–5.4, pp. 897–898): for every carrier-valid coloring c : IISView V Input R → V (∀ v, c v ∈ v.carrier), finite process set U : Finset V, and input inp : V → Input, the number of R-round IIS executions on U hitting all #U colors is odd.

        theorem Cslib.Distributed.SetAgreement.exists_panchromatic_iis {V : Type u_1} {Input : Type u_2} [DecidableEq V] [DecidableEq Input] {R : ℕ} {c : IISView V Input R → V} (hc : IsCarrierColoring c) (U : Finset V) (inp : V → Input) :
        ∃ (E : Fin R → ISSchedule U), IsPanchromaticIIS U inp c E

        Iterated immediate snapshot (IIS) panchromatic existence step for #7504 (after Herlihy and Shavit, Lemma 3.2, p. 880): every carrier-valid coloring admits at least one panchromatic R-round IIS execution on U.

        Part 4: Wait-free k-set agreement impossibility in IIS and t < k quorum contrast #

        An R-round IIS protocol P : IISProtocol V Val R solves wait-free k-set agreement ([HS99], §3.3, p. 879; [BG93b]; [SZ00]) when:

        1. Validity (P.IsValid): every decided value is the initial input of some process, and
        2. k-Agreement: in every execution, at most k distinct values are decided across all processes.
        theorem Cslib.Distributed.SetAgreement.not_solvesSetAgreement_iis {V : Type u_1} {Val : Type u_2} [Fintype V] [DecidableEq V] [Fintype Val] [DecidableEq Val] {k R : ℕ} (hV : k + 1 ≤ Fintype.card V) (hVal : k + 1 ≤ Fintype.card Val) (P : IISProtocol V Val R) :

        Iterated immediate snapshot (IIS) impossibility step for #7504 (after Herlihy and Shavit, §3.3, Theorem 3.3, p. 881; see also [BG93b] and [SZ00]): on Fintype.card V ≥ k + 1 processes with Fintype.card Val ≥ k + 1 possible input values, no R-round deterministic IIS protocol solves wait-free k-set agreement (the general asynchronous read/write shared-memory to IIS reduction remains open in #7504).

        Iterated immediate snapshot (IIS) solvability threshold step for #7504: for every k : ℕ and finite types V and Val, there exists an R-round IIS protocol solving wait-free k-set agreement if and only if Fintype.card V ≤ k ∨ Fintype.card Val ≤ k.

        Contrast: positive one-round (n - t)-quorum k-set agreement when t < k #

        A one-round (n - t)-quorum schedule over V: at most t processes are missed, so every deciding process p hears from a quorum Q p : Finset V containing p of cardinality at least Fintype.card V - t.

        def Cslib.Distributed.SetAgreement.quorumRun {V : Type u_1} {Val : Type u_2} [DecidableEq V] [DecidableEq Val] (inp : V → Val) (Q : V → Finset V) (p : V) :
        Finset (V × Val)

        Local quorum view observed by p in a one-round (n - t)-quorum exchange: the set of (process, input) pairs from Q p.

        structure Cslib.Distributed.SetAgreement.QuorumProtocol (V : Type u_1) (Val : Type u_2) :
        Type (max u_1 u_2)

        One-round deterministic quorum decision protocol.

        • decide : V → Finset (V × Val) → Val

          Per-process decision rule applied to the received (process, input) set.

        A QuorumProtocol solves (n - t)-quorum k-set agreement when in every IsQuorumSchedule t Q schedule, every process decides an observed input from Q p and at most k distinct values are decided globally.

        theorem Cslib.Distributed.SetAgreement.exists_quorumSetAgreement_of_lt (V : Type u_1) (Val : Type u_2) [Fintype V] [DecidableEq V] [DecidableEq Val] [Nonempty Val] {t k : ℕ} (htk : t < k) :
        ∃ (P : QuorumProtocol V Val), P.SolvesSetAgreement t k

        Original one-round (n - t)-quorum contrast step for #7504: whenever t < k, a fixed leader set L of size min (t + 1) |V| intersects every quorum Q p of size ≥ |V| - t, so adopting any heard leader's input solves (n - t)-quorum k-set agreement in one round.