@@ -94,34 +94,37 @@ module _ where
94
94
(function (⇔⇒⟶ I⇔J) A⟶B)
95
95
(function (⇔⇒⟵ I⇔J) B⟶A)
96
96
97
- equivalence-↪ :
98
- (I↪J : I ↪ J) →
99
- (∀ {i} → Equivalence (A atₛ (RightInverse.from I↪J i)) (B atₛ i)) →
100
- Equivalence (I ×ₛ A) (J ×ₛ B)
101
- equivalence-↪ {A = A} {B = B} I↪J A⇔B =
102
- equivalence (RightInverse.equivalence I↪J) A→B (fromFunction A⇔B)
103
- where
104
- A→B : ∀ {i} → Func (A atₛ i) (B atₛ (RightInverse.to I↪J i))
105
- A→B = record
106
- { to = to A⇔B ∘ cast A (RightInverse.strictlyInverseʳ I↪J _)
107
- ; cong = to-cong A⇔B ∘ cast-cong A (RightInverse.strictlyInverseʳ I↪J _)
108
- }
109
-
110
- equivalence-↠ :
111
- (I↠J : I ↠ J) →
112
- (∀ {x} → Equivalence (A atₛ x) (B atₛ (Surjection.to I↠J x))) →
113
- Equivalence (I ×ₛ A) (J ×ₛ B)
114
- equivalence-↠ {A = A} {B = B} I↠J A⇔B =
115
- equivalence (↠⇒⇔ I↠J) B-to B-from
116
- where
117
- B-to : ∀ {x} → Func (A atₛ x) (B atₛ (Surjection.to I↠J x))
118
- B-to = toFunction A⇔B
97
+ module _ (I↪J : I ↪ J) where
98
+
99
+ private module ItoJ = RightInverse I↪J
100
+
101
+ equivalence-↪ : (∀ {i} → Equivalence (A atₛ (ItoJ.from i)) (B atₛ i)) →
102
+ Equivalence (I ×ₛ A) (J ×ₛ B)
103
+ equivalence-↪ {A = A} {B = B} A⇔B =
104
+ equivalence ItoJ.equivalence A→B (fromFunction A⇔B)
105
+ where
106
+ A→B : ∀ {i} → Func (A atₛ i) (B atₛ (ItoJ.to i))
107
+ A→B = record
108
+ { to = to A⇔B ∘ cast A (ItoJ.strictlyInverseʳ _)
109
+ ; cong = to-cong A⇔B ∘ cast-cong A (ItoJ.strictlyInverseʳ _)
110
+ }
111
+
112
+ module _ (I↠J : I ↠ J) where
113
+
114
+ private module ItoJ = Surjection I↠J
115
+
116
+ equivalence-↠ : (∀ {x} → Equivalence (A atₛ x) (B atₛ (ItoJ.to x))) →
117
+ Equivalence (I ×ₛ A) (J ×ₛ B)
118
+ equivalence-↠ {A = A} {B = B} A⇔B = equivalence (↠⇒⇔ I↠J) B-to B-from
119
+ where
120
+ B-to : ∀ {x} → Func (A atₛ x) (B atₛ (ItoJ.to x))
121
+ B-to = toFunction A⇔B
119
122
120
- B-from : ∀ {y} → Func (B atₛ y) (A atₛ (Surjection .section I↠J y))
121
- B-from = record
122
- { to = from A⇔B ∘ cast B (Surjection.to∘to⁻ I↠J _)
123
- ; cong = from-cong A⇔B ∘ cast-cong B (Surjection.to∘to⁻ I↠J _)
124
- }
123
+ B-from : ∀ {y} → Func (B atₛ y) (A atₛ (ItoJ .section y))
124
+ B-from = record
125
+ { to = from A⇔B ∘ cast B (ItoJ.section-strictInverseˡ _)
126
+ ; cong = from-cong A⇔B ∘ cast-cong B (ItoJ.section-strictInverseˡ _)
127
+ }
125
128
126
129
------------------------------------------------------------------------
127
130
-- Injections
@@ -168,12 +171,12 @@ module _ where
168
171
func : Func (I ×ₛ A) (J ×ₛ B)
169
172
func = function (Surjection.function I↠J) (Surjection.function A↠B)
170
173
171
- to⁻ ′ : Carrier (J ×ₛ B) → Carrier (I ×ₛ A)
172
- to⁻ ′ (j , y) = section I↠J j , section A↠B (cast B (Surjection.to∘to⁻ I↠J _) y)
174
+ section ′ : Carrier (J ×ₛ B) → Carrier (I ×ₛ A)
175
+ section ′ (j , y) = section I↠J j , section A↠B (cast B (section-strictInverseˡ I↠J _) y)
173
176
174
177
strictlySurj : StrictlySurjective (Func.Eq₂._≈_ func) (Func.to func)
175
- strictlySurj (j , y) = to⁻ ′ (j , y) ,
176
- to∘to⁻ I↠J j , IndexedSetoid.trans B (to∘to⁻ A↠B _) (cast-eq B (to∘to⁻ I↠J j))
178
+ strictlySurj (j , y) = section ′ (j , y) ,
179
+ section-strictInverseˡ I↠J j , IndexedSetoid.trans B (section-strictInverseˡ A↠B _) (cast-eq B (section-strictInverseˡ I↠J j))
177
180
178
181
surj : Surjective (Func.Eq₁._≈_ func) (Func.Eq₂._≈_ func) (Func.to func)
179
182
surj = strictlySurjective⇒surjective (I ×ₛ A) (J ×ₛ B) (Func.cong func) strictlySurj
0 commit comments