β-reduction for the λ-calculus #
References #
- [A. Chargueraud, The Locally Nameless Representation] [Cha12]
- See also https://www.cis.upenn.edu/~plclub/popl08-tutorial/code/, from which this is partially adapted
A single β-reduction step.
- beta
{Var : Type u}
{M N : Term Var}
: M.abs.LC → N.LC → (M.abs.app N).FullBeta (M.open' N)
Reduce an application to a lambda term.
- appL
{Var : Type u}
{Z M N : Term Var}
: Z.LC → M.FullBeta N → (Z.app M).FullBeta (Z.app N)
Left congruence rule for application.
- appR
{Var : Type u}
{Z M N : Term Var}
: Z.LC → M.FullBeta N → (M.app Z).FullBeta (N.app Z)
Right congruence rule for application.
- abs
{Var : Type u}
{M N : Term Var}
(xs : Finset Var)
: (∀ x ∉ xs, (M.open' (fvar x)).FullBeta (N.open' (fvar x))) → M.abs.FullBeta N.abs
Congruence rule for lambda terms.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
LambdaCalculus.LocallyNameless.Untyped.Term.FullBeta.step_lc_r
{Var : Type u}
{M M' : Term Var}
[HasFresh Var]
[DecidableEq Var]
(step : M ⭢βᶠ M')
:
M'.LC
The right side of a reduction is locally closed.