TheHoTTGame/1FundamentalGroup/Quest1.agda

51 lines
1.2 KiB
Agda
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- ignore
module 1FundamentalGroup.Quest1 where
open import 1FundamentalGroup.Preambles.P1
loopSpace : (A : Type) (a : A) Type
loopSpace A a = a a
loop_times : loopSpace base
loop pos zero times = refl
loop pos (suc n) times = loop loop (pos n) times
loop negsuc zero times = sym loop
loop negsuc (suc n) times = sym loop loop (negsuc n) times
suc :
suc (pos n) = pos (suc n)
suc (negsuc zero) = pos zero
suc (negsuc (suc n)) = negsuc n
pred :
pred (pos zero) = negsuc zero
pred (pos (suc n)) = pos n
pred (negsuc n) = negsuc (suc n)
sucIso :
sucIso = iso suc pred leftInv rightInv where
leftInv : section suc pred
leftInv (pos zero) = refl
leftInv (pos (suc n)) = refl
leftInv (negsuc n) = refl
rightInv : retract suc pred
rightInv (pos n) = refl
rightInv (negsuc zero) = refl
rightInv (negsuc (suc n)) = refl
sucPath :
sucPath = isoToPath sucIso
helix : Type
helix base =
helix (loop i) = sucPath i
windingNumberBase : base base
windingNumberBase p = endPt helix p (pos zero)
windingNumber : (x : ) base x helix x
windingNumber x p = endPt helix p (pos zero)