ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/ReduceArity.lean

full_name: Lean.Compiler.LCNF.FindUsed.Context
code: structure Context where
  decl : Decl
  params : FVarIdSet
goal: Type

full_name: Lean.Compiler.LCNF.FindUsed.Context.decl
code: structure Context where
  decl : Decl
  params : FVarIdSet
goal: Lean.Compiler.LCNF.Decl

full_name: Lean.Compiler.LCNF.FindUsed.Context.params
code: structure Context where
  decl : Decl
  params : FVarIdSet
goal: Lean.FVarIdSet

full_name: Lean.Compiler.LCNF.FindUsed.State.used
code: structure State where
  used : FVarIdSet := {}
goal: Lean.FVarIdSet

full_name: Lean.Compiler.LCNF.FindUsed.State
code: structure State where
  used : FVarIdSet := {}
goal: Type

full_name: Lean.Compiler.LCNF.FindUsed.FindUsedM
code: abbrev FindUsedM 
goal: Type

full_name: Lean.Compiler.LCNF.FindUsed.visitFVar
code: def visitFVar (fvarId : FVarId) : FindUsedM Unit 
goal: Lean.Compiler.LCNF.FindUsed.FindUsedM Unit

full_name: Lean.Compiler.LCNF.FindUsed.visitArg
code: def visitArg (arg : Arg) : FindUsedM Unit 
goal: Lean.Compiler.LCNF.FindUsed.FindUsedM Unit

full_name: Lean.Compiler.LCNF.FindUsed.visitLetValue
code: def visitLetValue (e : LetValue) : FindUsedM Unit 
goal: Lean.Compiler.LCNF.FindUsed.FindUsedM Unit

full_name: Lean.Compiler.LCNF.FindUsed.visit
code: partial def visit (code : Code) : FindUsedM Unit 
goal: Lean.Compiler.LCNF.FindUsed.FindUsedM Unit

full_name: Lean.Compiler.LCNF.FindUsed.collectUsedParams
code: def collectUsedParams (decl : Decl) : CompilerM FVarIdSet 
goal: Lean.Compiler.LCNF.CompilerM Lean.FVarIdSet

full_name: Lean.Compiler.LCNF.ReduceArity.Context.auxDeclName
code: structure Context where
  declName : Name
  auxDeclName : Name
  paramMask : Array Bool
goal: Lean.Name

full_name: Lean.Compiler.LCNF.ReduceArity.Context
code: structure Context where
  declName : Name
  auxDeclName : Name
  paramMask : Array Bool
goal: Type

full_name: Lean.Compiler.LCNF.ReduceArity.Context.declName
code: structure Context where
  declName : Name
  auxDeclName : Name
  paramMask : Array Bool
goal: Lean.Name

full_name: Lean.Compiler.LCNF.ReduceArity.Context.paramMask
code: structure Context where
  declName : Name
  auxDeclName : Name
  paramMask : Array Bool
goal: Array Bool

full_name: Lean.Compiler.LCNF.ReduceArity.ReduceM
code: abbrev ReduceM 
goal: Type

full_name: Lean.Compiler.LCNF.ReduceArity.reduce
code: partial def reduce (code : Code) : ReduceM Code 
goal: Lean.Compiler.LCNF.ReduceArity.ReduceM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.Decl.reduceArity
code: def Decl.reduceArity (decl : Decl) : CompilerM (Array Decl) 
goal: Lean.Compiler.LCNF.CompilerM (Array Lean.Compiler.LCNF.Decl)

full_name: Lean.Compiler.LCNF.reduceArity
code: def reduceArity : Pass 
goal: Lean.Compiler.LCNF.Pass

full_name: Lean.Compiler.LCNF.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.LCNF.ReduceArity._hyg.2408
code: builtin_initialize
  registerTraceClass `Compiler.reduceArity (inherited := true)
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/AuxDeclCache.lean

full_name: Lean.Compiler.LCNF.AuxDeclCache
code: abbrev AuxDeclCache 
goal: Type

full_name: Lean.Compiler.LCNF.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.LCNF.AuxDeclCache._hyg.10
code: builtin_initialize auxDeclCacheExt : EnvExtension AuxDeclCache ← registerEnvExtension (pure {})
goal: IO (Lean.EnvExtension Lean.Compiler.LCNF.AuxDeclCache)

full_name: Lean.Compiler.LCNF.auxDeclCacheExt
code: builtin_initialize auxDeclCacheExt : EnvExtension AuxDeclCache ← registerEnvExtension (pure {})
goal: Lean.EnvExtension Lean.Compiler.LCNF.AuxDeclCache

full_name: Lean.Compiler.LCNF.CacheAuxDeclResult.new
code: inductive CacheAuxDeclResult where
  | new
  | alreadyCached (declName : Name)
goal: Lean.Compiler.LCNF.CacheAuxDeclResult

full_name: Lean.Compiler.LCNF.CacheAuxDeclResult.alreadyCached
code: inductive CacheAuxDeclResult where
  | new
  | alreadyCached (declName : Name)
goal: Lean.Compiler.LCNF.CacheAuxDeclResult

full_name: Lean.Compiler.LCNF.CacheAuxDeclResult
code: inductive CacheAuxDeclResult where
  | new
  | alreadyCached (declName : Name)
goal: Type

full_name: Lean.Compiler.LCNF.cacheAuxDecl
code: def cacheAuxDecl (decl : Decl) : CompilerM CacheAuxDeclResult 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.CacheAuxDeclResult
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/ElimDead.lean

full_name: Lean.Compiler.LCNF.UsedLocalDecls
code: abbrev UsedLocalDecls 
goal: Type

full_name: Lean.Compiler.LCNF.collectLocalDeclsType
code: /--
Collect set of (let) free variables in a LCNF value.
This code exploits the LCNF property that local declarations do not occur in types.
-/
def collectLocalDeclsType (s : UsedLocalDecls) (type : Expr) : UsedLocalDecls 
goal: Lean.Compiler.LCNF.UsedLocalDecls

full_name: Lean.Compiler.LCNF.collectLocalDeclsType.go
code: /--
Collect set of (let) free variables in a LCNF value.
This code exploits the LCNF property that local declarations do not occur in types.
-/
def collectLocalDeclsType (s : UsedLocalDecls) (type : Expr) : UsedLocalDecls 
goal: Lean.Compiler.LCNF.UsedLocalDecls

full_name: Lean.Compiler.LCNF.collectLocalDeclsArg
code: def collectLocalDeclsArg (s : UsedLocalDecls) (arg : Arg) : UsedLocalDecls 
goal: Lean.Compiler.LCNF.UsedLocalDecls

full_name: Lean.Compiler.LCNF.collectLocalDeclsArgs
code: def collectLocalDeclsArgs (s : UsedLocalDecls) (args : Array Arg) : UsedLocalDecls 
goal: Lean.Compiler.LCNF.UsedLocalDecls

full_name: Lean.Compiler.LCNF.collectLocalDeclsLetValue
code: def collectLocalDeclsLetValue (s : UsedLocalDecls) (e : LetValue) : UsedLocalDecls 
goal: Lean.Compiler.LCNF.UsedLocalDecls

full_name: Lean.Compiler.LCNF.ElimDead.M
code: abbrev M 
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.ElimDead.0.Lean.Compiler.LCNF.ElimDead.collectArgM
code: private abbrev collectArgM (arg : Arg) : M Unit 
goal: Lean.Compiler.LCNF.ElimDead.M Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.ElimDead.0.Lean.Compiler.LCNF.ElimDead.collectLetValueM
code: private abbrev collectLetValueM (e : LetValue) : M Unit 
goal: Lean.Compiler.LCNF.ElimDead.M Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.ElimDead.0.Lean.Compiler.LCNF.ElimDead.collectFVarM
code: private abbrev collectFVarM (fvarId : FVarId) : M Unit 
goal: Lean.Compiler.LCNF.ElimDead.M Unit

full_name: Lean.Compiler.LCNF.Code.elimDead
code: def Code.elimDead (code : Code) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.Decl.elimDead
code: def Decl.elimDead (decl : Decl) : CompilerM Decl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Decl
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Renaming.lean

full_name: Lean.Compiler.LCNF.Renaming
code: /--
A mapping from free variable id to binder name.
-/
abbrev Renaming 
goal: Type

full_name: Lean.Compiler.LCNF.Param.applyRenaming
code: def Param.applyRenaming (param : Param) (r : Renaming) : CompilerM Param 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Param

full_name: Lean.Compiler.LCNF.LetDecl.applyRenaming
code: def LetDecl.applyRenaming (decl : LetDecl) (r : Renaming) : CompilerM LetDecl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.LetDecl

full_name: Lean.Compiler.LCNF.Decl.applyRenaming
code: def Decl.applyRenaming (decl : Decl) (r : Renaming) : CompilerM Decl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Decl
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/ToMono.lean

full_name: Lean.Compiler.LCNF.ToMonoM.State.typeParams
code: structure ToMonoM.State where
  typeParams : FVarIdSet := {}
goal: Lean.FVarIdSet

full_name: Lean.Compiler.LCNF.ToMonoM.State
code: structure ToMonoM.State where
  typeParams : FVarIdSet := {}
goal: Type

full_name: Lean.Compiler.LCNF.ToMonoM
code: abbrev ToMonoM 
goal: Type

full_name: Lean.Compiler.LCNF.Param.toMono
code: def Param.toMono (param : Param) : ToMonoM Param 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.Param

full_name: Lean.Compiler.LCNF.isTrivialConstructorApp?
code: def isTrivialConstructorApp? (declName : Name) (args : Array Arg) : ToMonoM (Option LetValue) 
goal: Lean.Compiler.LCNF.ToMonoM (Option Lean.Compiler.LCNF.LetValue)

full_name: Lean.Compiler.LCNF.argToMono
code: def argToMono (arg : Arg) : ToMonoM Arg 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ctorAppToMono
code: def ctorAppToMono (ctorInfo : ConstructorVal) (args : Array Arg) : ToMonoM LetValue 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.LetValue.toMono
code: partial def LetValue.toMono (e : LetValue) : ToMonoM LetValue 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.LetDecl.toMono
code: def LetDecl.toMono (decl : LetDecl) : ToMonoM LetDecl 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.LetDecl

full_name: Lean.Compiler.LCNF.Decl.toMono
code: def Decl.toMono (decl : Decl) : CompilerM Decl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Decl

full_name: Lean.Compiler.LCNF.Decl.toMono.go
code: def Decl.toMono (decl : Decl) : CompilerM Decl 
goal: Lean.Compiler.LCNF.ToMonoM Lean.Compiler.LCNF.Decl

full_name: Lean.Compiler.LCNF.toMono
code: def toMono : Pass 
goal: Lean.Compiler.LCNF.Pass

full_name: Lean.Compiler.LCNF.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.LCNF.ToMono._hyg.2108
code: builtin_initialize
  registerTraceClass `Compiler.toMono (inherited := true)
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Simp/Basic.lean

full_name: Lean.Compiler.LCNF.Simp.findFunDecl'?
code: /--
Similar to `findFunDecl?`, but follows aliases (i.e., `let _x.i := _x.j`).
Consider the following example
```
fun _f.1 ... := ...
let _x.2 := _f.1
```
`findFunDecl? _x.2` returns `none`, but `findFunDecl'? _x.2` returns the declaration for `_f.1`.
-/
partial def findFunDecl'? (fvarId : FVarId) : CompilerM (Option FunDecl) 
goal: Lean.Compiler.LCNF.CompilerM (Option Lean.Compiler.LCNF.FunDecl)
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/BaseTypes.lean

full_name: Lean.Compiler.LCNF.instInhabitedBaseTypeExtState
code: /--
State for the environment extension used to save the LCNF base phase type for declarations
that do not have code associated with them.
Example: constructors, inductive types, foreign functions.
-/
structure BaseTypeExtState where
  /-- The LCNF type for the `base` phase. -/
  base : PHashMap Name Expr := {}
  deriving Inhabited
goal: Inhabited Lean.Compiler.LCNF.BaseTypeExtState

full_name: Lean.Compiler.LCNF.BaseTypeExtState.base
code: /--
State for the environment extension used to save the LCNF base phase type for declarations
that do not have code associated with them.
Example: constructors, inductive types, foreign functions.
-/
structure BaseTypeExtState where
  /-- The LCNF type for the `base` phase. -/
  base : PHashMap Name Expr := {}
  deriving Inhabited
goal: Lean.PHashMap Lean.Name Lean.Expr

full_name: Lean.Compiler.LCNF.BaseTypeExtState
code: /--
State for the environment extension used to save the LCNF base phase type for declarations
that do not have code associated with them.
Example: constructors, inductive types, foreign functions.
-/
structure BaseTypeExtState where
  /-- The LCNF type for the `base` phase. -/
  base : PHashMap Name Expr := {}
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.LCNF.baseTypeExt
code: builtin_initialize baseTypeExt : EnvExtension BaseTypeExtState ←
  registerEnvExtension (pure {})
goal: Lean.EnvExtension Lean.Compiler.LCNF.BaseTypeExtState

full_name: Lean.Compiler.LCNF.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.LCNF.BaseTypes._hyg.35
code: builtin_initialize baseTypeExt : EnvExtension BaseTypeExtState ←
  registerEnvExtension (pure {})
goal: IO (Lean.EnvExtension Lean.Compiler.LCNF.BaseTypeExtState)

full_name: Lean.Compiler.LCNF.getOtherDeclBaseType
code: def getOtherDeclBaseType (declName : Name) (us : List Level) : CoreM Expr 
goal: Lean.CoreM Lean.Expr
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/AlphaEqv.lean

full_name: Lean.Compiler.LCNF.AlphaEqv.EqvM
code: abbrev EqvM 
goal: Type

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvFVar
code: def eqvFVar (fvarId₁ fvarId₂ : FVarId) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvType
code: def eqvType (e₁ e₂ : Expr) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvTypes
code: def eqvTypes (es₁ es₂ : Array Expr) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvArg
code: def eqvArg (a₁ a₂ : Arg) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvArgs
code: def eqvArgs (as₁ as₂ : Array Arg) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.eqvLetValue
code: def eqvLetValue (e₁ e₂ : LetValue) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.withFVar
code: @[inline] def withFVar (fvarId₁ fvarId₂ : FVarId) (x : EqvM α) : EqvM α 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM α

full_name: Lean.Compiler.LCNF.AlphaEqv.withParams.go
code: @[inline] def withParams (params₁ params₂ : Array Param) (x : EqvM Bool) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.withParams
code: @[inline] def withParams (params₁ params₂ : Array Param) (x : EqvM Bool) : EqvM Bool 
goal: Lean.Compiler.LCNF.AlphaEqv.EqvM Bool

full_name: Lean.Compiler.LCNF.AlphaEqv.sortAlts
code: def sortAlts (alts : Array Alt) : Array Alt 
goal: Array Lean.Compiler.LCNF.Alt

full_name: Lean.Compiler.LCNF.Code.alphaEqv
code: /--
Return `true` if `c₁` and `c₂` are alpha equivalent.
-/
def Code.alphaEqv (c₁ c₂ : Code) : Bool 
goal: Bool
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Simp/SimpValue.lean

full_name: Lean.Compiler.LCNF.Simp.simpProj?
code: /--
Try to simplify projections `.proj _ i s` where `s` is constructor.
-/
def simpProj? (e : LetValue) : OptionT SimpM LetValue 
goal: OptionT Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.Simp.simpAppApp?
code: /--
Application over application.
```
let g := f a
g b
```
is simplified to `f a b`.
-/
def simpAppApp? (e : LetValue) : OptionT SimpM LetValue 
goal: OptionT Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.Simp.simpCtorDiscr?
code: def simpCtorDiscr? (e : LetValue) : OptionT SimpM LetValue 
goal: OptionT Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.Simp.applyImplementedBy?
code: def applyImplementedBy? (e : LetValue) : OptionT SimpM LetValue 
goal: OptionT Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.LetValue

full_name: Lean.Compiler.LCNF.Simp.simpValue?
code: /-- Try to apply simple simplifications. -/
def simpValue? (e : LetValue) : SimpM (Option LetValue) 
goal: Lean.Compiler.LCNF.Simp.SimpM (Option Lean.Compiler.LCNF.LetValue)
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Simp/Used.lean

full_name: Lean.Compiler.LCNF.Simp.markUsedFVar
code: /--
Mark `fvarId` as an used free variable.
This is information is used to eliminate dead local declarations.
-/
def markUsedFVar (fvarId : FVarId) : SimpM Unit 
goal: Lean.Compiler.LCNF.Simp.SimpM Unit

full_name: Lean.Compiler.LCNF.Simp.markUsedType
code: /--
Mark all free variables occurring in `type` as used.
This is information is used to eliminate dead local declarations.
-/
def markUsedType (type : Expr) : SimpM Unit 
goal: Lean.Compiler.LCNF.Simp.SimpM Unit

full_name: Lean.Compiler.LCNF.Simp.markUsedArg
code: /--
Mark all free variables occurring in `arg` as used.
-/
def markUsedArg (arg : Arg) : SimpM Unit 
goal: Lean.Compiler.LCNF.Simp.SimpM Unit

full_name: Lean.Compiler.LCNF.Simp.markUsedLetValue
code: /--
Mark all free variables occurring in `e` as used.
-/
def markUsedLetValue (e : LetValue) : SimpM Unit 
goal: Lean.Compiler.LCNF.Simp.SimpM Unit

full_name: Lean.Compiler.LCNF.Simp.markUsedLetDecl
code: /--
Mark all free variables occurring on the right-hand side of the given let declaration as used.
This is information is used to eliminate dead local declarations.
-/
def markUsedLetDecl (letDecl : LetDecl) : SimpM Unit 
goal: Lean.Compiler.LCNF.Simp.SimpM Unit

full_name: Lean.Compiler.LCNF.Simp.isUsed
code: /--
Return `true` if `fvarId` is in the `used` set.
-/
def isUsed (fvarId : FVarId) : SimpM Bool 
goal: Lean.Compiler.LCNF.Simp.SimpM Bool

full_name: Lean.Compiler.LCNF.Simp.attachCodeDecls.go
code: /--
Attach the given `decls` to `code`. For example, assume `decls` is `#[.let _x.1 := 10, .let _x.2 := true]`,
then the result is
```
let _x.1 := 10
let _x.2 := true
<code>
```
-/
def attachCodeDecls (decls : Array CodeDecl) (code : Code) : SimpM Code 
goal: Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.Simp.attachCodeDecls
code: /--
Attach the given `decls` to `code`. For example, assume `decls` is `#[.let _x.1 := 10, .let _x.2 := true]`,
then the result is
```
let _x.1 := 10
let _x.2 := true
<code>
```
-/
def attachCodeDecls (decls : Array CodeDecl) (code : Code) : SimpM Code 
goal: Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.Code
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Simp/DefaultAlt.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.Simp.DefaultAlt.0.Lean.Compiler.LCNF.Simp.getMaxOccs.getNumOccsOf
code: /--
Return the alternative in `alts` whose body appears in most arms,
and the number of occurrences.
We use this function to decide whether to create a `.default` case
or not.
-/
private def getMaxOccs (alts : Array Alt) : Alt × Nat 
goal: Nat

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.Simp.DefaultAlt.0.Lean.Compiler.LCNF.Simp.getMaxOccs
code: /--
Return the alternative in `alts` whose body appears in most arms,
and the number of occurrences.
We use this function to decide whether to create a `.default` case
or not.
-/
private def getMaxOccs (alts : Array Alt) : Alt × Nat 
goal: Lean.Compiler.LCNF.Alt × Nat

full_name: Lean.Compiler.LCNF.Simp.addDefaultAlt
code: /--
Add a default case to the given `cases` alternatives if there
are alternatives with equivalent (aka alpha equivalent) right hand sides.
-/
def addDefaultAlt (alts : Array Alt) : SimpM (Array Alt) 
goal: Lean.Compiler.LCNF.Simp.SimpM (Array Lean.Compiler.LCNF.Alt)
File: .lake/packages/lean4/src/lean/Lean/Compiler/Main.lean

full_name: Lean.Compiler.compile
code: /--
Run the code generation pipeline for all declarations in `declNames`
that fulfill the requirements of `shouldGenerateCode`.
-/
def compile (declNames : Array Name) : CoreM Unit 
goal: Lean.CoreM Unit

full_name: Lean.Compiler.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.Main._hyg.90
code: builtin_initialize
  registerTraceClass `Compiler
  registerTraceClass `Compiler.stat
goal: IO Unit
File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Simp/Main.lean

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.Simp.Main.0.Lean.Compiler.LCNF.Simp.oneExitPointQuick
code: /--
Return `true` if `c` has only one exit point.
This is a quick approximation. It does not check cases
such as: a `cases` with many but only one alternative is not reachable.
It is only used to avoid the creation of auxiliary join points, and does not need
to be precise.
-/
private partial def oneExitPointQuick (c : Code) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.Simp.Main.0.Lean.Compiler.LCNF.Simp.oneExitPointQuick.go
code: /--
Return `true` if `c` has only one exit point.
This is a quick approximation. It does not check cases
such as: a `cases` with many but only one alternative is not reachable.
It is only used to avoid the creation of auxiliary join points, and does not need
to be precise.
-/
private partial def oneExitPointQuick (c : Code) : Bool 
goal: Bool

full_name: Lean.Compiler.LCNF.Simp.specializePartialApp
code: /--
Create a new local function declaration when `info.args.size < info.params.size`.
We use this function to inline/specialize a partial application of a local function.
-/
def specializePartialApp (info : InlineCandidateInfo) : SimpM FunDecl 
goal: Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.FunDecl

full_name: Lean.Compiler.LCNF.Simp.inlineJp?
code: /--
Try to inline a join point.
-/
partial def inlineJp? (fvarId : FVarId) (args : Array Arg) : SimpM (Option Code) 
goal: Lean.Compiler.LCNF.Simp.SimpM (Option Lean.Compiler.LCNF.Code)

full_name: Lean.Compiler.LCNF.Simp.etaPolyApp?
code: /--
When the configuration flag `etaPoly = true`, we eta-expand
partial applications of functions that take local instances as arguments.
This kind of function is inlined or specialized, and we create new
simplification opportunities by eta-expanding them.
-/
def etaPolyApp? (letDecl : LetDecl) : OptionT SimpM FunDecl 
goal: OptionT Lean.Compiler.LCNF.Simp.SimpM Lean.Compiler.LCNF.FunDecl

full_name: Lean.Compiler.LCNF.Simp.isReturnOf
code: /--
Similar to `Code.isReturnOf`, but taking the current substitution into account.
-/
def isReturnOf (c : Code) (fvarId : FVarId) : SimpM Bool 
goal: Lean.Compiler.LCNF.Simp.SimpM Bool

full_name: Lean.Compiler.LCNF.Simp.elimVar?
code: def elimVar? (value : LetValue) : SimpM (Option FVarId) 
goal: Lean.Compiler.LCNF.Simp.SimpM (Option Lean.FVarId)
File: .lake/packages/lean4/src/lean/Lean/Compiler/IR/EmitUtil.lean

full_name: Lean.IR.isTailCallTo
code: /-- Return true iff `b` is of the form `let x := g ys; ret x` -/
def isTailCallTo (g : Name) (b : FnBody) : Bool 
goal: Bool

full_name: Lean.IR.usesModuleFrom
code: def usesModuleFrom (env : Environment) (modulePrefix : Name) : Bool 
goal: Bool

full_name: Lean.IR.CollectUsedDecls.M
code: abbrev M 
goal: Type

full_name: Lean.IR.CollectUsedDecls.collect
code: @[inline] def collect (f : FunId) : M Unit 
goal: Lean.IR.CollectUsedDecls.M Unit

full_name: Lean.IR.CollectUsedDecls.collectFnBody
code: partial def collectFnBody : FnBody → M Unit
  
goal: Lean.IR.FnBody → Lean.IR.CollectUsedDecls.M Unit

full_name: Lean.IR.CollectUsedDecls.collectInitDecl
code: def collectInitDecl (fn : Name) : M Unit 
goal: Lean.IR.CollectUsedDecls.M Unit

full_name: Lean.IR.CollectUsedDecls.collectDecl
code: def collectDecl : Decl → M NameSet
  
goal: Lean.IR.Decl → Lean.IR.CollectUsedDecls.M Lean.NameSet

full_name: Lean.IR.collectUsedDecls
code: def collectUsedDecls (env : Environment) (decl : Decl) (used : NameSet := {}) : NameSet 
goal: Lean.NameSet

full_name: Lean.IR.VarTypeMap
code: abbrev VarTypeMap  
goal: Type

full_name: Lean.IR.JPParamsMap
code: abbrev JPParamsMap 
goal: Type

full_name: Lean.IR.CollectMaps.Collector
code: abbrev Collector 
goal: Type

full_name: Lean.IR.CollectMaps.collectVar
code: @[inline] def collectVar (x : VarId) (t : IRType) : Collector
  
goal: Lean.IR.CollectMaps.Collector

full_name: Lean.IR.CollectMaps.collectParams
code: def collectParams (ps : Array Param) : Collector 
goal: Lean.IR.CollectMaps.Collector

full_name: Lean.IR.CollectMaps.collectJP
code: @[inline] def collectJP (j : JoinPointId) (xs : Array Param) : Collector
  
goal: Lean.IR.CollectMaps.Collector

full_name: Lean.IR.CollectMaps.collectFnBody
code: /-- `collectFnBody` assumes the variables in -/
partial def collectFnBody : FnBody → Collector
  
goal: Lean.IR.FnBody → Lean.IR.CollectMaps.Collector

full_name: Lean.IR.CollectMaps.collectDecl
code: def collectDecl : Decl → Collector
  
goal: Lean.IR.Decl → Lean.IR.CollectMaps.Collector

full_name: Lean.IR.mkVarJPMaps
code: /-- Return a pair `(v, j)`, where `v` is a mapping from variable/parameter to type,
   and `j` is a mapping from join point to parameters.
   This function assumes `d` has normalized indexes (see `normids.lean`). -/
def mkVarJPMaps (d : Decl) : VarTypeMap × JPParamsMap 
goal: Lean.IR.VarTypeMap × Lean.IR.JPParamsMap