module Cat.Instances.Shape.Terminal where
The terminal category is the category with a single object, and only trivial morphisms.
: Precategory lzero lzero
⊤Cat .Ob = ⊤
⊤Cat .Hom _ _ = ⊤
⊤Cat .Hom-set _ _ _ _ _ _ _ _ = tt
⊤Cat .Precategory.id = tt
⊤Cat .Precategory._∘_ _ _ = tt
⊤Cat .idr _ _ = tt
⊤Cat .idl _ _ = tt
⊤Cat .assoc _ _ _ _ = tt
⊤Cat
module _ {o h} {A : Precategory o h} where
private module A = Precategory A
open Functor
: Ob A → Functor ⊤Cat A
const! = Const
const!
: Functor A ⊤Cat
!F .F₀ _ = tt
!F .F₁ _ = tt
!F .F-id = refl
!F .F-∘ _ _ = refl
!F
: ∀ (F G : Functor ⊤Cat A) → F .F₀ tt ≡ G .F₀ tt → F ≡ G
const-η =
const-η F G p
Functor-path(λ _ → p)
(λ _ i → hcomp (∂ i) λ where
(i = i0) → F .F-id (~ j)
j (i = i1) → G .F-id (~ j)
j (j = i0) → A.id) j
Natural isomorphisms between functors correspond to isomorphisms in .
module _ {o ℓ} {𝒞 : Precategory o ℓ} {F G : Functor ⊤Cat 𝒞} where
private
module 𝒞 = Cat.Reasoning 𝒞
open Functor
open _=>_
: 𝒞.Hom (F .F₀ tt) (G .F₀ tt) → F => G
hom→⊤-natural-trans .η _ = f
hom→⊤-natural-trans f .is-natural _ _ _ = 𝒞.elimr (F .F-id) ∙ 𝒞.introl (G .F-id)
hom→⊤-natural-trans f
: F .F₀ tt 𝒞.≅ G .F₀ tt → F ≅ⁿ G
iso→⊤-natural-iso = iso→isoⁿ (λ _ → i) λ _ → 𝒞.eliml (G .F-id) ∙ 𝒞.intror (F .F-id) iso→⊤-natural-iso i