ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Simproc.lean

full_name: Lean.Elab.elabSimprocPattern
code: def elabSimprocPattern (stx : Syntax) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Lean.Elab.elabSimprocKeys
code: def elabSimprocKeys (stx : Syntax) : MetaM (Array Meta.SimpTheoremKey) 
goal: Lean.MetaM (Array Lean.Meta.SimpTheoremKey)

full_name: Lean.Elab.checkSimprocType
code: def checkSimprocType (declName : Name) : CoreM Bool 
goal: Lean.CoreM Bool

full_name: Lean.Elab.Command.elabSimprocPattern
code: @[builtin_command_elab Lean.Parser.simprocPattern] def elabSimprocPattern : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: Lean.Elab.Command.elabSimprocPatternBuiltin
code: @[builtin_command_elab Lean.Parser.simprocPatternBuiltin] def elabSimprocPatternBuiltin : CommandElab 
goal: Lean.Elab.Command.CommandElab
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Meta.lean

full_name: Lean.Elab.runTactic
code: /-- Apply the give tactic code to `mvarId` in `MetaM`. -/
def runTactic (mvarId : MVarId) (tacticCode : Syntax) (ctx : Context := {}) (s : State := {}) : MetaM (List MVarId × State) 
goal: Lean.MetaM (List Lean.MVarId × Lean.Elab.Term.State)
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Injection.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Tactic.Injection.0.Lean.Elab.Tactic.getInjectionNewIds
code: private def getInjectionNewIds (stx : Syntax) : List Name 
goal: List Lean.Name

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Tactic.Injection.0.Lean.Elab.Tactic.checkUnusedIds
code: private def checkUnusedIds (tacticName : Name) (mvarId : MVarId) (unusedIds : List Name) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Tactic.Injection.0.Lean.Elab.Tactic.tryAssumption
code: private def tryAssumption (mvarId : MVarId) : MetaM (List MVarId) 
goal: Lean.MetaM (List Lean.MVarId)

full_name: Lean.Elab.Tactic.evalInjection
code: @[builtin_tactic «injection»] def evalInjection : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Lean.Elab.Tactic.evalInjections
code: @[builtin_tactic «injections»] def evalInjections : Tactic 
goal: Lean.Elab.Tactic.Tactic
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Split.lean

full_name: Lean.Elab.Tactic.evalSplit
code: @[builtin_tactic Lean.Parser.Tactic.split] def evalSplit : Tactic 
goal: Lean.Elab.Tactic.Tactic
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Calc.lean

full_name: Lean.Elab.Tactic.evalCalc
code: /-- Elaborator for the `calc` tactic mode variant. -/
@[builtin_tactic Lean.calcTactic]
def evalCalc : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Lean.Elab.Tactic.evalCalc.throwFailed
code: /-- Elaborator for the `calc` tactic mode variant. -/
@[builtin_tactic Lean.calcTactic]
def evalCalc : Tactic 
goal: Lean.Elab.TermElabM PUnit
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Config.lean

full_name: Lean.Elab.Tactic.«_aux_.lake_packages_lean4_src_lean_Lean_Elab_Tactic_Config___macroRules_Lean_Elab_Tactic_configElab_1»
code: macro (name := configElab) doc?:(docComment)? "declare_config_elab" elabName:ident type:ident : command =>
 `(unsafe def evalUnsafe (e : Expr) : TermElabM $type :=
    Meta.evalExpr' (safety := .unsafe) $type ``$type e
   @[implemented_by evalUnsafe] opaque eval (e : Expr) : TermElabM $type
   $[$doc?:docComment]?
   def $elabName (optConfig : Syntax) : TermElabM $type := do
     if optConfig.isNone then
       return { : $type }
     else
       let c ← withoutModifyingStateWithInfoAndMessages <| withLCtx {} {} <| withSaveInfoContext <| Term.withSynthesize do
         let c ← Term.elabTermEnsuringType optConfig[0][3] (Lean.mkConst ``$type)
         Term.synthesizeSyntheticMVarsNoPostponing
         instantiateMVars c
       eval c
  )
goal: Lean.Macro

full_name: Lean.Elab.Tactic.configElab
code: macro (name := configElab) doc?:(docComment)? "declare_config_elab" elabName:ident type:ident : command =>
 `(unsafe def evalUnsafe (e : Expr) : TermElabM $type :=
    Meta.evalExpr' (safety := .unsafe) $type ``$type e
   @[implemented_by evalUnsafe] opaque eval (e : Expr) : TermElabM $type
   $[$doc?:docComment]?
   def $elabName (optConfig : Syntax) : TermElabM $type := do
     if optConfig.isNone then
       return { : $type }
     else
       let c ← withoutModifyingStateWithInfoAndMessages <| withLCtx {} {} <| withSaveInfoContext <| Term.withSynthesize do
         let c ← Term.elabTermEnsuringType optConfig[0][3] (Lean.mkConst ``$type)
         Term.synthesizeSyntheticMVarsNoPostponing
         instantiateMVars c
       eval c
  )
goal: Lean.ParserDescr

full_name: Lean.Elab.Tactic.checkConfigElab
code: @[builtin_missing_docs_handler Elab.Tactic.configElab]
def checkConfigElab : SimpleHandler 
goal: Lean.Linter.MissingDocs.SimpleHandler
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/ShowTerm.lean

full_name: Lean.Elab.Tactic.ShowTerm.evalShowTerm
code: @[builtin_tactic showTerm] def evalShowTerm : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Lean.Elab.Tactic.ShowTerm.elabShowTerm
code: /-- Implementation of `show_term` term elaborator. -/
@[builtin_term_elab showTermElabImpl] def elabShowTerm : TermElab
  
goal: Lean.Elab.Term.TermElab
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/LibrarySearch.lean

full_name: Lean.Elab.LibrarySearch.exact?
code: /--
Implementation of the `exact?` tactic.

* `ref` contains the input syntax and is used for locations in error reporting.
* `required` contains an optional list of terms that should be used in closing the goal.
* `requireClose` indicates if the goal must be closed.
  It is `true` for `exact?` and `false` for `apply?`.
-/
def exact? (ref : Syntax) (required : Option (Array (TSyntax `term))) (requireClose : Bool) :
    TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Lean.Elab.LibrarySearch.evalExact
code: @[builtin_tactic Lean.Parser.Tactic.exact?]
def evalExact : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Lean.Elab.LibrarySearch.evalApply
code: @[builtin_tactic Lean.Parser.Tactic.apply?]
def evalApply : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Lean.Elab.LibrarySearch.elabExact?Term
code: @[builtin_term_elab Lean.Parser.Syntax.exact?]
def elabExact?Term : TermElab 
goal: Lean.Elab.Term.TermElab
File: .lake/packages/lean4/src/lean/Lean/Elab/CheckTactic.lean

full_name: Lean.Elab.CheckTactic.elabCheckTactic
code: @[builtin_command_elab Lean.Parser.checkTactic]
def elabCheckTactic : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: Lean.Elab.CheckTactic.elabCheckTacticFailure
code: @[builtin_command_elab Lean.Parser.checkTacticFailure]
def elabCheckTacticFailure : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: Lean.Elab.CheckTactic.expandCheckSimp
code: @[builtin_macro Lean.Parser.checkSimp]
def expandCheckSimp : Macro 
goal: Lean.Macro

full_name: Lean.Elab.CheckTactic.expandCheckSimpFailure
code: @[builtin_macro Lean.Parser.checkSimpFailure]
def expandCheckSimpFailure : Macro 
goal: Lean.Macro
File: .lake/packages/lean4/src/lean/Lean/Elab/Eval.lean

full_name: Lean.Elab.Term.evalTerm
code: unsafe def evalTerm (α) (type : Expr) (value : Syntax) (safety := DefinitionSafety.safe) : TermElabM α 
goal: Lean.Elab.TermElabM α
File: .lake/packages/lean4/src/lean/Lean/Elab/AuxDef.lean

full_name: Lean.Elab.Command.aux_def
code: /--
Declares an auxiliary definition with an automatically generated name.
For example, `aux_def foo : Nat := 42` creates a definition
with an internal, unused name based on the suggestion `foo`.
-/
scoped syntax (name := aux_def) docComment ? attributes ? "aux_def" ident+ ":" term ":=" term : command
goal: Lean.ParserDescr

full_name: Lean.Elab.Command.elabAuxDef
code: @[builtin_command_elab «aux_def»]
def elabAuxDef : CommandElab
  
goal: Lean.Elab.Command.CommandElab
File: .lake/packages/lean4/src/lean/Lean/Elab/AutoBound.lean

full_name: Lean.Elab.autoImplicit
code: register_builtin_option autoImplicit : Bool := {
    defValue := true
    descr    := "Unbound local variables in declaration headers become implicit arguments. In \"relaxed\" mode (default), any atomic identifier is eligible, otherwise only single character followed by numeric digits are eligible. For example, `def f (x : Vector α n) : Vector α n :=` automatically introduces the implicit variables {α n}."
  }
goal: Lean.Option Bool

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.AutoBound._hyg.7
code: register_builtin_option autoImplicit : Bool := {
    defValue := true
    descr    := "Unbound local variables in declaration headers become implicit arguments. In \"relaxed\" mode (default), any atomic identifier is eligible, otherwise only single character followed by numeric digits are eligible. For example, `def f (x : Vector α n) : Vector α n :=` automatically introduces the implicit variables {α n}."
  }
goal: IO (Lean.Option Bool)

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.AutoBound._hyg.43
code: register_builtin_option relaxedAutoImplicit : Bool := {
    defValue := true
    descr    := "When \"relaxed\" mode is enabled, any atomic nonempty identifier is eligible for auto bound implicit locals (see optin `autoBoundImplicitLocal`."
  }
goal: IO (Lean.Option Bool)

full_name: Lean.Elab.relaxedAutoImplicit
code: register_builtin_option relaxedAutoImplicit : Bool := {
    defValue := true
    descr    := "When \"relaxed\" mode is enabled, any atomic nonempty identifier is eligible for auto bound implicit locals (see optin `autoBoundImplicitLocal`."
  }
goal: Lean.Option Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.AutoBound.0.Lean.Elab.isValidAutoBoundSuffix
code: private def isValidAutoBoundSuffix (s : String) : Bool 
goal: Bool

full_name: Lean.Elab.isValidAutoBoundImplicitName
code: def isValidAutoBoundImplicitName (n : Name) (relaxed : Bool) : Bool 
goal: Bool

full_name: Lean.Elab.isValidAutoBoundLevelName
code: def isValidAutoBoundLevelName (n : Name) (relaxed : Bool) : Bool 
goal: Bool
File: .lake/packages/lean4/src/lean/Lean/Elab/Tactic/Simpa.lean

full_name: initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Tactic.Simpa._hyg.5
code: /--
Enables the 'unnecessary `simpa`' linter. This will report if a use of
`simpa` could be proven using `simp` or `simp at h` instead.
-/
register_option linter.unnecessarySimpa : Bool := {
  defValue := true
  descr := "enable the 'unnecessary simpa' linter"
}
goal: IO (Lean.Option Bool)

full_name: linter.unnecessarySimpa
code: /--
Enables the 'unnecessary `simpa`' linter. This will report if a use of
`simpa` could be proven using `simp` or `simp at h` instead.
-/
register_option linter.unnecessarySimpa : Bool := {
  defValue := true
  descr := "enable the 'unnecessary simpa' linter"
}
goal: Lean.Option Bool

full_name: Lean.Elab.Tactic.Simpa.getLinterUnnecessarySimpa
code: /-- Gets the value of the `linter.unnecessarySimpa` option. -/
def getLinterUnnecessarySimpa (o : Options) : Bool 
goal: Bool

full_name: Lean.Elab.Tactic.Simpa.«instReprUseImplicitLambdaResult_.lake»
code: Repr
goal: Repr Lean.Elab.Term.UseImplicitLambdaResult

full_name: Lean.Elab.Tactic.Simpa.evalSimpa
code: @[builtin_tactic Lean.Parser.Tactic.simpa] def evalSimpa : Tactic 
goal: Lean.Elab.Tactic.Tactic
File: .lake/packages/lean4/src/lean/Lean/Elab/Attributes.lean

full_name: Lean.Elab.Attribute
code: structure Attribute where
  kind  : AttributeKind := AttributeKind.global
  name  : Name
  stx   : Syntax := Syntax.missing
  deriving Inhabited
goal: Type

full_name: Lean.Elab.Attribute.name
code: structure Attribute where
  kind  : AttributeKind := AttributeKind.global
  name  : Name
  stx   : Syntax := Syntax.missing
  deriving Inhabited
goal: Lean.Name

full_name: Lean.Elab.Attribute.kind
code: structure Attribute where
  kind  : AttributeKind := AttributeKind.global
  name  : Name
  stx   : Syntax := Syntax.missing
  deriving Inhabited
goal: Lean.AttributeKind

full_name: Lean.Elab.Attribute.stx
code: structure Attribute where
  kind  : AttributeKind := AttributeKind.global
  name  : Name
  stx   : Syntax := Syntax.missing
  deriving Inhabited
goal: Lean.Syntax

full_name: Lean.Elab.instInhabitedAttribute
code: structure Attribute where
  kind  : AttributeKind := AttributeKind.global
  name  : Name
  stx   : Syntax := Syntax.missing
  deriving Inhabited
goal: Inhabited Lean.Elab.Attribute

full_name: Lean.Elab.instToFormatAttribute
code: instance : ToFormat Attribute 
goal: Lean.ToFormat Lean.Elab.Attribute

full_name: Lean.Elab.toAttributeKind
code: /--
  ```
  attrKind := leading_parser optional («scoped» <|> «local»)
  ```
-/
def toAttributeKind (attrKindStx : Syntax) : MacroM AttributeKind 
goal: Lean.MacroM Lean.AttributeKind

full_name: Lean.Elab.mkAttrKindGlobal
code: def mkAttrKindGlobal : Syntax 
goal: Lean.Syntax

full_name: Lean.Elab.elabAttr
code: def elabAttr [Monad m] [MonadEnv m] [MonadResolveName m] [MonadError m] [MonadMacroAdapter m] [MonadRecDepth m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLiftT IO m] (attrInstance : Syntax) : m Attribute 
goal: m Lean.Elab.Attribute

full_name: Lean.Elab.elabAttrs
code: def elabAttrs [Monad m] [MonadEnv m] [MonadResolveName m] [MonadError m] [MonadMacroAdapter m] [MonadRecDepth m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLog m] [MonadLiftT IO m] (attrInstances : Array Syntax) : m (Array Attribute) 
goal: m (Array Lean.Elab.Attribute)

full_name: Lean.Elab.elabDeclAttrs
code: def elabDeclAttrs [Monad m] [MonadEnv m] [MonadResolveName m] [MonadError m] [MonadMacroAdapter m] [MonadRecDepth m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLog m] [MonadLiftT IO m] (stx : Syntax) : m (Array Attribute) 
goal: m (Array Lean.Elab.Attribute)
File: .lake/packages/lean4/src/lean/Lean/Elab/ElabRules.lean

full_name: Lean.Elab.Command.elabElabRulesAux
code: def elabElabRulesAux (doc? : Option (TSyntax ``docComment))
    (attrs? : Option (TSepArray ``attrInstance ",")) (attrKind : TSyntax ``attrKind)
    (k : SyntaxNodeKind) (cat? expty? : Option (Ident)) (alts : Array (TSyntax ``matchAlt)) :
    CommandElabM Syntax 
goal: Lean.Elab.Command.CommandElabM Lean.Syntax

full_name: Lean.Elab.Command.elabElabRules
code: @[builtin_command_elab «elab_rules»] def elabElabRules : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: Lean.Elab.Command.elabElab
code: @[builtin_command_elab Lean.Parser.Command.elab]
def elabElab : CommandElab
  
goal: Lean.Elab.Command.CommandElab
File: .lake/packages/lean4/src/lean/Lean/Elab/GenInjective.lean

full_name: Lean.Elab.Command.elabGenInjectiveTheorems
code: @[builtin_command_elab genInjectiveTheorems] def elabGenInjectiveTheorems : CommandElab 
goal: Lean.Elab.Command.CommandElab
File: .lake/packages/lean4/src/lean/Lean/Elab/Calc.lean

full_name: Lean.Elab.Term.getCalcRelation?
code: /--
  Decompose `e` into `(r, a, b)`.

  Remark: it assumes the last two arguments are explicit. -/
def getCalcRelation? (e : Expr) : MetaM (Option (Expr × Expr × Expr)) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr × Lean.Expr))

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Calc.0.Lean.Elab.Term.getRelUniv
code: private def getRelUniv (r : Expr) : MetaM Level 
goal: Lean.MetaM Lean.Level

full_name: Lean.Elab.Term.mkCalcTrans
code: def mkCalcTrans (result resultType step stepType : Expr) : MetaM (Expr × Expr) 
goal: Lean.MetaM (Lean.Expr × Lean.Expr)

full_name: Lean.Elab.Term.annotateFirstHoleWithType.go
code: /--
Adds a type annotation to a hole that occurs immediately at the beginning of the term.
This is so that coercions can trigger when elaborating the term.
See https://github.com/leanprover/lean4/issues/2040 for further rationale.

- `_ < 3` is annotated
- `(_) < 3` is not, because it occurs after an atom
- in `_ < _` only the first one is annotated
- `_ + 2 < 3` is annotated (not the best heuristic, ideally we'd like to annotate `_ + 2`)
- `lt _ 3` is not, because it occurs after an identifier
-/
partial def annotateFirstHoleWithType (t : Term) (type : Expr) : TermElabM Term 
goal: StateT Bool Lean.Elab.TermElabM Lean.Syntax

full_name: Lean.Elab.Term.annotateFirstHoleWithType
code: /--
Adds a type annotation to a hole that occurs immediately at the beginning of the term.
This is so that coercions can trigger when elaborating the term.
See https://github.com/leanprover/lean4/issues/2040 for further rationale.

- `_ < 3` is annotated
- `(_) < 3` is not, because it occurs after an atom
- in `_ < _` only the first one is annotated
- `_ + 2 < 3` is annotated (not the best heuristic, ideally we'd like to annotate `_ + 2`)
- `lt _ 3` is not, because it occurs after an identifier
-/
partial def annotateFirstHoleWithType (t : Term) (type : Expr) : TermElabM Term 
goal: Lean.Elab.TermElabM Lean.Term

full_name: Lean.Elab.Term.getCalcFirstStep
code: def getCalcFirstStep (step0 : TSyntax ``calcFirstStep) : TermElabM (TSyntax ``calcStep) 
goal: Lean.Elab.TermElabM (Lean.TSyntax `Lean.calcStep)

full_name: Lean.Elab.Term.getCalcSteps
code: def getCalcSteps (steps : TSyntax ``calcSteps) : TermElabM (Array (TSyntax ``calcStep)) 
goal: Lean.Elab.TermElabM (Array (Lean.TSyntax `Lean.calcStep))

full_name: Lean.Elab.Term.elabCalcSteps
code: def elabCalcSteps (steps : TSyntax ``calcSteps) : TermElabM Expr 
goal: Lean.Elab.TermElabM Lean.Expr

full_name: Lean.Elab.Term.elabCalc
code: /-- Elaborator for the `calc` term mode variant. -/
@[builtin_term_elab Lean.calc]
def elabCalc : TermElab 
goal: Lean.Elab.Term.TermElab
File: .lake/packages/lean4/src/lean/Lean/Elab/Deriving/SizeOf.lean

full_name: Lean.Elab.Deriving.SizeOf.mkSizeOfHandler
code: def mkSizeOfHandler (declNames : Array Name) : CommandElabM Bool 
goal: Lean.Elab.Command.CommandElabM Bool

full_name: Lean.Elab.Deriving.SizeOf.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Deriving.SizeOf._hyg.126
code: builtin_initialize
  registerDerivingHandler `SizeOf mkSizeOfHandler
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/Deriving/Hashable.lean

full_name: Lean.Elab.Deriving.Hashable.mkHashableHeader
code: def mkHashableHeader (indVal : InductiveVal) : TermElabM Header 
goal: Lean.Elab.TermElabM Lean.Elab.Deriving.Header

full_name: Lean.Elab.Deriving.Hashable.mkMatch.mkAlts
code: def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) : TermElabM Term 
goal: Lean.Elab.TermElabM (Array (Lean.TSyntax `Lean.Parser.Term.matchAlt))

full_name: Lean.Elab.Deriving.Hashable.mkMatch
code: def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) : TermElabM Term 
goal: Lean.Elab.TermElabM Lean.Term

full_name: Lean.Elab.Deriving.Hashable.mkAuxFunction
code: def mkAuxFunction (ctx : Context) (i : Nat) : TermElabM Command 
goal: Lean.Elab.TermElabM Lean.Command

full_name: Lean.Elab.Deriving.Hashable.mkHashFuncs
code: def mkHashFuncs (ctx : Context) : TermElabM Syntax 
goal: Lean.Elab.TermElabM Lean.Syntax

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Deriving.Hashable.0.Lean.Elab.Deriving.Hashable.mkHashableInstanceCmds
code: private def mkHashableInstanceCmds (declName : Name) : TermElabM (Array Syntax) 
goal: Lean.Elab.TermElabM (Array Lean.Syntax)

full_name: Lean.Elab.Deriving.Hashable.mkHashableHandler
code: def mkHashableHandler (declNames : Array Name) : CommandElabM Bool 
goal: Lean.Elab.Command.CommandElabM Bool

full_name: Lean.Elab.Deriving.Hashable.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Deriving.Hashable._hyg.2338
code: builtin_initialize
  registerDerivingHandler ``Hashable mkHashableHandler
  registerTraceClass `Elab.Deriving.hashable
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/Deriving/TypeName.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Deriving.TypeName.0.Lean.Elab.deriveTypeNameInstance
code: private def deriveTypeNameInstance (declNames : Array Name) : CommandElabM Bool 
goal: Lean.Elab.Command.CommandElabM Bool

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Deriving.TypeName._hyg.686
code: initialize
  registerDerivingHandler ``TypeName deriveTypeNameInstance
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/Config.lean

full_name: Lean.Elab.Term.setElabConfig
code: /--
  Set `isDefEq` configuration for the elaborator.
  Note that we enable all approximations but `quasiPatternApprox`

  In Lean3 and Lean 4, we used to use the quasi-pattern approximation during elaboration.
  The example:
  ```
  def ex : StateT δ (StateT σ Id) σ :=
  monadLift (get : StateT σ Id σ)
  ```
  demonstrates why it produces counterintuitive behavior.
  We have the `Monad-lift` application:
  ```
  @monadLift ?m ?n ?c ?α (get : StateT σ id σ) : ?n ?α
  ```
  It produces the following unification problem when we process the expected type:
  ```
  ?n ?α =?= StateT δ (StateT σ id) σ
  ==> (approximate using first-order unification)
  ?n := StateT δ (StateT σ id)
  ?α := σ
  ```
  Then, we need to solve:
  ```
  ?m ?α =?= StateT σ id σ
  ==> instantiate metavars
  ?m σ =?= StateT σ id σ
  ==> (approximate since it is a quasi-pattern unification constraint)
  ?m := fun σ => StateT σ id σ
  ```
  Note that the constraint is not a Milner pattern because σ is in
  the local context of `?m`. We are ignoring the other possible solutions:
  ```
  ?m := fun σ' => StateT σ id σ
  ?m := fun σ' => StateT σ' id σ
  ?m := fun σ' => StateT σ id σ'
  ```

  We need the quasi-pattern approximation for elaborating recursor-like expressions (e.g., dependent `match with` expressions).

  If we had use first-order unification, then we would have produced
  the right answer: `?m := StateT σ id`

  Haskell would work on this example since it always uses
  first-order unification.
-/
def setElabConfig (cfg : Meta.Config) : Meta.Config 
goal: Lean.Meta.Config
File: .lake/packages/lean4/src/lean/Lean/Elab/Deriving/Nonempty.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.Deriving.Nonempty.0.Lean.Elab.mkNonemptyInstance
code: private def mkNonemptyInstance (declName : Name) : TermElabM Syntax.Command 
goal: Lean.Elab.TermElabM Lean.Command

full_name: Lean.Elab.mkNonemptyInstanceHandler
code: def mkNonemptyInstanceHandler (declNames : Array Name) : CommandElabM Bool 
goal: Lean.Elab.Command.CommandElabM Bool

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.Deriving.Nonempty._hyg.1000
code: builtin_initialize
  registerDerivingHandler `Nonempty mkNonemptyInstanceHandler
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/Import.lean

full_name: Lean.Elab.headerToImports
code: def headerToImports (header : Syntax) : Array Import 
goal: Array Lean.Import

full_name: Lean.Elab.processHeader
code: def processHeader (header : Syntax) (opts : Options) (messages : MessageLog)
    (inputCtx : Parser.InputContext) (trustLevel : UInt32 := 0) (leakEnv := false)
    : IO (Environment × MessageLog) 
goal: IO (Lean.Environment × Lean.MessageLog)

full_name: Lean.Elab.parseImports
code: def parseImports (input : String) (fileName : Option String := none) : IO (Array Import × Position × MessageLog) 
goal: IO (Array Lean.Import × Lean.Position × Lean.MessageLog)

full_name: Lean.Elab.printImports
code: @[export lean_print_imports]
def printImports (input : String) (fileName : Option String) : IO Unit 
goal: IO Unit