úÎ F3      ! " # $ % & ' ( ) * + , - . / 0 1 2 SafeA semilattice.EIt may be a join-semilattice, or meet-semilattice, it doesn't matter.#If it matters for you, use package lattices.In addition to 3 , Semilattice defines this laws:  commutativity x  y == y  x idempotency x  x == xJust (4), specialized to .6Safe*5State-based, or convergent (Cv) replicated data type.!Update is any function modifying state.GQuery function is not needed. State itself is exposed. In other words, query = 5.$Actually, a CvRDT is nothing more a .SafeGrow-only counter.Safe Increment counter  Initial state Get value from the state  replica id    Safe nPositive-negative counter. Allows incrementing and decrementing. Nice example of combining of existing CvRDT (' in this case) to create another CvRDT.     Safe#Get value from the stateDecrement counterIncrement counter Initial state replica id replica id  SafeDR:Operation-based, or commutative (Cm) replicated data type. Commutativity law  op1 .  op2 ==  op2 .  op1!Idempotency doesn't need to hold.The type of the target valueApply operation to a value(Build state from a series of operations.SafeDRGrow-only counter.Commutativity:  obviously commutes with itself. Initial state SafeDR 0Last write wins. Interesting, this type is both  and . !"#$%&' !"#$ !"#$ !"#$%&' SafeDR[+@Positive-negative counter. Allows incrementing and decrementing.. Initial state+,-./+,-.+,-.+,-./6    !" # $ % & ' ( ) * + , -  ! .  / 0 1 23423 2567crdt-0.3-5fi0c8NkPoS1nZcGWKie91Data.SemilatticeCRDT.CvCRDT.GCounter.Cv.InternalCRDT.GCounter.CvCRDT.PNCounter.Cv.InternalCRDT.PNCounter.CvCRDT.CmCRDT.GCounter.CmCRDT.LWWCRDT.PNCounter.Cm Semilattice<>CvRDTGCounter$fSemilatticeGCounter$fSemigroupGCounter $fEqGCounter$fShowGCounter incrementinitialquery PNCounterpositivenegative$fSemilatticePNCounter$fSemigroupPNCounter $fEqPNCounter$fShowPNCounter decrementCmRDTStateupdate Increment$fCmRDTGCounterLWWWrite timestampvalue Timestamp$fSemilatticeLWW $fCmRDTLWW$fSemigroupLWW$fEqLWW$fOrdLWW $fShowLWW Decrement$fCmRDTPNCounter$fBoundedPNCounter$fEnumPNCounterbaseData.Semigroup SemigroupGHC.Baseid