module Cat.Morphism.Orthogonal where

Orthogonal mapsπŸ”—

A pair of maps and are called orthogonal, written 1, if for every fitting into a commutative diagram like

the space of arrows (dashed) which commute with everything is contractible. We refer to the type of these dashed arrows as a Lifting, and this type is parametrised over all maps in the square.

  Lifting
    : (f : Hom a b) (g : Hom c d) (u : Hom a c) (v : Hom b d)
    β†’ Type _
  Lifting f g u v = Ξ£[ w ∈ Hom _ _ ] w ∘ f ≑ u Γ— g ∘ w ≑ v

  mβŠ₯m : Hom a b β†’ Hom c d β†’ Type _
  mβŠ₯m {b = b} {c = c} f g =
    βˆ€ {u v} β†’ v ∘ f ≑ g ∘ u
    β†’ is-contr (Lifting f g u v)

In some of the proofs below, we’ll also need a name for a weakening of orthogonality, where the requirement that lifts are unique is dropped. We say lifts against if there is a map assigning lifts to every commutative squares with opposing and faces, as above.

  lifts-against : (f : Hom a b) (g : Hom c d) β†’ Type _
  lifts-against f g = βˆ€ {u v} β†’ v ∘ f ≑ g ∘ u β†’ Lifting f g u v

We also outline concepts of a map being orthogonal to an object, which is informally written and an object being orthogonal to a map

  mβŠ₯o : Hom a b β†’ ⌞ C ⌟ β†’ Type _
  mβŠ₯o {a} {b} f X = (a : Hom a X) β†’ is-contr (Ξ£[ b ∈ Hom b X ] (b ∘ f ≑ a))

  oβŠ₯m : ⌞ C ⌟ β†’ Hom a b β†’ Type _
  oβŠ₯m {a} {b} Y f = (c : Hom Y b) β†’ is-contr (Ξ£[ d ∈ Hom Y a ] (f ∘ d ≑ c))
Note

In the formalisation, we don’t write infix, since it must be explicitly applied to the category in which the morphisms live. Thus, we define three distinct predicates expressing orthogonality: mβŠ₯m (β€œmap-map”), mβŠ₯o (β€œmap-object”), and oβŠ₯m (β€œobject-map”). If the ambient category has enough co/limits, being orthogonal to an object is equivalent to being orthogonal to an object. For example, iff. where is the unique map from into the terminal object.

The proof is mostly a calculation, so we present it without a lot of comment.

  object-orthogonal-!-orthogonal
    : βˆ€ {X} (T : Terminal C) (f : Hom a b) β†’ mβŠ₯o f X ≃ mβŠ₯m f (! T)
  object-orthogonal-!-orthogonal {X = X} T f =
    prop-ext (hlevel 1) (hlevel 1) to from
    where
      to : mβŠ₯o f X β†’ mβŠ₯m f (! T)
      to fβŠ₯X {u} {v} sq =
        contr (fβŠ₯X u .centre .fst , fβŠ₯X u .centre .snd , !-uniqueβ‚‚ T _ _) Ξ» m β†’
          Ξ£-prop-path! (ap fst (fβŠ₯X u .paths (m .fst , m .snd .fst)))

      from : mβŠ₯m f (! T) β†’ mβŠ₯o f X
      from fβŠ₯! a = contr
        ( fβŠ₯! {v = ! T} (!-uniqueβ‚‚ T _ _) .centre .fst
        , fβŠ₯! (!-uniqueβ‚‚ T _ _) .centre .snd .fst ) Ξ» x β†’ Ξ£-prop-path!
          (ap fst (fβŠ₯! _ .paths (x .fst , x .snd , !-uniqueβ‚‚ T _ _)))

As a passing observation we note that if and then Of course, this is immediate in categories, but it holds in the generality of precategories.

  mβŠ₯-iso : βˆ€ {a b} {X Y} (f : Hom a b) β†’ X β‰… Y β†’ mβŠ₯o f X β†’ mβŠ₯o f Y

A slightly more interesting lemma is that, if is orthogonal to itself, then it is an isomorphism:

  self-orthogonalβ†’invertible : βˆ€ {a b} (f : Hom a b) β†’ mβŠ₯m f f β†’ C.is-invertible f
  self-orthogonalβ†’invertible f fβŠ₯f =
    C.make-invertible (gpq .fst) (gpq .snd .snd) (gpq .snd .fst)
    where
      gpq = fβŠ₯f (C.idl _ βˆ™ C.intror refl) .centre

For the next few lemmas, consider a square of the following form, where and are both lifts of the outer square.

If is an epimorphism, then In more succinct terms, the type of lifts of such a square is a proposition.

  left-epic→lift-is-prop
    : C.is-epic f β†’ v C.∘ f ≑ g C.∘ u β†’ is-prop (Lifting f g u v)
  left-epic→lift-is-prop f-epi vf=gu (l , lf=u , _) (k , kf=u , _) =
    Ξ£-prop-path! (f-epi l k (lf=u βˆ™ sym kf=u))

Dually, if is a monomorphism, then we the type of lifts is also a propostion.

  right-monic→lift-is-prop
    : C.is-monic g β†’ v C.∘ f ≑ g C.∘ u β†’ is-prop (Lifting f g u v)
  right-monic→lift-is-prop g-mono vf=gu (l , _ , gl=v) (k , _ , gk=v) =
    Ξ£-prop-path! (g-mono l k (gl=v βˆ™ sym gk=v))

As a corollary, if is an epi or is a mono, then it is sufficient to find any lift to establish that

  left-epic-lift→orthogonal
    : (g : C.Hom c d)
    β†’ C.is-epic f β†’ lifts-against f g β†’ mβŠ₯m f g
  left-epic-lift→orthogonal g f-epi lifts vf=gu =
    is-propβˆ™β†’is-contr (left-epicβ†’lift-is-prop f-epi vf=gu) (lifts vf=gu)

  right-monic-lift→orthogonal
    : (f : C.Hom a b)
    β†’ C.is-monic g β†’ lifts-against f g β†’ mβŠ₯m f g
  right-monic-lift→orthogonal f g-mono lifts vf=gu =
    is-propβˆ™β†’is-contr (right-monicβ†’lift-is-prop g-mono vf=gu) (lifts vf=gu)

Isomorphisms are left and right orthogonal to every other morphism.

  invertibleβ†’left-orthogonal  : (g : C.Hom c d) β†’ C.is-invertible f β†’ mβŠ₯m f g
  invertibleβ†’right-orthogonal : (f : C.Hom a b) β†’ C.is-invertible g β†’ mβŠ₯m f g

We will focus our attention on the left orthogonal case, as the proof for right orthogonality is completely dual. Suppose that is invertible, and is an arbitrary morphism. Invertible morphisms are epis, so it suffices to establish the existence of lifts to prove that is orthogonal to Luckily, these lifts are easy to find: if we have some square then fits perfectly along the diagonal:

A short calculation verifies that is indeed a lift.

  invertible→left-orthogonal {f = f} g f-inv =
    left-epic-lift→orthogonal g (C.invertible→epic f-inv) λ {u} {v} vf=gu →
      u ∘ f.inv ,
      C.cancelr f.invr ,
      Equiv.from
        (g ∘ u ∘ f.inv ≑ v   β‰ƒβŸ¨ C.reassocl e⁻¹ βˆ™e C.pre-invr f-inv βŸ©β‰ƒ
         g ∘ u ≑ v ∘ f       β‰ƒβŸ¨ sym-equiv βŸ©β‰ƒ
         v ∘ f ≑ g ∘ u       β‰ƒβˆŽ)
        vf=gu
    where module f = C.is-invertible f-inv
The proof of right orthogonality follows the exact same plan, so we omit the details.
  invertible→right-orthogonal {g = g} f g-inv =
    right-monic-lift→orthogonal f (C.invertible→monic g-inv) λ {u} {v} vf=gu →
      g.inv ∘ v ,
      Equiv.from
        ((g.inv ∘ v) ∘ f ≑ u β‰ƒβŸ¨ C.reassocl βˆ™e C.pre-invl g-inv βŸ©β‰ƒ
          v ∘ f ≑ g ∘ u      β‰ƒβˆŽ)
        vf=gu ,
      C.cancell g.invl
    where module g = C.is-invertible g-inv

We also have the following two properties, which state that β€œlifting against” is, as a property of morphisms, closed under composition on both the left and the right. To understand the proof, it’s helpful to visualise the inputs in a diagram. Suppose we have and assume that both and lift against Showing that lifts against amounts to finding a diagonal for the rectangle

under the assumption that We’ll populate this diagram a bit by observing that, by composing the and edges together, we have a commutative square with faces and β€” and since lifts against this implies that we have a diagonal map which appears dashed in

This map satisfies and, importantly, This latter equation implies that we can now treat the right half of the diagram as another square, with faces and Since also lifts against this implies that we can find the dotted map in the diagram

satisfying and The map fits the type of fillers for our original rectangle, but we must still show that it makes both triangles commute. But this is easy: we have by a short calculation and immediately.

  ∘l-lifts-against : lifts-against f h β†’ lifts-against g h β†’ lifts-against (f ∘ g) h
  ∘l-lifts-against f-lifts g-lifts vfg=hu =
    let (w , wg=u , hw=vf) = g-lifts (C.reassocl.from vfg=hu)
        (t , tf=w , ht=v)  = f-lifts (sym hw=vf)
    in t , C.pulll tf=w βˆ™ wg=u , ht=v

This proof dualises almost term-for-term the case where we’re composing on the bottom face, i.e., when we have some which lifts against both and and we want to show lifts against

  ∘r-lifts-against : lifts-against f g β†’ lifts-against f h β†’ lifts-against f (g ∘ h)
  ∘r-lifts-against f-lifts g-lifts ve=fgu =
    let (w , we=gu , fw=v) = f-lifts (C.reassocr.to ve=fgu)
        (t , te=u , gt=w)  = g-lifts we=gu
    in t , te=u , C.pullr gt=w βˆ™ fw=v

Regarding reflectionsπŸ”—

Let be an arbitrary reflective subcategory. Speaking abstractly, there is a β€œuniversal” choice of test for whether an object is β€œin” the subcategory: Whether the adjunction unit: is an isomorphism. The theory of orthogonality gives a second way to detect this situation. The proof here is from (Borceux 1994, vol. 1, sec. 5.4).

The first thing we observe is that any map such that is an isomorphism is orthogonal to every object in the subcategory: Let be inverted by and be the object. Given a map

  in-subcategory→orthogonal-to-inverted
    : βˆ€ {X} {a b} {f : C.Hom a b} β†’ D.is-invertible (r.₁ f) β†’ mβŠ₯o C f (ΞΉ.β‚€ X)
  in-subcategory→orthogonal-to-inverted {X} {A} {B} {f} rf-inv a→x =
    contr (fact , factors) Ξ» { (g , factors') β†’
      Ξ£-prop-path! (h≑k factors factors') }
    where
      module rf = D.is-invertible rf-inv
      module η⁻¹ {a} = C.is-invertible (is-reflectiveβ†’unit-G-is-iso r⊣ι ΞΉ-ff {a})

Observe that, since is a reflective subcategory, every unit morphism is an isomorphism; We define a morphism as the composite

      b : C.Hom (ΞΉ.β‚€ (r.β‚€ A)) (ΞΉ.β‚€ X)
      b = η⁻¹.inv C.∘ ΞΉ.₁ (r.₁ aβ†’x)

satisfying (by naturality of the unit map) the property that This is an intermediate step in what we have to do: construct a map

      p : aβ†’x ≑ b C.∘ unit.Ξ· _
      p = sym (C.pullr (sym (unit.is-natural _ _ _)) βˆ™ C.cancell zag)

We define that using the map we just constructed. It’s the composite

and a calculation shows us that this map is indeed a factorisation of through

      fact : C.Hom B (ΞΉ.β‚€ X)
      fact = b C.∘ ΞΉ.₁ rf.inv C.∘ unit.Ξ· _

      factors =
        (b C.∘ ΞΉ.₁ rf.inv C.∘ unit.Ξ· B) C.∘ f      β‰‘βŸ¨ C.pullr (C.pullr (unit.is-natural _ _ _)) βŸ©β‰‘
        b C.∘ ΞΉ.₁ rf.inv C.∘ (ΞΉr.₁ f) C.∘ unit.Ξ· A β‰‘βŸ¨ C.refl⟩∘⟨ C.cancell (ΞΉ.annihilate rf.invr) βŸ©β‰‘
        b C.∘ unit.Ξ· A                             β‰‘Λ˜βŸ¨ p βŸ©β‰‘Λ˜
        aβ†’x                                        ∎

The proof that this factorisation is unique is surprisingly totally independent of the actual map we just constructed: If note that we must have (since is invertible, it is epic); But then we have

and since is an isomorphism, thus monic, we have

      module _ {h k : C.Hom B (ΞΉ.β‚€ X)} (p : h C.∘ f ≑ aβ†’x) (q : k C.∘ f ≑ aβ†’x) where
        rh≑rk : r.₁ h ≑ r.₁ k
        rh≑rk = D.invertibleβ†’epic rf-inv (r.₁ h) (r.₁ k) (r.weave (p βˆ™ sym q))

        h≑k = C.invertibleβ†’monic (is-reflectiveβ†’unit-G-is-iso r⊣ι ΞΉ-ff) _ _ $
          unit.Ξ· (ΞΉ.β‚€ X) C.∘ h β‰‘βŸ¨ unit.is-natural _ _ _ βŸ©β‰‘
          ΞΉr.₁ h C.∘ unit.Ξ· B  β‰‘βŸ¨ ap ΞΉ.₁ rh≑rk C.⟩∘⟨refl βŸ©β‰‘
          ΞΉr.₁ k C.∘ unit.Ξ· B  β‰‘Λ˜βŸ¨ unit.is-natural _ _ _ βŸ©β‰‘Λ˜
          unit.Ξ· (ΞΉ.β‚€ X) C.∘ k ∎

As a partial converse, if an object is orthogonal to every unit map (it suffices to be orthogonal to its own unit map), then it lies in the subcategory:

  orthogonal-to-ηs→in-subcategory
    : βˆ€ {X} β†’ (βˆ€ B β†’ mβŠ₯o C (unit.Ξ· B) X) β†’ C.is-invertible (unit.Ξ· X)
  orthogonal-to-ηs→in-subcategory {X} ortho =
    C.make-invertible x lemma (ortho X C.id .centre .snd)
    where
      x = ortho X C.id .centre .fst
      lemma = unit.Ξ· _ C.∘ x             β‰‘βŸ¨ unit.is-natural _ _ _ βŸ©β‰‘
              ΞΉr.₁ x C.∘ unit.Ξ· (ΞΉr.β‚€ X) β‰‘βŸ¨ C.refl⟩∘⟨ Ξ·-comonad-commute r⊣ι ΞΉ-ff βŸ©β‰‘
              ΞΉr.₁ x C.∘ ΞΉr.₁ (unit.Ξ· X) β‰‘βŸ¨ ΞΉr.annihilate (ortho X C.id .centre .snd) βŸ©β‰‘
              C.id                       ∎

And the converse to that is a specialisation of the first thing we proved: We established that if is invertible by the reflection functor, and we know that is invertible by the reflection functor; It remains to replace with any object for which is an isomorphism.

  in-subcategory→orthogonal-to-ηs
    : βˆ€ {X B} β†’ C.is-invertible (unit.Ξ· X) β†’ mβŠ₯o C (unit.Ξ· B) X
  in-subcategory→orthogonal-to-ηs inv =
    mβŠ₯-iso C (unit.Ξ· _) (C.invertibleβ†’iso _ (C.is-invertible-inverse inv))
      (in-subcategory→orthogonal-to-inverted
        (is-reflectiveβ†’F-unit-is-iso r⊣ι ΞΉ-ff))

  1. Though hang tight for a note on formalised notationβ†©οΈŽ


References