author | nipkow |
Wed, 25 Sep 2002 07:42:24 +0200 | |
changeset 13575 | ecb6ecd9af13 |
parent 11868 | 56db9f3a6b3e |
permissions | -rw-r--r-- |
5562
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
1 |
(* Title: Integ/Int.thy |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
2 |
ID: $Id$ |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
4 |
Copyright 1998 University of Cambridge |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
5 |
|
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
6 |
Type "int" is a linear order |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
7 |
*) |
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
8 |
|
13575 | 9 |
theory Int = IntDef |
10 |
files ("int.ML"): |
|
11 |
||
12 |
instance int :: order |
|
13 |
proof qed (assumption | rule zle_refl zle_trans zle_anti_sym int_less_le)+ |
|
5562
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
14 |
|
13575 | 15 |
instance int :: plus_ac0 |
16 |
proof qed (rule zadd_commute zadd_assoc zadd_0)+ |
|
17 |
||
18 |
instance int :: linorder |
|
19 |
proof qed (rule zle_linear) |
|
5562
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
20 |
|
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
21 |
constdefs |
13575 | 22 |
nat :: "int => nat" |
23 |
"nat(Z) == if neg Z then 0 else (THE m. Z = int m)" |
|
5562
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
24 |
|
13575 | 25 |
defs (overloaded) |
26 |
zabs_def: "abs(i::int) == if i < 0 then -i else i" |
|
27 |
||
28 |
use "int.ML" |
|
9214 | 29 |
|
5562
02261e6880d1
Renaming of Integ/Integ.* to Integ/Int.*, and renaming of related constants
paulson
parents:
diff
changeset
|
30 |
end |