{z : U \sem{\u G}\rho\vdash\rho_{up}(\u G) : \rho(\dync)}
\inferrule*[right=Linearity]
{}
{th : U\u F U \rho(\dync) \vdash\bindXtoYinZ{\force th} w \rho_{dn}(\u G) \equidyn\letXbeYinZ{\thunk (\bindXtoYinZ{\force th}{w'}\force w')} w \rho_{dn}(\u G)}
{z : U \srho{\u G}\vdash\rho_{up}(\u G) : \rho(\dync)}
\inferrule*[right=Retraction]
{}
{z : U \sem{\u G}\rho\vdash\force z \equidyn
\letXbeYinZ{\rho_{up}(\u G)} w \rho_{dn}(\u G)
: \sem{\u G}\rho}
{z : U \srho{\u G}\vdash\force z \equidyn
\rho_{dn}(\u G)[\force{\rho_{up}(\u G)}]
: \srho{\u G}}
\inferrule*[right=Projection]
{}
{w : U\rho(\dync) \vdash
{\bullet :\rho(\dync) \vdash
\letXbeYinZ{\thunk\rho_{dn}(\u G)} z \rho_{up}(\u G)
\ltdyn
\force w
\bullet
: \rho(\dync)
}
\end{mathpar}
...
...
@@ -996,11 +993,11 @@ booleans.
\begin{theorem}[Interpretation of Casts]
\begin{enumerate}
\item If $A \ltdyn A'$, then $\sem{\upcast A {A'}}\rho$ is
\item If $A \ltdyn A'$, then $\srho{\upcast A {A'}}$ is
thunkable, and $\sem{\upcast A {A'}}$ and $\sem{\dncast{\u F
A}{\u F A}}$ are a value embedding-projection pair.
\item If $\u B \ltdyn\u B'$, then $\sem{\dncast{\u B}{\u
B'}}\rho$ is linear, and $\sem{\dncast{\u B}{\u B'}}\rho$ and
B'}}\rho$ is linear, and $\srho{\dncast{\u B}{\u B'}}$ and
$\sem{\upcast{U \u B}{U \u B'}}$ are a computation
embedding-projection pair.
\end{enumerate}
...
...
@@ -1012,9 +1009,140 @@ booleans.
When combined with the logical relation interpretation of CBPV, this
is our graduality theorem.
\begin{theorem}[Dynamism Preservation of Contract Translation (Graduality Part 1)]
Let $\rho$ be a dynamic type interpretation. Then the following are true,
\begin{mathpar}
\inferrule
{\Gamma\ltdyn\Gamma' \vdash M \ltdyn M' : \u B \ltdyn\u B'}