1478
|
1 |
(* Title: ZF/Nat.thy
|
0
|
2 |
ID: $Id$
|
1478
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
435
|
4 |
Copyright 1994 University of Cambridge
|
0
|
5 |
|
|
6 |
Natural numbers in Zermelo-Fraenkel Set Theory
|
|
7 |
*)
|
|
8 |
|
2469
|
9 |
Nat = OrdQuant + Bool + mono +
|
0
|
10 |
|
12789
|
11 |
constdefs
|
|
12 |
nat :: i
|
|
13 |
"nat == lfp(Inf, %X. {0} Un {succ(i). i:X})"
|
0
|
14 |
|
12789
|
15 |
nat_case :: "[i, i=>i, i]=>i"
|
|
16 |
"nat_case(a,b,k) == THE y. k=0 & y=a | (EX x. k=succ(x) & y=b(x))"
|
0
|
17 |
|
12789
|
18 |
nat_rec :: "[i, i, [i,i]=>i]=>i"
|
|
19 |
"nat_rec(k,a,b) ==
|
1478
|
20 |
wfrec(Memrel(nat), k, %n f. nat_case(a, %m. b(m, f`m), n))"
|
0
|
21 |
|
12789
|
22 |
(*Internalized relations on the naturals*)
|
|
23 |
|
|
24 |
Le :: i
|
|
25 |
"Le == {<x,y>:nat*nat. x le y}"
|
|
26 |
|
|
27 |
Lt :: i
|
|
28 |
"Lt == {<x, y>:nat*nat. x < y}"
|
|
29 |
|
|
30 |
Ge :: i
|
|
31 |
"Ge == {<x,y>:nat*nat. y le x}"
|
|
32 |
|
|
33 |
Gt :: i
|
|
34 |
"Gt == {<x,y>:nat*nat. y < x}"
|
|
35 |
|
|
36 |
less_than :: i=>i
|
|
37 |
"less_than(n) == {i:nat. i<n}"
|
|
38 |
|
|
39 |
greater_than :: i=>i
|
|
40 |
"greater_than(n) == {i:nat. n < i}"
|
|
41 |
|
0
|
42 |
end
|