11
{-# BUILTIN BOOL Bool #-}
12
{-# BUILTIN FALSE false #-}
13
{-# BUILTIN TRUE true #-}
17
_&&_ : Bool -> Bool -> Bool
30
IsFalse x = IsTrue (not x)
34
_==_ : Bool -> Bool -> Bool
38
subst : {x y : Bool}(P : Bool -> Set) -> IsTrue (x == y) -> P x -> P y
39
subst {true}{true} _ _ px = px
40
subst {false}{false} _ _ px = px
41
subst {true}{false} _ () _
42
subst {false}{true} _ () _
44
isTrue== : {x : Bool} -> IsTrue x -> IsTrue (x == true)
45
isTrue== {true} _ = tt
50
if_then_else_ : {A : Set} -> Bool -> A -> A -> A
51
if true then x else y = x
52
if false then x else y = y
56
if'_then_else_ : {A : Set} -> (x : Bool) -> (IsTrue x -> A) -> (IsFalse x -> A) -> A
57
if' true then f else g = f tt
58
if' false then f else g = g tt
60
isTrue&&₁ : {x y : Bool} -> IsTrue (x && y) -> IsTrue x
61
isTrue&&₁ {true} _ = tt
64
isTrue&&₂ : {x y : Bool} -> IsTrue (x && y) -> IsTrue y
65
isTrue&&₂ {true} p = p