Hint Constructors context contextlist.
Hint Resolve context_compose contextlist_compose.
(** * Safe executions. *)
(** A state is safe according to the nondeterministic semantics if it cannot get stuck by doing silent transitions only. *)
Definition safe (s: Csem.state) : Prop :=
forall s', star Csem.step ge s E0 s' ->
(exists r, final_state s' r) \/ (exists t, exists s'', Csem.step ge s' t s'').

Lemma safe_steps:
forall s s',
safe s -> star Csem.step ge s E0 s' -> safe s'.