(* SAFE FOR N STEPS *)

Definition safeN (p: program) (sk: state) (n: nat) : Prop :=
   exists sk', stepN p sk n = Some sk'.

Lemma stepN_plus: forall p sk1 n1 n2 sk3, stepN p sk1 (n1+n2) = Some sk3 <-> (exists sk2, stepN p sk1 n1 = Some sk2 /\ stepN p sk2 n2 = Some sk3).