Inductive ev_plus ge: state -> mem -> _ -> state -> mem -> Prop :=
| ev_plus_left: forall s1 m1 ev1 s2 m2 ev2 s3 m3,
ev_step (CLC_evsem ge) s1 m1 ev1 s2 m2 -> ev_star ge s2 m2 ev2 s3 m3 ->
ev_plus ge s1 m1 (ev1 ++ ev2) s3 m3.

(* Specifications: *)
Lemma ev_plus_one:
forall ge s1 m1 ev s2 m2, ev_step (CLC_evsem ge) s1 m1 ev s2 m2 -> ev_plus ge s1 m1 ev s2 m2.
Lemma ev_plus_two:
forall ge s1 m1 ev1 s2 m2 ev2 s3 m3,
ev_step (CLC_evsem ge) s1 m1 ev1 s2 m2 -> ev_step (CLC_evsem ge) s2 m2 ev2 s3 m3 ->
ev_plus ge s1 m1 (ev1 ++ ev2) s3 m3.
Lemma ev_plus_star: forall ge s1 m1 ev s2 m2, ev_plus ge s1 m1 ev s2 m2 -> ev_star ge s1 m1 ev s2 m2.
Lemma ev_plus_trans:
forall ge {s1 m1 ev1 s2 m2}, ev_plus ge s1 m1 ev1 s2 m2 ->
forall {ev2 s3 m3}, ev_plus ge s2 m2 ev2 s3 m3 -> ev_plus ge s1 m1 (ev1 ++ ev2) s3 m3.
Lemma ev_star_plus_trans:
forall ge {s1 m1 ev1 s2 m2}, ev_star ge s1 m1 ev1 s2 m2 ->
forall {ev2 s3 m3}, ev_plus ge s2 m2 ev2 s3 m3 -> ev_plus ge s1 m1 (ev1 ++ ev2) s3 m3.
Lemma ev_plus_star_trans:
forall ge {s1 m1 ev1 s2 m2}, ev_plus ge s1 m1 ev1 s2 m2 ->
forall {ev2 s3 m3}, ev_star ge s2 m2 ev2 s3 m3 -> ev_plus ge s1 m1 (ev1 ++ ev2) s3 m3.
Lemma exec_skipsT:
forall ge {s0 k s k'}
(H1: match_cont (Kseq s0 :: k) (strip_skip' (CC.Kseq s k')))
f ve te m mm,
match s0 with Sskip => False | Scontinue => False | Sloop _ _ => False
| Sifthenelse _ _ _ => False | Sreturn _ => False
| _ => True end ->
exists k2 mm', strip_skip' (CC.Kseq s k') = CC.Kseq s0 k2 /\
ev_star ge (CC.State f s k' ve te mm) m nil (CC.State f s0 k2 ve te mm') m.
Lemma strip_evstep:
forall ge ve te k m T st' m',
cl_evstep ge (State ve te (strip_skip k)) m T st' m' <->
cl_evstep ge (State ve te k) m T st' m'.
Lemma ev_strip_skip'_loop1:
forall ge f ve te m a3 s k1 k mm, CC.Kloop1 a3 s k1 = strip_skip' k ->
exists mm', ev_star ge (CC.State f Sskip k ve te mm) m nil (CC.State f Sskip (CC.Kloop1 a3 s k1) ve te mm') m.
Lemma evstrip_skip'_loop2:
forall ge f ve te m a3 s k1 k mm, CC.Kloop2 a3 s k1 = strip_skip' k ->
exists mm', ev_star ge (CC.State f Sskip k ve te mm) m nil (CC.State f Sskip (CC.Kloop2 a3 s k1) ve te mm') m.
Lemma evstrip_skip'_call:
forall ge f ve te m lid f' ve' te' k1 k mm, CC.Kcall lid f' ve' te' k1 = strip_skip' k ->
exists mm', ev_star ge (CC.State f Sskip k ve te mm) m nil (CC.State f Sskip (CC.Kcall lid f' ve' te' k1) ve te mm') m.
Lemma evexec_skips':
forall ge f s k' s0 k0' ve te m mm,
strip_skip' (CC.Kseq s k') = CC.Kseq s0 k0' ->
exists mm', ev_star ge (CC.State f s k' ve te mm) m nil (CC.State f s0 k0' ve te mm') m.
Lemma evstep_continue_strip:
forall ge f k ve te m,
ev_star ge (CC.State f Scontinue k ve te m) m nil
(CC.State f Scontinue (strip_skip' k) ve te m) m.
Lemma break_evstrip:
forall ge f ve te m k mm,
exists mm', ev_star ge (CC.State f Sbreak k ve te mm) m nil (CC.State f Sbreak (strip_skip' k) ve te mm') m.
Lemma Clight_new_ev_sim : forall ge c1 m ev c1' m',
event_semantics.ev_step (@semSem (Clight_newSem ge)) c1 m ev c1' m' ->
forall c2, match_states c1 (fst (CC'.CC_state_to_CC_core c2)) ->
exists c2', ev_plus ge c2 m ev c2' m' /\
match_states c1' (fst (CC'.CC_state_to_CC_core c2')).