8.1.4 The encode-decode proof


We begin with the functionΒ (LABEL:eq:pi1s1-encode) that maps paths to codes:

Definition 8.1.1.

Define encode:∏(x:S1)(base=x)β†’code(x) by

π–Ύπ—‡π–Όπ—ˆπ–½π–Ύp:β‰‘π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύ(p,0)

(we leave the argument x implicit).

Encode is defined by lifting a path into the universal coverMathworldPlanetmath, which determines an equivalence, and then applying the resulting equivalence to 0. The interesting thing about this function is that it computes a concrete number from a loop on the circle, when this loop is represented using the abstract groupoidal framework of homotopy type theory. To gain an intuition for how it does this, observe that by the above lemmas, π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰,x) is the successorMathworldPlanetmathPlanetmathPlanetmath map and π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰-1,x) is the predecessor map. Further, π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— is functorial (\autorefcha:basics), so π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰β’\centerdotβ’π—…π—ˆπ—ˆπ—‰,–) is

(π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰,-))∘(π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰,-))

and so on. Thus, when p is a composition like

π—…π—ˆπ—ˆπ—‰β’\centerdotβ’π—…π—ˆπ—ˆπ—‰-1⁒\centerdotβ’π—…π—ˆπ—ˆπ—‰β’\centerdot⁒⋯

π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(p,–) will compute a composition of functions like

π—Œπ—Žπ–Όπ–Όβˆ˜π—‰π—‹π–Ύπ–½βˆ˜π—Œπ—Žπ–Όπ–Όβˆ˜β‹―

Applying this composition of functions to 0 will compute the winding number of the pathβ€”how many times it goes around the circle, with orientation marked by whether it is positive or negative, after inversesPlanetmathPlanetmathPlanetmathPlanetmath have been canceled. Thus, the computational behavior of π–Ύπ—‡π–Όπ—ˆπ–½π–Ύ follows from the reductionPlanetmathPlanetmath rules for higher-inductive types and univalence, and the action of π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— on compositions and inverses.

Note that the instance π–Ύπ—‡π–Όπ—ˆπ–½π–Ύβ€²:β‰‘π–Ύπ—‡π–Όπ—ˆπ–½π–Ύπ–»π–Ίπ—Œπ–Ύ has type (π–»π–Ίπ—Œπ–Ύ=π–»π–Ίπ—Œπ–Ύ)β†’β„€. This will be one half of our desired equivalence; indeed, it is exactly the function g defined in \autorefsec:pi1s1-initial-thoughts.

Similarly, the functionΒ (LABEL:eq:pi1s1-decode) is a generalizationPlanetmathPlanetmath of the function π—…π—ˆπ—ˆπ—‰β€“ from \autorefsec:pi1s1-initial-thoughts.

Definition 8.1.2.

Define decode:∏(x:S1)code(x)β†’(base=x) by circle inductionMathworldPlanetmath on x. It suffices to give a function code(base)β†’(base=base), for which we use loop–, and to show that loop– respects the loop.

Proof.

To show that π—…π—ˆπ—ˆπ—‰β€“ respects the loop, it suffices to give a path from π—…π—ˆπ—ˆπ—‰β€“ to itself that lies over π—…π—ˆπ—ˆπ—‰. By the definition of dependent paths, this means a path from

π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—(xβ€²β†¦π–Όπ—ˆπ–½π–Ύ(xβ€²)β†’(π–»π–Ίπ—Œπ–Ύ=xβ€²))⁒(π—…π—ˆπ—ˆπ—‰,π—…π—ˆπ—ˆπ—‰β€“)

to π—…π—ˆπ—ˆπ—‰β€“. We define such a path as follows:

\MoveEqLeftβ’π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—(xβ€²β†¦π–Όπ—ˆπ–½π–Ύ(xβ€²)β†’(π–»π–Ίπ—Œπ–Ύ=xβ€²))⁒(π—…π—ˆπ—ˆπ—‰,π—…π—ˆπ—ˆπ—‰β€“)
=π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—x′↦(π–»π–Ίπ—Œπ–Ύ=xβ€²)⁒(π—…π—ˆπ—ˆπ—‰)βˆ˜π—…π—ˆπ—ˆπ—‰β€“βˆ˜π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰-1)
=(-\centerdotβ’π—…π—ˆπ—ˆπ—‰)∘(π—…π—ˆπ—ˆπ—‰β€“)βˆ˜π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰-1)
=(-\centerdotβ’π—…π—ˆπ—ˆπ—‰)∘(π—…π—ˆπ—ˆπ—‰β€“)βˆ˜π—‰π—‹π–Ύπ–½
=(nβ†¦π—…π—ˆπ—ˆπ—‰n-1\centerdotπ—…π—ˆπ—ˆπ—‰).

On the first line, we apply the characterizationMathworldPlanetmath of π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— when the outer connectiveMathworldPlanetmath of the fibrationMathworldPlanetmath is β†’, which reduces the π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— to pre- and post-composition with π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— at the domain and codomain types. On the second line, we apply the characterization of π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π— when the type family is xβ†¦π–»π–Ίπ—Œπ–Ύ=x, which is post-composition of paths. On the third line, we use the action of π–Όπ—ˆπ–½π–Ύ on π—…π—ˆπ—ˆπ—‰-1 from \autoreflem:transport-s1-code. And on the fourth line, we simply reduce the function composition. Thus, it suffices to show that for all n, π—…π—ˆπ—ˆπ—‰n-1⁒\centerdotβ’π—…π—ˆπ—ˆπ—‰=π—…π—ˆπ—ˆπ—‰n, which is an easy induction, using the groupoidPlanetmathPlanetmathPlanetmath laws. ∎

We can now show that π–Ύπ—‡π–Όπ—ˆπ–½π–Ύ and π–½π–Ύπ–Όπ—ˆπ–½π–Ύ are quasi-inverses. What used to be the difficult direction is now easy!

Lemma 8.1.3.

For all for all x:S1 and p:base=x, decodex⁒(encodex⁒(p))=p.

Proof.

By path induction, it suffices to show that π–½π–Ύπ–Όπ—ˆπ–½π–Ύπ–»π–Ίπ—Œπ–Ύβ’(π–Ύπ—‡π–Όπ—ˆπ–½π–Ύπ–»π–Ίπ—Œπ–Ύβ’(π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ))=π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ. But π–Ύπ—‡π–Όπ—ˆπ–½π–Ύπ–»π–Ίπ—Œπ–Ύβ’(π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ)β‰‘π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ,0)≑0, and π–½π–Ύπ–Όπ—ˆπ–½π–Ύπ–»π–Ίπ—Œπ–Ύβ’(0)β‰‘π—…π—ˆπ—ˆπ—‰0β‰‘π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ. ∎

The other direction is not much harder.

Lemma 8.1.4.

For all x:S1 and c:code⁒(x), we have encodex⁒(decodex⁒(c))=c.

Proof.

The proof is by circle induction. It suffices to show the case for π–»π–Ίπ—Œπ–Ύ, because the case for π—…π—ˆπ—ˆπ—‰ is a path between paths in β„€, which is immediate because β„€ is a set.

Thus, it suffices to show, for all n:β„€, that

π–Ύπ—‡π–Όπ—ˆπ–½π–Ύβ€²β’(π—…π—ˆπ—ˆπ—‰n)=n

The proof is by induction, using \crefthm:looptothe.

  • β€’

    In the case for 0, the result is true by definition.

  • β€’

    In the case for n+1,

    π–Ύπ—‡π–Όπ—ˆπ–½π–Ύβ€²β’(π—…π—ˆπ—ˆπ—‰n+1) =π–Ύπ—‡π–Όπ—ˆπ–½π–Ύβ€²β’(π—…π—ˆπ—ˆπ—‰n⁒\centerdotβ’π—…π—ˆπ—ˆπ—‰) (by definition of $\mathsf{loop}^{\mathord{\hskip1.0pt\text{--}\hskip1.0pt}}$)
    =π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’((π—…π—ˆπ—ˆπ—‰n⁒\centerdotβ’π—…π—ˆπ—ˆπ—‰),0) (by definition of $\mathsf{encode}$)
    =π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰,(π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰n,0))) (by functoriality)
    =(π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ–½π–Ύβ’(π—…π—ˆπ—ˆπ—‰n,0))+1 (by \autoreflem:transport-s1-code)
    =n+1. (by the inductive hypothesis)
  • β€’

    The case for negatives is analogous. ∎

Finally, we conclude the theoremMathworldPlanetmath.

Theorem 8.1.5.

There is a family of equivalences ∏(x:S1)((base=x)≃code(x)).

Proof.

The maps π–Ύπ—‡π–Όπ—ˆπ–½π–Ύ and π–½π–Ύπ–Όπ—ˆπ–½π–Ύ are quasi-inverses by \autoreflem:s1-decode-encode,\autoreflem:s1-decode-encode. ∎

Instantiating at π–»π–Ίπ—Œπ–Ύ gives

Corollary 8.1.6.

Ω⁒(π•Š1,π–»π–Ίπ—Œπ–Ύ)≃℀.

A simple induction shows that this equivalence takes additionPlanetmathPlanetmath to composition, so that Ω⁒(π•Š1)=β„€ as groups.

Corollary 8.1.7.

Ο€1⁒(π•Š1)=β„€, while Ο€n⁒(S1)=0 for n>1.

Proof.

For n=1, we sketched the proof from \autorefcor:omega-s1 above. For n>1, we have βˆ₯Ξ©n(π•Š1)βˆ₯0=βˆ₯Ξ©n-1(Ξ©π•Š1)βˆ₯0=βˆ₯Ξ©n-1(β„€)βˆ₯0. And since β„€ is a set, Ξ©n-1⁒(β„€) is contractible, so this is trivial. ∎

Title 8.1.4 The encode-decode proof
\metatable