src/ZF/Bool.thy
author lcp
Fri Dec 23 16:49:48 1994 +0100 (1994-12-23 ago)
changeset 837 778f01546669
parent 799 13aa1e3d8a3a
child 1401 0c439768f45c
permissions -rw-r--r--
Re-indented declarations; declared the number 2
clasohm@0
     1
(*  Title: 	ZF/bool.thy
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
clasohm@0
     4
    Copyright   1992  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Booleans in Zermelo-Fraenkel Set Theory 
lcp@837
     7
lcp@837
     8
2 is equal to bool, but serves a different purpose
clasohm@0
     9
*)
clasohm@0
    10
clasohm@124
    11
Bool = ZF + "simpdata" +
clasohm@0
    12
consts
lcp@837
    13
    "1"		:: "i"     	   ("1")
lcp@837
    14
    "2"         :: "i"             ("2")
lcp@837
    15
    bool        :: "i"
lcp@837
    16
    cond        :: "[i,i,i]=>i"
lcp@837
    17
    not		:: "i=>i"
lcp@837
    18
    "and"       :: "[i,i]=>i"      (infixl 70)
lcp@837
    19
    or		:: "[i,i]=>i"      (infixl 65)
lcp@837
    20
    xor		:: "[i,i]=>i"      (infixl 65)
clasohm@0
    21
lcp@14
    22
translations
lcp@14
    23
   "1"  == "succ(0)"
lcp@837
    24
   "2"  == "succ(1)"
lcp@14
    25
lcp@753
    26
defs
clasohm@0
    27
    bool_def	"bool == {0,1}"
clasohm@0
    28
    cond_def	"cond(b,c,d) == if(b=1,c,d)"
clasohm@0
    29
    not_def	"not(b) == cond(b,0,1)"
clasohm@0
    30
    and_def	"a and b == cond(a,b,0)"
clasohm@0
    31
    or_def	"a or b == cond(a,1,b)"
clasohm@0
    32
    xor_def	"a xor b == cond(a,not(b),b)"
clasohm@0
    33
end