(* Axiom extsem_erasure: *)
(*   forall name sg vs1 vs1' t vres m1 m1' m2 *)
(*     (Hmem: mem_erasure m1 m1') *)
(*     (Hval_erasure: val_erasure_list vs1 vs1') *)
(*     (Hextcall: external_functions_sem name sg the_ge vs1 m1 t vres m2), *)
(*   exists vres' m2', *)
(*     external_functions_sem name sg the_ge vs1' m1' t vres' m2' /\ *)
(*     val_erasure vres vres' /\ *)
(*     mem_erasure m2 (erasePerm m2'). *)
(* Axiom inline_assembly_erasure: *)
(*   forall text sg vs1 vs1' t vres m1 m1' m2 *)
(*     (Hmem: mem_erasure m1 m1') *)
(*     (Hval_erasure: val_erasure_list vs1 vs1') *)
(*     (Hextcall: inline_assembly_sem text sg the_ge vs1 m1 t vres m2), *)
(*   exists vres' m2', *)
(*     inline_assembly_sem text sg the_ge vs1' m1' t vres' m2' /\ *)
(*     val_erasure vres vres' /\ *)
(*     mem_erasure m2 (erasePerm m2'). *)

(* Specifications: *)
Lemma external_call_erasure:
forall ef m1 m1' vs1 vs1' t m2 vres
(Hef: match ef with
| EF_memcpy _ _ | EF_malloc | EF_free => True
| _ => False
end)
(Hmem: mem_erasure m1 m1')
(Hval_erasure: val_erasure_list vs1 vs1')
(Hextcall: external_call ef the_ge vs1 m1 t vres m2),
exists vres' m2',
external_call ef the_ge vs1' m1' t vres' m2' /\
val_erasure vres vres' /\
mem_erasure m2 (erasePerm m2').
Lemma evstep_erase:
forall c1 c1' c2 ev m1 m1' m2
(HeraseCores: core_erasure c1 c1')
(HerasedMem: mem_erasure m1 m1')
(Hstep: ev_step semSem c1 m1 ev c2 m2),
exists c2' m2' ev',
ev_step semSem c1' m1' ev' c2' m2' /\
core_erasure c2 c2' /\
mem_erasure m2 (erasePerm m2') /\
mem_event_list_erasure ev ev'.