src/HOL/WF.thy
author clasohm
Fri Mar 03 12:02:25 1995 +0100 (1995-03-03)
changeset 923 ff1574a81019
child 965 24eef3860714
permissions -rw-r--r--
new version of HOL with curried function application
clasohm@923
     1
(*  Title: 	HOL/wf.ML
clasohm@923
     2
    ID:         $Id$
clasohm@923
     3
    Author: 	Tobias Nipkow
clasohm@923
     4
    Copyright   1992  University of Cambridge
clasohm@923
     5
clasohm@923
     6
Well-founded Recursion
clasohm@923
     7
*)
clasohm@923
     8
clasohm@923
     9
WF = Trancl +
clasohm@923
    10
consts
clasohm@923
    11
   wf		:: "('a * 'a)set => bool"
clasohm@923
    12
   cut		:: "['a => 'b, ('a * 'a)set, 'a] => 'a => 'b"
clasohm@923
    13
   wftrec,wfrec	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b] => 'b"
clasohm@923
    14
   is_recfun	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b, 'a=>'b] => bool"
clasohm@923
    15
   the_recfun	:: "[('a * 'a)set, 'a, ['a,'a=>'b]=>'b] => 'a=>'b"
clasohm@923
    16
clasohm@923
    17
defs
clasohm@923
    18
  wf_def  "wf(r) == (!P. (!x. (!y. <y,x>:r --> P(y)) --> P(x)) --> (!x.P(x)))"
clasohm@923
    19
  
clasohm@923
    20
  cut_def 	 "cut f r x == (%y. if (<y,x>:r) (f y) (@z.True))"
clasohm@923
    21
clasohm@923
    22
  is_recfun_def  "is_recfun r a H f == (f = cut (%x.(H x (cut f r x))) r a)"
clasohm@923
    23
clasohm@923
    24
  the_recfun_def "the_recfun r a H == (@f.is_recfun r a H f)"
clasohm@923
    25
clasohm@923
    26
  wftrec_def     "wftrec r a H == H a (the_recfun r a H)"
clasohm@923
    27
clasohm@923
    28
  (*version not requiring transitivity*)
clasohm@923
    29
  wfrec_def	"wfrec r a H == wftrec (trancl r) a (%x f.(H x (cut f r x)))"
clasohm@923
    30
end