doc-src/Intro/gate2.thy
author nipkow
Tue, 22 Mar 1994 08:24:14 +0100
changeset 288 b00ce6a1fe27
parent 105 216d6ed87399
permissions -rw-r--r--
Implemented "ordered rewriting": rules which merely permute variables, such as commutativity, are only applied if the term becaomes lexicographically smaller (according to some fixed ordering on the term structure).

Gate2 = FOL +
consts  "~&"     :: "[o,o] => o" (infixl 35)
        "#"      :: "[o,o] => o" (infixl 30)
        If       :: "[o,o,o] => o"       ("if _ then _ else _")
rules   nand_def "P ~& Q == ~(P & Q)"    
        xor_def  "P # Q  == P & ~Q | ~P & Q"
        If_def   "if P then Q else R == P&Q | ~P&R"
end