module Prim.Kan where
Primitive: Kan operationsπ
Using the machinery from the other Prim
modules, we can
define the Kan operations: transport and composition.
private module X where primitive primTransp : β {β} (A : (i : I) β Type (β i)) (Ο : I) (a : A i0) β A i1 primHComp : β {β} {A : Type β} {Ο : I} (u : β i β Partial Ο A) (a : A) β A primComp : β {β} (A : (i : I) β Type (β i)) {Ο : I} (u : β i β Partial Ο (A i)) (a : A i0) β A i1 open X public renaming (primTransp to transp) hcomp : β {β} {A : Type β} (Ο : I) β (u : (i : I) β Partial (Ο β¨ ~ i) A) β A hcomp Ο u = X.primHComp (Ξ» j .o β u j (leftIs1 Ο (~ j) o)) (u i0 1=1) β : I β I β i = i β¨ ~ i comp : β {β : I β Level} (A : (i : I) β Type (β i)) (Ο : I) β (u : (i : I) β Partial (Ο β¨ ~ i) (A i)) β A i1 comp A Ο u = X.primComp A (Ξ» j .o β u j (leftIs1 Ο (~ j) o)) (u i0 1=1)
We also define the type of dependent paths, and of non-dependent paths.
postulate PathP : β {β} (A : I β Type β) β A i0 β A i1 β Type β {-# BUILTIN PATHP PathP #-} infix 7 _β‘_ _β‘_ : β {β} {A : Type β} β A β A β Type β _β‘_ {A = A} = PathP (Ξ» i β A) {-# BUILTIN PATH _β‘_ #-}
{-# BUILTIN REWRITE _β‘_ #-} caseβ±_of_ : β {β β'} {A : Type β} {B : Type β'} (x : A) β ((y : A) β x β‘ y β B) β B caseβ± x of f = f x (Ξ» i β x) caseβ±_return_of_ : β {β β'} {A : Type β} (x : A) (P : A β Type β') β ((y : A) β x β‘ y β P y) β P x caseβ± x return P of f = f x (Ξ» i β x) {-# INLINE caseβ±_of_ #-} {-# INLINE caseβ±_return_of_ #-}