loopspacelib/loopspace.ktt
The loop space of the circle is the integers.
5 | suc n => compS1 (intLoopPos n) loopP
9 | suc n => compS1 (intLoopNeg n) invLoop
12 | pos n => intLoopPos n
13 | negsuc n => intLoopNeg n
15✓def decodeSquare : (n : Int) -> PathP (\i -> Path S1 base (loop i)) (intLoop (predInt n)) (intLoop n)
24 (decodeSquare (unglue y) i j)
28✓def decodeEncode (x : S1) (p : Path S1 base x) : Path (Path S1 base x) (decode x (encode x p)) p :=
29 J (\x p -> Path (Path S1 base x) (decode x (encode x p)) p) (cong (decode base) (transportRefl (pos zero))) p
31-- Transport along helix, propositionally (composition does not compute away in Int in CCHM)
33-- transport along a composite path is the composite of the transports
35 : Path (F c) (transport (\i -> F (trans p q i)) u) (transport (\i -> F (q i)) (transport (\i -> F (p i)) u)) :=
36 J (\c q -> Path (F c) (transport (\i -> F (trans p q i)) u) (transport (\i -> F (q i)) (transport (\i -> F (p i)) u)))
38 (sym (transportRefl (transport (\i -> F (p i)) u))))
39 q
41-- transporting back undoes transport
42✓def transportInv {A B : U} (p : Path U A B) (x : A) : Path A (transport (\i -> p (~i)) (transport p x)) x :=
44 (trans (cong (transport (\i -> A)) (transportRefl x)) (transportRefl x)) p
50 trans (cong (transport (\i -> helix (invLoop i))) (trans (sym (sucPred y)) (transportLoop (predInt y))))
51 (transportInv (\i -> helix (loopP i)) (predInt y))
54 | zero => transportRefl (pos zero)
56 (trans (sym (transportLoop (winding (intLoopPos n)))) (cong sucInt (windingPos n)))
59 | zero => transportInvLoop (pos zero)
61 (trans (transportInvLoop (winding (intLoopNeg n))) (cong predInt (windingNeg n)))
64 | pos n => windingPos n
65 | negsuc n => windingNeg n
67-- The loop space of the circle is the integers