Section Prog.
Variable T : prog V A this.
Definition with_inv_set t :=
t = Unfinished \/ exists t', t' \In T /\ t = WithInv pr I ii (erefl _) t'.
Definition with_inv_prog := @Prog _ _ _ with_inv_set (or_introl (erefl _)).
End Prog.
Notation getS i := (getStatelet i l).
Definition with_inv_s : spec A :=
(fun i => s.1 i,
fun i y m => m \In Coh W /\ s.2 i y m).
Definition with_inv := with_spec (DTbin_make with_inv_has_spec).
End InductiveInv.
(* Proving by the rule of consequence *)
Definition conseq (W : world) A this (e : DT this W A) (s : spec A) :=
forall i, s.1 i -> verify i e (s.2 i).

(* The specification implies itself *)
Lemma conseq_refl (W : world) A this (e : DT this W A) :
conseq e (spec_of e).