Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added proof of iso from section and retraction #398

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions src/Categories/Morphism/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,59 @@ _∘↠_ : B ↠ C → A ↠ B → A ↠ C
f ∘↠ g = record { mor = mor f ∘ mor g ; epi = Epi-∘ (epi f) (epi g) }
where
open _↠_

--------------------------------------------------------------------------------
-- Isomorphism from a section and a retraction

EpicRetract⇒Iso : ∀ {X Y} {f : Y ⇒ X} {r : X ⇒ Y} →
r RetractOf f → Epi f → Iso f r
EpicRetract⇒Iso {f = f} {r} rf≈id epi = record {
isoˡ = rf≈id ;
isoʳ = epi (f ∘ r) id (begin
(f ∘ r) ∘ f ≈⟨ pullʳ rf≈id ⟩
f ∘ id ≈⟨ id-comm ⟩
id ∘ f ∎) }
JacquesCarette marked this conversation as resolved.
Show resolved Hide resolved

MonicSection⇒Iso : ∀ {X Y} {f : Y ⇒ X} {s : X ⇒ Y} →
s SectionOf f → Mono f → Iso f s
MonicSection⇒Iso {f = f} {s} fs≈id mono = record {
isoˡ = mono (s ∘ f) id (begin
f ∘ (s ∘ f) ≈⟨ pullˡ fs≈id ⟩
id ∘ f ≈⟨ id-comm-sym ⟩
f ∘ id ∎) ;
isoʳ = fs≈id }

≈-SectionRetraction : ∀ {X Y} {f : Y ⇒ X} {s r : X ⇒ Y} →
s SectionOf f → r RetractOf f → s ≈ r
≈-SectionRetraction {f = f} {s} {r} fs≈id rf≈id = begin
s ≈⟨ insertˡ rf≈id ⟩
r ∘ (f ∘ s) ≈⟨ elimʳ fs≈id ⟩
r ∎

SectionRetraction⇒Isoˡ : ∀ {X Y} {f : Y ⇒ X} {s r : X ⇒ Y} →
s SectionOf f → r RetractOf f → Iso f s
SectionRetraction⇒Isoˡ {f = f} {s} {r} fs≈id rf≈id = record {
isoˡ = begin
s ∘ f ≈⟨ ≈-SectionRetraction fs≈id rf≈id ⟩∘⟨refl ⟩
r ∘ f ≈⟨ rf≈id ⟩
id ∎ ;
isoʳ = fs≈id }

SectionRetraction⇒Isoʳ : ∀ {X Y} {f : Y ⇒ X} {s r : X ⇒ Y} →
s SectionOf f → r RetractOf f → Iso f r
SectionRetraction⇒Isoʳ {f = f} {s} {r} fs≈id rf≈id = record {
isoˡ = rf≈id ;
isoʳ = begin
f ∘ r ≈⟨ refl⟩∘⟨ ⟺ (≈-SectionRetraction fs≈id rf≈id) ⟩
f ∘ s ≈⟨ fs≈id ⟩
id ∎ }

JacquesCarette marked this conversation as resolved.
Show resolved Hide resolved