src/HOL/Nat.thy
author paulson
Sat, 07 Feb 1998 14:38:57 +0100
changeset 4609 b435c5a320b0
parent 4104 84433b1ab826
child 4613 67a726003cf8
permissions -rw-r--r--
AC and other rewrite rules for Un and Int

(*  Title:      HOL/Nat.thy
    ID:         $Id$
    Author:     Tobias Nipkow
    Copyright   1997 TU Muenchen

Nat is a partial order
*)

Nat = NatDef +

(*install 'automatic' induction tactic, pretending nat is a datatype
  except for induct_tac and exhaust_tac, everything is dummy*)

MLtext {|
|> Dtype.add_datatype_info
("nat", {case_const = Bound 0, case_rewrites = [],
  constructors = [], induct_tac = nat_ind_tac,
  exhaustion = natE,
  exhaust_tac = fn v => ALLNEWSUBGOALS (res_inst_tac [("n",v)] natE)
                                       (rotate_tac ~1),
  nchotomy = ProtoPure.flexpair_def, case_cong = ProtoPure.flexpair_def})
|}


instance nat :: order (le_refl,le_trans,le_anti_sym,nat_less_le)

consts
  "^"           :: ['a::power,nat] => 'a            (infixr 80)

end