@@ -10,12 +10,13 @@ module Function.Properties.Surjection where
10
10
11
11
open import Function.Base using (_∘_; _$_)
12
12
open import Function.Definitions using (Surjective; Injective; Congruent)
13
- open import Function.Bundles using (Func; Surjection; _↠_; _⟶_; _↪_; mk↪;
14
- _⇔_; mk⇔)
13
+ open import Function.Bundles
14
+ using (Func; Surjection; _↠_; _⟶_; _↪_; mk↪; _⇔_; mk⇔)
15
15
import Function.Construct.Identity as Identity
16
+ import Function.Construct.Symmetry as Symmetry
16
17
import Function.Construct.Composition as Compose
17
18
open import Level using (Level)
18
- open import Data.Product.Base using (proj₁; proj₂)
19
+ open import Data.Product.Base using (_,_; proj₁; proj₂)
19
20
import Relation.Binary.PropositionalEquality.Core as ≡
20
21
open import Relation.Binary.Definitions using (Reflexive; Trans)
21
22
open import Relation.Binary.Bundles using (Setoid)
@@ -31,8 +32,8 @@ private
31
32
-- Constructors
32
33
33
34
mkSurjection : (f : Func S T) (open Func f) →
34
- Surjective Eq₁._≈_ Eq₂._≈_ to →
35
- Surjection S T
35
+ Surjective Eq₁._≈_ Eq₂._≈_ to →
36
+ Surjection S T
36
37
mkSurjection f surjective = record
37
38
{ Func f
38
39
; surjective = surjective
@@ -63,22 +64,6 @@ trans : Trans (Surjection {a} {ℓ₁} {b} {ℓ₂})
63
64
(Surjection {a} {ℓ₁} {c} {ℓ₃})
64
65
trans = Compose.surjection
65
66
66
- ------------------------------------------------------------------------
67
- -- Other
68
-
69
- injective⇒section-cong : (surj : Surjection S T) →
70
- (open Surjection surj) →
71
- Injective Eq₁._≈_ Eq₂._≈_ to →
72
- Congruent Eq₂._≈_ Eq₁._≈_ section
73
- injective⇒section-cong {T = T} surj injective {x} {y} x≈y = injective $ begin
74
- to (section x) ≈⟨ section-strictInverseˡ x ⟩
75
- x ≈⟨ x≈y ⟩
76
- y ≈⟨ section-strictInverseˡ y ⟨
77
- to (section y) ∎
78
- where
79
- open ≈-Reasoning T
80
- open Surjection surj
81
-
82
67
83
68
------------------------------------------------------------------------
84
69
-- DEPRECATED NAMES
@@ -88,8 +73,15 @@ injective⇒section-cong {T = T} surj injective {x} {y} x≈y = injective $ begi
88
73
89
74
-- Version 2.3
90
75
91
- injective⇒to⁻-cong = injective⇒section-cong
76
+ module _ (surjection : Surjection S T) where
77
+
78
+ open Surjection surjection
79
+
80
+ injective⇒to⁻-cong : Injective Eq₁._≈_ Eq₂._≈_ to →
81
+ Congruent Eq₂._≈_ Eq₁._≈_ section
82
+ injective⇒to⁻-cong injective =
83
+ Symmetry.section-cong (injective , surjective) Eq₁.refl Eq₂.sym Eq₂.trans
92
84
{-# WARNING_ON_USAGE injective⇒to⁻-cong
93
85
"Warning: injective⇒to⁻-cong was deprecated in v2.3.
94
- Please use injective⇒ section-cong instead. "
86
+ Please use Symmetry. section-cong instead. "
95
87
#-}
0 commit comments