src/HOL/Nat.thy
author paulson
Fri, 17 Jul 1998 10:50:01 +0200
changeset 5154 40fd46f3d3a1
parent 4640 ac6cf9f18653
child 5188 633ec5f6c155
permissions -rw-r--r--
tidying

(*  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 => (res_inst_tac [("n",v)] natE)
                        THEN_ALL_NEW (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)
instance nat :: linorder (nat_le_linear)

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

end