(** * Definition and properties of deterministic semantics *)
Record sem_deterministic (L: semantics) := mk_deterministic {
det_step: forall s0 t1 s1 t2 s2,
Step L s0 t1 s1 -> Step L s0 t2 s2 -> s1 = s2 /\ t1 = t2;
det_initial_state: forall s1 s2,
initial_state L s1 -> initial_state L s2 -> s1 = s2;
det_final_state: forall s r1 r2,
final_state L s r1 -> final_state L s r2 -> r1 = r2;
det_final_nostep: forall s r,
final_state L s r -> Nostep L s
}.
Section DETERM_SEM.
Variable L: semantics.
Hypothesis DET: sem_deterministic L.
Ltac use_step_deterministic :=
match goal with
| [ S1: Step ?L _ ?t1 _, S2: Step ?L _ ?t2 _ |- _ ] =>
destruct (det_step _ DET _ _ _ _ _ S1 S2) as [EQ1 EQ2]; subst
end.
(** Determinism for finite transition sequences. *)

Lemma star_step_diamond:
forall s0 t1 s1, Star L s0 t1 s1 ->
forall t2 s2, Star L s0 t2 s2 ->
exists t,
(Star L s1 t s2 /\ t2 = t1 ** t)
\/ (Star L s2 t s1 /\ t1 = t2 ** t).