### add underscore notation for parallel reductions

parent d0481fea
 ... ... @@ -183,6 +183,8 @@ {} \end{mathpar} We denote by $e\uleadsto e'$ a step of reduction of the parallel semantic, regardless of the value on the top of the arrow. $\valsemantic t = \{v \alt \vvdash v : t\}$ \begin{mathpar} ... ... @@ -584,7 +586,7 @@ \begin{theorem}[Subject reduction] Let $\Gamma$ an ordinary environment, $e$ and $e'$ two expressions and $t$ a type. If $\Gamma\vdash e:t$ and $e\leadsto e'$, then $\Gamma\vdash e':t$. If $\Gamma\vdash e:t$ and $e\uleadsto e'$, then $\Gamma\vdash e':t$. \end{theorem} \begin{proof} ... ... @@ -605,9 +607,9 @@ \item[\Rule{Const}] Impossible case (no reduction possible). \item[\Rule{App}] In this case, $e\equiv e_1 e_2$. There are three possible cases: \begin{itemize} \item $e_2$ is not a value. In this case, we must have $e_2\leadsto e_2'$ \item $e_2$ is not a value. In this case, we must have $e_2\uleadsto e_2'$ and $e'\equiv e_1 e_2'$. We can easily conclude using the induction hypothesis. \item $e_2$ is a value and $e_1$ is not. In this case, we must have $e_1\leadsto e_1'$ \item $e_2$ is a value and $e_1$ is not. In this case, we must have $e_1\uleadsto e_1'$ and $e'\equiv e_1' e_2$. We can easily conclude using the induction hypothesis. \item Both $e_1$ and $e_2$ are values. This is the difficult case. We have $e_1\equiv \lambda^{\bigwedge_{i\in I}\arrow{s_i}{t_i}}x.e_x$ ... ... @@ -642,11 +644,11 @@ \item[\Rule{Abs-}] Impossible case (no reduction possible). \item[\Rule{Proj}] In this case, $e\equiv \pi_i e_0$. There are two possible cases: \begin{itemize} \item $e_0$ is not a value. In this case, we must have $e_0\leadsto e_0'$ \item $e_0$ is not a value. In this case, we must have $e_0\uleadsto e_0'$ and $e'\equiv \pi_i e_0'$. We can easily conclude using the induction hypothesis. \item $e_0$ is a value. Given that $e_0 \leq \pair \Any \Any$, we have $e_0 = (v_1,v_2)$ with $v_1$ and $v_2$ two values. We also have $e \leadsto v_i$. We also have $e \idleadsto v_i$. The derivation of $\Gamma \vdash (v_1,v_2): \pair {t_1} {t_2}$ must contain a rule \Rule{Pair} which guarantees $\Gamma \vdash v_i: t_i$ (recall that $\Gamma \neq \bot$ and $\Gamma$ is ordinary so there is no pair in $\dom\Gamma$). ... ... @@ -654,9 +656,9 @@ \end{itemize} \item[\Rule{Pair}] In this case, $e\equiv (e_1,e_2)$. There are two possible cases: \begin{itemize} \item $e_2$ is not a value. In this case, we must have $e_2\leadsto e_2'$ \item $e_2$ is not a value. In this case, we must have $e_2\uleadsto e_2'$ and $e'\equiv (e_1, e_2')$. We can easily conclude using the induction hypothesis. \item $e_2$ is a value and $e_1$ is not. In this case, we must have $e_1\leadsto e_1'$ \item $e_2$ is a value and $e_1$ is not. In this case, we must have $e_1\uleadsto e_1'$ and $e'\equiv (e_1', e_2)$. We can easily conclude using the induction hypothesis. \end{itemize} \item[\Rule{Case}] In this case, $e\equiv \ite {e_0} {t_{if}} {e_1} {e_2}$. There are three possible cases: ... ... @@ -680,8 +682,8 @@ \end{itemize} It can be easily proved by induction on the derivation of the reduction step. Secondly, as $e_a\leadsto e_b$ and as the derivation of this reduction is a strict subderivation of that of $e\leadsto e'$, we can use the induction hypothesis on $e_a\leadsto e_b$ and we obtain $\forall t'.\ \Gamma \vdash e_a : t' \Rightarrow \Gamma\rho \vdash e_b:t'$. Secondly, as $e_a\uleadsto e_b$ and as the derivation of this reduction is a strict subderivation of that of $e\uleadsto e'$, we can use the induction hypothesis on $e_a\uleadsto e_b$ and we obtain $\forall t'.\ \Gamma \vdash e_a : t' \Rightarrow \Gamma\rho \vdash e_b:t'$. Thus, we can conclude directly by using the substitution lemma on $e$ and $\rho$. \end{itemize} ... ... @@ -703,7 +705,7 @@ \end{proof} \begin{theorem}[Progress] If $\varnothing \vdash e:t$, then either $e$ is a value or there exists $e'$ such that $e \leadsto e'$. If $\varnothing \vdash e:t$, then either $e$ is a value or there exists $e'$ such that $e \uleadsto e'$. \end{theorem} \begin{proof} ... ...