(** For compatibility with previous version *)
Definition linear_search start (b : before_witness start) : {n : nat | P n} :=
let (n, p) := linear_search_conform start b in exist _ n (rel_ls_post p).
(** Main definitions *)
Definition constructive_indefinite_ground_description_nat :
(exists n, P n) -> {n:nat | P n}.
(** Start at 0 *)
Definition linear_search_from_0 (e : exists n, P n) : nat :=
let b := let (n, p) := e in O_witness n (stop n p) in
prog_linear_search 0 b.

Lemma linear_search_from_0_rel (e : exists n, P n) :
rel_ls 0 (linear_search_from_0 e).