File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/Basic.lean

full_name: Lean.Elab.PreDefinition.termination
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Elab.WF.TerminationHints

full_name: Lean.Elab.PreDefinition.type
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Expr

full_name: Lean.Elab.PreDefinition.levelParams
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: List Lean.Name

full_name: Lean.Elab.PreDefinition.declName
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Name

full_name: Lean.Elab.PreDefinition.value
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Expr

full_name: Lean.Elab.PreDefinition
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Type

full_name: Lean.Elab.instInhabitedPreDefinition
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Inhabited Lean.Elab.PreDefinition

full_name: Lean.Elab.PreDefinition.modifiers
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Elab.Modifiers

full_name: Lean.Elab.PreDefinition.ref
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Syntax

full_name: Lean.Elab.PreDefinition.kind
code: /--
  A (potentially recursive) definition.
  The elaborator converts it into Kernel definitions using many different strategies.
-/
structure PreDefinition where
  ref         : Syntax
  kind        : DefKind
  levelParams : List Name
  modifiers   : Modifiers
  declName    : Name
  type        : Expr
  value       : Expr
  termination : WF.TerminationHints
  deriving Inhabited
goal: Lean.Elab.DefKind

full_name: Lean.Elab.PreDefinition.filterAttrs
code: def PreDefinition.filterAttrs (preDef : PreDefinition) (p : Attribute → Bool) : PreDefinition 
goal: Lean.Elab.PreDefinition

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

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

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Basic.0.Lean.Elab.getLevelParamsPreDecls
code: private def getLevelParamsPreDecls (preDefs : Array PreDefinition) (scopeLevelNames allUserLevelNames : List Name) : TermElabM (List Name) 
goal: Lean.Elab.TermElabM (List Lean.Name)

full_name: Lean.Elab.fixLevelParams
code: def fixLevelParams (preDefs : Array PreDefinition) (scopeLevelNames allUserLevelNames : List Name) : TermElabM (Array PreDefinition) 
goal: Lean.Elab.TermElabM (Array Lean.Elab.PreDefinition)

full_name: Lean.Elab.applyAttributesOf
code: def applyAttributesOf (preDefs : Array PreDefinition) (applicationTime : AttributeApplicationTime) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.abstractNestedProofs
code: def abstractNestedProofs (preDef : PreDefinition) : MetaM PreDefinition 
goal: Lean.MetaM Lean.Elab.PreDefinition

full_name: Lean.Elab.addAsAxiom
code: /-- Auxiliary method for (temporarily) adding pre definition as an axiom -/
def addAsAxiom (preDef : PreDefinition) : MetaM Unit 
goal: Lean.MetaM Unit

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

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Basic.0.Lean.Elab.compileDecl
code: private def compileDecl (decl : Declaration) : TermElabM Bool 
goal: Lean.Elab.TermElabM Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Elab.PreDefinition.Basic.0.Lean.Elab.addNonRecAux
code: private def addNonRecAux (preDef : PreDefinition) (compile : Bool) (all : List Name) (applyAttrAfterCompilation := true) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.addAndCompileNonRec
code: def addAndCompileNonRec (preDef : PreDefinition) (all : List Name := [preDef.declName]) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.addNonRec
code: def addNonRec (preDef : PreDefinition) (applyAttrAfterCompilation := true) (all : List Name := [preDef.declName]) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

full_name: Lean.Elab.eraseRecAppSyntaxExpr
code: /--
  Eliminate recursive application annotations containing syntax. These annotations are used by the well-founded recursion module
  to produce better error messages. -/
def eraseRecAppSyntaxExpr (e : Expr) : CoreM Expr 
goal: Lean.CoreM Lean.Expr

full_name: Lean.Elab.eraseRecAppSyntax
code: def eraseRecAppSyntax (preDef : PreDefinition) : CoreM PreDefinition 
goal: Lean.CoreM Lean.Elab.PreDefinition

full_name: Lean.Elab.addAndCompileUnsafe
code: def addAndCompileUnsafe (preDefs : Array PreDefinition) (safety := DefinitionSafety.unsafe) : TermElabM Unit 
goal: Lean.Elab.TermElabM Unit

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

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

full_name: Lean.Elab.ensureNoRecFn
code: def ensureNoRecFn (recFnName : Name) (e : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr