Semilattice Irrevocable-Emission Coordination-Free Consistency ↔ Monotonicity #
This module formalizes a semilattice irrevocable-emission and monotone-observation model step
toward #7502 for coordination-free distributed query evaluation over partitionable CvRDT
semilattices (motivated by Hellerstein's CALM Conjecture [Hel10], §4.1 Conjecture 1,
and the relational-transducer characterization of Ameloot, Neven, and Van den Bussche
[ANVdB11], §§2.1, 3–6, Proposition 11, Theorem 12, and Corollary 13).
In a partitionable asynchronous CvRDT network over finite replica set P and state semilattice
S ([SemilatticeSup S]):
- Coordination-free local emission: before waiting for cross-replica coordination, each replica
p : Pevaluates an output queryemit : S → Finset Factlocally against its own partitioned statecfg p : Sand accumulates emitted facts irrevocably (emitted p ∪ emit s') across arbitrary asynchronous gossip merges(src, dst)(runGossipEmit). - Split-brain retraction safety (
SemilatticeCoordinationFreeConsistent P emit): across all initial partitioned replica configurationscfg : P → Sand all finite gossip scheduleshops, every fact irrevocably emitted at any replica belongs to the globally converged query outputemit (globalMergedState cfg).
Main theorems in the semilattice model #
- Exact Semilattice
iffCharacterization (semilatticeCoordinationFreeConsistent_iff_monotone): Over any multi-replica network ([Nontrivial P], i.e. at least two distinct replicas), an irrevocable fact-emission queryemit : S → Finset Factis coordination-free consistent if and only ifMonotone emitholds on the state semilatticeS(using the two-replica split-brain horizontal partition construction of [ANVdB11], §6, proof of Theorem 12). Moreover, whenMonotone emitholds, any all-pairs gossip schedule brings every replica's accumulated irrevocable output to the exact global answeremit (globalMergedState cfg)(emitted_eq_global_of_monotone), whereas on a 1-node network ([Subsingleton P]) every query trivially avoids cross-replica retraction (semilatticeCoordinationFreeConsistent_of_subsingleton, matching [ANVdB11], §4 Example 2). - Preorder-Valued Observable Queries (
semilatticeObservableConsistent_iff_monotone): Generalizes the characterization to arbitrary[Preorder Out]local observationsq : S → Out(SemilatticeObservableConsistent P q ↔ Monotone qunder[Nontrivial P]). - Positive Monotone CRDT Queries:
Threshold queries on
GCounter(gcounterThresholdEmit,gcounterThresholdBool) and membership / monotone selection-projection queries onGSet(gsetMemEmit,gsetFilterImage) are proved coordination-free consistent. - Negative Non-Monotone CRDT Queries (Split-Brain Retraction Refutations):
Set emptiness (
gsetIsEmptyEmit, [ANVdB11], §5 Example 10), negation / tombstone set difference (TwoPhaseSet.elements), and exact count (gcounterExactCountEmit k) all fail monotonicity and are refuted as coordination-free consistent over any[Nontrivial P].
Model scope relative to primary sources #
This module models local query evaluation emit : S → Finset Fact and q : S → Out over abstract
SemilatticeSup S replica states and gossip merges rather than the full relational transducer
networks (N, Π) over database schemas (S_in, S_sys, S_msg, S_mem) with Id/All system
relations, network-topology independence, obliviousness equivalence, and syntactic Datalog /
FO+while / Dedalus characterizations of [ANVdB11] (§§2–8, Theorems 6, 12,
16, 18 & Corollaries 13, 14, 17). Those database-transducer and query-language characterizations
remain open under #7502.
Main definitions #
Cslib.Distributed.CRDT.globalMergedState: global semilattice supremum across all replicasP.Cslib.Distributed.CRDT.IrrevocableReplicaState,Cslib.Distributed.CRDT.initIrrevocableState,Cslib.Distributed.CRDT.gossipEmitStep,Cslib.Distributed.CRDT.runGossipEmit: asynchronous gossip execution with irrevocable local fact emission.Cslib.Distributed.CRDT.SemilatticeCoordinationFreeConsistent: split-brain retraction freedom for irrevocableFinset Factemission overP.Cslib.Distributed.CRDT.gossipReplicaStates,Cslib.Distributed.CRDT.SemilatticeObservableConsistent: preorder-enriched local observation consistency across gossip schedules.Cslib.Distributed.CRDT.gcounterThresholdEmit,Cslib.Distributed.CRDT.gcounterThresholdBool,Cslib.Distributed.CRDT.gsetMemEmit,Cslib.Distributed.CRDT.gsetFilterImage: positive monotone CRDT queries.Cslib.Distributed.CRDT.gsetIsEmptyEmit,Cslib.Distributed.CRDT.gcounterExactCountEmit: negative non-monotone emptiness and exact-count queries.
Main results #
Monotone.semilatticeCoordinationFreeConsistentandCslib.Distributed.CRDT.semilatticeCoordinationFreeConsistent_iff_monotone: monotonicity impliesSemilatticeCoordinationFreeConsistent P emitover[Nonempty P], and is equivalent to it over[Nontrivial P].Cslib.Distributed.CRDT.emitted_eq_global_of_monotone: underMonotone emit, any all-pairs gossip schedule converges every replica's irrevocable output toemit (globalMergedState cfg).Cslib.Distributed.CRDT.semilatticeCoordinationFreeConsistent_of_subsingleton: on[Subsingleton P],SemilatticeCoordinationFreeConsistent P emitholds unconditionally, showing[Nontrivial P]is necessary.Monotone.semilatticeObservableConsistentandCslib.Distributed.CRDT.semilatticeObservableConsistent_iff_monotone: monotonicity impliesSemilatticeObservableConsistent P qover[Nonempty P], and is equivalent to it over[Nontrivial P].Cslib.Distributed.CRDT.semilatticeCoordinationFreeConsistent_gcounterThreshold,Cslib.Distributed.CRDT.semilatticeObservableConsistent_gcounterThresholdBool,Cslib.Distributed.CRDT.semilatticeCoordinationFreeConsistent_gsetMem, andCslib.Distributed.CRDT.semilatticeCoordinationFreeConsistent_gsetFilterImage: positive monotone query instantiations.Cslib.Distributed.CRDT.not_semilatticeCoordinationFreeConsistent_gsetIsEmpty,Cslib.Distributed.CRDT.not_semilatticeCoordinationFreeConsistent_twoPhaseSetElements, andCslib.Distributed.CRDT.not_semilatticeCoordinationFreeConsistent_gcounterExactCount: split-brain impossibility instantiations for emptiness, set difference / negation, and exact count.
References #
Semilattice Irrevocable-Emission Gossip Model #
Globally converged semilattice state ⨆ p : P, cfg p across all replicas p : P.
Replica states resulting from folding asynchronous (· ⊔ ·) gossip merges hops from cfg.
Distributed state of replicas running a semilattice CvRDT alongside an irrevocable output
accumulator emitted : P → Finset Fact (modeling append-only transition outputs
out(ρ) = ⋃_n out(τ_n) as in [ANVdB11], §2.1 & §3, pp. 3–4).
- replica : P → S
Current local semilattice state at each replica.
- emitted : P → Finset Fact
Cumulative set of facts irrevocably emitted at each replica so far.
Initial coordination-free configuration: before any cross-replica messages are exchanged, each
replica p evaluates and emits emit (cfg p) purely from its own local state cfg p.
One asynchronous gossip-and-emit step along directed pair hop = (src, dst): dst merges
src's state via (· ⊔ ·) and irrevocably appends emit evaluated at its updated state.
Execute a finite schedule hops : List (P × P) of asynchronous gossip merges starting from
initIrrevocableState emit cfg.
Coordination-free consistency in the semilattice irrevocable-emission model (step toward
#7502, motivated by [Hel10], §4.1 Conjecture 1, and [ANVdB11],
§§4–5): across all partitioned initial assignments cfg : P → S and all asynchronous gossip
schedules hops, no replica ever irrevocably emits a split-brain fact outside the globally
converged answer emit (globalMergedState cfg).
Every monotone query emit : S → Finset Fact is coordination-free consistent over any
nonempty finite replica set P.
Semilattice irrevocable-emission coordination-free consistency characterization step (toward
#7502, adapting the split-brain horizontal-partition argument of [ANVdB11],
§6 Theorem 12 & Corollary 13, p. 8, to SemilatticeSup S states, motivated by [Hel10],
§4.1 Conjecture 1): over any finite network P with at least two distinct replicas
([Nontrivial P]), SemilatticeCoordinationFreeConsistent P emit holds if and only if
Monotone emit.
Under Monotone emit, any gossip schedule hops that covers every ordered pair (src, dst)
(∀ src dst, (src, dst) ∈ hops) converges every replica p's state to globalMergedState cfg and
its cumulative irrevocable output to the exact global answer emit (globalMergedState cfg).
Single-replica degeneracy step (toward #7502, after [ANVdB11], §4
Example 2, p. 5): on a 1-replica network ([Subsingleton P]),
SemilatticeCoordinationFreeConsistent P emit holds for every emit (even non-monotone ones),
confirming that [Nontrivial P] (2 ≤ |P|) in semilatticeCoordinationFreeConsistent_iff_monotone
is necessary.
Preorder-Valued Observable Queries (q : S → Out) #
Semilattice observable-query consistency over [Preorder Out]: at every point along any
asynchronous gossip schedule hops from any partitioned configuration cfg : P → S, every
replica's local observation q (state p) is bounded above in Out by the globally converged
answer q (globalMergedState cfg) (for instance, on Bool with false ≤ true, once a local
predicate becomes true it never flips back to false upon merging remote partitions).
Every monotone observation q : S → Out is observable-consistent over any nonempty finite
replica set P.
Semilattice observable-query consistency characterization step (toward #7502): over any finite
network P with [Nontrivial P], SemilatticeObservableConsistent P q holds if and only if
Monotone q.
Positive Monotone CRDT Query Instantiations #
Existential / element-membership fact emission on GSet α (Finset α).
Monotone relational selection-and-projection query (s.filter (pred · = true)).image f on
GSet α.
Negative Non-Monotone CRDT Query Instantiations (Split-Brain Retractions) #
Emptiness fact emission on GSet α (s = ∅, [ANVdB11], §5 Example 10,
p. 7).
Semilattice emptiness non-monotonicity step (toward #7502, after
[ANVdB11], §5 Example 10, p. 7): set emptiness is non-monotone and therefore
cannot be evaluated coordination-freely without split-brain retraction over [Nontrivial P].
Set difference / tombstone negation (TwoPhaseSet.elements : s ↦ s.added \ s.removed) is
non-monotone in TwoPhaseSet α and therefore suffers split-brain retraction as an irrevocable
emission query over [Nontrivial P].
Exact-count queries (c.value = k) on GCounter Q ([Nonempty Q]) fail monotonicity for
every k : ℕ and therefore cannot be evaluated coordination-freely without split-brain retraction
over [Nontrivial P].