5 | notInvolutive : (x : Bool) -> not (not x) = x
6 | notInvolutive True = Refl
7 | notInvolutive False = Refl
12 | andSameNeutral : (x : Bool) -> x && x = x
13 | andSameNeutral False = Refl
14 | andSameNeutral True = Refl
17 | andFalseFalse : (x : Bool) -> x && False = False
18 | andFalseFalse False = Refl
19 | andFalseFalse True = Refl
22 | andTrueNeutral : (x : Bool) -> x && True = x
23 | andTrueNeutral False = Refl
24 | andTrueNeutral True = Refl
27 | andAssociative : (x, y, z : Bool) -> x && (y && z) = (x && y) && z
28 | andAssociative True _ _ = Refl
29 | andAssociative False _ _ = Refl
32 | andCommutative : (x, y : Bool) -> x && y = y && x
33 | andCommutative x True = andTrueNeutral x
34 | andCommutative x False = andFalseFalse x
37 | andNotFalse : (x : Bool) -> x && not x = False
38 | andNotFalse False = Refl
39 | andNotFalse True = Refl
44 | orSameNeutral : (x : Bool) -> x || x = x
45 | orSameNeutral False = Refl
46 | orSameNeutral True = Refl
49 | orFalseNeutral : (x : Bool) -> x || False = x
50 | orFalseNeutral False = Refl
51 | orFalseNeutral True = Refl
54 | orTrueTrue : (x : Bool) -> x || True = True
55 | orTrueTrue False = Refl
56 | orTrueTrue True = Refl
59 | orAssociative : (x, y, z : Bool) -> x || (y || z) = (x || y) || z
60 | orAssociative True _ _ = Refl
61 | orAssociative False _ _ = Refl
64 | orCommutative : (x, y : Bool) -> x || y = y || x
65 | orCommutative x True = orTrueTrue x
66 | orCommutative x False = orFalseNeutral x
69 | orNotTrue : (x : Bool) -> x || not x = True
70 | orNotTrue False = Refl
71 | orNotTrue True = Refl
74 | orBothFalse : {0 x, y : Bool} -> (0 prf : x || y = False) -> (x = False, y = False)
75 | orBothFalse prf = unerase $
orBothFalse' prf
77 | unerase : (0 prf : (x = False, y = False)) -> (x = False, y = False)
78 | unerase (p, q) = (irrelevantEq p, irrelevantEq q)
80 | orBothFalse' : {x, y : Bool} -> x || y = False -> (x = False, y = False)
81 | orBothFalse' {x = False} yFalse = (Refl, yFalse)
82 | orBothFalse' {x = True} trueFalse = absurd trueFalse
87 | orSameAndRightNeutral : (x, y : Bool) -> x || (x && y) = x
88 | orSameAndRightNeutral False _ = Refl
89 | orSameAndRightNeutral True _ = Refl
92 | andDistribOrR : (x, y, z : Bool) -> x && (y || z) = (x && y) || (x && z)
93 | andDistribOrR False _ _ = Refl
94 | andDistribOrR True _ _ = Refl
97 | orDistribAndR : (x, y, z : Bool) -> x || (y && z) = (x || y) && (x || z)
98 | orDistribAndR False _ _ = Refl
99 | orDistribAndR True _ _ = Refl
102 | notAndIsOr : (x, y : Bool) -> not (x && y) = not x || not y
103 | notAndIsOr False _ = Refl
104 | notAndIsOr True _ = Refl
107 | notOrIsAnd : (x, y : Bool) -> not (x || y) = not x && not y
108 | notOrIsAnd False _ = Refl
109 | notOrIsAnd True _ = Refl
114 | notTrueIsFalse : {1 x : Bool} -> Not (x = True) -> x = False
115 | notTrueIsFalse {x=False} _ = Refl
116 | notTrueIsFalse {x=True} f = absurd $
f Refl
119 | notFalseIsTrue : {1 x : Bool} -> Not (x = False) -> x = True
120 | notFalseIsTrue {x=True} _ = Refl
121 | notFalseIsTrue {x=False} f = absurd $
f Refl
130 | invertContraBool : (a, b : Bool) -> Not (a = b) -> (not a = b)
131 | invertContraBool False False contra = absurd $
contra Refl
132 | invertContraBool False True contra = Refl
133 | invertContraBool True False contra = Refl
134 | invertContraBool True True contra = absurd $
contra Refl