Documentation

Lean.Meta.Sym.LiftLet

let-lifting for SymM #

Sym.liftLets moves let/have declarations toward the root of a term, as far out as their dependencies allow. The result is definitionally equal to the input (lifting is a zeta-permutation), so no proof term is produced.

The implementation avoids the performance pitfalls of the standard Lean.Meta.liftLets:

Scope:

Moves the let/have declarations of e toward the root, as far out as their dependencies allow. Nested declarations are flattened, and declarations with pointer-equal types and values are merged. The result is definitionally equal to e.

lets under fun/ binders are not lifted; see the module docstring for the precise scope.

Assumptions:

  • e is maximally shared and has no loose bound variables.
  • Metavariables in e have been instantiated; they are treated as opaque atoms.

If nothing is lifted, the result is pointer-equal to e (check with isSameExpr).

Equations
  • One or more equations did not get rendered due to their size.
Instances For