Program Definition closedM : @modality world _ := exist _ closedR _.Definition closed := box closedM.Program Definition setM v x : @modality world _ := setR v x.Program Definition world_op (Pp : pred prog) (Pr : store -> Prop) (Pt: terminationMeasure -> Prop) : pred world :=
  fun prt =>
    match prt with (p,(r,t)) =>
      Pp p /\ Pr r /\ Pt t
    end.Definition store_op (Pr : store -> Prop) :=
  world_op TT Pr (fun _ => True).

(* Specifications: *)
Lemma worldNec_unfold : forall p r t p' r' t', @necR world _ (p,(r,t)) (p',(r',t')) <-> necR p p' /\ r = r' /\ t = t'.
Lemma worldLater_unfold : forall p r t p' r' t', @laterR world _ (p,(r,t)) (p',(r',t')) <-> laterR p p' /\ r = r' /\ t = t'.
Lemma collapse_instr_approx : forall n m i, fmap_instr (K.approx n) (fmap_instr (K.approx m) i) = fmap_instr (K.approx (min n m)) i.
Lemma collapse_instr_approx_same : forall n i, fmap_instr (K.approx n) (fmap_instr (K.approx n) i) = fmap_instr (K.approx n) i.
Lemma nec_prog_lookup : forall p p' l i, necR p p' -> prog_lookup p l = Some i -> prog_lookup p' l = Some (fmap_instr (K.approx (level p')) i).
Lemma termMeasure_incr_trans : forall t1 t2 t3, termMeasure_incr t1 t2 -> termMeasure_incr t2 t3 -> termMeasure_incr t1 t3.