Dependent types I › The product of a family of types [01DD]
- August 11, 2025
- Jon Sterling
Rule Formation [01DU]
- August 11, 2025
- Jon Sterling
The formation rule states that given A~\mathit {type} and a family x:A\vdash B[x]~\mathit {type}, then we may form {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]}~\mathit {type}.
\frac { A~\mathit {type}\quad x:A\vdash B[x]~\mathit {type} }{ {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}B[x]~\mathit {type} }Rule Introduction [01DV]
- August 11, 2025
- Jon Sterling
The introduction rule states that given A and B as above and x:A\vdash u[x]:B[x], we may form \lambda x\mathpunct {.}{u[x]}:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]}:
\frac { x:A\vdash u[x]:B[x] }{ \lambda x\mathpunct {.}{u[x]}:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }Recall that the premises concerning A and B are implicitly part of the rule above, and omitted only by convention. A further notational convention that we are already employing is to omit A and B from the \lambda -term itself; the most explicit notation for the rule above, which is how you should read it(!), would be something like the following:
\frac { A~\mathit {type}\quad x:A\vdash B[x]~\mathit {type}\quad x:A\vdash u[x]:B[x] }{ \mathsf {lam}(A; x\mathpunct {.}B[x]; x\mathpunct {.}u[x]) :{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }Rule Elimination [01DW]
- August 11, 2025
- Jon Sterling
The elimination rule states that given A and B as above and u:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} and v:A, we may form the application uv:B[v].
\frac { u:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]}\quad v:A }{ uv:B[v] }Rule Computation [01DX]
- August 11, 2025
- Jon Sterling
The computation rule says that applying a \lambda -expression to an element is equal to the corresponding instantiation of its body:
\frac { x:A\vdash u[x]:B[x]\quad v:A }{ (\lambda x\mathpunct {.}{u[x]})v \equiv u[v]:B[v] }Rule Uniqueness [01DY]
- August 11, 2025
- Jon Sterling
The uniqueness rule says that every element of the product {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} is equal to a \lambda -abstraction obtained from it by application to the bound variable.
\frac { u:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }{ u\equiv \lambda x\mathpunct {.}{ux}:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }Exercise Extensionality [01DJ]
- August 11, 2025
- Jon Sterling
Show that the uniqueness rule for the product {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} is equivalent to the following extensionality rule:
\frac { u,v:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} \quad x:A\vdash ux\equiv vx:B[x] }{ u\equiv v:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }