|
9 | 9 | module Data.Product.Properties where |
10 | 10 |
|
11 | 11 | open import Axiom.UniquenessOfIdentityProofs using (UIP; module Decidable⇒UIP) |
12 | | -open import Data.Product.Base using (_,_; Σ; _×_; map; swap; ∃; ∃₂) |
| 12 | +open import Data.Product.Base using (_,_; Σ; _,′_; _×_; map; swap; ∃; ∃₂) |
13 | 13 | open import Function.Base using (_∋_; _∘_; id) |
14 | | -open import Function.Bundles using (_↔_; mk↔ₛ′) |
| 14 | +open import Function.Bundles using (_↔_; mk↔ₛ′; Inverse) |
15 | 15 | open import Level using (Level) |
16 | 16 | open import Relation.Binary.Definitions using (DecidableEquality) |
17 | 17 | open import Relation.Binary.PropositionalEquality.Core |
@@ -114,3 +114,14 @@ module _ {p₁@(a₁ , b₁) p₂@(a₂ , b₂) : A × B} where |
114 | 114 |
|
115 | 115 | from : (∃₂ λ y x → R x y) → (∃₂ λ x y → R x y) |
116 | 116 | from (y , x , Rxy) = (x , y , Rxy) |
| 117 | + |
| 118 | +------------------------------------------------------------------------ |
| 119 | +-- Non-dependent product (_×_) preserves type isomorphism (_↔_) |
| 120 | + |
| 121 | +infixr 4 _,′-↔_ |
| 122 | + |
| 123 | +_,′-↔_ : A ↔ C → B ↔ D → (A × B) ↔ (C × D) |
| 124 | +i ,′-↔ j = mk↔ₛ′ (map (Inverse.to i) (Inverse.to j)) |
| 125 | + (map (Inverse.from i) (Inverse.from j)) |
| 126 | + (λ _ → ×-≡,≡→≡ (Inverse.inverseˡ i refl ,′ Inverse.inverseˡ j refl)) |
| 127 | + (λ _ → ×-≡,≡→≡ (Inverse.inverseʳ i refl ,′ Inverse.inverseʳ j refl)) |
0 commit comments