The threshold protocol (CRN-3) #
The protocol of [AADFP06, proof of Lemma 5(1)] for ∑ᵢ aᵢ xᵢ < c, as a leader protocol
(Leader.protocol). Values are integers in [-s, s] with s = |c| + 1 + ∑ᵢ |aᵢ|; input i
starts with value aᵢ. A leader encounter gives the initiator the clamped sum
q(u, u') = max(-s, min(s, u + u')) and the responder the rest r(u, u') = u + u' - q(u, u'),
and the output test is t(u) = [u < c]. Unlike AADFP06 (output bit 0), an input starts with
output bit t(aᵢ), which is needed for a single agent (see FORMALIZATION_DIFFERENCES.md).
Correctness (stablyComputes): the sum of the values is ∑ᵢ aᵢ xᵢ; merge the leaders, then let
the leader absorb the non-leaders' values while this decreases ∑ |u| over non-leaders. Then
(classify) either all non-leaders hold 0, or the leader holds s and all non-leaders are
≥ 0, or the leader holds -s and all non-leaders are ≤ 0 (AADFP06's stable configurations),
and the leader's test t is the predicate's value in each case.
There are finitely many counter values.
The initiator's new value: the clamped sum.
Equations
- Crn.ThresholdProtocol.q s u v = ⟨Crn.ThresholdProtocol.clamp s (↑u + ↑v), ⋯⟩
Instances For
The responder's new value: the rest of the sum.
Equations
- Crn.ThresholdProtocol.r s u v = ⟨↑u + ↑v - Crn.ThresholdProtocol.clamp s (↑u + ↑v), ⋯⟩
Instances For
[AADFP06, Lemma 5(1)] The threshold protocol stably computes ∑ᵢ aᵢ xᵢ < c.