author | kleing |
Tue, 13 May 2003 08:59:21 +0200 | |
changeset 14024 | 213dcc39358f |
parent 12018 | ec054019c910 |
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 |
|
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11464
diff
changeset
|
12 |
pnat = "lfp(%X. {Suc 0} Un Suc`X)" (lfp_def) |
5078 | 13 |
|
14 |
instance |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11701
diff
changeset
|
15 |
pnat :: {ord, one, plus, times} |
5078 | 16 |
|
17 |
consts |
|
18 |
||
19 |
pSuc :: pnat => pnat |
|
20 |
||
21 |
constdefs |
|
22 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
23 |
pnat_of_nat :: nat => pnat |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
24 |
"pnat_of_nat n == Abs_pnat(n + 1)" |
5078 | 25 |
|
26 |
defs |
|
27 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
28 |
pnat_one_def |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11701
diff
changeset
|
29 |
"1 == Abs_pnat(Suc 0)" |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
30 |
pnat_Suc_def |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
31 |
"pSuc == (%n. Abs_pnat(Suc(Rep_pnat(n))))" |
5078 | 32 |
|
33 |
pnat_add_def |
|
34 |
"x + y == Abs_pnat(Rep_pnat(x) + Rep_pnat(y))" |
|
35 |
||
36 |
pnat_mult_def |
|
37 |
"x * y == Abs_pnat(Rep_pnat(x) * Rep_pnat(y))" |
|
38 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
39 |
pnat_less_def |
5078 | 40 |
"x < (y::pnat) == Rep_pnat(x) < Rep_pnat(y)" |
41 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5078
diff
changeset
|
42 |
pnat_le_def |
5078 | 43 |
"x <= (y::pnat) == ~(y < x)" |
44 |
||
45 |
end |