author | wenzelm |
Tue, 27 Apr 1999 15:10:36 +0200 | |
changeset 6526 | 6b64d1454ee3 |
parent 5714 | b4f2e281a907 |
child 7702 | 35c7e0df749f |
permissions | -rw-r--r-- |
923 | 1 |
(* Title: HOL/Nat.thy |
2 |
ID: $Id$ |
|
2608 | 3 |
Author: Tobias Nipkow |
4 |
Copyright 1997 TU Muenchen |
|
923 | 5 |
|
5499 | 6 |
Type "nat" is a linear order, and a datatype |
923 | 7 |
*) |
8 |
||
5188
633ec5f6c155
Declaration of type 'nat' as a datatype (this allows usage of
berghofe
parents:
4640
diff
changeset
|
9 |
Nat = NatDef + Inductive + |
923 | 10 |
|
5188
633ec5f6c155
Declaration of type 'nat' as a datatype (this allows usage of
berghofe
parents:
4640
diff
changeset
|
11 |
setup |
633ec5f6c155
Declaration of type 'nat' as a datatype (this allows usage of
berghofe
parents:
4640
diff
changeset
|
12 |
DatatypePackage.setup |
4104 | 13 |
|
5188
633ec5f6c155
Declaration of type 'nat' as a datatype (this allows usage of
berghofe
parents:
4640
diff
changeset
|
14 |
rep_datatype nat |
5714 | 15 |
distinct Suc_not_Zero, Zero_not_Suc |
16 |
inject Suc_Suc_eq |
|
5188
633ec5f6c155
Declaration of type 'nat' as a datatype (this allows usage of
berghofe
parents:
4640
diff
changeset
|
17 |
induct nat_induct |
4104 | 18 |
|
2608 | 19 |
instance nat :: order (le_refl,le_trans,le_anti_sym,nat_less_le) |
4640 | 20 |
instance nat :: linorder (nat_le_linear) |
1660 | 21 |
|
3370
5c5fdce3a4e4
Overloading of "^" requires new type class "power", with types "nat" and
paulson
parents:
2608
diff
changeset
|
22 |
consts |
5c5fdce3a4e4
Overloading of "^" requires new type class "power", with types "nat" and
paulson
parents:
2608
diff
changeset
|
23 |
"^" :: ['a::power,nat] => 'a (infixr 80) |
5c5fdce3a4e4
Overloading of "^" requires new type class "power", with types "nat" and
paulson
parents:
2608
diff
changeset
|
24 |
|
923 | 25 |
end |