@@ -29,7 +29,7 @@ need to define some operators on types, which are given in
Section~\ref{sec:typeops}. The second origin is the rule \Rule{Abs-}
by which it is possible to deduce for every well-typed lambda
abstraction infinitely many types, that is the annotation of the
function intersected with as many negations of arrow types as
function intersected with as many negations of arrow types as
possible without making the type empty. We do not handle this
multiplicity directly in the algorithmic system but only in the proof
of its soundness by using and adapting the technique of \emph{type
...
...
@@ -38,11 +38,11 @@ representations of the infinite sets of types of
$\lambda$-abstractions which can be used to define an algorithmic
system that can be easily proved to be sound. The simpler algorithm
that we propose in this section implies (i.e., it is less precise than) the one with type schemes (cf.\
Theorem~\ref{????}) and it is thus sound, too. The algorithm of this
section is not only simpler but, as we discuss in Section~\ref{???},
Lemma~\ref{soundness_simple_ts}) and it is thus sound, too. The algorithm of this
section is not only simpler but, as we discuss in Section~\ref{???}\kim{Where?},
is also the one that should be used in practice. This is why we preferred to
present it here and relegate the presentation of type schemes to
Appendix~\ref{???}.
Appendix~\ref{app:typeschemes}.
$(ii)$. For what concerns the use of the auxiliary derivation for the $\Gamma\evdash e t \Gamma' $ and $\pvdash\Gamma e t \varpi:t'$
judgments, we present in Section~\ref{sec:typenv} an algorithm that is sound and satisfies a limited form of
...
...
@@ -79,7 +79,7 @@ the function has a functional type is easy since it corresponds to
checking that it has a type subtype of $\Empty{\to}\Any$. Determining
its domain and the type of the application is more complicated and needs the operators $\dom{}$ and $\circ$ we informally described in Section~\ref{sec:ideas} where we also introduced the operator $\worra{}{}$. These three operators are used by our algorithm and formally defined as:\vspace{-2mm}
\begin{eqnarray}
\dom t & = &\max\{ u \alt t\leq u\to\Any\}
\dom t & = &\max\{ u \alt t\leq u\to\Any\}
\\[-1mm]
\apply t s & = &\,\min\{ u \alt t\leq s\to u\}
\\[-1mm]
...
...
@@ -118,7 +118,7 @@ $i$ in $I$. For such a $t$ and any type $s$ then we have:\vspace{-1.7mm}
\end{equation}
The formula considers only the positive arrows of each summand that
forms $t$ and states that, for each summand, whenever you take a subset
$P$ of its positive arrows that cannot yield results in
$P$ of its positive arrows that cannot yield results in
$s$ (since $s$ does not overlap the intersection of the codomains of these arrows), then
the success of the test cannot depend on these arrows and therefore
the intersection of the domains of these arrows---i.e., the values that would precisely select that set of arrows---can be removed from $\dom t$. The proof
...
...
@@ -134,7 +134,7 @@ deduction of $\Gamma \evdash e t \Gamma'$, that is an algorithm that
takes as input $\Gamma$, $e$, and $t$, and returns an environment that
extends $\Gamma$ with hypotheses on the occurrences of $e$ that are
the most general that can be deduced by assuming that $e\,{\in}\,t$ succeeds. For that we need the notation $\tyof{e}{\Gamma}$ which denotes the type deduced for $e$ under the type environment $\Gamma$ in the algorithmic type system of Section~\ref{sec:algorules}.
That is, $\tyof{e}{\Gamma}=t$ if and only if $\Gamma\vdashA e:t$ is provable.
That is, $\tyof{e}{\Gamma}=t$ if and only if $\Gamma\vdashA e:t$ is provable.
We start by defining the algorithm for each single occurrence, that is for the deduction of $\pvdash\Gamma e t \varpi:t'$. This is obtained by defining two mutually recursive functions $\constrf$ and $\env{}{}$:\vspace{-1.3mm}
\begin{eqnarray}
...
...
@@ -160,7 +160,11 @@ in the definition are defined).\footnote{Note that the definition is
$\Gamma$ the type of every occurrence of $e$.)\vspace{-3mm}}
Each case of the definition of the $\constrf$ function corresponds to the
application of a logical rule (\emph{cf.} Footnote~\ref{fo:rules}) in
application of a logical rule
\iflongversion
(\emph{cf.} Footnote~\ref{fo:rules})
\fi
in
the deduction system for $\vdashp$: case \eqref{uno} corresponds
to the application of \Rule{PEps}; case \eqref{due} implements \Rule{Pappl}
straightforwardly; the implementation of rule \Rule{PAppR} is subtler:
abstract="The notion of parallel reduction is extracted from the Tait-Martin-Löf proof of the Church-Rosser theorem (for β-reduction). We define parallel β-, η- and βη-reduction by induction, and use them to give simple proofs of some fundamental theorems in λ-calculus; the normal reduction theorem for β-reduction, that for βη-reduction, the postponement theorem of η-reduction (in βη-reduction), and some others."