module Cat.Internal.Instances.Discrete {o β} (C : Precategory o β) where
Discrete internal categoriesπ
Every object induces a category internal to where the object-of-objects and object-of-morphisms are both taken to be and the source/target maps are identities. The identity-assigning morphism is also given by the identity map, and the composition operator returns the intermediate map.
These internal categories are called discrete internal categories, and play the same role as discrete categories do in 1-category theory.
Disci-is-internal-cat : β (I : Ob) β Internal-cat-on (id {I}) (id {I}) Disci-is-internal-cat I = icat where open Internal-cat-on icat : Internal-cat-on id id icat .idi x .ihom = x icat .idi x .has-src = idl _ icat .idi x .has-tgt = idl _ _βi_ icat {_} {x} {y} {z} f g .ihom = y _βi_ icat {_} {x} {y} {z} f g .has-src = id β y β‘β¨ idl _ β©β‘ y β‘Λβ¨ g .has-tgt β©β‘Λ id β g .ihom β‘β¨ g .has-src β©β‘ x β _βi_ icat {_} {x} {y} {z} f g .has-tgt = id β y β‘β¨ idl _ β©β‘ y β‘Λβ¨ f .has-src β©β‘Λ id β f .ihom β‘β¨ f .has-tgt β©β‘ z β icat .idli f = Internal-hom-path $ sym (f .has-tgt) β idl _ icat .idri f = Internal-hom-path $ sym (f .has-src) β idl _ icat .associ {_} {w} {x} {y} {z} f g h = Internal-hom-path $ y β‘Λβ¨ g .has-tgt β©β‘Λ id β g .ihom β‘β¨ g .has-src β©β‘ x β icat .idi-nat _ = Internal-hom-path refl icat .βi-nat _ _ _ = Internal-hom-path refl Disci : Ob β Internal-cat Disci I .Internal-cat.Cβ = I Disci I .Internal-cat.Cβ = I Disci I .Internal-cat.src = id Disci I .Internal-cat.tgt = id Disci I .Internal-cat.has-internal-cat = Disci-is-internal-cat I
Functors between discrete internal categories are given by morphisms between their objects of objects.
lift-disci : β {I J : Ob} β Hom I J β Internal-functor (Disci I) (Disci J) lift-disci f .Internal-functor.Fiβ g = f β g lift-disci f .Internal-functor.Fiβ g .ihom = f β g .ihom lift-disci f .Internal-functor.Fiβ g .has-src = extendl id-comm-sym β ap (f β_) (g .has-src) lift-disci f .Internal-functor.Fiβ g .has-tgt = extendl id-comm-sym β ap (f β_) (g .has-tgt) lift-disci f .Internal-functor.Fi-id = Internal-hom-path refl lift-disci f .Internal-functor.Fi-β _ _ = Internal-hom-path refl lift-disci f .Internal-functor.Fiβ-nat _ _ = sym (assoc _ _ _) lift-disci f .Internal-functor.Fiβ-nat _ _ = Internal-hom-pathp _ _ (sym (assoc _ _ _))