(** "Cooperating" semantics impose additional constraints; in particular,
   they require that the memories produced by coresteps contain no dangling
   pointers. *)

Record CoopCoreSem {G C} :=
  { coopsem :> CoreSemantics G C mem
  ; corestep_fwd :
      forall g c m c' m' (CS: corestep coopsem g c m c' m'),
      mem_forward m m' }.(** "Cooperating" semantics impose additional constraints; in particular,
   they require that the memories produced by coresteps contain no dangling
   pointers. *)

Record CoopCoreSem {G C} :=
  { coopsem :> CoreSemantics G C mem
  ; corestep_fwd :
      forall g c m c' m' (CS: corestep coopsem g c m c' m'),
      mem_forward m m' }.(** "Cooperating" semantics impose additional constraints; in particular,
   they require that the memories produced by coresteps contain no dangling
   pointers. *)

Record CoopCoreSem {G C} :=
  { coopsem :> CoreSemantics G C mem
  ; corestep_fwd :
      forall g c m c' m' (CS: corestep coopsem g c m c' m'),
      mem_forward m m' }.

Lemma corestepN_fwd: forall ge c m c' m' n, corestepN coopsem ge n c m c' m' -> mem_forward m m'.