src/HOL/Integ/NatBin.thy
author nipkow
Mon, 06 Aug 2001 13:43:24 +0200
changeset 11464 ddea204de5bc
parent 10574 8f98f0301d67
child 11468 02cd5d5bc497
permissions -rw-r--r--
turned translation for 1::nat into def. introduced 1' and replaced most occurrences of 1 by 1'.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7032
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     1
(*  Title:      HOL/NatBin.thy
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     2
    ID:         $Id$
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     4
    Copyright   1999  University of Cambridge
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     5
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     6
Binary arithmetic for the natural numbers
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     7
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     8
This case is simply reduced to that for the non-negative integers
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
     9
*)
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    10
10574
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    11
theory NatBin = IntPower
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    12
files ("nat_bin.ML"):
7032
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    13
10574
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    14
instance  nat :: number ..
7032
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    15
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    16
defs
10574
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    17
  nat_number_of_def:
7032
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    18
    "number_of v == nat (number_of v)"
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    19
     (*::bin=>nat        ::bin=>int*)
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    20
11464
ddea204de5bc turned translation for 1::nat into def.
nipkow
parents: 10574
diff changeset
    21
axioms
ddea204de5bc turned translation for 1::nat into def.
nipkow
parents: 10574
diff changeset
    22
neg_number_of_bin_pred_iff_0:
ddea204de5bc turned translation for 1::nat into def.
nipkow
parents: 10574
diff changeset
    23
  "neg (number_of (bin_pred v)) = (number_of v = (0::nat))"
ddea204de5bc turned translation for 1::nat into def.
nipkow
parents: 10574
diff changeset
    24
10574
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    25
use "nat_bin.ML"	setup nat_bin_arith_setup
8f98f0301d67 Linear arithmetic now copes with mixed nat/int formulae.
nipkow
parents: 9509
diff changeset
    26
7032
d6efb3b8e669 NatBin: binary arithmetic for the naturals
paulson
parents:
diff changeset
    27
end