Skip to content

Commit 35e7531

Browse files
committed
[add]: if-idem-then + if-idem-else
1 parent 08c80f6 commit 35e7531

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Data/Bool/Properties.agda

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,16 @@ if-eta : ∀ b {x : A} →
750750
if-eta false = refl
751751
if-eta true = refl
752752

753+
if-idem-then : b {x y : A}
754+
(if b then (if b then x else y) else y) ≡ (if b then x else y)
755+
if-idem-then false = refl
756+
if-idem-then true = refl
757+
758+
if-idem-else : b {x y : A}
759+
(if b then x else (if b then x else y)) ≡ (if b then x else y)
760+
if-idem-else false = refl
761+
if-idem-else true = refl
762+
753763
if-swap-then : b c {x y : A}
754764
(if b then (if c then x else y) else y)
755765
≡ (if c then (if b then x else y) else y)

0 commit comments

Comments
 (0)