Skip to content

Commit 1156681

Browse files
committed
refactor: add Setoid version of module Section
1 parent 2326602 commit 1156681

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/Function/Consequences/Setoid.agda

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,38 @@ strictlyInverseʳ⇒inverseʳ : Congruent ≈₂ ≈₁ f⁻¹ →
9090
StrictlyInverseʳ ≈₁ f f⁻¹
9191
Inverseʳ ≈₁ ≈₂ f f⁻¹
9292
strictlyInverseʳ⇒inverseʳ = C.strictlyInverseʳ⇒inverseʳ S.trans
93+
94+
------------------------------------------------------------------------
95+
-- Section
96+
97+
module Section (surj : Surjective ≈₁ ≈₂ f) where
98+
99+
private module Sf = C.Section ≈₂ surj
100+
101+
open Sf public using (section; inverseˡ)
102+
103+
strictlySurjective : StrictlySurjective ≈₂ f
104+
strictlySurjective = Sf.strictlySurjective S.refl
105+
106+
strictlyInverseˡ : StrictlyInverseˡ ≈₂ f section
107+
strictlyInverseˡ = Sf.strictlyInverseˡ S.refl
108+
109+
injective : Injective ≈₂ ≈₁ section
110+
injective = Sf.injective S.refl T.sym T.trans
111+
112+
module _ (inj : Injective ≈₁ ≈₂ f) where
113+
114+
cong : Congruent ≈₂ ≈₁ section
115+
cong = Sf.cong inj S.refl T.sym T.trans
116+
117+
inverseʳ : Inverseʳ ≈₁ ≈₂ f section
118+
inverseʳ = Sf.inverseʳ inj S.refl T.trans
119+
120+
strictlyInverseʳ : StrictlyInverseʳ ≈₁ f section
121+
strictlyInverseʳ = Sf.strictlyInverseʳ inj S.refl T.refl T.trans
122+
123+
surjective : Surjective ≈₂ ≈₁ section
124+
surjective = Sf.surjective inj S.refl T.trans
125+
126+
bijective : Bijective ≈₂ ≈₁ section
127+
bijective = Sf.bijective inj S.refl T.sym T.trans

0 commit comments

Comments
 (0)