Fixpoint composeOptN (A: Type) (f: A -> option A)
         (n: nat) (w: A) {struct n} : option A :=
 match n  with
 | S n' => match f w with Some w' => composeOptN A f n' w' | None => None end
 | O => Some w
 end.Definition ageN {A} `{ageable A}: nat -> A -> option A := composeOptN age1.

Lemma predicate_max: forall (F: nat -> Prop) (Fdec: forall n, {F n}+{~ F n}) n, F 0%nat -> ~ F n -> exists i, F i /\ (i<n)%nat /\ ~ F (S i).