Skip to content

Commit 6740db7

Browse files
committed
rename and extend if-cong lemmata
1 parent 3c2772c commit 6740db7

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,10 @@ Additions to existing modules
249249
if-∧ : ∀ b → (if b ∧ c then x else y) ≡ (if b then (if c then x else y) else y)
250250
if-∨ : ∀ b → (if b ∨ c then x else y) ≡ (if b then x else (if c then x else y))
251251
if-xor : ∀ b → (if b xor c then x else y) ≡ (if b then (if c then y else x) else (if c then x else y))
252-
if-congˡ : ∀ b → x ≡ z → (if b then x else y) ≡ (if b then z else y)
253-
if-congʳ : ∀ b → y ≡ z → (if b then x else y) ≡ (if b then x else z)
254-
if-cong : ∀ b → x ≡ z → y ≡ w → (if b then x else y) ≡ (if b then z else w)
252+
if-cong : b ≡ c → (if b then x else y) ≡ (if c then x else y)
253+
if-cong-then : ∀ b → x ≡ z → (if b then x else y) ≡ (if b then z else y)
254+
if-cong-else : ∀ b → y ≡ z → (if b then x else y) ≡ (if b then x else z)
255+
if-cong₂ : ∀ b → x ≡ z → y ≡ w → (if b then x else y) ≡ (if b then z else w)
255256
```
256257

257258
* In `Data.Fin.Base`:

src/Data/Bool/Properties.agda

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -790,17 +790,21 @@ if-xor false = refl
790790
if-xor true {false} = refl
791791
if-xor true {true } = refl
792792

793-
if-congˡ : b {x y z : A} xz
794-
(if b then x else y) ≡ (if b then z else y)
795-
if-congˡ _ refl = refl
793+
if-cong : {b c} {x y : A} bc
794+
(if b then x else y) ≡ (if c then x else y)
795+
if-cong refl = refl
796796

797-
if-congʳ : b {x y z : A} y ≡ z
798-
(if b then x else y) ≡ (if b then x else z)
799-
if-congʳ _ refl = refl
797+
if-cong-then : b {x y z : A} x ≡ z
798+
(if b then x else y) ≡ (if b then z else y)
799+
if-cong-then _ refl = refl
800800

801-
if-cong : b {x y z w : A} x ≡ z y ≡ w
802-
(if b then x else y) ≡ (if b then z else w)
803-
if-cong _ refl refl = refl
801+
if-cong-else : b {x y z : A} y ≡ z
802+
(if b then x else y) ≡ (if b then x else z)
803+
if-cong-else _ refl = refl
804+
805+
if-cong₂ : b {x y z w : A} x ≡ z y ≡ w
806+
(if b then x else y) ≡ (if b then z else w)
807+
if-cong₂ _ refl refl = refl
804808

805809
------------------------------------------------------------------------
806810
-- Properties of T

0 commit comments

Comments
 (0)