Documentation

Mathlib.Util.TermReduce

Term elaborators for reduction #

The beta% f x1 ... xn term elaborator elaborates the expression f x1 ... xn and then does one level of beta reduction. That is, if f is a lambda then it will substitute its arguments.

The purpose of this is to support substitutions in notations such as ∀ i, beta% p i so that p i gets beta reduced when p is a lambda.

beta% t elaborates t and then if the result is in the form f x1 ... xn where f is a (nested) lambda expression, it will substitute all of its arguments by beta reduction. This does not recursively do beta reduction, nor will it do beta reduction of subexpressions.

In particular, t is elaborated, its metavariables are instantiated, and then Lean.Expr.headBeta is applied.

Equations
    Instances For

      beta% t elaborates t and then if the result is in the form f x1 ... xn where f is a (nested) lambda expression, it will substitute all of its arguments by beta reduction. This does not recursively do beta reduction, nor will it do beta reduction of subexpressions.

      In particular, t is elaborated, its metavariables are instantiated, and then Lean.Expr.headBeta is applied.

      Equations
        Instances For

          delta% t elaborates to a head-delta reduced version of t.

          Equations
            Instances For

              delta% t elaborates to a head-delta reduced version of t.

              Equations
                Instances For

                  zeta% t elaborates to a zeta and zeta-delta reduced version of t.

                  Equations
                    Instances For

                      zeta% t elaborates to a zeta and zeta-delta reduced version of t.

                      Equations
                        Instances For

                          reduceProj% t apply Expr.reduceProjStruct? to all subexpressions of t.

                          Equations
                            Instances For

                              reduceProj% t apply Expr.reduceProjStruct? to all subexpressions of t.

                              Equations
                                Instances For