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

full_name: Lean.Elab.Term.expandOptType
code: /--
  Recall that
  ```
  def typeSpec := leading_parser " : " >> termParser
  def optType : Parser := optional typeSpec
  ```
-/
def expandOptType (ref : Syntax) (optType : Syntax) : Syntax 
goal: Lean.Syntax

full_name: Lean.Elab.Term.getMatchAltsNumPatterns
code: /-- Helper function for `expandEqnsIntoMatch` -/
def getMatchAltsNumPatterns (matchAlts : Syntax) : Nat 
goal: Nat

full_name: Lean.Elab.Term.expandMatchAlt
code: /--
  Expand a match alternative such as `| 0 | 1 => rhs` to an array containing `| 0 => rhs` and `| 1 => rhs`.
-/
def expandMatchAlt (stx : TSyntax ``matchAlt) : MacroM (Array (TSyntax ``matchAlt)) 
goal: Lean.MacroM (Array (Lean.TSyntax `Lean.Parser.Term.matchAlt))

full_name: Lean.Elab.Term.shouldExpandMatchAlt
code: def shouldExpandMatchAlt : TSyntax ``matchAlt → Bool
  
goal: Lean.TSyntax `Lean.Parser.Term.matchAlt → Bool

full_name: Lean.Elab.Term.expandMatchAlts?
code: def expandMatchAlts? (stx : Syntax) : MacroM (Option Syntax) 
goal: Lean.MacroM (Option Lean.Syntax)

full_name: Lean.Elab.Term.clearInMatchAlt
code: def clearInMatchAlt (stx : TSyntax ``matchAlt) (vars : Array Ident) : TSyntax ``matchAlt 
goal: Lean.TSyntax `Lean.Parser.Term.matchAlt

full_name: Lean.Elab.Term.clearInMatch
code: def clearInMatch (stx : Syntax) (vars : Array Ident) : MacroM Syntax 
goal: Lean.MacroM Lean.Syntax
File: .lake/packages/lean4/src/lean/Lean/Elab/MacroArgUtil.lean

full_name: Lean.Elab.Command.expandMacroArg.mkSyntaxAndPat
code: /-- Convert `macro` arg into a `syntax` command item and a pattern element -/
partial def expandMacroArg (stx : TSyntax ``macroArg) : CommandElabM (TSyntax `stx × Term) 
goal: Lean.Elab.Command.CommandElabM (Lean.TSyntax `stx × Lean.Term)

full_name: Lean.Elab.Command.expandMacroArg.mkAntiquotNode
code: /-- Convert `macro` arg into a `syntax` command item and a pattern element -/
partial def expandMacroArg (stx : TSyntax ``macroArg) : CommandElabM (TSyntax `stx × Term) 
goal: Lean.TSyntax `stx → Lean.Term → Lean.Elab.Command.CommandElabM Lean.Term

full_name: Lean.Elab.Command.expandMacroArg.mkSplicePat
code: /-- Convert `macro` arg into a `syntax` command item and a pattern element -/
partial def expandMacroArg (stx : TSyntax ``macroArg) : CommandElabM (TSyntax `stx × Term) 
goal: Lean.Elab.Command.CommandElabM Lean.Term

full_name: Lean.Elab.Command.expandMacroArg
code: /-- Convert `macro` arg into a `syntax` command item and a pattern element -/
partial def expandMacroArg (stx : TSyntax ``macroArg) : CommandElabM (TSyntax `stx × Term) 
goal: Lean.Elab.Command.CommandElabM (Lean.TSyntax `stx × Lean.Term)
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/Ite.lean

full_name: Lean.Meta.iteToDIte
code: /--
  Convert `ite` expressions in `e` to `dite`s.
  It is useful to make this conversion in the `WF` module because the condition is often used in
  termination proofs. -/
def iteToDIte (e : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/MkInhabitant.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.MkInhabitant.0.Lean.Elab.mkInhabitant?
code: private def mkInhabitant? (type : Expr) (useOfNonempty : Bool) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.MkInhabitant.0.Lean.Elab.findAssumption?
code: private def findAssumption? (xs : Array Expr) (type : Expr) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.MkInhabitant.0.Lean.Elab.mkFnInhabitant?
code: private def mkFnInhabitant? (xs : Array Expr) (type : Expr) (useOfNonempty : Bool) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.MkInhabitant.0.Lean.Elab.mkFnInhabitant?.loop
code: private def mkFnInhabitant? (xs : Array Expr) (type : Expr) (useOfNonempty : Bool) : MetaM (Option Expr) 
goal: Nat → Lean.Expr → Lean.MetaM (Option Lean.Expr)

full_name: Lean.Elab.mkInhabitantFor
code: def mkInhabitantFor (declName : Name) (xs : Array Expr) (type : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/PackMutual.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.PackMutual.0.Lean.Elab.WF.checkCodomainsLevel
code: /--
Checks that all codomians have the same level, throws an error otherwise.
-/
private def checkCodomainsLevel (fixedPrefixSize : Nat) (arities : Array Nat)
    (preDefs : Array PreDefinition) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Elab.WF.withAppN
code: /--
  Pass the first `n` arguments of `e` to the continuation, and apply the result to the
  remaining arguments. If `e` does not have enough arguments, it is eta-expanded as needed.

  Unlike `Meta.etaExpand` does not use `withDefault`.
-/
def withAppN (n : Nat) (e : Expr) (k : Array Expr → MetaM Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.PackMutual.0.Lean.Elab.WF.post
code: /--
A `post` for `Meta.transform` to replace recursive calls to the original `preDefs` with calls
to the new unary function `newfn`.
-/
private partial def post (fixedPrefix : Nat) (argsPacker : ArgsPacker) (funNames : Array Name)
    (domain : Expr) (newFn : Name) (e : Expr) : MetaM TransformStep 
goal: Lean.MetaM Lean.TransformStep

full_name: Lean.Elab.WF.packMutual
code: /--
Creates a single unary function from the given `preDefs`, using the machinery in the `ArgPacker`
module.
-/
def packMutual (fixedPrefix : Nat) (argsPacker : ArgsPacker) (preDefs : Array PreDefinition) : MetaM PreDefinition 
goal: Lean.MetaM Lean.Elab.PreDefinition
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/Preprocess.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.Preprocess.0.Lean.Elab.WF.shouldBetaReduce
code: private def shouldBetaReduce (e : Expr) (recFnNames : Array Name) : Bool 
goal: Bool

full_name: Lean.Elab.WF.preprocess
code: /--
Preprocesses the expessions to improve the effectiveness of `wfRecursion`.

* Floats out the RecApp markers.
  Example:
  ```
  def f : Nat → Nat
    | 0 => 1
    | i+1 => (f x) i
  ```

Unlike `Lean.Elab.Structural.preprocess`, do _not_ beta-reduce, as it could
remove `let_fun`-lambdas that contain explicit termination proofs.
-/
def preprocess (e : Expr) : CoreM Expr 
goal: Lean.CoreM Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Main.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.addAndCompilePartial
code: private def addAndCompilePartial (preDefs : Array PreDefinition) (useSorry := false) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.isNonRecursive
code: private def isNonRecursive (preDef : PreDefinition) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.partitionPreDefs
code: private def partitionPreDefs (preDefs : Array PreDefinition) : Array (Array PreDefinition) 
goal: Array (Array Lean.Elab.PreDefinition)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.collectMVarsAtPreDef
code: private def collectMVarsAtPreDef (preDef : PreDefinition) : StateRefT CollectMVars.State MetaM Unit 
goal: StateRefT' IO.RealWorld Lean.CollectMVars.State Lean.MetaM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.getMVarsAtPreDef
code: private def getMVarsAtPreDef (preDef : PreDefinition) : MetaM (Array MVarId) 
goal: Lean.MetaM (Array Lean.MVarId)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.ensureNoUnassignedMVarsAtPreDef
code: private def ensureNoUnassignedMVarsAtPreDef (preDef : PreDefinition) : TermElabM PreDefinition 
goal: Lean.Elab.TermElabM Lean.Elab.PreDefinition

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.betaReduceLetRecApps
code: /--
  Letrec declarations produce terms of the form `(fun .. => ..) d` where `d` is a (partial) application of an auxiliary declaration for a letrec declaration.
  This method beta-reduces them to make sure they can be eliminated by the well-founded recursion module. -/
private def betaReduceLetRecApps (preDefs : Array PreDefinition) : MetaM (Array PreDefinition) 
goal: Lean.MetaM (Array Lean.Elab.PreDefinition)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Main.0.Lean.Elab.addAsAxioms
code: private def addAsAxioms (preDefs : Array PreDefinition) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.ensureFunIndReservedNamesAvailable
code: def ensureFunIndReservedNamesAvailable (preDefs : Array PreDefinition) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Elab.addPreDefinitions
code: def addPreDefinitions (preDefs : Array PreDefinition) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.PreDefinition.Main._hyg.2090
code: builtin_initialize
  registerTraceClass `Elab.definition.body
  registerTraceClass `Elab.definition.scc
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/Rel.lean

full_name: Lean.Elab.WF.checkCodomains
code: /--
The termination arguments must not depend on the varying parameters of the function, and in
a mutual clique, they must be the same for all functions.

This ensures the preconditions for `ArgsPacker.uncurryND`.
-/
def checkCodomains (names : Array Name) (prefixArgs : Array Expr) (arities : Array Nat)
    (termArgs : TerminationArguments) : TermElabM Expr 
goal: Lean.Elab.TermElabM Lean.Expr

full_name: Lean.Elab.WF.elabWFRel
code: /--
If the `termArgs` map the packed argument `argType` to `β`, then this function passes to the
continuation a value of type `WellFoundedRelation argType` that is derived from the instance
for `WellFoundedRelation β` using `invImage`.
-/
def elabWFRel (preDefs : Array PreDefinition) (unaryPreDefName : Name) (prefixArgs : Array Expr)
    (argsPacker : ArgsPacker) (argType : Expr) (termArgs : TerminationArguments)
    (k : Expr → TermElabM α) : TermElabM α 
goal: Lean.Elab.TermElabM α
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/Main.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.Main.0.Lean.Elab.addNonRecPreDefs
code: private partial def addNonRecPreDefs (fixedPrefixSize : Nat) (argsPacker : ArgsPacker) (preDefs : Array PreDefinition) (preDefNonRec : PreDefinition)  : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.withCommonTelescope.go
code: partial def withCommonTelescope (preDefs : Array PreDefinition) (k : Array Expr → Array Expr → TermElabM α) : TermElabM α 
goal: Lean.Elab.TermElabM α

full_name: Lean.Elab.withCommonTelescope
code: partial def withCommonTelescope (preDefs : Array PreDefinition) (k : Array Expr → Array Expr → TermElabM α) : TermElabM α 
goal: Lean.Elab.TermElabM α

full_name: Lean.Elab.getFixedPrefix
code: def getFixedPrefix (preDefs : Array PreDefinition) : TermElabM Nat 
goal: Lean.Elab.TermElabM Nat

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.Main.0.Lean.Elab.isOnlyOneUnaryDef
code: private def isOnlyOneUnaryDef (preDefs : Array PreDefinition) (fixedPrefixSize : Nat) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Lean.Elab.varyingVarNames
code: /--
Collect the names of the varying variables (after the fixed prefix); this also determines the
arity for the well-founded translations, and is turned into an `ArgsPacker`.
We use the term to determine the arity, but take the name from the type, for better names in the
```
fun : (n : Nat) → Nat | 0 => 0 | n+1 => fun n
```
idiom.
-/
def varyingVarNames (fixedPrefixSize : Nat) (preDef : PreDefinition) : MetaM (Array Name) 
goal: Lean.MetaM (Array Lean.Name)

full_name: Lean.Elab.wfRecursion
code: def wfRecursion (preDefs : Array PreDefinition) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.PreDefinition.WF.Main._hyg.2866
code: builtin_initialize registerTraceClass `Elab.definition.wf
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/Main.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Main.0.Lean.Elab.Structural.getFixedPrefix
code: private def getFixedPrefix (declName : Name) (xs : Array Expr) (value : Expr) : MetaM Nat 
goal: Lean.MetaM Nat

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Main.0.Lean.Elab.Structural.elimRecursion
code: private def elimRecursion (preDef : PreDefinition) : M (Nat × PreDefinition) 
goal: Lean.Elab.Structural.M (Nat × Lean.Elab.PreDefinition)

full_name: Lean.Elab.Structural.structuralRecursion
code: def structuralRecursion (preDefs : Array PreDefinition) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.Structural.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Main._hyg.1340
code: builtin_initialize
  registerTraceClass `Elab.definition.structural
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/SmartUnfolding.lean

full_name: Lean.Elab.Structural.addSmartUnfoldingDefAux
code: partial def addSmartUnfoldingDefAux (preDef : PreDefinition) (recArgPos : Nat) : MetaM PreDefinition 
goal: Lean.MetaM Lean.Elab.PreDefinition

full_name: Lean.Elab.Structural.addSmartUnfoldingDefAux.visit
code: partial def addSmartUnfoldingDefAux (preDef : PreDefinition) (recArgPos : Nat) : MetaM PreDefinition 
goal: Lean.MetaM Lean.Expr

full_name: Lean.Elab.Structural.addSmartUnfoldingDef
code: partial def addSmartUnfoldingDef (preDef : PreDefinition) (recArgPos : Nat) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/Preprocess.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Preprocess.0.Lean.Elab.Structural.shouldBetaReduce
code: private def shouldBetaReduce (e : Expr) (recFnName : Name) : Bool 
goal: Bool

full_name: Lean.Elab.Structural.preprocess
code: /--
Preprocesses the expessions to improve the effectiveness of `elimRecursion`.

* Beta reduce terms where the recursive function occurs in the lambda term.
  Example:
  ```
  def f : Nat → Nat
    | 0 => 1
    | i+1 => (fun x => f x) i
  ```

* Floats out the RecApp markers.
  Example:
  ```
  def f : Nat → Nat
    | 0 => 1
    | i+1 => (f x) i
  ```
-/
def preprocess (e : Expr) (recFnName : Name) : CoreM Expr 
goal: Lean.CoreM Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/Eqns.lean

full_name: Lean.Elab.Structural.EqnInfo.recArgPos
code: structure EqnInfo extends EqnInfoCore where
  recArgPos   : Nat
  deriving Inhabited
goal: Nat

full_name: Lean.Elab.Structural.instInhabitedEqnInfo
code: structure EqnInfo extends EqnInfoCore where
  recArgPos   : Nat
  deriving Inhabited
goal: Inhabited Lean.Elab.Structural.EqnInfo

full_name: Lean.Elab.Structural.EqnInfo
code: structure EqnInfo extends EqnInfoCore where
  recArgPos   : Nat
  deriving Inhabited
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Eqns.0.Lean.Elab.Structural.mkProof
code: private partial def mkProof (declName : Name) (type : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Eqns.0.Lean.Elab.Structural.mkProof.go
code: private partial def mkProof (declName : Name) (type : Expr) : MetaM Expr 
goal: Lean.MetaM Unit

full_name: Lean.Elab.Structural.mkEqns
code: def mkEqns (info : EqnInfo) : MetaM (Array Name) 
goal: Lean.MetaM (Array Lean.Name)

full_name: Lean.Elab.Structural.eqnInfoExt
code: builtin_initialize eqnInfoExt : MapDeclarationExtension EqnInfo ← mkMapDeclarationExtension
goal: Lean.MapDeclarationExtension Lean.Elab.Structural.EqnInfo

full_name: Lean.Elab.Structural.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Eqns._hyg.1199
code: builtin_initialize eqnInfoExt : MapDeclarationExtension EqnInfo ← mkMapDeclarationExtension
goal: IO (Lean.MapDeclarationExtension Lean.Elab.Structural.EqnInfo)

full_name: Lean.Elab.Structural.registerEqnsInfo
code: def registerEqnsInfo (preDef : PreDefinition) (recArgPos : Nat) : CoreM Unit 
goal: Lean.CoreM Unit

full_name: Lean.Elab.Structural.getEqnsFor?
code: def getEqnsFor? (declName : Name) : MetaM (Option (Array Name)) 
goal: Lean.MetaM (Option (Array Lean.Name))

full_name: Lean.Elab.Structural.getUnfoldFor?
code: def getUnfoldFor? (declName : Name) : MetaM (Option Name) 
goal: Lean.MetaM (Option Lean.Name)

full_name: Lean.Elab.Structural.getStructuralRecArgPosImp?
code: @[export lean_get_structural_rec_arg_pos]
def getStructuralRecArgPosImp? (declName : Name) : CoreM (Option Nat) 
goal: Lean.CoreM (Option Nat)

full_name: Lean.Elab.Structural.initFn._@..lake.packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.Eqns._hyg.1448
code: builtin_initialize
  registerGetEqnsFn getEqnsFor?
  registerGetUnfoldEqnFn getUnfoldFor?
  registerTraceClass `Elab.definition.structural.eqns
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/IndPred.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.IndPred.0.Lean.Elab.Structural.replaceIndPredRecApps.loop.addBelow
code: private partial def replaceIndPredRecApps (recFnName : Name) (recArgInfo : RecArgInfo) (motive : Expr) (e : Expr) : M Expr 
goal: Lean.Elab.Structural.M Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.IndPred.0.Lean.Elab.Structural.replaceIndPredRecApps.loop
code: private partial def replaceIndPredRecApps (recFnName : Name) (recArgInfo : RecArgInfo) (motive : Expr) (e : Expr) : M Expr 
goal: Lean.Elab.Structural.M Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.IndPred.0.Lean.Elab.Structural.replaceIndPredRecApps
code: private partial def replaceIndPredRecApps (recFnName : Name) (recArgInfo : RecArgInfo) (motive : Expr) (e : Expr) : M Expr 
goal: Lean.Elab.Structural.M Lean.Expr

full_name: Lean.Elab.Structural.mkIndPredBRecOn
code: def mkIndPredBRecOn (recFnName : Name) (recArgInfo : RecArgInfo) (value : Expr) : M Expr 
goal: Lean.Elab.Structural.M Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Structural/FindRecArg.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.FindRecArg.0.Lean.Elab.Structural.getIndexMinPos
code: private def getIndexMinPos (xs : Array Expr) (indices : Array Expr) : Nat 
goal: Nat

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.FindRecArg.0.Lean.Elab.Structural.hasBadIndexDep?
code: private def hasBadIndexDep? (ys : Array Expr) (indices : Array Expr) : MetaM (Option (Expr × Expr)) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr))

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Structural.FindRecArg.0.Lean.Elab.Structural.hasBadParamDep?
code: private def hasBadParamDep? (ys : Array Expr) (indParams : Array Expr) : MetaM (Option (Expr × Expr)) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr))

full_name: Lean.Elab.Structural.withRecArgInfo
code: /--
Pass to `k` the `RecArgInfo` for the `i`th parameter in the parameter list `xs`. This performs
various sanity checks on the argument (is it even an inductive type etc).
Also wraps all errors in a common “argument cannot be used” header
-/
def withRecArgInfo (numFixed : Nat) (xs : Array Expr) (i : Nat) (k : RecArgInfo → M α) : M α 
goal: Lean.Elab.Structural.M α

full_name: Lean.Elab.Structural.findRecArg
code: /--
  Try to find an argument that is structurally smaller in every recursive application.
  We use this argument to justify termination using the auxiliary `brecOn` construction.

  We give preference for arguments that are *not* indices of inductive types of other arguments.
  See issue #837 for an example where we can show termination using the index of an inductive family, but
  we don't get the desired definitional equalities.
-/
partial def findRecArg (numFixed : Nat) (xs : Array Expr) (k : RecArgInfo → M α) : M α 
goal: Lean.Elab.Structural.M α
File: .lake/packages/lean4/src/lean/Lean/Elab/DeclUtil.lean

full_name: Lean.Meta.forallTelescopeCompatibleAux
code: def forallTelescopeCompatibleAux (k : Array Expr → Expr → Expr → MetaM α) : Nat → Expr → Expr → Array Expr → MetaM α
  
goal: Nat → Lean.Expr → Lean.Expr → Array Lean.Expr → Lean.MetaM α

full_name: Lean.Meta.forallTelescopeCompatible
code: /-- Given two forall-expressions `type₁` and `type₂`, ensure the first `numParams` parameters are compatible, and
    then execute `k` with the parameters and remaining types. -/
def forallTelescopeCompatible [Monad m] [MonadControlT MetaM m] (type₁ type₂ : Expr) (numParams : Nat) (k : Array Expr → Expr → Expr → m α) : m α 
goal: m α

full_name: Lean.Elab.expandOptDeclSig
code: def expandOptDeclSig (stx : Syntax) : Syntax × Option Syntax 
goal: Lean.Syntax × Option Lean.Syntax

full_name: Lean.Elab.expandDeclSig
code: def expandDeclSig (stx : Syntax) : Syntax × Syntax 
goal: Lean.Syntax × Lean.Syntax

full_name: Lean.Elab.sortDeclLevelParams
code: /--
  Sort the given list of `usedParams` using the following order:
  - If it is an explicit level `allUserParams`, then use user given order.
  - Otherwise, use lexicographical.

  Remark: `scopeParams` are the universe params introduced using the `universe` command. `allUserParams` contains
  the universe params introduced using the `universe` command *and* the `.{...}` notation.

  Remark: this function return an exception if there is an `u` not in `usedParams`, that is in `allUserParams` but not in `scopeParams`.

  Remark: `explicitParams` are in reverse declaration order. That is, the head is the last declared parameter. -/
def sortDeclLevelParams (scopeParams : List Name) (allUserParams : List Name) (usedParams : Array Name) : Except String (List Name) 
goal: Except String (List Lean.Name)
File: .lake/packages/lean4/src/lean/Lean/Elab/MatchAltView.lean

full_name: Lean.Elab.Term.MatchAltView.ref
code: structure MatchAltView where
  ref      : Syntax
  patterns : Array Syntax
  rhs      : Syntax
  deriving Inhabited
goal: Lean.Syntax

full_name: Lean.Elab.Term.MatchAltView
code: structure MatchAltView where
  ref      : Syntax
  patterns : Array Syntax
  rhs      : Syntax
  deriving Inhabited
goal: Type

full_name: Lean.Elab.Term.MatchAltView.rhs
code: structure MatchAltView where
  ref      : Syntax
  patterns : Array Syntax
  rhs      : Syntax
  deriving Inhabited
goal: Lean.Syntax

full_name: Lean.Elab.Term.instInhabitedMatchAltView
code: structure MatchAltView where
  ref      : Syntax
  patterns : Array Syntax
  rhs      : Syntax
  deriving Inhabited
goal: Inhabited Lean.Elab.Term.MatchAltView

full_name: Lean.Elab.Term.MatchAltView.patterns
code: structure MatchAltView where
  ref      : Syntax
  patterns : Array Syntax
  rhs      : Syntax
  deriving Inhabited
goal: Array Lean.Syntax