doc-src/Intro/bool_nat.thy
author bulwahn
Mon, 30 Nov 2009 08:44:08 +0100
changeset 33926 dd017d9db05f
parent 105 216d6ed87399
permissions -rw-r--r--
adding subsection about the predicate compiler to the code generator tutorial

BoolNat = Arith +
types   bool,nat    0
arities bool,nat    :: arith
consts  Suc         :: "nat=>nat"
rules   add0        "0 + n = n::nat"
        addS        "Suc(m)+n = Suc(m+n)"
        nat1        "1 = Suc(0)"
        or0l        "0 + x = x::bool"
        or0r        "x + 0 = x::bool"
        or1l        "1 + x = 1::bool"
        or1r        "x + 1 = 1::bool"
end