Lecture 1: J eliminator, Truncation, Extensional type theory

Correspondence between Types and Topological spaces

  • Structure of equality (Martin-Löf Identity type)

    • equality ⟺ $ω$-groupoids
  • Structure of equality on type constructors

    • $Σ$ types, $Π$ dependent products
  • Vladimir Voevodsky’s homotopy level of a type/truncation

    • contractible types
    • mere propositions ⟶ proof relevance
    • mere sets ⟶ uniqueness of identity proof


$A$ type $A$ space
$a:A$ $a$ is a point in $A$
$a, b :A$: \(Id \, A \, a\, b\) (also denoted by $a =_A b$) $a, b ∈ A$: \(a \sim b\)
$refl_a : a =_A a$ $id_A$ the identity path. You can concatenate paths
\[\cfrac{Γ ⊢ a, b: A}{Γ ⊢ a =_A b \text{ type}}\] \[\cfrac{Γ ⊢ a: A}{Γ ⊢ refl_a: a =_A a}\] \[\cfrac{Γ ⊢ a, b: A \qquad Γ ⊢ P: \prod_{b:A} a=b → Type \qquad Γ ⊢ u: P \, a \; refl_a \qquad Γ ⊢ e: a =_A b}{Γ ⊢ J \, a \, P \, u \, b \, e: P \, b \, e}\] \[J \, a \, P \, u \, a \; refl_a ≡ u\] \[\texttt{app :} Π_{\substack{F: A→B\\ (a, a': A)}} a=a' ⟶ f a = f a'\] \[\texttt{transport: } \prod_{P: A → Type} \, (a: A) \, (b: A) \, (e: a =_A b): Pa → Pb\] \[\texttt{inverse: } Π_{a, b: A} a=b → b=a\]

By path induction with $refl_a: a=_Aa$

\[\texttt{associativity: } Π_{a, b, c, d: A} Π_{\substack{e:a=b \\ e':b=c \\ e'' : c=d}} e @ (e' @ e'') = (e @ e') @ e''\]

By path induction with $refl_{refl_a}$

Transport and equality

  • $a, b, c:A$
  • $q: b=c$
  • $p: a=b$
\[\texttt{transport_paths_right }: \texttt{transport } \, (fun: b → a=b) \, q \, p: a=_A c\]

But you have also

\[p @ q: a =_A c\]

But we can show that they are propositionally equal by path induction, with $refl_{refl_a}$

Dependent sums

  • $A: Type$
  • $B: A → Type$
  • Dependent sum: \(Σ_{a: A} B \, a\)

First (resp. second) component: $u.1$ (resp. $u.2$)

If \(u, v: Σ_{a: A} B \, a\)

How to prove $u = v$?

We can’t just say that

  • $p: u.1 = v.1$
  • $q: u.2 = v.2$ ⟶ not well-typed

Fix for $q$:

\[Σ_{p: u.1 = v.1} (\texttt{transport } B \, p \; u.2 = v.2) ⟶ u=v\]

In fact, there’s even an equivalence between the two.

Transport and equality: Functional extensionality

  • $A: Type$
  • $B: A → Type$
  • $f, g: \prod_{x:A} B \, x$

Are $\prod_{x:A} f \, x =_{B x} g \, x$ and $f=g$ equivalent ?

You can go from $f=g$ to \(\prod_{x:A} f \, x =_{B x} g \, x\) by path induction (with $λx. refl_{f \, x}$)

BUT: the converse doesn’t hold in HoTT!! It’s independent: not inconsistent though.

With the Univalence Axiom, it does.

Contractible types

  • $A: Type$
  • \[IsContr \, A ≝ \sum_{a:A} \prod_{b:A} a = b\]

The unit type is contractible:

Inductive unit: Type :=
    | tt: unit

$IsContr\, unit$

\[tt: unit \\ \prod_{b: unit} tt=b\\ λb. \texttt{match } b \texttt{ with}\\ \mid tt ⟹ refl_{tt}: tt=tt\]


Fixpoint IsTrunc n A := match n with
    | 0 => IsContr A
    | S n => forall x y:A, IsTrunc n (x=y)

But in HoTT, it starts with $-2$, so that Hsets are $0$-truncated, and it matches higher-category theory.

Starting at $0$:

\[IsContr \, A := IsTrunc \, 0 \, A \\ IsHProp \, A := IsTrunc \, 1 \, A\\ IsHSet \, A := IsTrunc \, 2 \, A\]

In particular:

\[IsHprop \, A := ∀x y: A. \sum_{e: x=y} \prod_{e': x=y} e=e'\]
Proof irrelevance (satisfying the following property means being a proposition):
\[IsIrr \, A := ∀x y: A. x=y\]

Why is it equivalent to $IsHprop$? Because when you satisfy $IsIrr$, you’re contractible, provided that you’re inhabited by at least one term (and all the higher equalities collapse).

\[UIP \, A := ∀ x y:A. ∀e e': x=y. e=e'\]

We have:

\[UIP \, A ≃ IsHSet \, A\]

Other contractible type:

\[singleton \, A \, (x:A) := \sum_{y:A} x=y\]

Extensional Type Theory (ETT)

\[\cfrac{Γ ⊢ e: x =_A y}{Γ ⊢ x ≡ y \quad\text{ (convertible)}}(reflection)\]


\[∀A, x y : A, e e': x=y. e=e'\]

By path induction on $e’$:

\[∀A, x:A, e: x=x. e= refl_x\]

Why? Because in fact, in ETT:

\[∀A:Type, xy: A, e:x=y. \; e=refl_x\]

It’s well-typed, because $x$ and $y$ are convertible, so that

\[x=y ≡ x=x\]

Then, path induction on $e$, and $refl_{refl_x}$

BUT: UIP and Univalence are not compatible! So that’s why we don’t have it in HoTT.

Leave a comment