author | berghofe |
Wed, 20 Feb 2002 15:58:38 +0100 | |
changeset 12907 | 27e6d344d724 |
parent 3837 | d7f033c74b38 |
child 17441 | 5b5feca0344a |
permissions | -rw-r--r-- |
1474 | 1 |
(* Title: CTT/bool |
0 | 2 |
ID: $Id$ |
1474 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
0 | 4 |
Copyright 1991 University of Cambridge |
5 |
||
6 |
The two-element type (booleans and conditionals) |
|
7 |
*) |
|
8 |
||
9 |
Bool = CTT + |
|
10 |
||
1474 | 11 |
consts Bool :: "t" |
12 |
true,false :: "i" |
|
13 |
cond :: "[i,i,i]=>i" |
|
0 | 14 |
rules |
1474 | 15 |
Bool_def "Bool == T+T" |
16 |
true_def "true == inl(tt)" |
|
17 |
false_def "false == inr(tt)" |
|
3837 | 18 |
cond_def "cond(a,b,c) == when(a, %u. b, %u. c)" |
0 | 19 |
end |