(* 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'). *)

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').