src/HOL/WF.thy
author paulson
Wed, 13 Jan 1999 12:08:18 +0100
changeset 6113 b321f5aaa5f4
parent 3947 eb707467f8c5
child 8882 9df44a4f1bf7
permissions -rw-r--r--
generalized qed_spec_mp code to work for ZF
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1475
7f5a4cd08209 expanded tabs; renamed subtype to typedef;
clasohm
parents: 1276
diff changeset
     1
(*  Title:      HOL/wf.ML
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1475
7f5a4cd08209 expanded tabs; renamed subtype to typedef;
clasohm
parents: 1276
diff changeset
     3
    Author:     Tobias Nipkow
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     5
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     6
Well-founded Recursion
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     7
*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     8
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     9
WF = Trancl +
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    10
3947
eb707467f8c5 adapted to qualified names;
wenzelm
parents: 3842
diff changeset
    11
global
eb707467f8c5 adapted to qualified names;
wenzelm
parents: 3842
diff changeset
    12
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    13
constdefs
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    14
  wf         :: "('a * 'a)set => bool"
3842
b55686a7b22c fixed dots;
wenzelm
parents: 3413
diff changeset
    15
  "wf(r) == (!P. (!x. (!y. (y,x):r --> P(y)) --> P(x)) --> (!x. P(x)))"
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    16
3413
c1f63cc3a768 Finite.ML Finite.thy: Replaced `finite subset of' by mere `finite'.
nipkow
parents: 3320
diff changeset
    17
  acyclic :: "('a*'a)set => bool"
c1f63cc3a768 Finite.ML Finite.thy: Replaced `finite subset of' by mere `finite'.
nipkow
parents: 3320
diff changeset
    18
  "acyclic r == !x. (x,x) ~: r^+"
c1f63cc3a768 Finite.ML Finite.thy: Replaced `finite subset of' by mere `finite'.
nipkow
parents: 3320
diff changeset
    19
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    20
  cut        :: "('a => 'b) => ('a * 'a)set => 'a => 'a => 'b"
3320
3a5e4930fb77 Added `arbitrary'
nipkow
parents: 1558
diff changeset
    21
  "cut f r x == (%y. if (y,x):r then f y else arbitrary)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    22
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    23
  is_recfun  :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) =>'a=>('a=>'b) => bool"
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    24
  "is_recfun r H a f == (f = cut (%x. H (cut f r x) x) r a)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    25
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    26
  the_recfun :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) => 'a => 'a => 'b"
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    27
  "the_recfun r H a  == (@f. is_recfun r H a f)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    28
1558
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    29
  wfrec      :: "('a * 'a)set => (('a=>'b) => ('a=>'b)) => 'a => 'b"
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    30
  "wfrec r H == (%x. H (cut (the_recfun (trancl r) (%f v. H (cut f r v) v) x)
9c6ebfab4e05 added constdefs section
clasohm
parents: 1475
diff changeset
    31
                            r x)  x)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    32
3947
eb707467f8c5 adapted to qualified names;
wenzelm
parents: 3842
diff changeset
    33
local
eb707467f8c5 adapted to qualified names;
wenzelm
parents: 3842
diff changeset
    34
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    35
end