Wait-free O(n²) step and shared-register operation complexity #
Defines remainingSteps, remainingRegOps, and isRegAccessStep, proving unconditional
O(n²) per-process wait-free completion bounds (exists_solo_completion,
[AAD+93], Lemma 3.4, p. 10).
Main definitions #
Cslib.Distributed.SetAgreement.remainingSteps,Cslib.Distributed.SetAgreement.remainingRegOps,Cslib.Distributed.SetAgreement.isRegAccessStep: per-process termination potentials (O(n²)).
Main results #
Cslib.Distributed.SetAgreement.remainingSteps_le_quad:2n² + 4n + 3upper bound.Cslib.Distributed.SetAgreement.remainingRegOps_invokeScan,Cslib.Distributed.SetAgreement.remainingRegOps_invokeUpdate: initial register-operation counts.Cslib.Distributed.SetAgreement.proc_eq_of_other_event,Cslib.Distributed.SetAgreement.remainingSteps_eq_of_other,Cslib.Distributed.SetAgreement.remainingSteps_lt_of_step,Cslib.Distributed.SetAgreement.step_enabled_of_not_idle,Cslib.Distributed.SetAgreement.exists_solo_completion: non-interference and solo termination.
Wait-free O(n²) step complexity (Lemma 3.4) #
Remaining protocol steps (including local loop-boundary evaluations) for process i to finish
its current operation (0 when idle).
Remaining shared-register operations (Read or Write, excluding purely local transitions)
for process i to finish its current operation (0 when idle).
Whether transition stepSnapshot ord dInit s (.step i) performs a shared-register Read or
Write (true) versus a local loop evaluation (false).
Unbounded sequence-numbered single-writer step for #7504 (after
Afek et al., Lemma 3.4, p. 10): in every state with
st.rem.length ≤ n, remainingSteps is at most (2n + 2)(n + 1) + 1 = 2n² + 4n + 3 where
n = Fintype.card P.
Unbounded sequence-numbered single-writer step for #7504 (after
Afek et al., Lemma 3.4, p. 10): immediately after
invokeScan i, remainingRegOps equals 2 * n * (n + 1) (O(n²) shared-register reads, bounded
across subsequent steps by remainingSteps_lt_of_step).
Unbounded sequence-numbered single-writer step for #7504 (after
Afek et al., Lemma 3.4, p. 10): immediately after
invokeUpdate i val, remainingRegOps equals 2 * n * (n + 1) + 1 (O(n²) shared-register reads
plus 1 write, bounded across subsequent steps by remainingSteps_lt_of_step).
Any event performed by another process j ≠ i leaves i's local state and remainingSteps
completely unchanged.
Unbounded sequence-numbered single-writer step for #7504 (after
Afek et al., Lemma 3.4, p. 10): every atomic .step i of
an active process i strictly decreases remainingSteps ord (s.proc i), and decreases
remainingRegOps whenever a shared register is accessed (isRegAccessStep).
Whenever s.proc i ≠ .idle, .step i is enabled (stepSnapshot ord dInit s (.step i) returns
some s').
Unbounded sequence-numbered single-writer step for #7504 (after
Afek et al., Lemma 3.4, p. 10): from any state s, running
process i alone drives i to .idle in at most remainingSteps ord (s.proc i) transitions.