From mathcomp.ssreflect
From mathcomp
From fcsl
From DiSeL
Require FunctionalExtensionality.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Module ProtocolWithInvariant.
Section ProtocolWithInvariant.
Variable p : protocol.
(* Decompose the initial protocol *)
Notation l := (plab p).
Notation coh := (coh p).
(* User-provided (supposedly inductive) invariant *)
Variable I : dstatelet -> pred nid -> Prop.
(* "Initial" state *)
Variable d0 : dstatelet.
Definition W := mkWorld p.
Notation toSt d := (l \\-> d).
(* TODO: prove relation between stability and reachability *)
(* New coherence predicate: includes only reachable states *)
Definition cohI :=
[Pred d | coh d /\ I d (nodes p d)].

(* Specifications: *)
(* The usual coherence properties all hold *)
Lemma cohIVd d : cohI d -> valid (dstate d).
Section SendInvWrapper.