src/HOL/Integ/Int.thy
author skalberg
Fri, 29 Aug 2003 18:39:47 +0200
changeset 14176 716fec31f9ea
parent 13588 07b66a557487
child 14264 3d0c6238162a
permissions -rw-r--r--
Added show_all_types flag, such that all type information in the term is made explicit.

(*  Title:      Integ/Int.thy
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1998  University of Cambridge

Type "int" is a linear order
*)

theory Int = IntDef
files ("Int_lemmas.ML"):

instance int :: order
proof qed (assumption | rule zle_refl zle_trans zle_anti_sym int_less_le)+

instance int :: plus_ac0
proof qed (rule zadd_commute zadd_assoc zadd_0)+

instance int :: linorder
proof qed (rule zle_linear)

constdefs
 nat  :: "int => nat"
"nat(Z) == if neg Z then 0 else (THE m. Z = int m)"

defs (overloaded)
zabs_def:  "abs(i::int) == if i < 0 then -i else i"

use "Int_lemmas.ML"

end