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.

Theorem erase_halt : forall p n r s, eventually_halts (K.squash (n,p)) r s -> eventually_ehalts (erase_prog p) r (List.map erase_instr s).