Let iter (x: positive) (P: forall y, Plt y x -> A) : A :=
match peq x xH with
| left EQ => v1
| right NOTEQ => f (Pos.pred x) (P (Pos.pred x) (Ppred_Plt x NOTEQ))
end.
Definition positive_rec : positive -> A :=
Fix Plt_wf (fun _ => A) iter.

(* Specifications: *)
Lemma unroll_positive_rec:
forall x,
positive_rec x = iter x (fun y _ => positive_rec y).
Lemma positive_rec_base:
positive_rec 1%positive = v1.
Lemma positive_rec_succ:
forall x, positive_rec (Pos.succ x) = f x (positive_rec x).
Lemma positive_Peano_ind:
forall (P: positive -> Prop),
P xH ->
(forall x, P x -> P (Pos.succ x)) ->
forall x, P x.