module Cat.Site.Constructions where
Constructing sitesπ
This module collects miscellaneous helpers for constructing sites. The first thing we observe is that we can form a coverage by considering a pullback-stable predicate, rather than pullback-stable families. This is the usual fibration/family dichotomy.
from-stable-property : β {o β βj} {C : Precategory o β} β (P : β {U} β Sieve C U β Type βj) β (β {U V} (f : C .Precategory.Hom V U) (s : Sieve C U) β P s β P (pullback f s)) β Coverage C (o β β β βj) from-stable-property P stab .covers U = Ξ£[ s β Sieve _ U ] P s from-stable-property P stab .cover = fst from-stable-property P stab .stable (S , ps) f = pure ((pullback f S , stab f S ps) , Ξ» g hf β hf)
In a similar vein, we can generalise from families of sieves
to families of families, since every family generates a sieve.
We call a presentation of a Coverage
in terms of
families-of-families a family of Coverings
, since Agda forces us
to differentiate the names.
record Coverings βi βc : Type (o β β β lsuc (βi β βc)) where field covers : β C β β Type βi family : β {U} β covers U β Cover C U βc
The definition of the stability property can be simplified slightly, by quantifying over the family rather than over the sieve it generates.
stable : β {U V} (S : covers U) (f : C .Hom V U) β β[ R β covers V ] (β i β family R .map i β pullback f β¦ family S β§)
Itβs not very complicated to show that this simplified stability property implies the literal stability property for the generated sieves.
from-families : β {βi βf} β Coverings C βi βf β Coverage C βi from-families cov .covers = cov .covers from-families cov .cover S = β¦ cov .family S β§ from-families cov .stable S f = do (R , incl) β cov .stable S f let incl' : β¦ cov .family R β§ β pullback f β¦ _ β§ incl' {W} = elim! Ξ» g r h p β do (s , i , q) β incl r pure (s , i β h , extendl q β ap (f β_) p) pure (R , incl')