Lecture 7: Category theory in HoTT

We want a notion of category where type is a category, so that there’s a notion of homotopy thanks to model structures.

Categories:

  • $HSet$ ⟶ gives rise to a univalent category
    • $Type$ does not
  • univalent category

Fibrancy:

  • 2-level type theory (TT): TT with both a

    • strict equality $≡$ (UIP)
    • univalent equality $=$ (univalence)

Other definition of category: $Type$ is cat in this setting

  • Model structure

  • Fibrant types form a category with a model structure

Categories in HoTT

Naive definition:

A category $𝒞$ is:
  • a type of objects $Obj \, 𝒞: 𝒰_i$

  • a “set” \(∀A, B: Obj \, 𝒞, Hom(A, B): HSet \qquad (≝ \sum\limits_{ S: 𝒰_i } IsHSet \, S)\)

  • identity: \(∀A: Obj \, 𝒞, id_A: Hom(A, A)\)

  • composition: \(∀A, B, C: Obj \, 𝒞, (f: Hom(A, B)), (g: Hom(B, C)), g \circ f : Hom(A, C)\)

  • \[id_C : ∀A, B: Obj \, 𝒞, f: Hom (A, B), f \circ id_A = f: HProp\]
  • \[id_R : ∀A, B: Obj \, 𝒞, f: Hom (A, B), id_B \circ f = f: HProp\]
  • Associativity: $A \overset{f}{⟶} B \overset{g}{⟶} C \overset{h}{⟶} D$: \((h \circ g) \circ f = h \circ (g \circ f): HProp\)

$HSet$ is a category

  • $Obj \, HSet ≝ HSet$
  • Morphisms: type theoretic arrows $A ⟶ B$
  • $id_A ≡ λx.x: A ⟶ A$
  • $g \circ f ≡ λx:A. g(f \, x)$
  • $id_L \, A \, B \, f: λx. (f(id_A \, x)) = λx. f \, x = f$
  • Associativity for $f, g, h$: \(λx. h (g (f \, x)) = λx. h(g(f \, x))\)

Isomorphisms

$f: Hom(A, B)$

\[IsIso \, f ≡ \sum\limits_{ g: Hom(B, A) } g \circ f = id_A × f \circ g = id_B\]
\[∀f, IsHProp \, (IsIso \, f)\]

Proof: If $(g, η, ε) = (g’, η’, ε’): IsIso \, f$

Then

\[g \overset{id_L}{=} g \circ id_B \overset{ε'}{=} g \circ (f \circ g') \overset{\text{assoc}}{=} (g \circ f) \circ g' \overset{η}{=} id_A \circ g' \overset{id_R}{=} g'\]

Univalence

A category $𝒞$ is univalent when:
\[∀A, B: Obj \, 𝒞. \begin{cases} A=B &\overset{≃}{⟶} Iso(A, B) \qquad (≡ \sum\limits_{ f: Hom(A, B) } IsIso \, f ) \\ e &\mapsto e \# (id_A, id_{Iso(A, A)}, refl, refl) \end{cases}\]

Prop: $HSet$ is univalent

By univalence:

\[A = B \overset{≃}{⟶} A ≃ B \overset{≃}{⟶} Iso(A, B)\]

The last arrow is due to the fact that all $α: F η = ε_F$ are equal

How to turn $Type$ into a category?

We modify the naive definition as follows:

A category $𝒞$ is:
  • a type of objects $Obj \, 𝒞: 𝒰_i$

  • a “set” \(∀A, B: Obj \, 𝒞, Hom(A, B): 𝒰_i\)

  • identity: \(∀A: Obj \, 𝒞, id_A: Hom(A, A)\)

  • composition: \(∀A, B, C: Obj \, 𝒞, (f: Hom(A, B)), (g: Hom(B, C)), g \circ f : Hom(A, C)\)

  • \[id_C : ∀A, B: Obj \, 𝒞, f: Hom (A, B), f \circ id_A ≡ f: HProp\]
  • \[id_R : ∀A, B: Obj \, 𝒞, f: Hom (A, B), id_B \circ f ≡ f: HProp\]
  • Associativity: $A \overset{f}{⟶} B \overset{g}{⟶} C \overset{h}{⟶} D$: \((h \circ g) \circ f ≡ h \circ (g \circ f): HProp\)

NB: Warning! The strict equality $≡$ is not the definitional/”on the nose” one

Then:

$Type$ is a category

  • $Obj \, Type = 𝒰_i$
  • Morphisms: type theoretic arrows $A ⟶ B$
  • $id_A ≡ λx.x: A ⟶ A$
  • $g \circ f ≡ λx:A. g(f \, x)$
  • $id_L \, A \, B \, f: λx. (f(id_A \, x)) ≡ λx. f \, x = f$
  • Associativity for $f, g, h$: \(λx. h (g (f \, x)) ≡ λx. h(g(f \, x))\)

2-level Type Theory (HTS: Homotopical Type System, by Voevodsky)

\[∀A, B: 𝒰_i, A \underbrace{=}_{\text{univalent}} B ⟶ A \underbrace{≡}_{\text{UIP/Stricter K}} B\]
Stricter K:

any two proofs of equality are reflexivity

And

\[A ≃ B \overset{\text{ua}}{⟶} A=B\]

But the TT is then inconsistent:

Indeed, with Bool $𝔹$:

\[𝔹 \overset{\overset{\text{flip}}{≃}}{⟶} 𝔹\]

So that

\[ua(flip): 𝔹 ≡ 𝔹\]

By K:

\[ua(flip) = refl_{𝔹}\\ ⟶ ∀b:𝔹, flip \, b = id_{𝔹} \, b\]

and \(false = true\)

⟶ inconsistent

To fix this: Fibrant predicates: if $P$ is fibrant:

If $A= B$, then $PA ⟶ PB$

NB: here, for $A=A ⟶ A ≡ B$, $P ≝ λX. A ≡ X$ is not fibrant

Martin-Löf Type Theory

MLTT:

  • \[\cfrac{Γ ⊢ x, y: A}{Γ ⊢ x ≡_A y: 𝒰_i}\]
  • \[\cfrac{Γ ⊢ x: A}{Γ ⊢ refl_x: x ≡_A x}\]
  • $J_≡$

  • UIP: \(∀x, y:A, ∀e, e': x ≡_A y. e≡e'\)

  • FunExt: \(∀f, g: A ⟶ B, (∀x, f \, x = g \, x) ⟶ f ≡ g\)
Fibrancy:
  • \[Γ ⊢ A \, Fib \qquad \underbrace{𝒰ℱ_i}_{\text{universe of fibrant types}}\]
  • \[\cfrac{Γ ⊢ A: 𝒰ℱ_i}{Γ ⊢A \, Fib}\]
  • \[\cfrac{Γ ⊢ A: 𝒰_i \qquad Γ ⊢ A \, Fib}{Γ ⊢A: 𝒰ℱ_i}\]
  • \[\cfrac{Γ ⊢ A \, Fib \qquad Γ ⊢ x, y: A}{Γ ⊢ x=_A y: 𝒰_i}\]
  • \[\cfrac{Γ ⊢ A \qquad Γ ⊢ x, y: A}{Γ ⊢ x=_A y: \, Fib}\]
  • \[\cfrac{Γ ⊢ A \, Fib \quad Γ, y':A, p': x =_A y' ⊢ P \, Fib \quad Γ ⊢ x, y: A, p:x=y \quad Γ ⊢ t: P \, x \, refl}{Γ ⊢ J_= \, A \, P \, x \, y \, p \, t: P \, y \, p}\]
  • \[\cfrac{Γ ⊢ A \, Fib \qquad Γ, x:A ⊢ B \, Fib}{Γ ⊢ \prod\limits_{ x:A } B \, Fib}\]
  • \[\cfrac{Γ ⊢ A \, Fib \qquad Γ ⊢ x, y: A}{Γ ⊢ \sum\limits_{ x:A } B \, Fib }\]

Restricting oneself to fibrant type gives homotopy type theory

Model structures

2-out-of-3 property

Let $𝒞$ be a category.

Let $P$ be a predicate that classifies morphisms:

\[P: \prod\limits_{ A, B: Obj \, 𝒞 } Hom(A, B) ⟶ 𝒰_i\]

Then $∀A, B, C: Obj \, 𝒞, f: Hom(A,B), g: Hom(B,C)$, if two of the three following properties hold: $P \, f, P \, g, P \, (g \circ f)$, so does the third one.

That is:

  1. \[P \, f ⟶ P \, g ⟶ P \, (g \circ f)\]
  2. \[P \, f ⟶ P \, (g \circ f) ⟶ P \, g\]
  3. \[P \, g ⟶ P \, (g \circ f) ⟶ P \, f\]

Left Lifting Propery (LLP)

$X, Y, X’, Y’: Obj \, 𝒞$

$f: X ⟶ Y$ has a left lifting property with respect to $g: X’, Y’$ (and $g$ has a right lifting property wrt $f$):

iff

\[\begin{xy} \xymatrix{ X \ar[r]^{∀F} \ar[d]_f & X' \ar[d]^g \\ Y \ar[r]_{∀G} \ar@{.>}[ru]^{α} & Y' } \end{xy}\]

i.e: for all $F: Hom(X, X’), G:Hom(Y, Y’)$ such that the outer square commutes, $∃ α: Hom(Y, X’)$ s.t. the whole diagram commutes

\[LLP(P) \, ≝ \, \sum\limits_{ f: Hom(A, B)} ∀g: Hom(A', B'), P \, g ⟶ LLP \, f \, g\]

Weak factorization system (L, R)

  1. \[∀f: Hom(A, B), ∃C, l: Hom(A, C), r:Hom(C, B) \text{ s.t. } L \, l \, \text{ and } \, R \, r \text{ and } f = r \circ l\]
  2. \[R ≃ RLP(L)\]
  3. \[L ≃ LLP(R)\]

Model structure on $𝒞$

A Model Structure on $𝒞$:

consists in three classes $W, F, C$ s.t.

  • $W$ satisfies the 2-out-of-3 property
  • $(AC, F)$ and $(C, AF)$ are weak factorization systems and

    \[\begin{cases} AC = W ∩ C \\ AF = W ∩ F \end{cases}\]

NB: \(W, F \\ ⟶ AF = F ∩ W \\ ⟶ C ≃ LLP(AF) \\ AC ≃ \underbrace{ C ∩ W}_{LLP(F)}\)

Model Structure on $𝒰ℱ_i$

\[W: λ A, B, (f: Hom(A, B)). IsEquiv \, f\] \[g = (g \circ f) \circ f^{-1}\\ IsEquiv \, f ⟶ IsEquiv \, f^{-1}\\ IsEquiv \, f ⟶ IsEquiv \, g ⟶ IsEquiv \, (g \circ f)\]

$f: A ⟶ B, y: B$

Recall that

\[fib_f \, y ≝ \sum\limits_{ x:A } f \, x = y\] \[\begin{xy} \xymatrix{ A \ar[rr]^f \ar[rd]_{φ} && B \\ & \sum\limits_{ y: B } fib_f \, y \ar[ru]^{π_1} & } \end{xy}\]

where \(\underbrace{φ}_{AC \text{ acyclic cofibration, so in partic. } W} ≝ a ⟼ (f \, a, a, refl_{f \, a})\)

$φ$ is an equivalence: indeed,

\[\sum\limits_{ y: B } fib_f \, y = \sum\limits_{ y: B } \sum\limits_{ x: A } f \, x = y ≃ \sum\limits_{ x: A }\underbrace{ \sum\limits_{ y: B } f \, x = y}_{\text{singleton ⟹ is contractible}} ≃ \sum\limits_{ x: A } 1 ≃ A\]

Leave a comment