@@ -29,6 +29,34 @@ twoPlusTwo = refl
29\end{SaveVerbatim}
29\end{SaveVerbatim}
30\useverb{eqprf}
30\useverb{eqprf}
32+\subsection{The Empty Type}
34+There is an empty type, \texttt{\_|\_}, which has no constructors. It is
35+therefore impossible to construct an element of the empty type, at least
36+without using a partially defined or general recursive function (see Section
37+\ref{sect:totality} for more details). We can therefore use the empty type
38+to prove that something is impossible, for example zero is never equal
41+\begin{SaveVerbatim}{natdisjoint}
43+imp : (n : Nat) -> O = S n -> _|_
44+imp n p = replace {P = impTy} p ()
54+There is no need to worry too much about how this function works --- essentially,
55+it applies the library function \texttt{replace}, which uses an equality proof to
56+transform a predicate. Here we use it to transform a value of a type which can exist,
57+the empty tuple, to a value of a type which can't, by using a proof of something
32\subsection{Simple Theorems}
60\subsection{Simple Theorems}
34When type checking dependent types, the type itself gets \emph{normalised}. So imagine
62When type checking dependent types, the type itself gets \emph{normalised}. So imagine