(** ** Backward simulation diagrams. *)
(** Various simulation diagrams that imply backward simulation. *)
Section BACKWARD_SIMU_DIAGRAMS.
Variable L1: semantics.
Variable L2: semantics.
Hypothesis public_preserved:
forall id, Senv.public_symbol (symbolenv L2) id = Senv.public_symbol (symbolenv L1) id.
Variable match_states: state L1 -> state L2 -> Prop.
Hypothesis initial_states_exist:
forall s1, initial_state L1 s1 -> exists s2, initial_state L2 s2.
Hypothesis match_initial_states:
forall s1 s2, initial_state L1 s1 -> initial_state L2 s2 ->
exists s1', initial_state L1 s1' /\ match_states s1' s2.
Hypothesis match_final_states:
forall s1 s2 r,
match_states s1 s2 -> final_state L2 s2 r -> final_state L1 s1 r.
Hypothesis progress:
forall s1 s2,
match_states s1 s2 -> safe L1 s1 ->
(exists r, final_state L2 s2 r) \/
(exists t, exists s2', Step L2 s2 t s2').
Section BACKWARD_SIMULATION_PLUS.
Hypothesis simulation:
forall s2 t s2', Step L2 s2 t s2' ->
forall s1, match_states s1 s2 -> safe L1 s1 ->
exists s1', Plus L1 s1 t s1' /\ match_states s1' s2'.

(* Specifications: *)
Lemma backward_simulation_plus: backward_simulation L1 L2.
End BACKWARD_SIMULATION_PLUS.