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
     1 (*  Title: 	ZF/bool.thy
     2     ID:         $Id$
     3     Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1992  University of Cambridge
     5 
     6 Booleans in Zermelo-Fraenkel Set Theory 
     7 
     8 2 is equal to bool, but serves a different purpose
     9 *)
    10 
    11 Bool = ZF + "simpdata" +
    12 consts
    13     "1"		:: "i"     	   ("1")
    14     "2"         :: "i"             ("2")
    15     bool        :: "i"
    16     cond        :: "[i,i,i]=>i"
    17     not		:: "i=>i"
    18     "and"       :: "[i,i]=>i"      (infixl 70)
    19     or		:: "[i,i]=>i"      (infixl 65)
    20     xor		:: "[i,i]=>i"      (infixl 65)
    21 
    22 translations
    23    "1"  == "succ(0)"
    24    "2"  == "succ(1)"
    25 
    26 defs
    27     bool_def	"bool == {0,1}"
    28     cond_def	"cond(b,c,d) == if(b=1,c,d)"
    29     not_def	"not(b) == cond(b,0,1)"
    30     and_def	"a and b == cond(a,b,0)"
    31     or_def	"a or b == cond(a,1,b)"
    32     xor_def	"a xor b == cond(a,not(b),b)"
    33 end