Section Efficient_Rec.
(** [natlike_rec2] is the same as [natlike_rec], but with a different proof, designed to give a better extracted term. *)
Let R (a b:Z) := 0 <= a /\ a < b.
Local Definition R_wf : well_founded R.
(** A variant of the previous using [Z.pred] instead of [Z.succ]. *)

(* Specifications: *)
Lemma natlike_rec3 :
forall P:Z -> Type,
P 0 ->
(forall z:Z, 0 < z -> P (Z.pred z) -> P z) ->
forall z:Z, 0 <= z -> P z.