Definition bind := with_spec (DTbin_make bind_has_spec).
End Bind.
Section Inject.
Variables (this : nid) (V W : world) (K : hooks) (A : Type) (w : injects V W K).
Variable (e : DT this V A).
Notation W2 := (inj_ext w).
Notation s := (spec_of e).
Section Prog.
Variable T : prog V A this.
Definition inject_set t :=
t = Unfinished \/ exists t', t' \In T /\ t = Inject w t'.
Definition inject_prog := @Prog _ _ _ inject_set (or_introl (erefl _)).
End Prog.
Definition inject_s : spec A :=
(fun i => exists i1 i2, i = i1 \+ i2 /\ i1 \In Coh V /\ s.1 i1,
fun i y m => forall i1 i2, i = i1 \+ i2 -> i1 \In Coh V ->
exists m1 m2, [/\ m = m1 \+ m2, s.2 i1 y m1 &
network_rely W2 this i2 m2]).

(* Specifications: *)
Lemma inject_has_spec : inject_prog (code_of e) \In has_spec this W inject_s.
Definition inject := with_spec (DTbin_make inject_has_spec).