Inductive estepstar : program X -> store -> list (instr X) -> store -> list (instr X) ->  Prop :=
  | estepstar_O: forall p s i, estepstar p s i s i
  | estepstar_S: forall p s i s' i' s'' i'',
              estep p s i s' i' ->
              estepstar p s' i' s'' i'' ->
              estepstar p s i s'' i''.Inductive estepstar : program X -> store -> list (instr X) -> store -> list (instr X) ->  Prop :=
  | estepstar_O: forall p s i, estepstar p s i s i
  | estepstar_S: forall p s i s' i' s'' i'',
              estep p s i s' i' ->
              estepstar p s' i' s'' i'' ->
              estepstar p s i s'' i''.Inductive estepstar : program X -> store -> list (instr X) -> store -> list (instr X) ->  Prop :=
  | estepstar_O: forall p s i, estepstar p s i s i
  | estepstar_S: forall p s i s' i' s'' i'',
              estep p s i s' i' ->
              estepstar p s' i' s'' i'' ->
              estepstar p s i s'' i''.Definition eventually_ehalts (p:program X) (r:store) (s:list (instr X)) : Prop :=
    exists r', estepstar p r s r' nil.Definition erase_instr : instruction -> instr X :=
    fmap_instr (fun _ => x).Definition erase_prog := map_fmap _ _ erase_instr.

Lemma erase_halt' : forall n p p' r r' s, stepstar (K.squash (n,p)) p' r s r' nil -> estepstar (erase_prog p) r (List.map erase_instr s) r' nil.