module Homotopy.Space.Circle where
private variable
: Level
ℓ ℓ' : Type ℓ X
Spaces: The circle🔗
The first example of nontrivial space one typically encounters when studying synthetic homotopy theory is the circle: it is, in a sense, the perfect space to start with, having exactly one nontrivial path space, which is a free group, and the simplest nontrivial free group at that: the integers.
data S¹ : Type where
: S¹
base : base ≡ base
loop
: Type∙ lzero
S¹∙ = S¹ , base S¹∙
Diagrammatically, we can picture the circle as being the generated by the following diagram:
In type theory with K, the circle is exactly the same type as ⊤
. However, with univalence
, it can be
shown that the circle has at least two different paths:
_ = ⊤
: S¹ → Type
möbius = Bool
möbius base (loop i) = ua not≃ i möbius
When pattern matching on the circle, we are asked to provide a
basepoint b
and a path l : b ≡ b
, as can be
seen in the definition above. To make it clearer, we can also define a
recursion principle:
: ∀ {ℓ} {A : Type ℓ} (b : A) (l : b ≡ b) → S¹ → A
S¹-rec = b
S¹-rec b l base (loop i) = l i S¹-rec b l
: ∀ {ℓ} {A : S¹ → Type ℓ} (b : A base) (l : PathP (λ i → A (loop i)) b b)
S¹-elim → ∀ s → A s
= b
S¹-elim b l base (loop i) = l i S¹-elim b l
We call the map möbius
a
double cover of the circle, since the fibre at each point is a
discrete space with two elements. It has an action by the fundamental
group of the circle, which has the effect of negating the “parity” of
the path. In fact, we can use möbius
to show that loop
is not refl
:
: base ≡ base → Bool
parity = subst möbius l true
parity l
_ : parity refl ≡ true
_ = refl
_ : parity loop ≡ false
_ = refl
: ¬ refl ≡ loop
refl≠loop = true≠false (ap parity path) refl≠loop path
The circle is also useful as a source of counterexamples: we can
prove that there is an inhabitant of (x : S¹) → x ≡ x
which is not constantly refl
.
: (x : S¹) → x ≡ x
always-loop = S¹-elim loop (double-connection loop loop) always-loop
Fundamental group🔗
We will now calculate that the first loop space of the circle at the
basepoint is a type of integers, i.e. it satisfies the universal property of
the integers. First, we generalise the construction of möbius
to turn an equivalence on an
arbitrary type into a type family over S¹
. Transport over this family will give
the universal map
associated with an equivalence
and basepoint
: X ≃ X → S¹ → Type _
equiv→family {X = X} eqv base = X
equiv→family (loop i) = ua eqv i equiv→family eqv
We will later need the “action” associated with an equivalence valued at a path with free endpoint Taking recovers a more vanilla notion of “action on ”.
: ∀ {y} (e : X ≃ X) → base ≡ y → X → equiv→family e y
equiv→action = subst (equiv→family e) p x
equiv→action e p x
_ : X ≃ X → base ≡ base → X → X
_ = equiv→action {y = base}
open Integers
interleaved mutual
The first thing we will do is assume an elimination principle for
which will be used in showing uniqueness of the universal map
associated to an equivalence
We must also equip
with an auto-equivalence, which corresponds in some way to taking
successors: since loop
corresponds
to “the number 1”, the equivalence we go with is thus “adding 1”:
postcomposition with the loop
.
ΩS¹-elim: ∀ {ℓ} (P : Path S¹ base base → Type ℓ)
→ (pr : P refl)
→ (pl : P ≃[ ∙-post-equiv loop ] P)
→ ∀ x → P x
private
: (base ≡ base) ≃ (base ≡ base)
rotΩS¹ = ∙-post-equiv {x = base} loop
rotΩS¹
: Integers (Path S¹ base base)
ΩS¹-integers .point = refl
ΩS¹-integers .rotate = rotΩS¹ ΩS¹-integers
It is easy to see that transporting the basepoint along the family
associated to an automorphism of
commutes with our chosen automorphism of
modulo a tactic application, it is refl
.
.map-out x e l = equiv→action e l x
ΩS¹-integers .map-out-point x e = Regularity.precise! refl
ΩS¹-integers .map-out-rotate x e l = Regularity.precise! refl ΩS¹-integers
The difficult part of the proof is showing that equiv→action
is the unique map
with these properties. We will show this is the case assuming first that
we have an elimination principle for
.map-out-unique f {p} {r} frefl floop = ΩS¹-elim _
ΩS¹-integers (Regularity.precise! frefl) $ over-left→over rotΩS¹ λ a →
(f a ≡ go a) ≃⟨ ap-equiv r ⟩
(r .fst (f a) ≡ r .fst (go a)) ≃⟨ ∙-pre-equiv (floop a) ⟩
(f (a ∙ loop) ≡ r .fst (go a)) ≃⟨ ∙-post-equiv (Regularity.precise! refl) ⟩
(f (a ∙ loop) ≡ go (a ∙ loop)) ≃∎
where
: _ → _
go = equiv→action r l p go l
Loop induction🔗
We must now show the elimination principle for that was promised above. Note that, while this is a path type, both of the endpoints are fixed (here, to be constructors), so we can not directly use path induction. Instead, we will mimic the construction of induction from initiality, turning our induction methods into a total algebra which can be mapped into universally.
Applying the universal map at then gives us a pair of an index and a proof in If we have a proper initial object, we could then show that the composite which defines is an algebra map so it must be the identity; thus and we have the desired Here, however, we’re trying to show initiality, so we’ll need a hand-crafted coherence.
We note that the induction methods for ΩS¹-elim
fit together into a basepoint
and auto-equivalence of the type
The family associated to this action will be called totl
.
= subst P (pathβ base l) attempt where
ΩS¹-elim P pr pl l : S¹ → Type _
totl = equiv→family (over→total rotΩS¹ pl) totl
By rotating the basepoint (given by the method
we get a value in
but its type appears to be way off. Essentially, to show that our attempt
landed in the right fibre, we
would like to reduce to the case where
since there the index is essentially trivially correct.
: P (subst totl l (refl , pr) .fst)
attempt = subst totl l (refl , pr) .snd attempt
However, this statement depends critically on
being a loop, preventing us from using path induction: if
is instead a path
then transport takes us to a fibre of totl
which is not a sigma type, hence not
something we can project from. To generalise this, we must define a
fibrewise transformation from totl
to the based path space of
which, at the basepoint, is the first projection function.
This turns out to be pretty easy: using the helper function ua→
to simplify the coherence condition,
we are left with filling a square with the boundary below, which we have
by the definition of path composition: it is ∙-filler
.
: ∀ y → totl y → base ≡ y
path = S¹-elim fst $ ua→ λ _ → ∙-filler _ loop path
Now we have a statement which is sufficiently general to prove by
path induction: projecting the index using path
from the result of applying our
universal map, even at an arbitrary based path
is the identity function; And, by construction, when
this statement reduces to precisely the identification between indices
we were looking for.
: ∀ y l → path y (subst totl l (refl , pr)) ≡ l
pathβ = J (λ y l → path y (subst totl l (refl , pr)) ≡ l)
pathβ y (transport-refl refl)
: (base ≡ base) ≃ Int
ΩS¹≃Int = Integers-unique ΩS¹-integers Int-integers
ΩS¹≃Int
open Equiv ΩS¹≃Int renaming (from to loopⁿ) using ()
It immediately follows from this that the circle is a groupoid, since it is connected and its loop space is a set.
opaque: is-groupoid S¹
S¹-is-groupoid = S¹-elim (S¹-elim
S¹-is-groupoid (Equiv→is-hlevel 2 ΩS¹≃Int (hlevel 2)) prop!) prop!
instance
: ∀ {k} → H-Level S¹ (3 + k)
H-Level-S¹ = basic-instance 3 S¹-is-groupoid
H-Level-S¹
opaque: (n : Int) → loopⁿ (sucℤ n) ≡ loopⁿ n ∙ loop
loopⁿ⁺¹ = Int-integers .map-out-rotate refl rotΩS¹ n loopⁿ⁺¹ n
By induction, we can show that this equivalence respects group composition (that is, so that we have a proper isomorphism of groups.
: (a b : Int) → loopⁿ (a +ℤ b) ≡ loopⁿ a ∙ loopⁿ b
loopⁿ-+ = Integers.induction Int-integers
loopⁿ-+ a (ap loopⁿ (+ℤ-zeror a) ∙ sym (∙-idr _))
λ b →
(a +ℤ b) ≡ loopⁿ a ∙ loopⁿ b ≃⟨ ap (_∙ loop) , equiv→cancellable (∙-post-equiv loop .snd) ⟩
loopⁿ (a +ℤ b) ∙ loop ≡ (loopⁿ a ∙ loopⁿ b) ∙ loop ≃⟨ ∙-post-equiv (sym (∙-assoc _ _ _)) ⟩
loopⁿ (a +ℤ b) ∙ loop ≡ loopⁿ a ∙ loopⁿ b ∙ loop ≃⟨ ∙-post-equiv (ap (loopⁿ a ∙_) (sym (loopⁿ⁺¹ b))) ⟩
loopⁿ (a +ℤ b) ∙ loop ≡ loopⁿ a ∙ loopⁿ (sucℤ b) ≃⟨ ∙-pre-equiv (loopⁿ⁺¹ (a +ℤ b)) ⟩
loopⁿ (sucℤ (a +ℤ b)) ≡ loopⁿ a ∙ loopⁿ (sucℤ b) ≃⟨ ∙-pre-equiv (ap loopⁿ (+ℤ-sucr a b)) ⟩
loopⁿ (a +ℤ sucℤ b) ≡ loopⁿ a ∙ loopⁿ (sucℤ b) ≃∎
loopⁿ
: π₁Groupoid.π₁ S¹∙ S¹-is-groupoid ≡ ℤ
π₁S¹≡ℤ = sym $ ∫-Path
π₁S¹≡ℤ (∫hom (Equiv.from ΩS¹≃Int)
(record { pres-⋆ = loopⁿ-+ }))
((ΩS¹≃Int e⁻¹) .snd)
Furthermore, since the loop space of the circle is a set, we automatically get that all of its higher homotopy groups are trivial.
: ∀ n → is-contr ⌞ Ωⁿ (2 + n) S¹∙ ⌟
Ωⁿ⁺²S¹-is-contr = is-prop∙→is-contr (hlevel 1) refl
Ωⁿ⁺²S¹-is-contr zero (suc n) = Path-is-hlevel 0 (Ωⁿ⁺²S¹-is-contr n)
Ωⁿ⁺²S¹-is-contr
: ∀ n → πₙ₊₁ (suc n) S¹∙ ≡ Zero-group {lzero}
πₙ₊₂S¹≡0 = ∫-Path
πₙ₊₂S¹≡0 n (Zero-group-is-terminal _ .centre)
(is-contr→≃ (is-contr→∥-∥₀-is-contr (Ωⁿ⁺²S¹-is-contr n)) (hlevel 0) .snd)