Rule. Dependent types I › The boolean type › Elimination [01DS]

The elimination rule is where things start to get interesting; this will be a dependently typed version of the classical if-expression. Given a family of types x:\mathsf {bool}\vdash C[x]~\mathit {type} and elements u:\mathsf {bool} and v:C[\mathsf {true}] and w:C[\mathsf {false}], we may assert \mathsf {if}_{x\mathpunct {.}C[x]}(u;v;w):C[u].

\frac { x:\mathsf {bool}\vdash C[x]~\mathit {type} \quad u:\mathsf {bool} \quad v:C[\mathsf {true}] \quad w:C[\mathsf {false}] }{ \mathsf {if}_{x\mathpunct {.}C[x]}(u;v;w):C[u] }