theorem
LambdaCalculus.LocallyNameless.Untyped.Term.subst_fresh
{Var : Type u}
[DecidableEq Var]
(x : Var)
(t sub : Term Var)
(nmem : x ∉ t.fv)
:
Substitution of a free variable not present in a term leaves it unchanged.
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.swap_open_fvar_close
{Var : Type u}
[DecidableEq Var]
(k n : ℕ)
(x y : Var)
(m : Term Var)
(neq₁ : k ≠ n)
(neq₂ : x ≠ y)
:
Opening and closing are associative for nonclashing free variables.
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.close_preserve_not_fvar
{Var : Type u}
[DecidableEq Var]
{k : ℕ}
{x y : Var}
(m : Term Var)
(nmem : x ∉ m.fv)
:
Closing preserves free variables.
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.close_var_not_fvar_rec
{Var : Type u}
[DecidableEq Var]
(x : Var)
(k : ℕ)
(t : Term Var)
:
Closing removes a free variable.
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.close_var_not_fvar
{Var : Type u}
[DecidableEq Var]
(x : Var)
(t : Term Var)
:
Specializes close_var_not_fvar_rec
to first closing.
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.subst_intro
{Var : Type u}
[DecidableEq Var]
[HasFresh Var]
(x : Var)
(t e : Term Var)
(mem : x ∉ e.fv)
(t_lc : t.LC)
:
Opening to a term t
is equivalent to opening to a free variable and substituting for t
.