src/ZF/Nat.thy
author paulson
Fri, 16 Feb 1996 18:00:47 +0100
changeset 1512 ce37c64244c0
parent 1478 2b8c2a7547ab
child 2469 b50b8c0eec01
permissions -rw-r--r--
Elimination of fully-functorial style. Type tactic changed to a type abbrevation (from a datatype). Constructor tactic and function apply deleted.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/Nat.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 124
diff changeset
     4
    Copyright   1994  University of Cambridge
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Natural numbers in Zermelo-Fraenkel Set Theory 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 124
diff changeset
     9
Nat = Ordinal + Bool + "mono" +
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
consts
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    11
    nat         ::      i
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    12
    nat_case    ::      [i, i=>i, i]=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    13
    nat_rec     ::      [i, i, [i,i]=>i]=>i
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
753
ec86863e87c8 replaced "rules" by "defs"
lcp
parents: 435
diff changeset
    15
defs
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
    nat_def     "nat == lfp(Inf, %X. {0} Un {succ(i). i:X})"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
    nat_case_def
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    20
        "nat_case(a,b,k) == THE y. k=0 & y=a | (EX x. k=succ(x) & y=b(x))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
    nat_rec_def
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    23
        "nat_rec(k,a,b) ==   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    24
          wfrec(Memrel(nat), k, %n f. nat_case(a, %m. b(m, f`m), n))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
end