open import Cat.Functor.Adjoint.Reflective
open import Cat.Functor.Properties
open import Cat.Diagram.Terminal
open import Cat.Functor.Adjoint
open import Cat.Morphism.Class
open import Cat.Morphism.Lifts
open import Cat.Prelude

import Cat.Functor.Reasoning
import Cat.Reasoning
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 liftings (dashed) which commute with everything is contractible. We will also speak of orthogonality of an object and a morphism, a morphism and a class of morphisms, and so on.

Note

In the formalisation, we will write Orthogonal to denote all of the aforementioned orthogonality properties.

module _ {o ℓ} (C : Precategory o ℓ) where
  open Cat.Reasoning C
  open Terminal
  private
    variable
      a b c d x y : ⌞ C ⌟
      f g h u v : Hom a b

If the ambient category has enough co/limits, being orthogonal to an object is equivalent to being orthogonal to a morphism. For example, iff. where is the unique map from into the terminal object.

  object-orthogonal-!-orthogonal
    : ∀ {X : Ob} (T : Terminal C) (f : Hom a b)
    → Orthogonal C f X ≃ Orthogonal C f (! T {X})

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

  object-orthogonal-!-orthogonal {X = X} T f = prop-ext! fwd bwd where
    module T = Terminal T

    fwd : Orthogonal C f X → Orthogonal C f T.!
    fwd f⊄X u v sq .centre =
        f⊄X u .centre .fst
      , f⊄X u .centre .snd
      , T.!-unique₂ _ _
    fwd f⊄X u v sq .paths m = ÎŁ-prop-path! $
      ap fst (f⊄X u .paths (m .fst , m .snd .fst))

    bwd : Orthogonal C f (! T) → Orthogonal C f X
    bwd f⊄! u .centre =
        f⊄! u T.! (T.!-unique₂ _ _) .centre .fst
      , f⊄! u T.! (T.!-unique₂ _ _) .centre .snd .fst
    bwd f⊄! u .paths (w , eq) = ÎŁ-prop-path! $
      ap fst (f⊄! _ _ _ .paths (w , eq , (T.!-unique₂ _ _)))

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.

  obj-orthogonal-iso
    : ∀ {a b} {X Y} (f : Hom a b)
    → X ≅ Y → Orthogonal C f X → Orthogonal C f Y
  obj-orthogonal-iso f x≅y f⊄X a =
    contr
      ( g.to ∘ contr' .centre .fst
      , pullr (contr' .centre .snd) ∙ cancell g.invl )
      λ x → ÎŁ-prop-path! $
        ap₂ _∘_ refl (ap fst (contr' .paths (g.from ∘ x .fst , pullr (x .snd))))
        ∙ cancell g.invl
    where
      module g = _≅_ x≅y
      contr' = f⊄X (g.from ∘ a)

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) → Orthogonal C f f → is-invertible f
  self-orthogonal→invertible f f⊄f =
    let (f , p , q) = f⊄f id id (idl _ ∙ intror refl) .centre in
    make-invertible f q p

If is an epi or is a mono, then the mere existence of any lift is enough to establish that

  left-epic-lift→orthogonal
    : (g : Hom c d)
    → is-epic f → Lifts C f g → Orthogonal C f g
  left-epic-lift→orthogonal g f-epi lifts u v vf=gu = is-prop∄∄→is-contr
    (left-epic→lift-is-prop C f-epi vf=gu)
    (lifts u v vf=gu)

  right-monic-lift→orthogonal
    : (f : Hom a b)
    → is-monic g → Lifts C f g → Orthogonal C f g
  right-monic-lift→orthogonal f g-mono lifts u v vf=gu = is-prop∄∄→is-contr
    (right-monic→lift-is-prop C g-mono vf=gu)
    (lifts u v vf=gu)
  left-epic-lift→orthogonal-class
    : ∀ {Îș} (R : Arrows C Îș)
    → is-epic f → Lifts C f R → Orthogonal C f R
  left-epic-lift→orthogonal-class R f-epic lifts r r∈R = left-epic-lift→orthogonal
    r f-epic (lifts r r∈R)

  right-monic-lift→orthogonal-class
    : ∀ {Îș} (L : Arrows C Îș)
    → is-monic f → Lifts C L f → Orthogonal C L f
  right-monic-lift→orthogonal-class L f-epic lifts l l∈L =
    right-monic-lift→orthogonal l f-epic (lifts l l∈L)

As a corollary, we get that isomorphisms are left and right orthogonal to every other morphism.

  invertible→left-orthogonal : (g : Hom c d) → Orthogonal C Isos g
  invertible→left-orthogonal g f f-inv =
      left-epic-lift→orthogonal g (invertible→epic f-inv)
    $ invertible-left-lifts C f f-inv

  invertible→right-orthogonal : (f : Hom a b) → Orthogonal C f Isos
  invertible→right-orthogonal f g g-inv =
      right-monic-lift→orthogonal f (invertible→monic g-inv)
    $ invertible-right-lifts C g g-inv

Phrased another way, the class of isomorphisms is left and right orthogonal to every other class.

  isos-left-orthogonal : ∀ {Îș} (R : Arrows C Îș) → Orthogonal C Isos R
  isos-left-orthogonal R f f-inv r r∈R = invertible→left-orthogonal r f f-inv

  isos-right-orthogonal : ∀ {Îș} (L : Arrows C Îș) → Orthogonal C L Isos
  isos-right-orthogonal L l l∈L f f-inv = invertible→right-orthogonal l f f-inv
  invertible→left-orthogonal-class : ∀ {Îș} (R : Arrows C Îș) → is-invertible f → Orthogonal C f R
  invertible→left-orthogonal-class R f-inv r _ = invertible→left-orthogonal r _ f-inv

  invertible→right-orthogonal-class : ∀ {Îș} (L : Arrows C Îș) → is-invertible f → Orthogonal C L f
  invertible→right-orthogonal-class L f-inv l _ = invertible→right-orthogonal l _ f-inv
  orthogonal→lifts-against : Orthogonal C f g → Lifts C f g
  orthogonal→lifts-against o u v p = pure (o u v p .centre)

  orthogonal→lifts-left-class
    : ∀ {Îș} (L : Arrows C Îș)
    → Orthogonal C L f → Lifts C L f
  orthogonal→lifts-left-class L L⊄f l l∈L =
    orthogonal→lifts-against (L⊄f l l∈L)

  orthogonal→lifts-right-class
    : ∀ {Îș} (R : Arrows C Îș)
    → Orthogonal C f R → Lifts C f R
  orthogonal→lifts-right-class R f⊄R r r∈R =
    orthogonal→lifts-against (f⊄R r r∈R)

Regarding reflections🔗

module
  _ {o ℓ o' ℓ'} {C : Precategory o ℓ} {D : Precategory o' ℓ'}
    {r : Functor C D} {Îč : Functor D C}
    (r⊣Îč : r ⊣ Îč) (Îč-ff : is-fully-faithful Îč)
  where
  private
    module C = Cat.Reasoning C
    module D = Cat.Reasoning D
    module Îč = Cat.Functor.Reasoning Îč
    module r = Cat.Functor.Reasoning r
    module rÎč = Cat.Functor.Reasoning (r F∘ Îč)
    module Îčr = Cat.Functor.Reasoning (Îč F∘ r)
  open _⊣_ r⊣Îč

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) → Orthogonal 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-right-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-right-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 → Orthogonal 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) → Orthogonal C (unit.η B) X
  in-subcategory→orthogonal-to-ηs inv =
      obj-orthogonal-iso C (unit.η _)
        (C.invertible→iso _ (C.is-invertible-inverse inv))
    $ in-subcategory→orthogonal-to-inverted
        (is-reflective→left-unit-is-iso r⊣Îč Îč-ff)

  1. Though hang tight for a note on formalised notation↩


References