File: .lake/packages/lean4/src/lean/Lean/Meta/Tactic/Simp/Main.lean

full_name: Lean.Meta.Simp.congrHypothesisExceptionId
code: builtin_initialize congrHypothesisExceptionId : InternalExceptionId ←
  registerInternalExceptionId `congrHypothesisFailed
goal: Lean.InternalExceptionId

full_name: Lean.Meta.Simp.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main._hyg.5
code: builtin_initialize congrHypothesisExceptionId : InternalExceptionId ←
  registerInternalExceptionId `congrHypothesisFailed
goal: IO Lean.InternalExceptionId

full_name: Lean.Meta.Simp.throwCongrHypothesisFailed
code: def throwCongrHypothesisFailed : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.Simp.Config.updateArith
code: /--
  Helper method for bootstrapping purposes. It disables `arith` if support theorems have not been defined yet.
-/
def Config.updateArith (c : Config) : CoreM Config 
goal: Lean.CoreM Lean.Meta.Simp.Config

full_name: Lean.Meta.Simp.isOfNatNatLit
code: /-- Return true if `e` is of the form `ofNat n` where `n` is a kernel Nat literal -/
def isOfNatNatLit (e : Expr) : Bool 
goal: Bool

full_name: Lean.Meta.Simp.foldRawNatLit
code: /--
If `e` is a raw Nat literal and `OfNat.ofNat` is not in the list of declarations to unfold,
return an `OfNat.ofNat`-application.
-/
def foldRawNatLit (e : Expr) : SimpM Expr 
goal: Lean.Meta.SimpM Lean.Expr

full_name: Lean.Meta.Simp.isOfScientificLit
code: /-- Return true if `e` is of the form `ofScientific n b m` where `n` and `m` are kernel Nat literals. -/
def isOfScientificLit (e : Expr) : Bool 
goal: Bool

full_name: Lean.Meta.Simp.isCharLit
code: /-- Return true if `e` is of the form `Char.ofNat n` where `n` is a kernel Nat literals. -/
def isCharLit (e : Expr) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.reduceProjFn?
code: private def reduceProjFn? (e : Expr) : SimpM (Option Expr) 
goal: Lean.Meta.SimpM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.reduceFVar
code: private def reduceFVar (cfg : Config) (thms : SimpTheoremsArray) (e : Expr) : SimpM Expr 
goal: Lean.Meta.SimpM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.isMatchDef
code: /--
  Return true if `declName` is the name of a definition of the form
  ```
  def declName ... :=
    match ... with
    | ...
  ```
-/
private partial def isMatchDef (declName : Name) : CoreM Bool 
goal: Lean.CoreM Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.isMatchDef.go
code: /--
  Return true if `declName` is the name of a definition of the form
  ```
  def declName ... :=
    match ... with
    | ...
  ```
-/
private partial def isMatchDef (declName : Name) : CoreM Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.unfold?.unfoldDeclToUnfold?
code: /--
Try to unfold `e`.
-/
private def unfold? (e : Expr) : SimpM (Option Expr) 
goal: Lean.Meta.SimpM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.unfold?
code: /--
Try to unfold `e`.
-/
private def unfold? (e : Expr) : SimpM (Option Expr) 
goal: Lean.Meta.SimpM (Option Lean.Expr)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.reduceStep
code: private def reduceStep (e : Expr) : SimpM Expr 
goal: Lean.Meta.SimpM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.reduce
code: private partial def reduce (e : Expr) : SimpM Expr 
goal: Lean.Meta.SimpM Lean.Expr

full_name: Lean.Meta.Simp.«instInhabitedSimpM_.lake»
code: instance : Inhabited (SimpM α) 
goal: Inhabited (Lean.Meta.SimpM α)

full_name: Lean.Meta.Simp.lambdaTelescopeDSimp
code: partial def lambdaTelescopeDSimp (e : Expr) (k : Array Expr → Expr → SimpM α) : SimpM α 
goal: Lean.Meta.SimpM α

full_name: Lean.Meta.Simp.lambdaTelescopeDSimp.go
code: partial def lambdaTelescopeDSimp (e : Expr) (k : Array Expr → Expr → SimpM α) : SimpM α 
goal: Lean.Meta.SimpM α

full_name: Lean.Meta.Simp.SimpLetCase.dep
code: inductive SimpLetCase where
  | dep -- `let x := v; b` is not equivalent to `(fun x => b) v`
  | nondepDepVar -- `let x := v; b` is equivalent to `(fun x => b) v`, but result type depends on `x`
  | nondep
goal: Lean.Meta.Simp.SimpLetCase

full_name: Lean.Meta.Simp.SimpLetCase
code: inductive SimpLetCase where
  | dep -- `let x := v; b` is not equivalent to `(fun x => b) v`
  | nondepDepVar -- `let x := v; b` is equivalent to `(fun x => b) v`, but result type depends on `x`
  | nondep
goal: Type

full_name: Lean.Meta.Simp.SimpLetCase.nondepDepVar
code: inductive SimpLetCase where
  | dep -- `let x := v; b` is not equivalent to `(fun x => b) v`
  | nondepDepVar -- `let x := v; b` is equivalent to `(fun x => b) v`, but result type depends on `x`
  | nondep
goal: Lean.Meta.Simp.SimpLetCase

full_name: Lean.Meta.Simp.SimpLetCase.nondep
code: inductive SimpLetCase where
  | dep -- `let x := v; b` is not equivalent to `(fun x => b) v`
  | nondepDepVar -- `let x := v; b` is equivalent to `(fun x => b) v`, but result type depends on `x`
  | nondep
goal: Lean.Meta.Simp.SimpLetCase

full_name: Lean.Meta.Simp.getSimpLetCase
code: def getSimpLetCase (n : Name) (t : Expr) (b : Expr) : MetaM SimpLetCase 
goal: Lean.MetaM Lean.Meta.Simp.SimpLetCase

full_name: Lean.Meta.Simp.withNewLemmas
code: /--
We use `withNewlemmas` whenever updating the local context.
-/
def withNewLemmas {α} (xs : Array Expr) (f : SimpM α) : SimpM α 
goal: Lean.Meta.SimpM α

full_name: Lean.Meta.Simp.simpProj
code: def simpProj (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpConst
code: def simpConst (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLambda
code: def simpLambda (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpArrow
code: def simpArrow (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpForall
code: def simpForall (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLet
code: def simpLet (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.dsimpReduce
code: private def dsimpReduce : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.doNotVisit
code: /-- Helper `dsimproc` for `doNotVisitOfNat` and `doNotVisitOfScientific` -/
private def doNotVisit (pred : Expr → Bool) (declName : Name) : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.doNotVisitOfNat
code: /--
Auliliary `dsimproc` for not visiting `OfNat.ofNat` application subterms.
This is the `dsimp` equivalent of the approach used at `visitApp`.
Recall that we fold orphan raw Nat literals.
-/
private def doNotVisitOfNat : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.doNotVisitOfScientific
code: /--
Auliliary `dsimproc` for not visiting `OfScientific.ofScientific` application subterms.
-/
private def doNotVisitOfScientific : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.doNotVisitCharLit
code: /--
Auliliary `dsimproc` for not visiting `Char` literal subterms.
-/
private def doNotVisitCharLit : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Main.0.Lean.Meta.Simp.dsimpImpl
code: @[export lean_dsimp]
private partial def dsimpImpl (e : Expr) : SimpM Expr 
goal: Lean.Meta.SimpM Lean.Expr

full_name: Lean.Meta.Simp.visitFn
code: def visitFn (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.congrDefault
code: def congrDefault (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.processCongrHypothesis
code: /-- Process the given congruence theorem hypothesis. Return true if it made "progress". -/
def processCongrHypothesis (h : Expr) : SimpM Bool 
goal: Lean.Meta.SimpM Bool

full_name: Lean.Meta.Simp.trySimpCongrTheorem?
code: /-- Try to rewrite `e` children using the given congruence theorem -/
def trySimpCongrTheorem? (c : SimpCongrTheorem) (e : Expr) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.congr
code: def congr (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpApp
code: def simpApp (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpStep
code: def simpStep (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.cacheResult
code: def cacheResult (e : Expr) (cfg : Config) (r : Result) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLoop.visitPreContinue
code: partial def simpLoop (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLoop
code: partial def simpLoop (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLoop.visitPost
code: partial def simpLoop (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpLoop.visitPostContinue
code: partial def simpLoop (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpImpl
code: @[export lean_simp]
def simpImpl (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpImpl.go
code: @[export lean_simp]
def simpImpl (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.withSimpContext
code: @[inline] def withSimpContext (ctx : Context) (x : MetaM α) : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.Simp.main.simpMain
code: def main (e : Expr) (ctx : Context) (stats : Stats := {}) (methods : Methods := {}) : MetaM (Result × Stats) 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.main
code: def main (e : Expr) (ctx : Context) (stats : Stats := {}) (methods : Methods := {}) : MetaM (Result × Stats) 
goal: Lean.MetaM (Lean.Meta.Simp.Result × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.Simp.dsimpMain.dsimpMain
code: def dsimpMain (e : Expr) (ctx : Context) (stats : Stats := {}) (methods : Methods := {}) : MetaM (Expr × Stats) 
goal: Lean.Meta.SimpM Lean.Expr

full_name: Lean.Meta.Simp.dsimpMain
code: def dsimpMain (e : Expr) (ctx : Context) (stats : Stats := {}) (methods : Methods := {}) : MetaM (Expr × Stats) 
goal: Lean.MetaM (Lean.Expr × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.simp
code: def simp (e : Expr) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (stats : Stats := {}) : MetaM (Simp.Result × Stats) 
goal: Lean.MetaM (Lean.Meta.Simp.Result × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.dsimp
code: def dsimp (e : Expr) (ctx : Simp.Context) (simprocs : SimprocsArray := #[])
    (stats : Stats := {}) : MetaM (Expr × Stats) 
goal: Lean.MetaM (Lean.Expr × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.simpTargetCore
code: /-- See `simpTarget`. This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
def simpTargetCore (mvarId : MVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (mayCloseGoal := true) (stats : Stats := {}) : MetaM (Option MVarId × Stats) 
goal: Lean.MetaM (Option Lean.MVarId × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.simpTarget
code: /--
  Simplify the given goal target (aka type). Return `none` if the goal was closed. Return `some mvarId'` otherwise,
  where `mvarId'` is the simplified new goal. -/
def simpTarget (mvarId : MVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (mayCloseGoal := true) (stats : Stats := {}) : MetaM (Option MVarId × Stats) 
goal: Lean.MetaM (Option Lean.MVarId × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.applySimpResultToProp
code: /--
  Apply the result `r` for `prop` (which is inhabited by `proof`). Return `none` if the goal was closed. Return `some (proof', prop')`
  otherwise, where `proof' : prop'` and `prop'` is the simplified `prop`.

  This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
def applySimpResultToProp (mvarId : MVarId) (proof : Expr) (prop : Expr) (r : Simp.Result) (mayCloseGoal := true) : MetaM (Option (Expr × Expr)) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr))

full_name: Lean.Meta.applySimpResultToFVarId
code: def applySimpResultToFVarId (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Result) (mayCloseGoal : Bool) : MetaM (Option (Expr × Expr)) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr))

full_name: Lean.Meta.simpStep
code: /--
  Simplify `prop` (which is inhabited by `proof`). Return `none` if the goal was closed. Return `some (proof', prop')`
  otherwise, where `proof' : prop'` and `prop'` is the simplified `prop`.

  This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
def simpStep (mvarId : MVarId) (proof : Expr) (prop : Expr) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (mayCloseGoal := true) (stats : Stats := {}) : MetaM (Option (Expr × Expr) × Stats) 
goal: Lean.MetaM (Option (Lean.Expr × Lean.Expr) × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.applySimpResultToLocalDeclCore
code: def applySimpResultToLocalDeclCore (mvarId : MVarId) (fvarId : FVarId) (r : Option (Expr × Expr)) : MetaM (Option (FVarId × MVarId)) 
goal: Lean.MetaM (Option (Lean.FVarId × Lean.MVarId))

full_name: Lean.Meta.applySimpResultToLocalDecl
code: /--
  Simplify `simp` result to the given local declaration. Return `none` if the goal was closed.
  This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
def applySimpResultToLocalDecl (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Result) (mayCloseGoal : Bool) : MetaM (Option (FVarId × MVarId)) 
goal: Lean.MetaM (Option (Lean.FVarId × Lean.MVarId))

full_name: Lean.Meta.simpLocalDecl
code: def simpLocalDecl (mvarId : MVarId) (fvarId : FVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (mayCloseGoal := true) (stats : Stats := {}) : MetaM (Option (FVarId × MVarId) × Stats) 
goal: Lean.MetaM (Option (Lean.FVarId × Lean.MVarId) × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.simpGoal
code: def simpGoal (mvarId : MVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[])
    (stats : Stats := {}) : MetaM (Option (Array FVarId × MVarId) × Stats) 
goal: Lean.MetaM (Option (Array Lean.FVarId × Lean.MVarId) × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.simpTargetStar
code: def simpTargetStar (mvarId : MVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none)
    (stats : Stats := {}) : MetaM (TacticResultCNM × Stats) 
goal: Lean.MetaM (Lean.Meta.TacticResultCNM × Lean.Meta.Simp.Stats)

full_name: Lean.Meta.dsimpGoal
code: def dsimpGoal (mvarId : MVarId) (ctx : Simp.Context) (simprocs : SimprocsArray := #[]) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[])
    (stats : Stats := {}) : MetaM (Option MVarId × Stats) 
goal: Lean.MetaM (Option Lean.MVarId × Lean.Meta.Simp.Stats)