blob: c8e62fd846a34cac03615dc7fb289d8accbf9f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
def not : bool -> bool :=
\x -> bool-elim x at _ -> bool [
true => false,
false => true
]
def and : bool -> bool -> bool :=
\x -> \y -> bool-elim x at _ -> bool [
true => bool-elim y at _ -> bool [
true => true,
false => false
],
false => false
]
def or : bool -> bool -> bool :=
\x -> \y -> bool-elim x at _ -> bool [
true => true,
false => bool-elim y at _ -> bool [
true => true,
false => false
]
]
def xor : bool -> bool -> bool :=
\x -> \y -> or
(and x (not y))
(and (not x) y)
|