TheHoTTGame/1FundamentalGroup/Quest2.agda
2021-09-21 13:02:20 +01:00

48 lines
1.2 KiB
Agda
Raw 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.

module 1FundamentalGroup.Quest2 where
open import Cubical.Core.Everything
open import Cubical.Data.Nat
open import Cubical.Data.Int using ( ; pos ; negsuc ; -_)
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude renaming (subst to endPt)
open import Cubical.HITs.S1 using ( ; base ; loop)
open import 1FundamentalGroup.Quest1
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 : Iso
sucIso = iso suc pred s r where
s : section suc pred
s (pos zero) = refl
s (pos (suc n)) = refl
s (negsuc zero) = refl
s (negsuc (suc n)) = refl
r : retract suc pred
r (pos zero) = refl
r (pos (suc n)) = refl
r (negsuc zero) = refl
r (negsuc (suc n)) = refl
sucPath :
sucPath = isoToPath sucIso
helix : Type
helix base =
helix (loop i) = sucPath i
spinCountBase : base base
spinCountBase p = endPt helix p 0
spinCount : (x : ) base x helix x
spinCount x p = endPt helix p 0