module 1Lab.Type.Pointed where
Pointed typesπ
A pointed type is a type equipped with a choice of base point
Typeβ : β β β Type (lsuc β) Typeβ β = Ξ£ (Type β) (Ξ» A β A)
If we have pointed types and the most natural notion of function between them is not simply the type of functions but rather those functions which preserve the basepoint, i.e.Β the functions equipped with paths Those are called pointed maps.
_ββ_ : Typeβ β β Typeβ β' β Type _ (A , a) ββ (B , b) = Ξ£[ f β (A β B) ] (f a β‘ b) infixr 0 _ββ_
Pointed maps compose in a straightforward way.
idβ : A ββ A idβ = id , refl _ββ_ : (B ββ C) β (A ββ B) β A ββ C (f , ptf) ββ (g , ptg) = f β g , ap f ptg β ptf infixr 40 _ββ_
Paths between pointed maps are characterised as pointed homotopies:
funextβ : {f g : A ββ B} β (h : β x β f .fst x β‘ g .fst x) β Square (h (A .snd)) (f .snd) (g .snd) refl β f β‘ g funextβ h pth i = funext h i , pth i
The product of two pointed types is again a pointed type.
_Γβ_ : Typeβ β β Typeβ β' β Typeβ (β β β') (A , a) Γβ (B , b) = A Γ B , a , b infixr 5 _Γβ_ fstβ : A Γβ B ββ A fstβ = fst , refl sndβ : A Γβ B ββ B sndβ = snd , refl