@@ -10,6 +10,8 @@ module Function.Construct.Symmetry where
10
10
11
11
open import Data.Product.Base using (_,_; swap; proj₁; proj₂)
12
12
open import Function.Base using (_∘_)
13
+ open import Function.Consequences
14
+ using (module IsSurjective )
13
15
open import Function.Definitions
14
16
using (Bijective; Injective; Surjective; Inverseˡ; Inverseʳ; Inverseᵇ; Congruent)
15
17
open import Function.Structures
@@ -35,21 +37,26 @@ module _ {≈₁ : Rel A ℓ₁} {≈₂ : Rel B ℓ₂} {f : A → B}
35
37
((inj , surj) : Bijective ≈₁ ≈₂ f)
36
38
where
37
39
38
- private
39
- f⁻¹ = proj₁ ∘ surj
40
- f∘f⁻¹≡id = proj₂ ∘ surj
40
+ open IsSurjective {≈₂ = ≈₂} surj
41
+ using (section; section-strictInverseˡ)
42
+
43
+ module _ (refl : Reflexive ≈₁) where
44
+
45
+ private
46
+
47
+ f∘section≡id = section-strictInverseˡ refl
41
48
42
- injective : Reflexive ≈₁ → Symmetric ≈₂ → Transitive ≈₂ →
43
- Congruent ≈₁ ≈₂ f → Injective ≈₂ ≈₁ f⁻¹
44
- injective refl sym trans cong gx≈gy =
45
- trans (trans (sym (f∘f⁻¹ ≡id _ refl )) (cong gx≈gy)) (f∘f⁻¹ ≡id _ refl )
49
+ injective : Symmetric ≈₂ → Transitive ≈₂ →
50
+ Congruent ≈₁ ≈₂ f → Injective ≈₂ ≈₁ section
51
+ injective sym trans cong gx≈gy =
52
+ trans (trans (sym (f∘section ≡id _)) (cong gx≈gy)) (f∘section ≡id _)
46
53
47
- surjective : Reflexive ≈₁ → Transitive ≈₂ → Surjective ≈₂ ≈₁ f⁻¹
48
- surjective refl trans x = f x , inj ∘ trans (f∘f⁻¹ ≡id _ refl )
54
+ surjective : Transitive ≈₂ → Surjective ≈₂ ≈₁ section
55
+ surjective trans x = f x , inj ∘ trans (f∘section ≡id _)
49
56
50
- bijective : Reflexive ≈₁ → Symmetric ≈₂ → Transitive ≈₂ →
51
- Congruent ≈₁ ≈₂ f → Bijective ≈₂ ≈₁ f⁻¹
52
- bijective refl sym trans cong = injective refl sym trans cong , surjective refl trans
57
+ bijective : Symmetric ≈₂ → Transitive ≈₂ →
58
+ Congruent ≈₁ ≈₂ f → Bijective ≈₂ ≈₁ section
59
+ bijective sym trans cong = injective sym trans cong , surjective trans
53
60
54
61
module _ (≈₁ : Rel A ℓ₁) (≈₂ : Rel B ℓ₂) {f : A → B} {f⁻¹ : B → A} where
55
62
0 commit comments