blob: 14990a24c5b0593e1e3c125ce636be1133f6c89a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Require Import Wf.
Section Well_founded.
Variable A : Set.
Variable R : A -> A -> Prop.
Hypothesis Rwf : well_founded R.
Section FixPoint.
Variable P : A -> Set.
Variable F_sub : forall x:A, (forall y: { y : A | R y x }, P (proj1_sig y)) -> P x.
Fixpoint Fix_F_sub (x : A) (r : Acc R x) {struct r} : P x :=
F_sub x (fun y: { y : A | R y x} => Fix_F_sub (proj1_sig y)
(Acc_inv r (proj1_sig y) (proj2_sig y))).
Definition Fix_sub (x : A) := Fix_F_sub x (Rwf x).
End FixPoint.
End Well_founded.
Check Fix_sub.
Notation "'forall' { x : A | P } , Q" :=
(forall x:{x:A|P}, (fun x => Q) (proj1_sig x))
(at level 200, x ident, right associativity).
|