THE COLLABORATE merge two cells into one — and it does not matter who came first
To collaborate two cells is to merge them into one agreed value — not by one overwriting the other (that was the invade, dart 328), but by a join: take the maximum, and the result is the same no matter the order, and merging a value with itself changes nothing. Merge the two ~~ cores and you get 4; merge that with 4 again and it is still 4. This is a join-semilattice — idempotent, commutative, associative — the algebra beneath conflict-free replicated data types, where replicas that saw updates in any order still converge. Its mirror is the invade: overwrite (one erases the other) against merge (both fold into a value neither disputes).
THE TECHNIQUE merge by join (max): idempotent, commutative, associative
The demo collaborates two core cells by join — and shows merging again changes nothing: live demo
HISTORY & CREDIT join-semilattice / CRDT · 2011
“Merging conflicting cells needs a referee to pick an order.” — a join needs no order: idempotent, commutative, associative, it converges to the same value however the updates arrived. cited
algebra · the join-semilattice — a merge that is idempotent (a∨a=a), commutative, associative. 2011 · Shapiro, Preguiça, Baquero & Zawirski — conflict-free replicated data types (CRDTs): replicas merge by join and converge without coordination. mirror · dart 328, the invade: overwrite vs merge.
Two cells fold into one that neither disputes, in any order, however many times. To collaborate is to merge without a referee. CRDT, 2011
RECOMMEND FOR I-13 the order-free merge, on the compiler
On the canonical compiler, joining the two cores gives 4, and joining again is still 4 (idempotent):
$ i13 run d_collaborate.i13 # merge by join (max)
RUN OK · 25 step(s) · peak stack 3 · call depth 1
collab = 4 -- the two ~~ cores, merged
idem = 4 -- merged again: unchanged (idempotent)
Recommend, honestly not a keeper here: the collaborate is a real join — idempotent, order-free — and that confluence is exactly the crdt keeper the corpus already holds (axis 5). So it re-instantiates rather than extends. Its value in the batch is the contrast it draws with its mirror, the invade (328): two ways a cell takes a new state — overwrite, where one value erases another and order matters, versus merge, where values fold into one that order cannot disturb. The destructive and the confluent, set face to face across the nesting.