Documentation

Batteries.Lean.Expr

Additional operations on Expr and related types #

This file defines basic operations on the types expr, name, declaration, level, environment.

This file is mostly for non-tactics.

Converts an Expr into a Syntax, by creating a fresh metavariable assigned to the expr and returning a named metavariable syntax ?a.

Instances For
    @[inline]
    def Lean.Expr.withApp' {α : Sort u_1} (e : Expr) (k : Expr → Array Expr → α) :
    α

    Like withApp but ignores metadata.

    Instances For
      @[inline]

      Like getAppArgs but ignores metadata.

      Instances For
        def Lean.Expr.traverseApp' {m : Type → Type u_1} [Monad m] (f : Expr → m Expr) (e : Expr) :

        Like traverseApp but ignores metadata.

        Instances For
          @[inline]
          def Lean.Expr.withAppRev' {α : Sort u_1} (e : Expr) (k : Expr → Array Expr → α) :
          α

          Like withAppRev but ignores metadata.

          Instances For
            @[inline]

            Like getAppRevArgs but ignores metadata.

            Instances For

              Like getRevArgD but ignores metadata.

              Instances For
                @[inline]
                def Lean.Expr.getArgD' (e : Expr) (i : Nat) (v₀ : Expr) (n : Nat := e.getAppNumArgs') :

                Like getArgD but ignores metadata.

                Instances For
                  def Lean.Expr.isAppOf' (e : Expr) (n : Name) :

                  Like isAppOf but ignores metadata.

                  Instances For

                    Turns an expression that is a natural number literal into a natural number.

                    Instances For

                      Turns an expression that is a constructor of Int applied to a natural number literal into an integer.

                      Instances For
                        def Lean.Expr.addLocalVarInfoForBinderIdent (fvar : Expr) (tk : TSyntax `Lean.binderIdent) :

                        Annotates a binderIdent with the binder information from an fvar.

                        Instances For