author | wenzelm |
Sun, 30 Jul 2000 13:02:14 +0200 | |
changeset 9473 | 7d13a5ace928 |
parent 8856 | 435187ffc64e |
child 10834 | a7897aebbffc |
permissions | -rw-r--r-- |
5078 | 1 |
(* Title : PNat.thy |
7219 | 2 |
ID : $Id$ |
5078 | 3 |
Author : Jacques D. Fleuriot |
4 |
Copyright : 1998 University of Cambridge |
|
5 |
Description : The positive naturals |
|
6 |
*) |
|
7 |
||
8 |
||
8856 | 9 |
PNat = Main + |
5078 | 10 |
|
11 |
typedef |
|
12 |
pnat = "lfp(%X. {1} Un (Suc``X))" (lfp_def) |
|
13 |
||
14 |
instance |
|
15 |
pnat :: {ord, plus, times} |
|
16 |
||
17 |
consts |
|
18 |
||
19 |
pSuc :: pnat => pnat |
|
20 |
"1p" :: pnat ("1p") |
|
21 |
||
22 |
constdefs |
|
23 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
24 |
pnat_of_nat :: nat => pnat |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
25 |
"pnat_of_nat n == Abs_pnat(n + 1)" |
5078 | 26 |
|
27 |
defs |
|
28 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
29 |
pnat_one_def |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
30 |
"1p == Abs_pnat(1)" |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
31 |
pnat_Suc_def |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
32 |
"pSuc == (%n. Abs_pnat(Suc(Rep_pnat(n))))" |
5078 | 33 |
|
34 |
pnat_add_def |
|
35 |
"x + y == Abs_pnat(Rep_pnat(x) + Rep_pnat(y))" |
|
36 |
||
37 |
pnat_mult_def |
|
38 |
"x * y == Abs_pnat(Rep_pnat(x) * Rep_pnat(y))" |
|
39 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
40 |
pnat_less_def |
5078 | 41 |
"x < (y::pnat) == Rep_pnat(x) < Rep_pnat(y)" |
42 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
43 |
pnat_le_def |
5078 | 44 |
"x <= (y::pnat) == ~(y < x)" |
45 |
||
46 |
end |