This is all well and good, but how can we get an actually interesting dependent type x:\mathsf {bool}\vdash C[x]~\mathit {type}? Later on we will introduce type formers that will readily provide examples, but to get an idea of what is possible, we consider the optional large elimination rule with its corresponding computation rules:
-
Given A,B~\mathit {type} and u:\mathsf {bool} we may assert \mathsf {If}(u;A;B)~\mathit {type}.
\frac {
A,B~\mathit {type}
\quad
u:\mathsf {bool}
}{
\mathsf {If}(u;A;B)~\mathit {type}
}
-
Given A,B~\mathit {type}, we may assert \mathsf {If}(\mathsf {true};A;B)\equiv A~\mathit {type}.
\frac {
A,B~\mathit {type}
}{
\mathsf {If}(\mathsf {true};A;B)\equiv A~\mathit {type}
}
-
Given A,B~\mathit {type}, we may assert \mathsf {If}(\mathsf {false};A;B)\equiv B~\mathit {type}.
\frac {
A,B~\mathit {type}
}{
\mathsf {If}(\mathsf {true};A;B)\equiv B~\mathit {type}
}
With the above it is therefore possible to define types like \mathsf {If}(u;\mathsf {unit};\mathsf {empty}) whose behaviour differs wildly depending on the value of u. Once we introduce universes (types whose elements describe types), we will be able to construct examples like this without using the large elimination.