Definition step_info (a: A) : {b | step a = inl _ b} + {a' | step a = inr _ a' & ord a' a}.Definition iterate_F (a: A) (rec: forall a', ord a' a -> B) : B :=
  match step_info a with
  | inl (exist b P) => b
  | inr (exist2 a' P Q) => rec a' Q
  end.Definition iterate (a: A) : B := Fix ord_wf iterate_F a.

Lemma iterate_prop: forall a, P a -> Q (iterate a).