Fixpoint ageN (n : nat) (p1 p2 : prog) : Prop :=
  match n with
   | 0 => p1 = p2
   | S n' => exists p', age p1 p' /\ ageN n' p' p2
  end.

(* Specifications: *)
Lemma ageN_det: forall n p1 p2 p2', ageN n p1 p2 -> ageN n p1 p2' -> p2 = p2'.
Lemma ageN_necR: forall p1 p2, (exists n, ageN n p1 p2) = necR p1 p2.
Lemma ageN_level: forall n p1 p2, ageN n p1 p2 -> level p1 = level p2 + n.
Lemma ageN_det: forall n p1 p2 p2', ageN n p1 p2 -> ageN n p1 p2' -> p2 = p2'.
Lemma ageN_necR: forall p1 p2, (exists n, ageN n p1 p2) = necR p1 p2.
Lemma ageN_level: forall n p1 p2, ageN n p1 p2 -> level p1 = level p2 + n.