| author | wenzelm | 
| Sat, 25 Sep 1999 13:05:38 +0200 | |
| changeset 7596 | c97c3ad15d2e | 
| parent 7562 | 8519d5019309 | 
| child 8856 | 435187ffc64e | 
| 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 | ||
| 9 | PNat = Arith + | |
| 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: 
5078diff
changeset | 24 | pnat_of_nat :: nat => pnat | 
| 
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
 paulson parents: 
5078diff
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: 
5078diff
changeset | 29 | pnat_one_def | 
| 
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
 paulson parents: 
5078diff
changeset | 30 | "1p == Abs_pnat(1)" | 
| 
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
 paulson parents: 
5078diff
changeset | 31 | pnat_Suc_def | 
| 
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
 paulson parents: 
5078diff
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: 
5078diff
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: 
5078diff
changeset | 43 | pnat_le_def | 
| 5078 | 44 | "x <= (y::pnat) == ~(y < x)" | 
| 45 | ||
| 46 | end |