λ-calculus #
The untyped λ-calculus, with a named representation of variables. This file contains properties of α-equivalence and capture-avoiding substitution.
Main results #
AlphaEquiv.refl: reflexivity of α-equivalenceAlphaEquiv.symm: symmetry of α-equivalenceAlphaEquiv.trans: transitivity of α-equivalenceSubst.relation_iff_function: the relational and functional definition of capture-avoiding substitution are equivalent, modulo alpha-equivalencesubst.commutativity: commutativity of substitution, more commonly known as the "substitution lemma" (e.g. in [84])
A variable in a term is either free or bound.
Renaming an unused variable has no effect.
Renaming a variable to itself has no effect.
Renaming removes the variable.
Concatenation of renaming.
α-equivalent terms have the same size.
α-equivalent terms have the same free variables.
Reflexivity of α-equivalence.
Symmetry of α-equivalence.
Elimination rule for α-equivalence of abstractions.
It states that if two abstractions are α-equivalent,
then their bodies can be renamed to any'' fresh variable y and remain α-equivalent. This is sometimes easier to use than using by_cases on the equivalence, which can only produce the claim for some'' fresh y.
Transitivity of α-equivalence.
Renaming a non-free variable results in an α-equivalent term
Abstracting over an arbitrary non-free variable results in the same term, modulo α-equivalence.
The functional definition of substitution satisfies the relational definition of substitution.
Modulo α-equivalence, substituting an abstraction falls back to the fresh variable case only. With this lemma, the three cases in the definition of subst can be reduced to one.
The relational definition of substitution coincides with the functional definition of substitution, modulo α-equivalence.