Definition rel X := X -> X -> Prop.Inductive safeN : nat -> X -> Prop :=
  | safeO : forall x, safeN 0 x
  | safeS : forall n x x', R x x' -> safeN n x' -> safeN (S n) x.Inductive safeN : nat -> X -> Prop :=
  | safeO : forall x, safeN 0 x
  | safeS : forall n x x', R x x' -> safeN n x' -> safeN (S n) x.Inductive safeN : nat -> X -> Prop :=
  | safeO : forall x, safeN 0 x
  | safeS : forall n x x', R x x' -> safeN n x' -> safeN (S n) x.Definition safeN' n f : Prop := forall i, i < n -> R (f i) (f (1 + i)).

(* Specifications: *)
Lemma safeN_safeN' n x : safeN n x <-> (exists f, f 0 = x /\ safeN' n f).