Rule. Dependent types I › The boolean type › Computation [01DT]

The computation rules corresponding to the above elimination rule correspond to the way that when an if-expression is applied to a concrete boolean (i.e. true or false) the whole expression reduces to the corresponding branch.

  1. Given x:\mathsf {bool}\vdash C[x]~\mathit {type} and u:C[\mathsf {true}] and v:C[\mathsf {false}], we may assert \mathsf {if}_{x\mathpunct {.}C[x]}(\mathsf {true};v;w)\equiv v:C[\mathsf {true}]. \frac { x:\mathsf {bool}\vdash C[x]~\mathit {type} \quad v:C[\mathsf {true}] \quad w:C[\mathsf {false}] }{ \mathsf {if}_{x\mathpunct {.}C[x]}(\mathsf {true};v;w)\equiv v:C[\mathsf {true}] }
  2. Given x:\mathsf {bool}\vdash C[x]~\mathit {type} and u:C[\mathsf {true}] and v:C[\mathsf {false}], we may assert \mathsf {if}_{x\mathpunct {.}C[x]}(\mathsf {false};v;w)\equiv w:C[\mathsf {false}]. \frac { x:\mathsf {bool}\vdash C[x]~\mathit {type} \quad v:C[\mathsf {true}] \quad w:C[\mathsf {false}] }{ \mathsf {if}_{x\mathpunct {.}C[x]}(\mathsf {false};v;w)\equiv w:C[\mathsf {false}] }