1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: Well_Ordering.v 9598 2007-02-06 19:45:52Z herbelin $ i*)
11
(** Author: Cristina Cornes.
12
From: Constructing Recursion Operators in Type Theory
13
L. Paulson JSC (1986) 2, 325-355 *)
19
Variable B : A -> Type.
21
Inductive WO : Type :=
22
sup : forall (a:A) (f:B a -> WO), WO.
25
Inductive le_WO : WO -> WO -> Prop :=
26
le_sup : forall (a:A) (f:B a -> WO) (v:B a), le_WO (f v) (sup a f).
28
Theorem wf_WO : well_founded le_WO.
30
unfold well_founded in |- *; intro.
36
generalize H4; generalize H1; generalize f0; generalize v.
41
intros E; rewrite E; auto.
43
apply (inj_pair2 A (fun a0:A => B a0 -> WO) a0 f1 f H5).
49
Section Characterisation_wf_relations.
51
(** Wellfounded relations are the inverse image of wellordering types *)
52
(* in course of development *)
56
Variable leA : A -> A -> Prop.
58
Definition B (a:A) := {x : A | leA x a}.
60
Definition wof : well_founded leA -> A -> WO A B.
63
apply (well_founded_induction_type H (fun a:A => WO A B)); auto.
66
unfold B at 1 in |- *.
71
End Characterisation_wf_relations.