src/HOL/WF.thy
changeset 923 ff1574a81019
child 965 24eef3860714
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/WF.thy	Fri Mar 03 12:02:25 1995 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +(*  Title: 	HOL/wf.ML
     1.5 +    ID:         $Id$
     1.6 +    Author: 	Tobias Nipkow
     1.7 +    Copyright   1992  University of Cambridge
     1.8 +
     1.9 +Well-founded Recursion
    1.10 +*)
    1.11 +
    1.12 +WF = Trancl +
    1.13 +consts
    1.14 +   wf		:: "('a * 'a)set => bool"
    1.15 +   cut		:: "['a => 'b, ('a * 'a)set, 'a] => 'a => 'b"
    1.16 +   wftrec,wfrec	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b] => 'b"
    1.17 +   is_recfun	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b, 'a=>'b] => bool"
    1.18 +   the_recfun	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b] => 'a=>'b"
    1.19 +
    1.20 +defs
    1.21 +  wf_def  "wf(r) == (!P. (!x. (!y. <y,x>:r --> P(y)) --> P(x)) --> (!x.P(x)))"
    1.22 +  
    1.23 +  cut_def 	 "cut f r x == (%y. if (<y,x>:r) (f y) (@z.True))"
    1.24 +
    1.25 +  is_recfun_def  "is_recfun r a H f == (f = cut (%x.(H x (cut f r x))) r a)"
    1.26 +
    1.27 +  the_recfun_def "the_recfun r a H == (@f.is_recfun r a H f)"
    1.28 +
    1.29 +  wftrec_def     "wftrec r a H == H a (the_recfun r a H)"
    1.30 +
    1.31 +  (*version not requiring transitivity*)
    1.32 +  wfrec_def	"wfrec r a H == wftrec (trancl r) a (%x f.(H x (cut f r x)))"
    1.33 +end