open import 1Lab.HIT.Suspension
open import 1Lab.Path.Groupoid
open import 1Lab.Univalence
open import 1Lab.HIT.S1
open import 1Lab.Equiv
open import 1Lab.Path
open import 1Lab.Type

module 1Lab.HIT.Sphere where

The -1 and 0 SpheresšŸ”—

In classical topology, the topological space SnS^n is typically defined as the subspace of Rn+1\bb{R}^{n+1} consisting of all points at unit distance from the origin. We see from this definition that the 00-sphere is the discrete two point space {āˆ’1,1}āŠ‚R\{-1, 1\} \subset \bb{R}, and that the āˆ’1-1 sphere is the empty subspace āˆ…āŠ‚{0}\varnothing \subset \{0\}. We will recycle existing types and define:

Sā»Ā¹ : Type
Sā»Ā¹ = āŠ„

Sā° : Type
Sā° = Bool

We note that Sā° may be identified with Susp Sā»Ā¹. Since the pattern matching checker can prove that merid x i is impossible when x : āŠ„, the case for this constructor does not need to be written, this makes the proof look rather tautologous.

open is-iso

SuspSā»Ā¹ā‰ƒSā° : Susp Sā»Ā¹ ā‰” Sā°
SuspSā»Ā¹ā‰ƒSā° = ua (SuspSā»Ā¹ā†’Sā° , is-isoā†’is-equiv iso-pf) where
  SuspSā»Ā¹ā†’Sā° : Susp Sā»Ā¹ ā†’ Sā°
  SuspSā»Ā¹ā†’Sā° N = true
  SuspSā»Ā¹ā†’Sā° S = false

  Sā°ā†’SuspSā»Ā¹ : Sā° ā†’ Susp Sā»Ā¹
  Sā°ā†’SuspSā»Ā¹ true = N
  Sā°ā†’SuspSā»Ā¹ false = S

  iso-pf : is-iso SuspSā»Ā¹ā†’Sā°
  iso-pf .inv = Sā°ā†’SuspSā»Ā¹
  iso-pf .rinv false = refl
  iso-pf .rinv true = refl
  iso-pf .linv N = refl
  iso-pf .linv S = refl

n-SpheresšŸ”—

The spheres of higher dimension can be defined inductively: Sn+1=Ī£SnS^{n + 1} = \Sigma S^n, that is, suspending the nn-sphere constructs the n+1n+1-sphere.

The spheres are essentially indexed by the natural numbers, except that we want to start at āˆ’1-1 instead of 00. To remind ourselves of this, we name our spheres with a superscript nāˆ’1^{n-1}:

Sāæā»Ā¹ : Nat ā†’ Type
Sāæā»Ā¹ zero = Sā»Ā¹
Sāæā»Ā¹ (suc n) = Susp (Sāæā»Ā¹ n)

A slightly less trivial example of definitions lining up is the verification that Sāæā»Ā¹ 2 is equivalent to our previous definition of SĀ¹:

SuspSā°ā‰ƒSĀ¹ : Sāæā»Ā¹ 2 ā‰” SĀ¹
SuspSā°ā‰ƒSĀ¹ = ua (SuspSā°ā†’SĀ¹ , is-isoā†’is-equiv iso-pf) where

In Sāæā»Ā¹ 2, we have two point constructors joined by two paths, while in SĀ¹ we have a single point constructor and a loop. Geometrically, we can picture a morphing Sāæā»Ā¹ 2 into SĀ¹ by squashing one of the meridians down to a point, thus bringing N and S together. This intuition leads to a definition:

  SuspSā°ā†’SĀ¹ : Sāæā»Ā¹ 2 ā†’ SĀ¹
  SuspSā°ā†’SĀ¹ N = base
  SuspSā°ā†’SĀ¹ S = base
  SuspSā°ā†’SĀ¹ (merid N i) = loop i
  SuspSā°ā†’SĀ¹ (merid S i) = base

In the other direction, we send base to N, and then need to send loop to some path N ā‰” N. Since this map should define an equivalence, we make it such that loop wraps around the space Sāæ 2 by way of traversing both meridians.

  SĀ¹ā†’SuspSā° : SĀ¹ ā†’ Sāæā»Ā¹ 2
  SĀ¹ā†’SuspSā° base = N
  SĀ¹ā†’SuspSā° (loop i) = (merid N āˆ™ sym (merid S)) i
We then verify that these maps are inverse equivalences. One of the steps involves a slightly tricky hcomp, although this can be avoided by working with transports instead of dependent paths, and then by using lemmas on transport in pathspaces.
  iso-pf : is-iso SuspSā°ā†’SĀ¹
  iso-pf .inv = SĀ¹ā†’SuspSā°
  iso-pf .rinv base = refl
  iso-pf .rinv (loop i) =
    ap (Ī» p ā†’ p i)
      (ap SuspSā°ā†’SĀ¹ (merid N āˆ™ sym (merid S))  ā‰”āŸØ ap-comp-path SuspSā°ā†’SĀ¹ (merid N) (sym (merid S))āŸ©ā‰”
      loop āˆ™ refl                              ā‰”āŸØ āˆ™-id-r loop āŸ©ā‰”
      loop                                     āˆŽ)
  iso-pf .linv N = refl
  iso-pf .linv S = merid S
  iso-pf .linv (merid N i) j =
    hcomp
      (Ī» k ā†’ Ī» { (i = i0) ā†’ N
               ; (i = i1) ā†’ merid S (j āˆØ ~ k)
               ; (j = i0) ā†’ āˆ™-filler (merid N) (sym (merid S)) k i
               ; (j = i1) ā†’ merid N i})
      (merid N i)
  iso-pf .linv (merid S i) j =
    merid S (i āˆ§ j)