src/HOL/Numeral.thy
author wenzelm
Wed, 08 Aug 2001 17:38:29 +0200
changeset 11488 4ff900551340
parent 9410 612ee826a409
child 11699 c7df55158574
permissions -rw-r--r--
constify numeral tokens in order to allow translations;

(*  Title:      HOL/Numeral.thy
    ID:         $Id$
    Author:     Larry Paulson and Markus Wenzel

Generic numerals represented as twos-complement bit strings.
*)

theory Numeral = Datatype
files "Tools/numeral_syntax.ML":

datatype
  bin = Pls
      | Min
      | Bit bin bool    (infixl "BIT" 90)

axclass
  number < "term"      (*for numeric types: nat, int, real, ...*)

consts
  number_of :: "bin => 'a::number"

nonterminals
  numeral

syntax
  "_constify" :: "xnum => numeral"    ("_")
  "_Numeral" :: "numeral => 'a"    ("_")


setup NumeralSyntax.setup

end