It is possible to directly prove the induction principle going
back to primitive recursion on natural numbers (
induction_ltof1)
or to use the previous lemmas to extract a program with a fixpoint
(
induction_ltof2)
the ML-like program for
induction_ltof1 is :
let induction_ltof1 f F a =
let rec indrec n k =
match n with
| O -> error
| S m -> F k (indrec m)
in indrec (f a + 1) a
the ML-like program for
induction_ltof2 is :
let induction_ltof2 F a = indrec a
where rec indrec a = F a indrec;;
A constructive proof that any non empty decidable subset of
natural numbers has a least element