module Cat.Direct.Generalized where

Generalized direct categories🔗

A precategory is direct if the relation

is well-founded.

  record is-generalized-direct : Type (od  ℓd) where
    _≺_ : D.Ob  D.Ob  Type ℓd
    x  y = ∃[ f  D.Hom x y ] ¬ D.is-invertible f

    field
      ≺-wf : Wf _≺_

Closure properties🔗

If is a conservative functor and is a generalized direct category, then is generalized direct as well.

  conservative→reflect-direct
    : is-conservative F
     is-generalized-direct D
     is-generalized-direct C
  conservative→reflect-direct F-conservative D-direct = C-direct where

Note that if is conservative, then it also reflects non-invertibility of morphisms. This lets us pull back well-foundedness of in to well-foundedness of in

    C-direct : is-generalized-direct C
    C-direct .≺-wf =
      reflect-wf D.≺-wf F₀ $ rec! λ f ¬f-inv 
        pure (F₁ f , ¬f-inv  F-conservative)