Section ErasureSafety.
Context (initU: HybridMachineSig.schedule).
Context (init_rmap : @res JR).
Context (init_pmap : @res DR).
Context (init_rmap_perm:  match_rmap_perm init_rmap init_pmap).
(*Definition local_erasure:= erasure initU init_rmap init_pmap init_rmap_perm.*)
Definition step_diagram:= ErasureProof.core_diagram.
Existing Instance DMS.

(*there is something weird about this theorem.*)
(*The injection is trivial... but it shouldn't*)
(*  Theorem initial_safety: forall genv (U : HybridMachineSig.schedule) (js : jstate genv) (vals : seq Values.val) m (rmap0 : rmap) (pmap : access_map * access_map) main h, match_rmap_perm rmap0 pmap -> no_locks_perm rmap0 -> initial_core (JMachineSem U (Some rmap0)) h m (U, [::], js) main vals  -> exists (ds : dstate genv), initial_core (ClightMachineSem U (Some pmap)) h m (U, [::], ds) main vals /\ invariant ds /\ match_st genv js ds.  End ErasureSafety.  End ErasureSafety.  Require Import VST.concurrency.juicy.semax_to_juicy_machine.  Lemma no_locks_no_locks_perm : forall r, Parching.no_locks_perm r <-> initial_world.no_locks r.  (* unused *)
Lemma juice2Perm_match : forall m r, access_cohere' m r ->
Parching.match_rmap_perm r (juice2Perm r m, empty_map).