(** *SyncStep simulation*)
(** Proof of the step diagram when the step is a synchronization step. TODO: Split the proof in each diagram. *)
Inductive deltaMap_cases (dmap:delta_map) b ofs:=
| DMAPS df p:  dmap ! b = Some df -> df ofs = Some p -> deltaMap_cases dmap b ofs
| DNONE1 df:  dmap ! b = Some df -> df ofs = None -> deltaMap_cases dmap b ofs
| DNONE2:  dmap ! b = None -> deltaMap_cases dmap b ofs.

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.