Skip to content

Commit 0d55cb9

Browse files
committed
[refactor]: add line breaks to some if-lemmas
This (1) follows the style guide of having a line length limit of 72 characters and (2) increases readability because it enables immediately seeing which sub-terms of an if_then_else_ expression are substituted.
1 parent 3eb32c3 commit 0d55cb9

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/Data/Bool/Properties.agda

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,14 @@ if-eta false = refl
751751
if-eta true = refl
752752

753753
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)
754+
(if b then (if b then x else y) else y)
755+
≡ (if b then x else y)
755756
if-idem-then false = refl
756757
if-idem-then true = refl
757758

758759
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 b then x else (if b then x else y))
761+
≡ (if b then x else y)
760762
if-idem-else false = refl
761763
if-idem-else true = refl
762764

@@ -790,7 +792,8 @@ if-∨ false = refl
790792
if-∨ true = refl
791793

792794
if-xor : b {c} {x y : A}
793-
(if b xor c then x else y) ≡ (if b then (if c then y else x) else (if c then x else y))
795+
(if b xor c then x else y)
796+
≡ (if b then (if c then y else x) else (if c then x else y))
794797
if-xor false = refl
795798
if-xor true {false} = refl
796799
if-xor true {true } = refl
@@ -808,19 +811,23 @@ if-xor true {true } = refl
808811
-- unfortunately fails to resolve the omitted argument.)
809812

810813
if-cong : {b c} {x y : A} b ≡ c
811-
(if b then x else y) ≡ (if c then x else y)
814+
(if b then x else y)
815+
≡ (if c then x else y)
812816
if-cong refl = refl
813817

814818
if-cong-then : b {x y z : A} x ≡ z
815-
(if b then x else y) ≡ (if b then z else y)
819+
(if b then x else y)
820+
≡ (if b then z else y)
816821
if-cong-then _ refl = refl
817822

818823
if-cong-else : b {x y z : A} y ≡ z
819-
(if b then x else y) ≡ (if b then x else z)
824+
(if b then x else y)
825+
≡ (if b then x else z)
820826
if-cong-else _ refl = refl
821827

822828
if-cong₂ : b {x y z w : A} x ≡ z y ≡ w
823-
(if b then x else y) ≡ (if b then z else w)
829+
(if b then x else y)
830+
≡ (if b then z else w)
824831
if-cong₂ _ refl refl = refl
825832

826833
------------------------------------------------------------------------

0 commit comments

Comments
 (0)