From mathcomp.ssreflect
From mathcomp
From fcsl
From DiSeL
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
(* Framing with respect to the world *)
Module Injection.
Section Injection.
Variable W : world.
Structure injects (U V : world) (K : hooks) := Inject {
(* The "delta world" *)
E : world;
_ : hook_complete U /\ hook_complete E;
(* Additional hooks are included with an empty world *)
_ : V = U \+ E \+ (Unit, K);
(* Additional hooks are well-formed with respect to the world *)
_ : hooks_consistent (getc (U \+ E)) K;
(* These all should be easy to prove given a standard world disentanglement *)
_ : forall s, Coh V s <-> exists s1 s2,
[/\ s = s1 \+ s2, Coh U s1 & Coh E s2];
(* Framing wrt. worlds and hooks *)
_ : forall s1 s2 s this,
s1 \+ s \In Coh V -> network_step U this s1 s2 ->
network_step V this (s1 \+ s) (s2 \+ s);
_ : forall s1 s2 s1' s2' this,
s1 \In Coh U -> s2 \In Coh U ->
network_step V this (s1 \+ s1') (s2 \+ s2') ->
(network_step U this s1 s2   /\ s1' = s2') \/
(network_step E this s1' s2' /\ s1 = s2); }.
End Injection.
Module Exports.
Section Exports.
Definition inj_ext := E.
Definition injects := injects.
Definition Inject := Inject.

Lemma getSUn s1 s2 l :
valid (s1 \+ s2) -> l \in dom s1 ->
getStatelet s1 l = getStatelet (s1 \+ s2) l.