module Homotopy.Truncation where
General truncationsπ
Inspired by the equivalence between loop spaces and maps out of spheres, 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 in are trivial, so that is
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 where the 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)
0 prop sph = sph N , Ξ» x β prop (sph x) (sph N)
hlevelβhubs-and-spokes {A = A} (suc n) h =
hlevelβhubs-and-spokes Ξ» x y β hlevelβhubs-and-spokes n (h x y)
helper where
helper: ((a b : A) β (sph : SβΏβ»ΒΉ (1 + n) β a β‘ b) β Ξ£ _ Ξ» hub β β x β sph x β‘ hub)
β (sph : SβΏβ»ΒΉ (2 + n) β A)
β Ξ£ _ Ξ» hub β β x β sph x β‘ hub
= f N , sym β r where
helper h f : (x : SβΏβ»ΒΉ (2 + n)) β f N β‘ f x
r = refl
r N = h (f N) (f S) (Ξ» x i β f (merid x i)) .fst
r S (merid x i) j = hcomp (β i β¨ β j) Ξ» where
r (i = i0) β f N
k (i = i1) β h (f N) (f S) (Ξ» x i β f (merid x i)) .snd x k j
k (j = i0) β f N
k (j = i1) β f (merid x i)
k (k = i0) β f (merid x (i β§ j))
k
{A = A} zero spheres x y
hubs-and-spokesβhlevel = spheres go .snd N β sym (spheres go .snd S) where
: SβΏβ»ΒΉ 1 β A
go = x
go N = y
go S {A = A} (suc n) spheres x y =
hubs-and-spokesβhlevel where
hubs-and-spokesβhlevel n $ helper spheres x y
helper: ((sph : SβΏβ»ΒΉ (2 + n) β A) β Ξ£ _ Ξ» hub β β x β sph x β‘ hub)
β β a b
β (sph : SβΏβ»ΒΉ (1 + n) β a β‘ b)
β Ξ£ _ Ξ» hub β β x β sph x β‘ hub
= _ , r where
helper h x y f : SβΏβ»ΒΉ (2 + n) β A
f' = x
f' N = y
f' S (merid u i) = f u i
f'
: (s : SβΏβ»ΒΉ (1 + n)) β f s β‘ h f' .snd N β sym (h f' .snd S)
r = hcomp (β i β¨ β j) Ξ» where
r s i j (k = i0) β h f' .snd N (~ i β¨ j)
k (i = i0) β h f' .snd (merid s j) (~ k)
k (i = i1) β hfill (β j) k Ξ» where
k (j = i0) β x
l (j = i1) β h f' .snd S (~ l)
l (l = i0) β h f' .snd N j
l (j = i0) β h f' .snd N (~ i β§ ~ k)
k (j = i1) β h f' .snd S (~ k) k
Using this idea, we can define a general
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
what we can do is freely generate hub
s and spokes
for any
drawn on the
of
The result is the universal
admitting a map from
data n-Tr {β} (A : Type β) n : Type β where
: A β n-Tr A n
inc : (r : SβΏβ»ΒΉ n β n-Tr A n) β n-Tr A n
hub : (r : SβΏβ»ΒΉ n β n-Tr A n) β β x β r x β‘ hub r spokes
For both proving that the has the right h-level, and proving that one can eliminate from it to 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)
= hubs-and-spokesβhlevel n Ξ» sph β hub sph , spokes sph
n-Tr-is-hlevel n
instance
: β {β} {A : Type β} {n k} β¦ _ : suc n β€ k β¦ β H-Level (n-Tr A (suc n)) k
H-Level-n-Tr {k = _} β¦ p β¦ = hlevel-instance $ is-hlevel-le _ _ p (n-Tr-is-hlevel _)
H-Level-n-Tr
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
{A = A} {n} P ptrunc pbase = go where
n-Tr-elim module _ (r : SβΏ n .fst β n-Tr A (1 + n))
(w : (x : SβΏ n .fst) β P (r x))
where
: SβΏβ»ΒΉ (1 + n) β P (hub r)
circle = subst P (spokes r x) (w x)
circle x
= hlevelβhubs-and-spokes n (ptrunc (hub r)) circle .fst
hub'
: β x β PathP (Ξ» i β P (spokes r x i)) (w x) hub'
spokes' = to-pathp $
spokes' x (ptrunc (hub r)) circle .snd x
hlevelβhubs-and-spokes n
: β 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 i go
instance
Inductive-n-Tr: β {β β' βm} {A : Type β} {n} {P : n-Tr A (suc n) β Type β'} β¦ i : Inductive (β x β P (inc x)) βm β¦
β β¦ _ : β {x} β H-Level (P x) (suc n) β¦
β Inductive (β x β P x) βm
= record
Inductive-n-Tr β¦ i β¦ { from = Ξ» f β n-Tr-elim _ (Ξ» x β hlevel _) (i .Inductive.from f)
}
n-Tr-elim!: β {β β'} {A : Type β} {n}
β (P : n-Tr A (suc n) β Type β')
β β¦ _ : β {x} β H-Level (P x) (suc n) β¦
β (β x β P (inc x))
β β x β P x
= n-Tr-elim P (Ξ» x β hlevel _) f
n-Tr-elim! P f
n-Tr-rec!: β {β β'} {A : Type β} {B : Type β'} {n}
β β¦ hl : H-Level B (suc n) β¦
β (A β B) β n-Tr A (suc n) β B
= n-Tr-elim (Ξ» _ β _) (Ξ» _ β hlevel _)
n-Tr-rec!
n-Tr-map: β {β β'} {A : Type β} {B : Type β'} {n}
β (A β B) β n-Tr A (suc n) β n-Tr B (suc n)
= n-Tr-rec! (inc β f) n-Tr-map f
As 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-elim (Ξ» _ β _) (Ξ» _ β hl) n-Tr-rec hl
An initial application of the induction principle for of is characterising its path spaces, at least for the inclusions of points from Identifications between (the images of) points in in the are equivalently 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)
{A = A} {n} {x = x} {y} = IsoβEquiv isom where n-Tr-path-equiv
The 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, the induction principle for only allows us to map into while itself is not an for any We salvage our definition by instead mapping into which is a
: (x : A) (y' : n-Tr A (2 + n)) β n-Type _ (suc n)
code = n-Tr-rec! Ξ» y' β el! (n-Tr (Path A x y') (suc n)) code x
The rest of the proof boils down to applications of path induction
and the induction
principle for
: β x y β inc x β‘ y β β£ code x y β£
encode' _ = J (Ξ» y _ β β£ code x y β£) (inc refl)
encode' x
: β x y β β£ code x y β£ β inc x β‘ y
decode' = elim! Ξ» x y β ap inc
decode'
: β x y β is-right-inverse (decode' x y) (encode' x y)
rinv = elim! Ξ» x y x=y β ap n-Tr.inc (subst-path-right _ _ β β-idl _)
rinv
: β x y β is-left-inverse (decode' x y) (encode' x y)
linv _ = J (Ξ» y p β decode' x y (encode' x y p) β‘ p)
linv x (ap (decode' x (inc x)) (transport-refl (inc refl)) β refl)
: Iso (inc x β‘ inc y) (n-Tr (x β‘ y) (suc n))
isom = encode' _ (inc _)
isom (decode' _ (inc _)) (rinv _ (inc _)) (linv _ (inc _)) , iso
n-Tr-univ: β {β β'} {A : Type β} {B : Type β'} n
β is-hlevel B (suc n)
β (n-Tr A (suc n) β B) β (A β B)
= IsoβEquiv Ξ» where
n-Tr-univ n b-hl .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) Ξ» _ β refl
n-Tr-product: β {β β'} {A : Type β} {B : Type β'} {n}
β n-Tr (A Γ B) (suc n) β (n-Tr A (suc n) Γ n-Tr B (suc n))
{A = A} {B} {n} = distrib , distrib-is-equiv where
n-Tr-product : 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
distrib
: 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
pair
open is-iso
: is-iso distrib
distrib-is-iso .inv (x , y) = pair x y
distrib-is-iso .rinv = elim! Ξ» x y β refl
distrib-is-iso .linv = n-Tr-elim! _ Ξ» x β refl
distrib-is-iso
= is-isoβis-equiv distrib-is-iso
distrib-is-equiv
n-Tr-Ξ£: β {β β'} {A : Type β} {B : A β Type β'} {n}
β n-Tr (Ξ£ A B) (suc n) β n-Tr (Ξ£ A Ξ» a β n-Tr (B a) (suc n)) (suc n)
{A = A} {B} {n} = IsoβEquiv is where
n-Tr-Ξ£ : Iso _ _
is .fst = n-Tr-map (Ξ£-map id inc)
is .snd .is-iso.inv = n-Tr-rec! Ξ» (a , b) β n-Tr-map (a ,_) b
is .snd .is-iso.rinv = n-Tr-elim! _ Ξ» (a , b) β n-Tr-elim! (Ξ» b β n-Tr-map (Ξ£-map id inc) (n-Tr-map (a ,_) b) β‘ inc (a , b)) (Ξ» _ β refl) b
is .snd .is-iso.linv = n-Tr-elim! _ Ξ» _ β refl
is
n-Tr-β: β {β β'} {A : Type β} {B : Type β'} {n}
β (e : A β B) β n-Tr A (suc n) β n-Tr B (suc n)
= IsoβEquiv is where
n-Tr-β e : Iso _ _
is .fst = n-Tr-map (e .fst)
is .snd .is-iso.inv = n-Tr-map (Equiv.from e)
is .snd .is-iso.rinv = elim! Ξ» _ β ap inc (Equiv.Ξ΅ e _)
is .snd .is-iso.linv = elim! Ξ» _ β ap inc (Equiv.Ξ· e _) is
Any map can be made basepoint-preserving by letting be based at β©οΈ