(** safety *)
Section safety.
Variable (state cont : Type).
Variable (step : state -> cont -> state -> cont -> Prop).
Notation star := (star step).
Notation stepN := (stepN step).
Definition safe s k := forall s2 k2,
star s k s2 k2 -> exists s', exists k', step s2 k2 s' k'.
Definition safeN s k := forall s2 k2 n,
stepN n s k s2 k2 -> exists s', exists k', step s2 k2 s' k'.

Lemma safe_safeN s k : safe s k <-> safeN s k.