{v_1}{}\tstimes\tyof{v_1}{}$. Then we have $v\in t\iffdef\tyof
v{}\leq t$.
We also need to perform intersections of type schemes so as to intersect the static type of an expression with the one deduced by occurrence typing. For our algorithmic system (see \Rule{Env$_{\scriptscriptstyle\mathcal{A}}$} in Section~\ref{sec:algorules}) all we need to define is the intersection of a type with a type scheme:
\begin{lemma}
Let $\ts$ be a type scheme and $t$ a type. We can compute a type scheme, written $t \tsand\ts$, such that
\(\tsint{t \tsand\ts}=\{s \alt\exists t' \in\tsint\ts.\ t \land t' \leq s \}\)
\end{lemma}
\beppe{Do we need the next definition and lemma here or they can go in the appendix?
\beppe{Do we need the next definition or it can go in the appendix?
\begin{definition}[Representative]
We define a function $\tsrep{\_}$ that maps every non-empty type scheme into a type, \textit{representative} of the set of types denoted by the scheme.
...
...
@@ -540,10 +546,7 @@ the value. By induction on the definition of values: $\tyof c {} =
\end{align*}
\end{definition}
Note that $\tsrep\ts\in\tsint\ts$.
\begin{lemma}
Let $\ts$ be a type scheme and $t$ a type. We can compute a type scheme, written $t \tsand\ts$, such that:
\[\tsint{t \tsand\ts}=\{s \alt\exists t' \in\tsint\ts.\ t \land t' \leq s \}\]