@@ -24,8 +24,9 @@ open import Data.Empty.Polymorphic using (⊥; ⊥-elim)
2424open import Data.Product.Base as Product
2525 using (_×_; Σ; curry; uncurry; _,_; -,_; <_,_>; proj₁; proj₂; ∃₂; ∃; ∃-syntax)
2626open import Data.Product.Function.NonDependent.Propositional
27+ import Data.Product.Properties as Product
2728open import Data.Sum.Base as Sum
28- open import Data.Sum.Properties using (swap-involutive)
29+ import Data.Sum.Properties as Sum
2930open import Data.Sum.Function.Propositional using (_⊎-cong_)
3031open import Data.Unit.Polymorphic.Base using (⊤)
3132open import Level using (Level; Lift; 0ℓ; suc)
@@ -63,7 +64,7 @@ open import Relation.Nullary.Decidable public
6364-- × is commutative
6465
6566×-comm : ∀ (A : Set a) (B : Set b) → (A × B) ↔ (B × A)
66- ×-comm _ _ = mk↔ₛ′ Product.swap Product.swap ( λ _ → refl) λ _ → refl
67+ ×-comm _ _ = Product.swap-↔
6768
6869-- × has ⊤ as its identity
6970
@@ -102,7 +103,7 @@ open import Relation.Nullary.Decidable public
102103-- ⊎ is commutative
103104
104105⊎-comm : ∀ (A : Set a) (B : Set b) → (A ⊎ B) ↔ (B ⊎ A)
105- ⊎-comm _ _ = mk↔ₛ′ swap swap swap-involutive swap-involutive
106+ ⊎-comm _ _ = Sum. swap-↔
106107
107108-- ⊎ has ⊥ as its identity
108109
@@ -279,13 +280,7 @@ open import Relation.Nullary.Decidable public
279280
280281∃∃↔∃∃ : ∀ {a b p} {A : Set a} {B : Set b} (P : A → B → Set p) →
281282 (∃₂ λ x y → P x y) ↔ (∃₂ λ y x → P x y)
282- ∃∃↔∃∃ P = mk↔ₛ′ to from (λ _ → refl) (λ _ → refl)
283- where
284- to : (∃₂ λ x y → P x y) → (∃₂ λ y x → P x y)
285- to (x , y , Pxy) = (y , x , Pxy)
286-
287- from : (∃₂ λ y x → P x y) → (∃₂ λ x y → P x y)
288- from (y , x , Pxy) = (x , y , Pxy)
283+ ∃∃↔∃∃ = Product.∃∃↔∃∃
289284
290285------------------------------------------------------------------------
291286-- Implicit and explicit function spaces are isomorphic
0 commit comments