Section Exports.
Definition inj_ext := E.
Definition injects := injects.
Definition Inject := Inject.
(* The following two definitions are central for framing with respect to the hooks. In essence. we can add more hooks via the frame rule, if none of the protocols in the "core" world (i.e., the world, to which we attach the frame with more hooks) are going to become constrained by the newly added hooks.  In other words, the new hooks only constrain the world "to be attached" but not our "core" world. *)
Definition not_hooked_by (K : hooks) l :=
forall z lc l' st, (z, lc, (l', st)) \in dom K -> l != l'.
Definition world_not_hooked (W: world) K :=
forall l, l \in dom W.1 -> not_hooked_by K l.
(********************************************************************)
(*                      Framing result                              *)
(********************************************************************)
(* State something about hook direction *)

Lemma injectL (U W : world) K :
valid (U \+ W \+ (Unit, K)) ->
hook_complete U -> hook_complete W ->
hooks_consistent (getc (U \+ W)) K ->
world_not_hooked U K ->
injects U (U \+ W \+ (Unit, K)) K.