A set of terms is called saturated if it
- only contains locally closed terms,
- only contains strongly normalizing terms,
- contains all neutral locally closed terms, and
- is closed under top-level β-reduction of the form (λ M) N P₁ … Pₙ → M ^ N P₁ … Pₙ.
- lc (M : Untyped.Term Var) : M ∈ S → M.LC
- sn (M : Untyped.Term Var) : M ∈ S → M.SN
- neutal_lc (M : Untyped.Term Var) : M.Neutral → M.LC → M ∈ S
Instances For
The semantic map maps each type to a corresponding saturated set of terms. For the strong normalization proof to work, we must ensure that Γ ⊢ t ∶ τ implies that t is in the set of terms corresponding to τ.
Strong normalization later follows from the fact that terms in saturated sets are strongly normalizing.
Equations
- One or more equations did not get rendered due to their size.
- Cslib.LambdaCalculus.LocallyNameless.Stlc.semanticMap (Cslib.LambdaCalculus.LocallyNameless.Stlc.Ty.base a) = {t : Cslib.LambdaCalculus.LocallyNameless.Untyped.Term Var | t.SN ∧ t.LC}
Instances For
The sets constructed by semanticMap are saturated
The entails_context predicate ensures that each variable in the context
is mapped to a term in the corresponding semantic map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The empty context is entailed by any environment.
The entails_context predicate is preserved when extending the context
with a new variable, provided the new variable is fresh and its
substitution is in the corresponding semantic map.
The entails predicate states that a term t is
semantically valid with respect to a context Γ and a type τ
Equations
- One or more equations did not get rendered due to their size.
Instances For
The soundness lemma states that if a term t has type τ in context Γ,
then t is semantically valid with respect to Γ and τ
Using soundness and the fact that the empty context is entailed by any environment, we can conclude that a well-typed term is strongly normalizing.