Skip to content

Commit c26f3ef

Browse files
HeinrichApfelmusjespercockx
authored andcommitted
Add properties about constants to Bool
1 parent 6fcbbd2 commit c26f3ef

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

lib/Haskell/Law/Bool.agda

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,47 @@ open import Haskell.Prim.Bool
55

66
open import Haskell.Law.Equality
77

8+
{-----------------------------------------------------------------------------
9+
Properties
10+
Logical operations and constants
11+
------------------------------------------------------------------------------}
12+
--
13+
prop-x-&&-True
14+
: (x : Bool)
15+
(x && True) ≡ x
16+
--
17+
prop-x-&&-True True = refl
18+
prop-x-&&-True False = refl
19+
20+
--
21+
prop-x-&&-False
22+
: (x : Bool)
23+
(x && False) ≡ False
24+
--
25+
prop-x-&&-False True = refl
26+
prop-x-&&-False False = refl
27+
28+
--
29+
prop-x-||-True
30+
: (x : Bool)
31+
(x || True) ≡ True
32+
--
33+
prop-x-||-True True = refl
34+
prop-x-||-True False = refl
35+
36+
--
37+
prop-x-||-False
38+
: (x : Bool)
39+
(x || False) ≡ x
40+
--
41+
prop-x-||-False True = refl
42+
prop-x-||-False False = refl
43+
44+
{-----------------------------------------------------------------------------
45+
Properties
46+
Other
47+
------------------------------------------------------------------------------}
48+
849
--------------------------------------------------
950
-- &&
1051

0 commit comments

Comments
 (0)