module Cat.Internal.Morphism
  {o β„“} {C : Precategory o β„“}
  (β„‚ : Internal-cat C)
  where

Morphisms in internal categoriesπŸ”—

This module defines the internal versions of monomorphisms, epimorphisms, and isomorphisms. These definitions mirror their 1-categorical counterparts, so we do not comment on them further.

MonosπŸ”—

is-monici : Homi x y β†’ Type _
is-monici {x = x} f = βˆ€ {w} β†’ (g h : Homi w x) β†’ f ∘i g ≑ f ∘i g β†’ g ≑ h

is-monici-is-prop : βˆ€ (f : Homi x y) β†’ is-prop (is-monici f)
is-monici-is-prop f x y i {w} g h p = Internal-hom-set g h (x g h p) (y g h p) i

record _β†ͺi_ (x y : Hom Ξ“ Cβ‚€) : Type β„“ where
  field
    mori : Homi x y
    monici : is-monici mori

EpisπŸ”—

is-epici : Homi x y β†’ Type _
is-epici {y = y} f = βˆ€ {z} β†’ (g h : Homi y z) β†’ g ∘i f ≑ h ∘i f β†’ g ≑ h

is-epici-is-prop : βˆ€ (f : Homi x y) β†’ is-prop (is-epici f)
is-epici-is-prop f x y i {z} g h p = Internal-hom-set g h (x g h p) (y g h p) i

record _β† i_ (x y : Hom Ξ“ Cβ‚€) : Type β„“ where
  field
    mori  : Homi x y
    epici : is-epici mori

IsomorphismsπŸ”—

record Inversesi (f : Homi x y) (g : Homi y x) : Type β„“ where
  field
    invli : f ∘i g ≑ idi y
    invri : g ∘i f ≑ idi x

record is-invertiblei (f : Homi x y) : Type β„“ where
  field
    invi : Homi y x
    inversesi : Inversesi f invi

  open Inversesi inversesi public

record _β‰…i_ (x y : Hom Ξ“ Cβ‚€) : Type β„“ where
  field
    toi : Homi x y
    fromi : Homi y x
    inversesi : Inversesi toi fromi

  open Inversesi inversesi public

open _β‰…i_ public