module Homotopy.Truncation whereGeneral truncationsπ
Inspired by the equivalence built above, although not using it directly, we can characterise h-levels in terms of maps of spheres, too. The idea is that, since a map is equivalently some loop in 1, we can characterise the trivial loops as the constant functions . Correspondingly, if every function is trivial, this means that all -loops in are trivial, so that is -truncated!
We refer to a trivialisation of a map as being a βhubs-and-spokesβ construction. Geometrically, a trivial loop can be understood as a map from the -disc rather than the -sphere, where the -disc is the type generated by attaching a new point to the sphere (the βhubβ), and paths connecting the hub to each point along the sphere (the βspokesβ). The resulting type is contractible, whence every function out of it is constant.
hlevelβhubs-and-spokes
: β {β} {A : Type β} (n : Nat) β is-hlevel A (suc n)
β (sph : SβΏ n .fst β A)
β Ξ£[ hub β A ] (β x β sph x β‘ hub)
hubs-and-spokesβhlevel
: β {β} {A : Type β} (n : Nat)
β ((sph : SβΏ n .fst β A) β Ξ£[ hub β A ] (β x β sph x β‘ hub))
β is-hlevel A (suc n)Using this idea, we can define a general
-truncation
type, as a joint generalisation of the propositional
and set truncations. While we can
not directly build a type with a constructor saying the type is
-truncated,
what we can do is freely generate hubs and spokes for any
-sphere
drawn on the
-truncation
of
.
The result is the universal
-type
admitting a map from
.
data n-Tr {β} (A : Type β) n : Type β where
inc : A β n-Tr A n
hub : (r : SβΏβ»ΒΉ n β n-Tr A n) β n-Tr A n
spokes : (r : SβΏβ»ΒΉ n β n-Tr A n) β β x β r x β‘ hub rFor both proving that the -truncation has the right h-level, and proving that one can eliminate from it to -types, we use the characterisations of truncation in terms of hubs-and-spokes.
n-Tr-is-hlevel
: β {β} {A : Type β} n β is-hlevel (n-Tr A (suc n)) (suc n)
n-Tr-is-hlevel n = hubs-and-spokesβhlevel n Ξ» sph β hub sph , spokes sph
instance
n-tr-decomp : β {β} {A : Type β} {n} β hlevel-decomposition (n-Tr A (suc n))
n-tr-decomp = decomp (quote n-Tr-is-hlevel) (`level-minus 1 β· [])
n-Tr-elim
: β {β β'} {A : Type β} {n}
β (P : n-Tr A (suc n) β Type β')
β (β x β is-hlevel (P x) (suc n))
β (β x β P (inc x))
β β x β P x
n-Tr-elim {A = A} {n} P ptrunc pbase = go where
module _ (r : SβΏ n .fst β n-Tr A (1 + n))
(w : (x : SβΏ n .fst) β P (r x))
where
circle : SβΏβ»ΒΉ (1 + n) β P (hub r)
circle x = subst P (spokes r x) (w x)
hub' = hlevelβhubs-and-spokes n (ptrunc (hub r)) circle .fst
spokes' : β x β PathP (Ξ» i β P (spokes r x i)) (w x) hub'
spokes' x = to-pathp $
hlevelβhubs-and-spokes n (ptrunc (hub r)) circle .snd x
go : β x β P x
go (inc x) = pbase x
go (hub r) = hub' r (Ξ» x β go (r x))
go (spokes r x i) = spokes' r (Ξ» x β go (r x)) x iAs a simpler case of n-Tr-elim,
we have the recursion principle, where the type we are eliminating into
is constant.
n-Tr-rec
: β {β β'} {A : Type β} {B : Type β'} {n}
β is-hlevel B (suc n) β (A β B) β n-Tr A (suc n) β B
n-Tr-rec hl = n-Tr-elim (Ξ» _ β _) (Ξ» _ β hl)An initial application of the induction principle for -truncation of is characterising its path spaces, at least for the inclusions of points from . Identifications between (the images of) points in in the -truncation are equivalently -truncated identifications in :
n-Tr-path-equiv
: β {β} {A : Type β} {n} {x y : A}
β Path (n-Tr A (2 + n)) (inc x) (inc y) β n-Tr (x β‘ y) (suc n)
n-Tr-path-equiv {A = A} {n} {x = x} {y} = IsoβEquiv isom whereThe proof is an application of the encode-decode method. We would like to characterise the space
so we will, for every , define a type family , where the fibre of over should be . However, induction principle for only allows us to map into -types, while itself is not an -type for any . We salvage our definition by instead mapping into , which is a -type.
code : (x : A) (y' : n-Tr A (2 + n)) β n-Type _ (suc n)
code x =
n-Tr-elim!
(Ξ» y' β n-Type _ (suc n))
(Ξ» y' β el! (n-Tr (Path A x y') (suc n)))The rest of the proof boils down to applications of path induction and the induction
principle for
.
encode' : β x y β inc x β‘ y β β£ code x y β£
encode' x _ = J (Ξ» y _ β β£ code x y β£) (inc refl)
decode' : β x y β β£ code x y β£ β inc x β‘ y
decode' x =
n-Tr-elim! _ Ξ» x β n-Tr-rec hlevel! (ap inc)
rinv : β x y β is-right-inverse (decode' x y) (encode' x y)
rinv x = n-Tr-elim _
(Ξ» y β Ξ -is-hlevel (2 + n)
(Ξ» c β Path-is-hlevel (2 + n) (is-hlevel-suc (suc n) (code x y .is-tr))))
Ξ» x β n-Tr-elim! _ Ξ» p β ap n-Tr.inc (subst-path-right _ _ β β-idl _)
linv : β x y β is-left-inverse (decode' x y) (encode' x y)
linv x _ = J (Ξ» y p β decode' x y (encode' x y p) β‘ p)
(ap (decode' x (inc x)) (transport-refl (inc refl)) β refl)
isom : Iso (inc x β‘ inc y) (n-Tr (x β‘ y) (suc n))
isom = encode' _ (inc _)
, iso (decode' _ (inc _)) (rinv _ (inc _)) (linv _ (inc _))n-Tr-univ
: β {β β'} {A : Type β} {B : Type β'} n
β is-hlevel B (suc n)
β (n-Tr A (suc n) β B) β (A β B)
n-Tr-univ n b-hl = IsoβEquiv Ξ» where
.fst f β f β inc
.snd .is-iso.inv f β n-Tr-rec b-hl f
.snd .is-iso.rinv f β refl
.snd .is-iso.linv f β funext $ n-Tr-elim _ (Ξ» x β Path-is-hlevel (suc n) b-hl) Ξ» _ β refln-Tr-product
: β {β β'} {A : Type β} {B : Type β'} {n}
β n-Tr (A Γ B) (suc n) β (n-Tr A (suc n) Γ n-Tr B (suc n))
n-Tr-product {A = A} {B} {n} = distrib , distrib-is-equiv module n-Tr-product where
distrib : n-Tr (A Γ B) (suc n) β n-Tr A (suc n) Γ n-Tr B (suc n)
distrib (inc (x , y)) = inc x , inc y
distrib (hub r) .fst = hub Ξ» s β distrib (r s) .fst
distrib (hub r) .snd = hub Ξ» s β distrib (r s) .snd
distrib (spokes r x i) .fst = spokes (Ξ» s β distrib (r s) .fst) x i
distrib (spokes r x i) .snd = spokes (Ξ» s β distrib (r s) .snd) x i
pair : n-Tr A (suc n) β n-Tr B (suc n) β n-Tr (A Γ B) (suc n)
pair (inc x) (inc y) = inc (x , y)
pair (inc x) (hub r) = hub Ξ» s β pair (inc x) (r s)
pair (inc x) (spokes r y i) = spokes (Ξ» s β pair (inc x) (r s)) y i
pair (hub r) y = hub Ξ» s β pair (r s) y
pair (spokes r x i) y = spokes (Ξ» s β pair (r s) y) x i
open is-iso
distrib-is-iso : is-iso distrib
distrib-is-iso .inv (x , y) = pair x y
distrib-is-iso .rinv (x , y) = n-Tr-elim
(Ξ» x β β y β distrib (pair x y) β‘ (x , y))
(Ξ» _ β Ξ -is-hlevel (suc n) Ξ» x β Path-is-hlevel (suc n) (Γ-is-hlevel (suc n) hlevel! hlevel!))
(Ξ» x β n-Tr-elim _ (Ξ» y β Path-is-hlevel (suc n) (Γ-is-hlevel (suc n) hlevel! hlevel!)) Ξ» y β refl)
x y
distrib-is-iso .linv = n-Tr-elim! _ Ξ» x β refl
distrib-is-equiv = is-isoβis-equiv distrib-is-isoAny map can be made basepoint-preserving by letting be based at .β©οΈ