(* SAFE FOR N STEPS *)
Definition safeN (p: program) (sk: state) (n: nat) : Prop :=
exists sk', stepN p sk n = Some sk'.

(* Specifications: *)
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).
Lemma safeN_less: forall p sk n1 n2, n1 <= n2 -> safeN p sk n2 -> safeN p sk n1.
Lemma safeN_step:
forall p sk sk' n, step p sk = Some sk' -> (safeN p sk (S n) <-> safeN p sk' n).