File: .lake/packages/lean4/src/lean/Lean/Meta/ForEachExpr.lean

full_name: Lean.Meta.visitLambda.visit
code: /-- Given an expression `e = fun (x₁ : α₁) .. (xₙ : αₙ) => b`, runs `f` on each `αᵢ` and `b`. -/
def visitLambda (f : Expr → m Unit) (e : Expr) : m Unit 
goal: Lean.Expr → m Unit

full_name: Lean.Meta.visitLambda
code: /-- Given an expression `e = fun (x₁ : α₁) .. (xₙ : αₙ) => b`, runs `f` on each `αᵢ` and `b`. -/
def visitLambda (f : Expr → m Unit) (e : Expr) : m Unit 
goal: m Unit

full_name: Lean.Meta.visitForall.visit
code: /-- Given an expression `e =  (x₁ : α₁) → .. (xₙ : αₙ) → b`, runs `f` on each `αᵢ` and `b`. -/
def visitForall (f : Expr → m Unit) (e : Expr) : m Unit 
goal: Lean.Expr → m Unit

full_name: Lean.Meta.visitForall
code: /-- Given an expression `e =  (x₁ : α₁) → .. (xₙ : αₙ) → b`, runs `f` on each `αᵢ` and `b`. -/
def visitForall (f : Expr → m Unit) (e : Expr) : m Unit 
goal: m Unit

full_name: Lean.Meta.visitLet
code: /-- Given a sequence of let binders `let (x₁ : α₁ := v₁) ... in b`, runs `f` on each `αᵢ`, `vᵢ` and `b`. -/
def visitLet (f : Expr → m Unit) (e : Expr) : m Unit 
goal: m Unit

full_name: Lean.Meta.visitLet.visit
code: /-- Given a sequence of let binders `let (x₁ : α₁ := v₁) ... in b`, runs `f` on each `αᵢ`, `vᵢ` and `b`. -/
def visitLet (f : Expr → m Unit) (e : Expr) : m Unit 
goal: Lean.Expr → m Unit

full_name: Lean.Meta.forEachExpr'.visit
code: /-- Similar to `Expr.forEach'`, but creates free variables whenever going inside of a binder.
If the inner function returns `false`, deeper subexpressions will not be visited.
 -/
partial def forEachExpr'
  (input : Expr)
  (fn : Expr → m Bool)
  : m Unit 
goal: (x : STWorld IO.RealWorld m) → MonadLiftT (ST IO.RealWorld) m → Lean.Expr → Lean.MonadCacheT Lean.Expr Unit m Unit

full_name: Lean.Meta.forEachExpr'
code: /-- Similar to `Expr.forEach'`, but creates free variables whenever going inside of a binder.
If the inner function returns `false`, deeper subexpressions will not be visited.
 -/
partial def forEachExpr'
  (input : Expr)
  (fn : Expr → m Bool)
  : m Unit 
goal: m Unit

full_name: Lean.Meta.forEachExpr
code: /-- Similar to `Expr.forEach`, but creates free variables whenever going inside of a binder. -/
def forEachExpr (e : Expr) (f : Expr → m Unit) : m Unit 
goal: m Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.ForEachExpr.0.Lean.Meta.shouldInferBinderName
code: /-- Return true iff `x` is a metavariable with an anonymous user facing name. -/
private def shouldInferBinderName (x : Expr) : m Bool 
goal: m Bool

full_name: Lean.Meta.setMVarUserNamesAt
code: /--
  Auxiliary method for (temporarily) setting the user facing name of metavariables.
  Let `?m` be a metavariable in `isTarget.contains ?m`, and `?m` does not have a user facing name.
  Then, we try to find an application `f ... ?m` in `e`, and (temporarily) use the
  corresponding parameter name (with a fresh macro scope) as the user facing name for `?m`.
  This method returns all metavariables whose user facing name has been updated.
-/
def setMVarUserNamesAt (e : Expr) (isTarget : Array Expr) : MetaM (Array MVarId) 
goal: Lean.MetaM (Array Lean.MVarId)

full_name: Lean.Meta.resetMVarUserNames
code: /--
  Remove user facing name for metavariables in `toReset`.
  This a low-level method for "undoing" the effect of `setMVarUserNamesAt`
-/
def resetMVarUserNames (toReset : Array MVarId) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.mkForallFVars'
code: /--
  Similar to `mkForallFVars`, but tries to infer better binder names when `xs` contains metavariables.
  Let `?m` be a metavariable in `xs` s.t. `?m` does not have a user facing name.
  Then, we try to find an application `f ... ?m` in the other binder typer and `type`, and
  (temporarily) use the corresponding parameter name (with a fresh macro scope) as the user facing name for `?m`.
  The "renaming" is temporary.
-/
def mkForallFVars' (xs : Array Expr) (type : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr