module Cat.Functor.Algebra.Limits where
Limits in categories of F-algebras🔗
This short note details the construction of limits in categories of F-algebras from limits in the underlying category; it is similar to the construction of limits in categories of algebras for a monad.
module _
{o ℓ oj ℓj} {C : Precategory o ℓ}
(F : Functor C C)
{J : Precategory oj ℓj} (K : Functor J (FAlg F))
where
open Cat.Reasoning C
private
module J = Cat.Reasoning J
module F = Cat.Functor.Reasoning F
module K = Cat.Functor.Reasoning K
open ∫Hom
Let be an endofunctor, and be a diagram of If has a limit of then can be equipped with an structure that makes it the limit of in
: Limit (πᶠ (F-Algebras F) F∘ K) → Limit K
Forget-algebra-lifts-limit = to-limit (to-is-limit L') where
Forget-algebra-lifts-limit L module L = Limit L
open make-is-limit
As noted earlier, the underlying object of the limit is The algebra is constructed via the universal property of to give a map it suffices to give maps for every which we can construct by composing the projection with the algebra
: FAlg.Ob F
apex .fst = L.apex
apex .snd = L.universal (λ j → K.₀ j .snd ∘ F.₁ (L.ψ j)) comm where abstract
apex
comm: ∀ {i j : J.Ob} (f : J.Hom i j)
→ K.₁ f .fst ∘ K.₀ i .snd ∘ F.₁ (L.ψ i) ≡ K.₀ j .snd ∘ F.₁ (L.ψ j)
{i} {j} f =
comm .₁ f .fst ∘ K.₀ i .snd ∘ F.₁ (L.ψ i) ≡⟨ pulll (K.₁ f .snd) ⟩
K(K.₀ j .snd ∘ F.₁ (K.₁ f .fst)) ∘ F.₁ (L.ψ i) ≡⟨ F.pullr (L.commutes f) ⟩
.₀ j .snd ∘ F.₁ (L.ψ j) ∎ K
A short series of calculations shows that the projections and universal map associated to are homomorphisms.
: make-is-limit K apex
L' .ψ j .fst = L.ψ j
L' .ψ j .snd = L.factors _ _
L' .universal eps p .fst =
L' .universal (λ j → eps j .fst) (λ f → ap fst (p f))
L.universal eps p .snd =
L' .unique₂ (λ j → K.F₀ j .snd ∘ F.₁ (eps j .fst))
L(λ f → pulll (K.₁ f .snd) ∙ F.pullr (ap fst (p f)))
(λ j → pulll (L.factors _ _) ∙ eps j .snd)
(λ j → pulll (L.factors _ _) ∙ F.pullr (L.factors _ _))
Finally, equality of morphisms of is given by equality on the underlying morphisms, so all of the relevant diagrams in commute.
.commutes f =
L' (F-Algebras F) (L.commutes f) prop!
∫Hom-path .factors eps p =
L' (F-Algebras F) (L.factors _ _) prop!
∫Hom-path .unique eps p other q =
L' (F-Algebras F) (L.unique _ _ _ λ j → ap fst (q j)) prop! ∫Hom-path
module _
{o ℓ oj ℓj} {C : Precategory o ℓ}
(F : Functor C C)
{J : Precategory oj ℓj}
where
Packaging this together, we have that the forgetful functor from the category of to creates limits.
: lifts-limits-of J (πᶠ (F-Algebras F))
Forget-algebra-lifts-limits .lifted = Forget-algebra-lifts-limit F _ lim
Forget-algebra-lifts-limits lim .preserved = trivial-is-limit! (Ran.has-ran lim)
Forget-algebra-lifts-limits lim
: creates-limits-of J (πᶠ (F-Algebras F))
Forget-algebra-creates-limits = conservative+lifts→creates-limits
Forget-algebra-creates-limits Forget-algebra-is-conservative Forget-algebra-lifts-limits
module _
{o ℓ oκ ℓκ} {C : Precategory o ℓ}
(complete : is-complete oκ ℓκ C)
where
This gives us the following useful corollary: if is then is also complete.
: (F : Functor C C) → is-complete oκ ℓκ (FAlg F)
FAlg-is-complete = lifts-limits→complete (πᶠ (F-Algebras F))
FAlg-is-complete F (Forget-algebra-lifts-limits F) complete