on master help sign in
Data.Bool.Extra: proofs for booleans used in types
8783e4eMichael Morgan
libs/contrib/Data/Bool/Extra.idrnew file+28
@@ -0,0 +1,28 @@
1+module Data.Bool.Extra
2+
3+%access public export
4+%default total
5+
6+andSameNeutral : (x : Bool) -> x && x = x
7+andSameNeutral False = Refl
8+andSameNeutral True = Refl
9+
10+andFalseFalse : (x : Bool) -> x && False = False
11+andFalseFalse False = Refl
12+andFalseFalse True = Refl
13+
14+andTrueNeutral : (x : Bool) -> x && True = x
15+andTrueNeutral False = Refl
16+andTrueNeutral True = Refl
17+
18+orSameNeutral : (x : Bool) -> x || x = x
19+orSameNeutral False = Refl
20+orSameNeutral True = Refl
21+
22+orFalseNeutral : (x : Bool) -> x || False = x
23+orFalseNeutral False = Refl
24+orFalseNeutral True = Refl
25+
26+orTrueTrue : (x : Bool) -> x || True = True
27+orTrueTrue False = Refl
28+orTrueTrue True = Refl
libs/contrib/contrib.ipkg+1
@@ -17,6 +17,7 @@ modules = CFFI
17 , Control.ST.Exception
17 , Control.ST.Exception
18 , Control.ST.ImplicitCall
18 , Control.ST.ImplicitCall
19 , Control.ST.Random
19 , Control.ST.Random
20+ , Data.Bool.Extra
20 , Data.BoundedList
21 , Data.BoundedList
21 , Data.CoList
22 , Data.CoList
22 , Data.Combinators
23 , Data.Combinators