2018-05-16 09:01:07 +00:00
|
|
|
|
\documentclass[a4paper,handout]{beamer}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\usetheme{metropolis}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\beamertemplatenavigationsymbolsempty
|
|
|
|
|
%% \usecolortheme[named=seagull]{structure}
|
|
|
|
|
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\input{packages.tex}
|
2018-05-30 23:07:05 +00:00
|
|
|
|
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\input{macros.tex}
|
2018-05-30 23:07:05 +00:00
|
|
|
|
|
|
|
|
|
\title{Univalent Categories}
|
|
|
|
|
\subtitle{A formalization of category theory in Cubical Agda}
|
|
|
|
|
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\newcommand{\myname}{Frederik Hangh{\o}j Iversen}
|
|
|
|
|
\author[\myname]{
|
|
|
|
|
\myname\\
|
|
|
|
|
\footnotesize Supervisors: Thierry Coquand, Andrea Vezzosi\\
|
|
|
|
|
Examiner: Andreas Abel
|
|
|
|
|
}
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\institute{Chalmers University of Technology}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\begin{document}
|
|
|
|
|
\frame{\titlepage}
|
|
|
|
|
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Motivating example}
|
|
|
|
|
\framesubtitle{Functional extensionality}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
Consider the functions
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{zeroLeft} & ≜ \lambda (n \tp \bN) \mto (0 + n \tp \bN) \\
|
|
|
|
|
\var{zeroRight} & ≜ \lambda (n \tp \bN) \mto (n + 0 \tp \bN)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
We have
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
∏_{n \tp \bN} \var{zeroLeft}\ n ≡ \var{zeroRight}\ n
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
But not
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{zeroLeft} ≡ \var{zeroRight}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
We need
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\funExt \tp ∏_{a \tp A} f\ a ≡ g\ a → f ≡ g
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Motivating example}
|
|
|
|
|
\framesubtitle{Univalence}
|
|
|
|
|
Consider the set
|
|
|
|
|
$\{x \mid \phi\ x \land \psi\ x\}$
|
|
|
|
|
\pause
|
|
|
|
|
|
2018-05-28 15:32:56 +00:00
|
|
|
|
If we show $∀ x . \psi\ x ≡ \top$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
then we want to conclude
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$\{x \mid \phi\ x \land \psi\ x\} ≡ \{x \mid \phi\ x\}$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\pause
|
|
|
|
|
|
|
|
|
|
We need univalence:
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$$(A ≃ B) ≃ (A ≡ B)$$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\pause
|
2018-05-18 11:14:41 +00:00
|
|
|
|
%
|
2018-05-28 15:32:56 +00:00
|
|
|
|
We will return to $≃$, but for now think of it as an
|
2018-05-16 09:01:07 +00:00
|
|
|
|
isomorphism, so it induces maps:
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{toPath} & \tp (A ≃ B) → (A ≡ B) \\
|
|
|
|
|
\var{toEquiv} & \tp (A ≡ B) → (A ≃ B)
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{Definition}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
Heterogeneous paths
|
|
|
|
|
\begin{equation*}
|
2018-05-30 23:07:05 +00:00
|
|
|
|
\Path \tp (P \tp \I → \MCU) → P\ 0 → P\ 1 → \MCU
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{equation*}
|
|
|
|
|
\pause
|
2018-05-30 23:07:05 +00:00
|
|
|
|
For $P \tp \I → \MCU$, $A \tp \MCU$ and $a_0, a_1 \tp A$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
inhabitants of $\Path\ P\ a_0\ a_1$ are like functions
|
2018-05-18 11:14:41 +00:00
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-30 23:07:05 +00:00
|
|
|
|
p \tp ∏_{i \tp \I} P\ i
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
Which satisfy $p\ 0 & = a_0$ and $p\ 1 & = a_1$
|
|
|
|
|
\pause
|
2018-05-16 09:01:07 +00:00
|
|
|
|
|
2018-05-18 11:14:41 +00:00
|
|
|
|
Homogenous paths
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
a_0 ≡ a_1 ≜ \Path\ (\var{const}\ A)\ a_0\ a_1
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{Functional extenstionality}
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\funExt & \tp ∏_{a \tp A} f\ a ≡ g\ a → f ≡ g
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\funExt\ p ≜ λ i\ a → p\ a\ i
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
$$
|
|
|
|
|
\funExt\ (\var{const}\ \refl)
|
|
|
|
|
\tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{zeroLeft} ≡ \var{zeroRight}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{Homotopy levels}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \isContr && \tp \MCU → \MCU \\
|
|
|
|
|
& \isContr\ A && ≜ ∑_{c \tp A} ∏_{a \tp A} a ≡ c
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \isProp && \tp \MCU → \MCU \\
|
|
|
|
|
& \isProp\ A && ≜ ∏_{a_0, a_1 \tp A} a_0 ≡ a_1
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \isSet && \tp \MCU → \MCU \\
|
|
|
|
|
& \isSet\ A && ≜ ∏_{a_0, a_1 \tp A} \isProp\ (a_0 ≡ a_1)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \isGroupoid && \tp \MCU → \MCU \\
|
|
|
|
|
& \isGroupoid\ A && ≜ ∏_{a_0, a_1 \tp A} \isSet\ (a_0 ≡ a_1)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{A few lemmas}
|
|
|
|
|
Let $D$ be a type-family:
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
D \tp ∏_{b \tp A} ∏_{p \tp a ≡ b} \MCU
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
And $d$ and in inhabitant of $D$ at $\refl$:
|
|
|
|
|
%
|
|
|
|
|
$$
|
|
|
|
|
d \tp D\ a\ \refl
|
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
We then have the function:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\pathJ\ D\ d \tp ∏_{b \tp A} ∏_{p \tp a ≡ b} D\ b\ p
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{A few lemmas}
|
|
|
|
|
Given
|
|
|
|
|
\begin{align*}
|
|
|
|
|
A & \tp \MCU \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
P & \tp A → \MCU \\
|
|
|
|
|
\var{propP} & \tp ∏_{x \tp A} \isProp\ (P\ x) \\
|
|
|
|
|
p & \tp a_0 ≡ a_1 \\
|
2018-05-18 11:14:41 +00:00
|
|
|
|
p_0 & \tp P\ a_0 \\
|
|
|
|
|
p_1 & \tp P\ a_1
|
|
|
|
|
\end{align*}
|
|
|
|
|
%
|
|
|
|
|
We have
|
|
|
|
|
$$
|
|
|
|
|
\lemPropF\ \var{propP}\ p
|
|
|
|
|
\tp
|
|
|
|
|
\Path\ (\lambda\; i \mto P\ (p\ i))\ p_0\ p_1
|
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Paths}
|
|
|
|
|
\framesubtitle{A few lemmas}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$∏$ preserves $\isProp$:
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\mathit{propPi}
|
|
|
|
|
\tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\left(∏_{a \tp A} \isProp\ (P\ a)\right)
|
|
|
|
|
→ \isProp\ \left(∏_{a \tp A} P\ a\right)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$∑$ preserves $\isProp$:
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\mathit{propSig} \tp \isProp\ A → \left(∏_{a \tp A} \isProp\ (P\ a)\right) → \isProp\ \left(∑_{a \tp A} P\ a\right)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Pre categories}
|
|
|
|
|
\framesubtitle{Definition}
|
|
|
|
|
Data:
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\Object & \tp \Type \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\Arrow & \tp \Object → \Object → \Type \\
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\identity & \tp \Arrow\ A\ A \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\lll & \tp \Arrow\ B\ C → \Arrow\ A\ B → \Arrow\ A\ C
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
Laws:
|
|
|
|
|
%
|
|
|
|
|
$$
|
|
|
|
|
h \lll (g \lll f) ≡ (h \lll g) \lll f
|
|
|
|
|
$$
|
|
|
|
|
$$
|
|
|
|
|
(\identity \lll f ≡ f)
|
2018-05-28 15:32:56 +00:00
|
|
|
|
×
|
2018-05-18 11:14:41 +00:00
|
|
|
|
(f \lll \identity ≡ f)
|
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
1-categories:
|
|
|
|
|
$$
|
|
|
|
|
\isSet\ (\Arrow\ A\ B)
|
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Pre categories}
|
|
|
|
|
\framesubtitle{Propositionality}
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\isProp\ \left( (\identity \comp f ≡ f) × (f \comp \identity ≡ f) \right)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\isProp\ \IsPreCategory
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\var{isAssociative} & \tp \var{IsAssociative}\\
|
|
|
|
|
\isIdentity & \tp \var{IsIdentity}\\
|
|
|
|
|
\var{arrowsAreSets} & \tp \var{ArrowsAreSets}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
|
|
|
|
& \var{propIsAssociative} && a.\var{isAssociative}\
|
|
|
|
|
&& b.\var{isAssociative} && i \\
|
|
|
|
|
& \propIsIdentity && a.\isIdentity\
|
|
|
|
|
&& b.\isIdentity && i \\
|
|
|
|
|
& \var{propArrowsAreSets} && a.\var{arrowsAreSets}\
|
|
|
|
|
&& b.\var{arrowsAreSets} && i
|
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{Univalence}
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{IsIdentity} & ≜
|
|
|
|
|
∏_{A\ B \tp \Object} ∏_{f \tp \Arrow\ A\ B} \phi\ f
|
2018-05-18 11:14:41 +00:00
|
|
|
|
%% \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
%% & \mathrel{\ } \identity \lll f ≡ f × f \lll \identity ≡ f
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
where
|
|
|
|
|
$$
|
2018-05-30 23:07:05 +00:00
|
|
|
|
\phi\ f ≜
|
|
|
|
|
( \identity \lll f ≡ f )
|
2018-05-28 15:32:56 +00:00
|
|
|
|
×
|
|
|
|
|
( f \lll \identity ≡ f)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
2018-05-30 23:07:05 +00:00
|
|
|
|
Let $\approxeq$ denote isomorphism of objects. We can then construct
|
2018-05-18 11:14:41 +00:00
|
|
|
|
the identity isomorphism in any category:
|
|
|
|
|
$$
|
|
|
|
|
\identity , \identity , \var{isIdentity} \tp A \approxeq A
|
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
Likewise since paths are substitutive we can promote a path to an isomorphism:
|
|
|
|
|
$$
|
|
|
|
|
\idToIso \tp A ≡ B → A ≊ B
|
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
For a category to be univalent we require this to be an equivalence:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\isEquiv\ (A ≡ B)\ (A \approxeq B)\ \idToIso
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{Univalence, cont'd}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$$\isEquiv\ (A ≡ B)\ (A \approxeq B)\ \idToIso$$
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\pause%
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$$(A ≡ B) ≃ (A \approxeq B)$$
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\pause%
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$$(A ≡ B) ≅ (A \approxeq B)$$
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\pause%
|
|
|
|
|
Name the above maps:
|
|
|
|
|
$$\idToIso \tp A ≡ B → A ≊ B$$
|
|
|
|
|
%
|
2018-05-28 15:32:56 +00:00
|
|
|
|
$$\isoToId \tp (A \approxeq B) → (A ≡ B)$$
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{Propositionality}
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\isProp\ \IsCategory = ∏_{a, b \tp \IsCategory} a ≡ b
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
So, for
|
|
|
|
|
$$
|
|
|
|
|
a\ b \tp \IsCategory
|
|
|
|
|
$$
|
|
|
|
|
the proof obligation is the pair:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
p & \tp a.\isPreCategory ≡ b.\isPreCategory \\
|
|
|
|
|
& \mathrel{\ } \Path\ (\lambda\; i → (p\ i).Univalent)\ a.\isPreCategory\ b.\isPreCategory
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{Propositionality, cont'd}
|
|
|
|
|
First path given by:
|
|
|
|
|
$$
|
|
|
|
|
p
|
2018-05-28 15:32:56 +00:00
|
|
|
|
≜
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\var{propIsPreCategory}\ a\ b
|
|
|
|
|
\tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
a.\isPreCategory ≡ b.\isPreCategory
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
Use $\lemPropF$ for the latter.
|
|
|
|
|
\pause
|
|
|
|
|
%
|
2018-05-30 23:07:05 +00:00
|
|
|
|
Univalence is indexed by an identity proof. So $A ≜
|
2018-05-28 15:32:56 +00:00
|
|
|
|
IsIdentity\ identity$ and $B ≜ \var{Univalent}$.
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
$$
|
|
|
|
|
\lemPropF\ \var{propUnivalent}\ p
|
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{A theorem}
|
|
|
|
|
%
|
|
|
|
|
Let the isomorphism $(ι, \inv{ι}) \tp A \approxeq B$.
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
The isomorphism induces the path
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
p ≜ \idToIso\ (\iota, \inv{\iota}) \tp A ≡ B
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
and consequently an arrow:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
p_{\var{dom}} ≜ \congruence\ (λ x → \Arrow\ x\ X)\ p
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\Arrow\ A\ X ≡ \Arrow\ B\ X
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
The proposition is:
|
|
|
|
|
%
|
|
|
|
|
\begin{align}
|
|
|
|
|
\label{eq:coeDom}
|
|
|
|
|
\tag{$\var{coeDom}$}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
∏_{f \tp A → X}
|
|
|
|
|
\var{coe}\ p_{\var{dom}}\ f ≡ f \lll \inv{\iota}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{A theorem, proof}
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\var{coe}\ p_{\var{dom}}\ f
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& ≡ f \lll \inv{(\idToIso\ p)} && \text{By path-induction} \\
|
|
|
|
|
& ≡ f \lll \inv{\iota}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
&& \text{$\idToIso$ and $\isoToId$ are inverses}\\
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
%
|
2018-05-30 23:07:05 +00:00
|
|
|
|
Induction will be based at $A$. Let $\widetilde{B}$ and $\widetilde{p}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\tp A ≡ \widetilde{B}$ be given.
|
2018-05-18 11:14:41 +00:00
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
Define the family:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
D\ \widetilde{B}\ \widetilde{p} ≜
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\var{coe}\ \widetilde{p}_{\var{dom}}\ f
|
2018-05-28 15:32:56 +00:00
|
|
|
|
≡
|
2018-05-18 11:14:41 +00:00
|
|
|
|
f \lll \inv{(\idToIso\ \widetilde{p})}
|
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
The base-case becomes:
|
|
|
|
|
$$
|
|
|
|
|
d \tp D\ A\ \refl =
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{coe}\ \refl_{\var{dom}}\ f ≡ f \lll \inv{(\idToIso\ \refl)}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Categories}
|
|
|
|
|
\framesubtitle{A theorem, proof, cont'd}
|
|
|
|
|
$$
|
|
|
|
|
d \tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{coe}\ \refl_{\var{dom}}\ f ≡ f \lll \inv{(\idToIso\ \refl)}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\var{coe}\ \refl^*\ f
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& ≡ f
|
2018-05-18 11:14:41 +00:00
|
|
|
|
&& \text{$\refl$ is a neutral element for $\var{coe}$}\\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& ≡ f \lll \identity \\
|
|
|
|
|
& ≡ f \lll \var{subst}\ \refl\ \identity
|
2018-05-18 11:14:41 +00:00
|
|
|
|
&& \text{$\refl$ is a neutral element for $\var{subst}$}\\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& ≡ f \lll \inv{(\idToIso\ \refl)}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
&& \text{By definition of $\idToIso$}\\
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
In conclusion, the theorem is inhabited by:
|
|
|
|
|
$$
|
|
|
|
|
\label{eq:pathJ-example}
|
|
|
|
|
\pathJ\ D\ d\ B\ p
|
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Span category} \framesubtitle{Definition} Given a base
|
|
|
|
|
category $\bC$ and two objects in this category $\pairA$ and $\pairB$
|
|
|
|
|
we can construct the \nomenindex{span category}:
|
|
|
|
|
%
|
|
|
|
|
\pause
|
|
|
|
|
Objects:
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
∑_{X \tp Object} \Arrow\ X\ \pairA × \Arrow\ X\ \pairB
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
Arrows between objects $A ,\ a_{\pairA} ,\ a_{\pairB}$ and
|
|
|
|
|
$B ,\ b_{\pairA} ,\ b_{\pairB}$:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
∑_{f \tp \Arrow\ A\ B}
|
|
|
|
|
b_{\pairA} \lll f ≡ a_{\pairA} ×
|
|
|
|
|
b_{\pairB} \lll f ≡ a_{\pairB}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Span category}
|
|
|
|
|
\framesubtitle{Univalence}
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\label{eq:univ-0}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
(X , x_{𝒜} , x_{ℬ}) ≡ (Y , y_{𝒜} , y_{ℬ})
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\label{eq:univ-1}
|
|
|
|
|
\begin{split}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
p \tp & X ≡ Y \\
|
|
|
|
|
& \Path\ (λ i → \Arrow\ (p\ i)\ 𝒜)\ x_{𝒜}\ y_{𝒜} \\
|
|
|
|
|
& \Path\ (λ i → \Arrow\ (p\ i)\ ℬ)\ x_{ℬ}\ y_{ℬ}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{split}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\begin{split}
|
|
|
|
|
\var{iso} \tp & X \approxeq Y \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \Path\ (λ i → \Arrow\ (\widetilde{p}\ i)\ 𝒜)\ x_{𝒜}\ y_{𝒜} \\
|
|
|
|
|
& \Path\ (λ i → \Arrow\ (\widetilde{p}\ i)\ ℬ)\ x_{ℬ}\ y_{ℬ}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{split}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
(X , x_{𝒜} , x_{ℬ}) ≊ (Y , y_{𝒜} , y_{ℬ})
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Span category}
|
|
|
|
|
\framesubtitle{Univalence, proof}
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
%% (f, \inv{f}, \var{inv}_f, \var{inv}_{\inv{f}})
|
|
|
|
|
%% \tp
|
2018-05-28 15:32:56 +00:00
|
|
|
|
(X, x_{𝒜}, x_{ℬ}) \approxeq (Y, y_{𝒜}, y_{ℬ})
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\to
|
|
|
|
|
\begin{split}
|
|
|
|
|
\var{iso} \tp & X \approxeq Y \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \Path\ (λ i → \Arrow\ (\widetilde{p}\ i)\ 𝒜)\ x_{𝒜}\ y_{𝒜} \\
|
|
|
|
|
& \Path\ (λ i → \Arrow\ (\widetilde{p}\ i)\ ℬ)\ x_{ℬ}\ y_{ℬ}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{split}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
Let $(f, \inv{f}, \var{inv}_f, \var{inv}_{\inv{f}})$ be an inhabitant
|
|
|
|
|
of the antecedent.\pause
|
|
|
|
|
|
|
|
|
|
Projecting out the first component gives us the isomorphism
|
|
|
|
|
%
|
|
|
|
|
$$
|
|
|
|
|
(\fst\ f, \fst\ \inv{f}
|
|
|
|
|
, \congruence\ \fst\ \var{inv}_f
|
|
|
|
|
, \congruence\ \fst\ \var{inv}_{\inv{f}}
|
|
|
|
|
)
|
|
|
|
|
\tp X \approxeq Y
|
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
This gives rise to the following paths:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\begin{split}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\widetilde{p} & \tp X ≡ Y \\
|
|
|
|
|
\widetilde{p}_{𝒜} & \tp \Arrow\ X\ 𝒜 ≡ \Arrow\ Y\ 𝒜 \\
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{split}
|
|
|
|
|
\end{align*}
|
|
|
|
|
%
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Span category}
|
|
|
|
|
\framesubtitle{Univalence, proof, cont'd}
|
|
|
|
|
It remains to construct:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\begin{split}
|
|
|
|
|
\label{eq:product-paths}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
& \Path\ (λ i → \widetilde{p}_{𝒜}\ i)\ x_{𝒜}\ y_{𝒜}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{split}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
This is achieved with the following lemma:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
∏_{q \tp A ≡ B} \var{coe}\ q\ x_{𝒜} ≡ y_{𝒜}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
→
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\Path\ (λ i → q\ i)\ x_{𝒜}\ y_{𝒜}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
%
|
|
|
|
|
Which is used without proof.\pause
|
|
|
|
|
|
|
|
|
|
So the construction reduces to:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{coe}\ \widetilde{p}_{𝒜}\ x_{𝒜} ≡ y_{𝒜}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}%
|
|
|
|
|
\pause%
|
|
|
|
|
This is proven with:
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{coe}\ \widetilde{p}_{𝒜}\ x_{𝒜}
|
|
|
|
|
& ≡ x_{𝒜} \lll \fst\ \inv{f} && \text{\ref{eq:coeDom}} \\
|
|
|
|
|
& ≡ y_{𝒜} && \text{Property of span category}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Propositionality of products}
|
|
|
|
|
We have
|
|
|
|
|
%
|
|
|
|
|
$$
|
|
|
|
|
\isProp\ \var{Terminal}
|
|
|
|
|
$$\pause
|
|
|
|
|
%
|
|
|
|
|
We can show:
|
|
|
|
|
\begin{align*}
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{Terminal} ≃ \var{Product}\ ℂ\ 𝒜\ ℬ
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
And since equivalences preserve homotopy levels we get:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\isProp\ \left(\var{Product}\ \bC\ 𝒜\ ℬ\right)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Monads}
|
|
|
|
|
\framesubtitle{Monoidal form}
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\EndoR & \tp \Endo ℂ \\
|
|
|
|
|
\pureNT
|
|
|
|
|
& \tp \NT{\EndoR^0}{\EndoR} \\
|
|
|
|
|
\joinNT
|
|
|
|
|
& \tp \NT{\EndoR^2}{\EndoR}
|
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
%
|
2018-05-30 23:07:05 +00:00
|
|
|
|
Let $\fmap$ be the map on arrows of $\EndoR$. Likewise
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$\pure$ and $\join$ are the maps of the natural transformations
|
|
|
|
|
$\pureNT$ and $\joinNT$ respectively.
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\join \lll \fmap\ \join
|
|
|
|
|
& ≡ \join \lll \join \\
|
|
|
|
|
\join \lll \pure\ & ≡ \identity \\
|
|
|
|
|
\join \lll \fmap\ \pure & ≡ \identity
|
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Monads}
|
|
|
|
|
\framesubtitle{Kleisli form}
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\omapR & \tp \Object → \Object \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\pure & \tp % ∏_{X \tp Object}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\Arrow\ X\ (\omapR\ X) \\
|
|
|
|
|
\bind & \tp
|
|
|
|
|
\Arrow\ X\ (\omapR\ Y)
|
|
|
|
|
\to
|
|
|
|
|
\Arrow\ (\omapR\ X)\ (\omapR\ Y)
|
|
|
|
|
\end{align*}\pause
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\fish & \tp
|
|
|
|
|
\Arrow\ A\ (\omapR\ B)
|
|
|
|
|
→
|
|
|
|
|
\Arrow\ B\ (\omapR\ C)
|
|
|
|
|
→
|
|
|
|
|
\Arrow\ A\ (\omapR\ C) \\
|
2018-05-28 15:32:56 +00:00
|
|
|
|
f \fish g & ≜ f \rrr (\bind\ g)
|
2018-05-18 11:14:41 +00:00
|
|
|
|
\end{align*}
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
\begin{align*}
|
|
|
|
|
\label{eq:monad-kleisli-laws-0}
|
|
|
|
|
\bind\ \pure & ≡ \identity_{\omapR\ X} \\
|
|
|
|
|
\label{eq:monad-kleisli-laws-1}
|
|
|
|
|
\pure \fish f & ≡ f \\
|
|
|
|
|
\label{eq:monad-kleisli-laws-2}
|
|
|
|
|
(\bind\ f) \rrr (\bind\ g) & ≡ \bind\ (f \fish g)
|
|
|
|
|
\end{align*}
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\frametitle{Monads}
|
|
|
|
|
\framesubtitle{Equivalence}
|
|
|
|
|
In the monoidal formulation we can define $\bind$:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\bind\ f ≜ \join \lll \fmap\ f
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
|
|
|
|
%
|
|
|
|
|
And likewise in the Kleisli formulation we can define $\join$:
|
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\join ≜ \bind\ \identity
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
\pause
|
2018-05-30 23:07:05 +00:00
|
|
|
|
The laws are logically equivalent. So we get:
|
2018-05-18 11:14:41 +00:00
|
|
|
|
%
|
|
|
|
|
$$
|
2018-05-28 15:32:56 +00:00
|
|
|
|
\var{Monoidal} ≃ \var{Kleisli}
|
2018-05-18 11:14:41 +00:00
|
|
|
|
$$
|
|
|
|
|
%
|
2018-05-16 09:01:07 +00:00
|
|
|
|
\end{frame}
|
|
|
|
|
\end{document}
|