Fix Unify WF lemma
This commit is contained in:
parent
319f080a8d
commit
54fb6f9f0f
@ -155,10 +155,10 @@ Method calls generate multiple constraints that share the same wildcard placehol
|
||||
% %UNIFY fails when there are free variables on the right side of a a =. T constraint
|
||||
|
||||
\begin{lemma}
|
||||
\unify{} generates well-formed type environments
|
||||
\unify{} generates well-formed types as long as well-formed types are supplied.
|
||||
\begin{description}
|
||||
\item[If] $(\Delta, \sigma) = \unify{}(\Delta', C)$ and $\sigma(\tv{a}) = \wcNtype{\ol{\wildcard{X}{\type{U}}{\type{L}}}}{N}$
|
||||
\item[and] $\forall \Delta_w \in C: \ \vdash \type{L} <: \type{U}$
|
||||
\item[and] $\forall \wcNtype{\Delta}{N} \in C: \ \Delta' \vdash \wcNtype{\Delta}{N} \ \ok$
|
||||
\item[then] $\Delta \vdash \ol{L <: U}$ and $\Delta \vdash \ol{U <: U'}$ % (with U' being upper limit by class definition)
|
||||
\end{description}
|
||||
\end{lemma}
|
||||
@ -166,6 +166,9 @@ Only the \rulename{General} rule generates fresh wildcards.
|
||||
By lemma \ref{lemma:unifySoundness} we get $\Delta \vdash $
|
||||
By S-Exists and S-Trans
|
||||
|
||||
% All types supplied to the Unify algorithm by TYPEs only contain ? extends or ? super wildcards. (X : [bot..T] or X : [T .. Object]).
|
||||
% Both are well formed!
|
||||
|
||||
\begin{lemma}
|
||||
Well-formedness is hereditary
|
||||
\begin{description}
|
||||
|
Loading…
Reference in New Issue
Block a user