@@ -24,7 +24,7 @@ open import Function
24
24
open import Function.Equality using (_⟨$⟩_)
25
25
import Function.Equivalence as FE
26
26
open import Function.Inverse as Inv using (_↔_; Inverse; inverse)
27
- open import Function.Related as Related using (↔⇒; ⌊_⌋; ⌊_⌋→; ⇒→)
27
+ open import Function.Related as Related using (↔⇒; ⌊_⌋; ⌊_⌋→; ⇒→; SK-sym )
28
28
open import Function.Related.TypeIsomorphisms
29
29
open import Relation.Binary
30
30
import Relation.Binary.EqReasoning as EqR
@@ -98,7 +98,7 @@ module _ {a k} {A : Set a} {x y : A} {xs ys} where
98
98
99
99
∷-cong : x ≡ y → xs ∼[ k ] ys → x ∷ xs ∼[ k ] y ∷ ys
100
100
∷-cong refl xs≈ys {y} =
101
- y ∈ x ∷ xs ↔⟨ sym $ ∷↔ (y ≡_) ⟩
101
+ y ∈ x ∷ xs ↔⟨ SK- sym $ ∷↔ (y ≡_) ⟩
102
102
(y ≡ x ⊎ y ∈ xs) ∼⟨ (y ≡ x ∎) ⊎-cong xs≈ys ⟩
103
103
(y ≡ x ⊎ y ∈ ys) ↔⟨ ∷↔ (y ≡_) ⟩
104
104
y ∈ x ∷ ys ∎
@@ -111,7 +111,7 @@ module _ {ℓ k} {A B : Set ℓ} {f g : A → B} {xs ys} where
111
111
112
112
map-cong : f ≗ g → xs ∼[ k ] ys → map f xs ∼[ k ] map g ys
113
113
map-cong f≗g xs≈ys {x} =
114
- x ∈ map f xs ↔⟨ sym $ map↔ ⟩
114
+ x ∈ map f xs ↔⟨ SK- sym $ map↔ ⟩
115
115
Any (λ y → x ≡ f y) xs ∼⟨ Any-cong (↔⇒ ∘ helper) xs≈ys ⟩
116
116
Any (λ y → x ≡ g y) ys ↔⟨ map↔ ⟩
117
117
x ∈ map g ys ∎
@@ -136,7 +136,7 @@ module _ {a k} {A : Set a} {xs₁ xs₂ ys₁ ys₂ : List A} where
136
136
++-cong : xs₁ ∼[ k ] xs₂ → ys₁ ∼[ k ] ys₂ →
137
137
xs₁ ++ ys₁ ∼[ k ] xs₂ ++ ys₂
138
138
++-cong xs₁≈xs₂ ys₁≈ys₂ {x} =
139
- x ∈ xs₁ ++ ys₁ ↔⟨ sym $ ++↔ ⟩
139
+ x ∈ xs₁ ++ ys₁ ↔⟨ SK- sym $ ++↔ ⟩
140
140
(x ∈ xs₁ ⊎ x ∈ ys₁) ∼⟨ xs₁≈xs₂ ⊎-cong ys₁≈ys₂ ⟩
141
141
(x ∈ xs₂ ⊎ x ∈ ys₂) ↔⟨ ++↔ ⟩
142
142
x ∈ xs₂ ++ ys₂ ∎
@@ -149,7 +149,7 @@ module _ {a k} {A : Set a} {xss yss : List (List A)} where
149
149
150
150
concat-cong : xss ∼[ k ] yss → concat xss ∼[ k ] concat yss
151
151
concat-cong xss≈yss {x} =
152
- x ∈ concat xss ↔⟨ sym concat↔ ⟩
152
+ x ∈ concat xss ↔⟨ SK- sym concat↔ ⟩
153
153
Any (Any (x ≡_)) xss ∼⟨ Any-cong (λ _ → _ ∎) xss≈yss ⟩
154
154
Any (Any (x ≡_)) yss ↔⟨ concat↔ ⟩
155
155
x ∈ concat yss ∎
@@ -163,7 +163,7 @@ module _ {ℓ k} {A B : Set ℓ} {xs ys} {f g : A → List B} where
163
163
>>=-cong : xs ∼[ k ] ys → (∀ x → f x ∼[ k ] g x) →
164
164
(xs >>= f) ∼[ k ] (ys >>= g)
165
165
>>=-cong xs≈ys f≈g {x} =
166
- x ∈ (xs >>= f) ↔⟨ sym >>=↔ ⟩
166
+ x ∈ (xs >>= f) ↔⟨ SK- sym >>=↔ ⟩
167
167
Any (λ y → x ∈ f y) xs ∼⟨ Any-cong (λ x → f≈g x) xs≈ys ⟩
168
168
Any (λ y → x ∈ g y) ys ↔⟨ >>=↔ ⟩
169
169
x ∈ (ys >>= g) ∎
@@ -243,9 +243,9 @@ empty-unique {xs = _ ∷ _} ∷∼[] with ⇒→ ∷∼[] (here refl)
243
243
∀ {ℓ} {A B : Set ℓ} (xs : List A) {f g : A → List B} →
244
244
(xs >>= λ x → f x ++ g x) ∼[ bag ] (xs >>= f) ++ (xs >>= g)
245
245
>>=-left-distributive {ℓ} xs {f} {g} {y} =
246
- y ∈ (xs >>= λ x → f x ++ g x) ↔⟨ sym $ >>=↔ ⟩
247
- Any (λ x → y ∈ f x ++ g x) xs ↔⟨ sym (Any-cong (λ _ → ++↔) (_ ∎)) ⟩
248
- Any (λ x → y ∈ f x ⊎ y ∈ g x) xs ↔⟨ sym $ ⊎↔ ⟩
246
+ y ∈ (xs >>= λ x → f x ++ g x) ↔⟨ SK- sym $ >>=↔ ⟩
247
+ Any (λ x → y ∈ f x ++ g x) xs ↔⟨ SK- sym (Any-cong (λ _ → ++↔) (_ ∎)) ⟩
248
+ Any (λ x → y ∈ f x ⊎ y ∈ g x) xs ↔⟨ SK- sym $ ⊎↔ ⟩
249
249
(Any (λ x → y ∈ f x) xs ⊎ Any (λ x → y ∈ g x) xs) ↔⟨ >>=↔ ⟨ _⊎-cong_ ⟩ >>=↔ ⟩
250
250
(y ∈ (xs >>= f) ⊎ y ∈ (xs >>= g)) ↔⟨ ++↔ ⟩
251
251
y ∈ (xs >>= f) ++ (xs >>= g) ∎
0 commit comments