(* (Htp': tp' = updThread cnt0 (Kresume c) pmap_tid')
            (Htp'': tp'' = updLockSet tp' pmap_lp), *)
          Definition WorF (sh: share): permission:=
            if eq_dec sh Share.top then Freeable else Writable.Definition empty_delta_map: delta_map:= PTree.empty (Z -> option (option permission)).

(* Specifications: *)
Lemma mtch_install_perm: forall js ds m m' tid (MATCH : match_st js ds) (Hcmpt : mem_compatible js m) (Htid : containsThread js tid) (Hperm : install_perm Hcmpt Htid m'), DryHybridMachine.install_perm _ _ _ (MTCH_compat _ _ _ MATCH Hcmpt) (MTCH_cnt MATCH Htid) m'.
Lemma core_diagram': forall (m : Mem.mem) (U0 U U': schedule) (ds : dstate) dtr (js js': jstate) jtr jtr' rmap pmap (m' : Mem.mem), match_st js ds -> invariant ds -> corestep (JMachineSem U0 rmap) (U, jtr, js) m (U', jtr', js') m' -> exists (ds' : dstate), invariant ds' /\ match_st js' ds' /\ exists dtr', corestep (ClightMachineSem U0 pmap) (U, dtr, ds) m (U', dtr ++ dtr', ds') m'.
Lemma core_diagram: forall (m : Mem.mem) (U0 U U': schedule) rmap pmap (ds : dstate) dtr (js js': jstate) jtr jtr' (m' : Mem.mem), corestep (JMachineSem U0 rmap) (U, jtr, js) m (U', jtr', js') m' -> match_st js ds -> invariant ds -> exists (ds' : dstate), invariant ds' /\ match_st js' ds' /\ exists dtr', corestep (ClightMachineSem U0 pmap) (U, dtr, ds) m (U', dtr ++ dtr', ds') m'.
Lemma halted_diagram: forall U ds js rmap pmap, fst (fst js) = fst (fst ds) -> halted (JMachineSem(ge := ge) U rmap) js = halted (ClightMachineSem(ge := ge) U pmap) ds.