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

full_name: Lean.Meta.Simp.DischargeResult.notProved
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: Lean.Meta.Simp.DischargeResult

full_name: Lean.Meta.Simp.DischargeResult.maxDepth
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: Lean.Meta.Simp.DischargeResult

full_name: Lean.Meta.Simp.instDecidableEqDischargeResult
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: DecidableEq Lean.Meta.Simp.DischargeResult

full_name: Lean.Meta.Simp.DischargeResult.proved
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: Lean.Meta.Simp.DischargeResult

full_name: Lean.Meta.Simp.DischargeResult.failedAssign
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: Lean.Meta.Simp.DischargeResult

full_name: Lean.Meta.Simp.DischargeResult
code: /--
Helper type for implementing `discharge?'`
-/
inductive DischargeResult where
  | proved
  | notProved
  | maxDepth
  | failedAssign
  deriving DecidableEq
goal: Type

full_name: Lean.Meta.Simp.discharge?'
code: /--
Wrapper for invoking `discharge?` method. It checks for maximum discharge depth, create trace nodes, and ensure
the generated proof was successfully assigned to `x`.
-/
def discharge?' (thmId : Origin) (x : Expr) (type : Expr) : SimpM Bool 
goal: Lean.Meta.SimpM Bool

full_name: Lean.Meta.Simp.synthesizeArgs.synthesizeInstance
code: def synthesizeArgs (thmId : Origin) (bis : Array BinderInfo) (xs : Array Expr) : SimpM Bool 
goal: Lean.Meta.SimpM Bool

full_name: Lean.Meta.Simp.synthesizeArgs
code: def synthesizeArgs (thmId : Origin) (bis : Array BinderInfo) (xs : Array Expr) : SimpM Bool 
goal: Lean.Meta.SimpM Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Rewrite.0.Lean.Meta.Simp.tryTheoremCore
code: private def tryTheoremCore (lhs : Expr) (xs : Array Expr) (bis : Array BinderInfo) (val : Expr) (type : Expr) (e : Expr) (thm : SimpTheorem) (numExtraArgs : Nat) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Simp.Rewrite.0.Lean.Meta.Simp.tryTheoremCore.go
code: private def tryTheoremCore (lhs : Expr) (xs : Array Expr) (bis : Array BinderInfo) (val : Expr) (type : Expr) (e : Expr) (thm : SimpTheorem) (numExtraArgs : Nat) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.tryTheoremWithExtraArgs?
code: def tryTheoremWithExtraArgs? (e : Expr) (thm : SimpTheorem) (numExtraArgs : Nat) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.tryTheorem?
code: def tryTheorem? (e : Expr) (thm : SimpTheorem) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.rewrite?.diagnoseWhenNoIndex
code: /--
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
-/
def rewrite? (e : Expr) (s : SimpTheoremTree) (erased : PHashSet Origin) (tag : String) (rflOnly : Bool) : SimpM (Option Result) 
goal: Lean.Meta.SimpM Unit

full_name: Lean.Meta.Simp.rewrite?.inErasedSet
code: /--
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
-/
def rewrite? (e : Expr) (s : SimpTheoremTree) (erased : PHashSet Origin) (tag : String) (rflOnly : Bool) : SimpM (Option Result) 
goal: Bool

full_name: Lean.Meta.Simp.rewrite?
code: /--
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
-/
def rewrite? (e : Expr) (s : SimpTheoremTree) (erased : PHashSet Origin) (tag : String) (rflOnly : Bool) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.rewrite?.rewriteUsingIndex?
code: /--
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
-/
def rewrite? (e : Expr) (s : SimpTheoremTree) (erased : PHashSet Origin) (tag : String) (rflOnly : Bool) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.rewrite?.rewriteNoIndex?
code: /--
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
-/
def rewrite? (e : Expr) (s : SimpTheoremTree) (erased : PHashSet Origin) (tag : String) (rflOnly : Bool) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.simpCtorEq
code: def simpCtorEq : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.simpUsingDecide
code: @[inline] def simpUsingDecide : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.simpArith
code: def simpArith (e : Expr) : SimpM Step 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Step

full_name: Lean.Meta.Simp.simpMatchDiscrs?
code: /--
Given a match-application `e` with `MatcherInfo` `info`, return `some result`
if at least of one of the discriminants has been simplified.
-/
def simpMatchDiscrs? (info : MatcherInfo) (e : Expr) : SimpM (Option Result) 
goal: Lean.Meta.SimpM (Option Lean.Meta.Simp.Result)

full_name: Lean.Meta.Simp.simpMatchCore
code: def simpMatchCore (matcherName : Name) (e : Expr) : SimpM Step 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Step

full_name: Lean.Meta.Simp.simpMatch
code: def simpMatch : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.rewritePre
code: def rewritePre (rflOnly := false) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.rewritePost
code: def rewritePost (rflOnly := false) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.drewritePre
code: def drewritePre : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: Lean.Meta.Simp.drewritePost
code: def drewritePost : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: Lean.Meta.Simp.dpreDefault
code: def dpreDefault (s : SimprocsArray) : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: Lean.Meta.Simp.dpostDefault
code: def dpostDefault (s : SimprocsArray) : DSimproc 
goal: Lean.Meta.Simp.DSimproc

full_name: Lean.Meta.Simp.dischargeGround
code: /--
Discharge procedure for the ground/symbolic evaluator.
-/
def dischargeGround (e : Expr) : SimpM (Option Expr) 
goal: Lean.Meta.SimpM (Option Lean.Expr)

full_name: Lean.Meta.Simp.sevalGround
code: /--
Try to unfold ground term in the ground/symbolic evaluator.
-/
def sevalGround : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.preSEval
code: partial def preSEval (s : SimprocsArray) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.postSEval
code: def postSEval (s : SimprocsArray) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.mkSEvalMethods
code: def mkSEvalMethods : CoreM Methods 
goal: Lean.CoreM Lean.Meta.Simp.Methods

full_name: Lean.Meta.Simp.mkSEvalContext
code: def mkSEvalContext : CoreM Context 
goal: Lean.CoreM Lean.Meta.Simp.Context

full_name: Lean.Meta.Simp.seval
code: /--
Invoke ground/symbolic evaluator from `simp`.
It uses the `seval` theorems and simprocs.
-/
def seval (e : Expr) : SimpM Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Result

full_name: Lean.Meta.Simp.simpGround
code: /--
Try to unfold ground term in the ground/symbolic evaluator.
-/
def simpGround : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.preDefault
code: def preDefault (s : SimprocsArray) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.postDefault
code: def postDefault (s : SimprocsArray) : Simproc 
goal: Lean.Meta.Simp.Simproc

full_name: Lean.Meta.Simp.isEqnThmHypothesis.go
code: /--
  Return true if `e` is of the form `(x : α) → ... → s = t → ... → False`

  Recall that this kind of proposition is generated by Lean when creating equations for
  functions and match-expressions with overlapping cases.
  Example: the following `match`-expression has overlapping cases.
  ```
  def f (x y : Nat) :=
    match x, y with
    | Nat.succ n, Nat.succ m => ...
    | _, _ => 0
  ```
  The second equation is of the form
  ```
  (x y : Nat) → ((n m : Nat) → x = Nat.succ n → y = Nat.succ m → False) → f x y = 0
  ```
  The hypothesis `(n m : Nat) → x = Nat.succ n → y = Nat.succ m → False` is essentially
  saying the first case is not applicable.
-/
partial def isEqnThmHypothesis (e : Expr) : Bool 
goal: Bool

full_name: Lean.Meta.Simp.isEqnThmHypothesis
code: /--
  Return true if `e` is of the form `(x : α) → ... → s = t → ... → False`

  Recall that this kind of proposition is generated by Lean when creating equations for
  functions and match-expressions with overlapping cases.
  Example: the following `match`-expression has overlapping cases.
  ```
  def f (x y : Nat) :=
    match x, y with
    | Nat.succ n, Nat.succ m => ...
    | _, _ => 0
  ```
  The second equation is of the form
  ```
  (x y : Nat) → ((n m : Nat) → x = Nat.succ n → y = Nat.succ m → False) → f x y = 0
  ```
  The hypothesis `(n m : Nat) → x = Nat.succ n → y = Nat.succ m → False` is essentially
  saying the first case is not applicable.
-/
partial def isEqnThmHypothesis (e : Expr) : Bool 
goal: Bool

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

full_name: Lean.Meta.Simp.dischargeEqnThmHypothesis?
code: /--
  Tries to solve `e` using `unifyEq?`.
  It assumes that `isEqnThmHypothesis e` is `true`.
-/
partial def dischargeEqnThmHypothesis? (e : Expr) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: Lean.Meta.Simp.dischargeEqnThmHypothesis?.go?
code: /--
  Tries to solve `e` using `unifyEq?`.
  It assumes that `isEqnThmHypothesis e` is `true`.
-/
partial def dischargeEqnThmHypothesis? (e : Expr) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.MVarId)

full_name: Lean.Meta.Simp.dischargeDefault?
code: def dischargeDefault? (e : Expr) : SimpM (Option Expr) 
goal: Lean.Meta.SimpM (Option Lean.Expr)

full_name: Lean.Meta.Simp.Discharge
code: abbrev Discharge 
goal: Type

full_name: Lean.Meta.Simp.mkMethods
code: def mkMethods (s : SimprocsArray) (discharge? : Discharge) (wellBehavedDischarge : Bool) : Methods 
goal: Lean.Meta.Simp.Methods

full_name: Lean.Meta.Simp.mkDefaultMethodsCore
code: def mkDefaultMethodsCore (simprocs : SimprocsArray) : Methods 
goal: Lean.Meta.Simp.Methods

full_name: Lean.Meta.Simp.mkDefaultMethods
code: def mkDefaultMethods : CoreM Methods 
goal: Lean.CoreM Lean.Meta.Simp.Methods