src/HOL/WF.thy
author clasohm
Mon Feb 05 21:27:16 1996 +0100 (1996-02-05)
changeset 1475 7f5a4cd08209
parent 1276 42ccfd3e1fb4
child 1558 9c6ebfab4e05
permissions -rw-r--r--
expanded tabs; renamed subtype to typedef;
incorporated Konrad's changes
     1 (*  Title:      HOL/wf.ML
     2     ID:         $Id$
     3     Author:     Tobias Nipkow
     4     Copyright   1992  University of Cambridge
     5 
     6 Well-founded Recursion
     7 *)
     8 
     9 WF = Trancl +
    10 consts
    11  wf         :: "('a * 'a)set => bool"
    12  cut        :: "('a => 'b) => ('a * 'a)set => 'a => 'a => 'b"
    13  is_recfun  :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) =>'a=>('a=>'b) => bool"
    14  the_recfun :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) => 'a => 'a => 'b"
    15  wfrec      :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) => 'a => 'b"
    16 
    17 defs
    18   wf_def  "wf(r) == (!P. (!x. (!y. (y,x):r --> P(y)) --> P(x)) --> (!x.P(x)))"
    19   
    20   cut_def        "cut f r x == (%y. if (y,x):r then f y else @z.True)"
    21 
    22   is_recfun_def  "is_recfun r H a f == (f = cut (%x. H (cut f r x) x) r a)"
    23 
    24   the_recfun_def "the_recfun r H a  == (@f. is_recfun r H a f)"
    25 
    26   wfrec_def
    27     "wfrec r H == (%x. H (cut (the_recfun (trancl r) (%f v. H (cut f r v) v) x)
    28                               r x)  x)"
    29 end