module Cat.Displayed.Univalence.Thin where
open Cat.Displayed.Total public
open Cat.Displayed.Base public
open Total-hom public
open Precategory
open Displayed
open Cat.Displayed.Morphism
open _β
[_]_
Thinly displayed structuresπ
The HoTT Bookβs version of the structure identity principle can be seen as a very early example of displayed category theory. Their standard notion of structure corresponds exactly to a displayed category, all of whose fibres are posets. Note that this is not a category fibred in posets, since the displayed category will not necessarily be a Cartesian fibration.
Here, we restrict our attention to an important special case: Categories of structures over the category of sets (for a given universe level). Since these all have thin fibres (by assumption), we refer to them as thinly displayed structures, or thin structures for short. These are of note not only because they intersect the categorical SIP defined above with the typal SIP established in the prelude modules, but also because we can work with them very directly.
record
{β o'} β' (S : Type β β Type o')
Thin-structure : Type (lsuc β β o' β lsuc β') where
no-eta-equality
field
: β {x y} β (x β y) β S x β S y β Prop β'
is-hom : β {x} {s : S x} β β£ is-hom (Ξ» x β x) s s β£
id-is-hom
:
β-is-hom β {x y z} {s t u} (f : y β z) (g : x β y)
β (Ξ± : β£ is-hom f t u β£) (Ξ² : β£ is-hom g s t β£)
β β£ is-hom (Ξ» x β f (g x)) s u β£
id-hom-unique: β {x} {s t : S x}
β β£ is-hom (Ξ» x β x) s t β£ β β£ is-hom (Ξ» x β x) t s β£ β s β‘ t
open Thin-structure public
module _
{β o' β'} {S : Type β β Type o'}
(spec : Thin-structure β' S) where
The data above conspires to make a category displayed over The laws are trivial since is valued in propositions.
: Displayed (Sets β) o' β'
Thin-structure-over .Ob[_] x = S β£ x β£
Thin-structure-over .Hom[_] f x y = β£ spec .is-hom f x y β£
Thin-structure-over .Hom[_]-set f a b = hlevel 2
Thin-structure-over .id' = spec .id-is-hom
Thin-structure-over ._β'_ f g = spec .β-is-hom _ _ f g
Thin-structure-over .idr' f' = prop!
Thin-structure-over .idl' f' = prop!
Thin-structure-over .assoc' f' g' h' = prop!
Thin-structure-over
: Precategory _ _
Structured-objects = β« Thin-structure-over Structured-objects
We recall that the can be made into a preorder by setting iff. the identity morphism is an from to And, if this preorder is in fact a partial order, then the total category of structures is univalent β the type of identities between is equivalent to the type of
: is-category Structured-objects
Structured-objects-is-category =
Structured-objects-is-category
is-category-total Thin-structure-over Sets-is-category $_ Sets-is-category Ξ» A x y β
is-category-fibrewise
Ξ£-prop-path(Ξ» _ _ _ β β
[]-path _ (spec .is-hom _ _ _ .is-tr _ _))
( spec .id-hom-unique (x .snd .from') (x .snd .to')
.id-hom-unique (y .snd .to') (y .snd .from')) β spec
By construction, such a category of structured objects admits a faithful functor into the category of sets.
: Functor Structured-objects (Sets β)
Forget-structure = ΟαΆ Thin-structure-over
Forget-structure
: is-faithful Forget-structure
Structured-hom-path = total-hom-path Thin-structure-over p prop!
Structured-hom-path p
module _ {β o' β'} {S : Type β β Type o'} {spec : Thin-structure β' S} where
private
module So = Precategory (Structured-objects spec)
module Som = Cat.Morphism (Structured-objects spec)
instance
Extensional-Hom: β {a b βr} β¦ sa : Extensional (β a β β β b β) βr β¦
β Extensional (So.Hom a b) βr
= injectionβextensional!
Extensional-Hom β¦ sa β¦ (Structured-hom-path spec) sa
Homomorphism-monic: β {x y : So.Ob} (f : So.Hom x y)
β (β {x y} (p : f # x β‘ f # y) β x β‘ y)
β Som.is-monic f
= ext Ξ» x β wit (ap hom p $β x)
Homomorphism-monic f wit g h p
record is-equational {β o' β'} {S : Type β β Type o'} (spec : Thin-structure β' S) : Type (lsuc β β o' β β') where
field
: β {x} {s t : S x} β β£ spec .is-hom (Ξ» x β x) s t β£ β β£ spec .is-hom (Ξ» x β x) t s β£
invert-id-hom
private
module So = Precategory (Structured-objects spec)
module Som = Cat.Morphism (Structured-objects spec)
abstract
equiv-homβinverse-hom: β {a b : So.Ob}
β (f : β a β β β b β)
β β£ spec .is-hom (Equiv.to f) (a .snd) (b .snd) β£
β β£ spec .is-hom (Equiv.from f) (b .snd) (a .snd) β£
{a = a} {b = b} f e =
equiv-homβinverse-hom (Ξ» B e β β st β β£ spec .is-hom (e .fst) (a .snd) st β£ β β£ spec .is-hom (Equiv.from e) st (a .snd) β£)
EquivJ (Ξ» _ β invert-id-hom) f (b .snd) e
total-iso: β {a b : So.Ob}
β (f : β a β β β b β)
β β£ spec .is-hom (Equiv.to f) (a .snd) (b .snd) β£
β a Som.β
b
= Som.make-iso
total-iso f e (total-hom (Equiv.to f) e)
(total-hom (Equiv.from f) (equiv-homβinverse-hom f e))
(ext (Equiv.Ξ΅ f))
(ext (Equiv.Ξ· f))
β«-Path: β {a b : So.Ob}
β (f : So.Hom a b)
β is-equiv (f #_)
β a β‘ b
{a = a} {b = b} f eqv = Univalent.isoβpath
β«-Path (Structured-objects-is-category spec)
(total-iso ((f #_) , eqv) (f .preserves))
open is-equational β¦ ... β¦ public
Full-substructure: β {β o'} β' (R S : Type β β Type o')
β (β X β R X βͺ S X)
β Thin-structure β' S
β Thin-structure β' R
_ R S embed Sst .is-hom f x y =
Full-substructure .is-hom f (embed _ .fst x) (embed _ .fst y)
Sst _ R S embed Sst .id-is-hom = Sst .id-is-hom
Full-substructure _ R S embed Sst .β-is-hom = Sst .β-is-hom
Full-substructure _ R S embed Sst .id-hom-unique Ξ± Ξ² =
Full-substructure (embed _ .fst) (embed _ .snd)
has-prop-fibresβinjective (Sst .id-hom-unique Ξ± Ξ²)