mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 02:58:26 +00:00
Type substitution.
This commit is contained in:
25
thesis.tex
25
thesis.tex
@@ -745,14 +745,33 @@ defined as follows.
|
|||||||
\[
|
\[
|
||||||
\begin{eqs}
|
\begin{eqs}
|
||||||
-[-/-] &:& \TypeCat \times \TypeCat \times \TyVarCat \to \TypeCat\\
|
-[-/-] &:& \TypeCat \times \TypeCat \times \TyVarCat \to \TypeCat\\
|
||||||
(A \to C)[B/\alpha] &\defas& A[B/\alpha] \to C[B/\alpha]\\
|
(A \eff E)[B/\beta] &\defas& A[B/\beta] \eff E[B/\beta]\\
|
||||||
|
(A \to C)[B/\beta] &\defas& A[B/\beta] \to C[B/\beta]\\
|
||||||
|
(\forall \alpha^K.C)[B/\beta] &\defas& \begin{cases}
|
||||||
|
\forall \alpha^K.C & \text{if } \alpha = \beta\\
|
||||||
|
\forall \alpha^K.C[B/\beta] & \text{otherwise}
|
||||||
|
\end{cases}\\
|
||||||
\alpha[B/\beta] &\defas& \begin{cases}
|
\alpha[B/\beta] &\defas& \begin{cases}
|
||||||
B & \text{if } \alpha = \beta\\
|
B & \text{if } \alpha = \beta\\
|
||||||
\alpha & \text{otherwise}
|
\alpha & \text{otherwise}
|
||||||
\end{cases}
|
\end{cases}\\
|
||||||
|
\Record{R}[B/\beta] &\defas& \Record{R[B/\beta]}\\
|
||||||
|
{[R]}[B/\beta] &\defas& [R[B/\beta]]\\
|
||||||
|
\{R\}[B/\beta] &\defas& \{R[B/\beta]\}\\
|
||||||
|
\cdot[B/\beta] &\defas& \cdot\\
|
||||||
|
\rho[B/\beta] &\defas& \begin{cases}
|
||||||
|
B & \text{if } \rho = \beta\\
|
||||||
|
\rho & \text{otherwise}
|
||||||
|
\end{cases}\\
|
||||||
|
(\ell : P;R)[B/\beta] &\defas& (\ell : P[B/\beta]; R[B/\beta])\\
|
||||||
|
\theta[B/\beta] &\defas& \begin{cases}
|
||||||
|
B & \text{if } \rho = \beta\\
|
||||||
|
\theta & \text{otherwise}
|
||||||
|
\end{cases}\\
|
||||||
|
\Abs[B/\beta] &\defas& \Abs\\
|
||||||
|
\Pre{A}[B/beta] &\defas& \Pre{A[B/\beta]}
|
||||||
\end{eqs}
|
\end{eqs}
|
||||||
\]
|
\]
|
||||||
\dhil{Complete the implementation\dots}
|
|
||||||
%
|
%
|
||||||
The \tylab{Split} rule handles typing of record destructing. When
|
The \tylab{Split} rule handles typing of record destructing. When
|
||||||
splitting a record term $V$ on some label $\ell$ binding it to $x$ and
|
splitting a record term $V$ on some label $\ell$ binding it to $x$ and
|
||||||
|
|||||||
Reference in New Issue
Block a user