doc-src/Intro/bool_nat.thy
author paulson
Tue, 10 Feb 2004 12:02:11 +0100
changeset 14378 69c4d5997669
parent 105 216d6ed87399
permissions -rw-r--r--
generic of_nat and of_int functions, and generalization of iszero and neg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
105
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     1
BoolNat = Arith +
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     2
types   bool,nat    0
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     3
arities bool,nat    :: arith
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     4
consts  Suc         :: "nat=>nat"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     5
rules   add0        "0 + n = n::nat"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     6
        addS        "Suc(m)+n = Suc(m+n)"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     7
        nat1        "1 = Suc(0)"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     8
        or0l        "0 + x = x::bool"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
     9
        or0r        "x + 0 = x::bool"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
    10
        or1l        "1 + x = 1::bool"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
    11
        or1r        "x + 1 = 1::bool"
216d6ed87399 Initial revision
lcp
parents:
diff changeset
    12
end