Commit e8514524 authored by Giuseppe Castagna's avatar Giuseppe Castagna
Browse files

added statements

parent c5d0e34b
......@@ -851,9 +851,28 @@ an hypothesis in $\Gamma$ is the only way to deduce the type of a
variable, which is a why the algorithm reintroduces the classic rules
for variables.
The system above satisfies the following properties:\beppe{State here
soundness and partial completeness}
The algorithmic system above is sound with respect to the deductive one of Section~\ref{sec:static}
\begin{theorem}[Soundness]
For every $\Gamma$, $e$, $t$, $n_o$, if $\tyof e \Gamma \leq t$, then $\Gamma \vdash e:t$.
\end{theorem}
We were not able to prove completeness, just a partial form of it. As
anticipated, the problems are twofold: $(i)$ the recursive nature of
rule \Rule{Path} and $(ii)$ the use of nested \Rule{PAppL} that yield
a precision that the algorithm loses by applying \tsrep{} in the
definition of \constrf{} (case~\eqref{due} is the crical
one). Completeness is recovered by $(i)$ limiting the depth of the
derivations and $(ii)$ forbidding nested negated arrows on the
lefthand side of negated arrows.
\begin{definition}[Rank-1 negation]
A derivation of $\Gamma \vdash e:t$ is \emph{Rank-1 negated} if \Rule{Abs--} never occurs in the derivation of a left premises of a \Rule{PAppL} rule
\end{definition}
The use of this terminology is borrowed from the ranking of higher-order
types, since, intuitively, it corresponds to typing a language in
which in the types used in dynamic tests, a negated arrow never occurs on the
lefthand side of another negated arrows.
\begin{theorem}[Partial Completeness]
For every $\Gamma$, $e$, $t$, if $\Gamma \vdash e:t$ is derivable by a Rank-1 negated derivation, then there exists $n_o$ such that $\tsrep{\tyof e \Gamma} \leq t$.
\end{theorem}
The use of type schemes and the possible non convergence of iterations
yield a system that may seem overly complicated. But it is important
......
......@@ -973,7 +973,7 @@
\subsubsection{Soundness}
\begin{theorem}[Soundness of the algorithm]
For any $\Gamma$, $e$, $t$ such that $\tyof e \Gamma \leq t$ (for any $n_o$), we can derive $\Gamma \vdash e:t$.
For every $\Gamma$, $e$, $t$, $n_o$, if $\tyof e \Gamma \leq t$, then we can derive $\Gamma \vdash e:t$.
More precisely:
\begin{align*}
......@@ -1444,4 +1444,4 @@
&\forall \Gamma, \Gamma', e, t.\ \Gamma \evdash e t \Gamma' \text{ has an acceptable derivation } \Rightarrow \Refine {e,t} \Gamma \leqA \Gamma' \text{ (for $n_o$ large enough)}
\end{align*}
\end{theorem}
\ No newline at end of file
......@@ -61,11 +61,11 @@
\newcommand{\tauUp}{\tau^\Uparrow}
\newcommand{\sigmaUp}{\sigma^\Uparrow}
\newcommand{\types}{\textbf{Types}}
\newcommand{\types}{\textbf{\textup{Types}}}
\newcommand{\occ}[2]{#1{\downarrow}#2}
\newcommand{\basic}[1]{\text{\fontshape{\itdefault}\fontseries{\bfdefault}\selectfont b}_{#1}}
\newcommand{\tyof}[2]{\textsf{typeof}_{#2}(#1)}
\newcommand{\typep}[3]{\textsf{Constr}^{#1}_{#3}(#2)}
\newcommand{\tyof}[2]{\textsf{\textup{typeof}}_{#2}(#1)}
\newcommand{\typep}[3]{\textsf{\textup{Constr}}^{#1}_{#3}(#2)}
\newcommand{\Gp}[2]{\textsf{Env}^{#1}_{#2}}
\newcommand{\ite}[4]{\ensuremath{\texttt{if}\;#1\in#2\;\texttt{then}\;#3\;\texttt{else}\;#4}}
\newcommand{\Let}[3]{\ensuremath{\texttt{let}\;#1\;\texttt{=}\;#2\;\texttt{in}\;#3}}
......@@ -135,15 +135,15 @@
\newcommand{\Odd} {\textsf{Odd}}
\newcommand{\subst}[2]{\{#1 \mapsto #2\}}
\newcommand{\Refinef}{\textsf{Refine}}
\newcommand{\Refinef}{\textsf{\textup{Refine}}}
\newcommand{\Refine}[2]{\ensuremath{\Refinef_{#1}(#2)}}
\newcommand{\RefineStep}[1]{\textsf{RefineStep}_{#1}}
\newcommand{\RefineStep}[1]{\textsf{\textup{RefineStep}}_{#1}}
\newcommand{\constrf}{\textsf{Constr}}
\newcommand{\constrf}{\textsf{\textup{Constr}}}
\newcommand{\constr}[2]{\constrf_{#2}(#1)}
%\newcommand{\env}[1]{\textsf{Env}_{#1}}
\newcommand{\env}[1]{\textsf{Intertype}_{#1}}
\newcommand{\env}[1]{\textsf{\textup{Intertype}}_{#1}}
\newcommand{\cons}[2]{{#1}\textsf{::}{#2}}
\newcommand{\fixpoint}{\textsf{gfp}}
......@@ -174,7 +174,7 @@
\newcommand{\tsfunone}[2]{{[}\arrow {#1} {#2}]}
\newcommand{\ts}{\mathbbm{t}}
\newcommand{\tsint}[1]{\textbf{\textup{\{}}#1\textbf{\textup{\}}}}
\newcommand{\tsrep}[1]{\textsf{Repr}(#1)}
\newcommand{\tsrep}[1]{\textsf{\textup{Repr}}(#1)}
\newcommand{\vdashA}{\vdash_{\!\scriptscriptstyle\mathcal{A}}}
\newcommand{\vdashp}{\vdash^{\texttt{Path}}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment