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

full_name: Lean.Meta.Split.getSimpMatchContext
code: def getSimpMatchContext : MetaM Simp.Context 
goal: Lean.MetaM Lean.Meta.Simp.Context

full_name: Lean.Meta.Split.simpMatch.pre
code: def simpMatch (e : Expr) : MetaM Simp.Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Step

full_name: Lean.Meta.Split.simpMatch
code: def simpMatch (e : Expr) : MetaM Simp.Result 
goal: Lean.MetaM Lean.Meta.Simp.Result

full_name: Lean.Meta.Split.simpMatchTarget
code: def simpMatchTarget (mvarId : MVarId) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.simpMatchCore.pre
code: private def simpMatchCore (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : MetaM Simp.Result 
goal: Lean.Meta.SimpM Lean.Meta.Simp.Step

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.simpMatchCore
code: private def simpMatchCore (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : MetaM Simp.Result 
goal: Lean.MetaM Lean.Meta.Simp.Result

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.simpMatchTargetCore
code: private def simpMatchTargetCore (mvarId : MVarId) (matchDeclName : Name) (matchEqDeclName : Name) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.withEqs.go
code: private partial def withEqs (lhs rhs : Array Expr) (k : Array Expr → Array Expr → MetaM α) : MetaM α 
goal: Lean.MetaM α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.withEqs
code: private partial def withEqs (lhs rhs : Array Expr) (k : Array Expr → Array Expr → MetaM α) : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.Split.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Tactic.Split._hyg.906
code: /--
Internal exception for discriminant generalization failures due to type errors.
-/
builtin_initialize discrGenExId : InternalExceptionId ←
  registerInternalExceptionId `discrGeneralizationFailure
goal: IO Lean.InternalExceptionId

full_name: Lean.Meta.Split.discrGenExId
code: /--
Internal exception for discriminant generalization failures due to type errors.
-/
builtin_initialize discrGenExId : InternalExceptionId ←
  registerInternalExceptionId `discrGeneralizationFailure
goal: Lean.InternalExceptionId

full_name: Lean.Meta.Split.isDiscrGenException
code: def isDiscrGenException (ex : Exception) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.generalizeMatchDiscrs.mkNewTarget
code: /--
  This method makes sure each discriminant is a free variable.
  Return the tuple `(discrsNew, discrEqs, mvarId)`. `discrsNew` in an array representing the new discriminants, `discrEqs` is an array of auxiliary equality hypotheses
  that connect the new discriminants to the original terms they represent.
  Remark: `discrEqs.size ≤ discrsNew.size`

  Remark:
    We should only generalize `discrs` occurrences as `match`-expression discriminants.
    For example, given the following goal.
    ```
    x : Nat
    ⊢ (match g x with
        | 0 => 1
        | Nat.succ y => g x) =
        2 * x + 1
    ```
    we should not generalize the `g x` in the rhs of the second alternative, and the two resulting goals
    for the `split` tactic  should be
    ```
    case h_1
    x x✝ : Nat
    h✝ : g x = 0
    ⊢ 1 = 2 * x + 1

    case h_2
    x x✝ y✝ : Nat
    h✝ : g x = Nat.succ y✝
    ⊢ g x = 2 * x + 1
    ```
-/
private partial def generalizeMatchDiscrs (mvarId : MVarId) (matcherDeclName : Name) (motiveType : Expr) (discrs : Array Expr) : MetaM (Array FVarId × Array FVarId × MVarId) 
goal: Lean.MetaM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.generalizeMatchDiscrs.withNewAltEqs.go
code: /--
  This method makes sure each discriminant is a free variable.
  Return the tuple `(discrsNew, discrEqs, mvarId)`. `discrsNew` in an array representing the new discriminants, `discrEqs` is an array of auxiliary equality hypotheses
  that connect the new discriminants to the original terms they represent.
  Remark: `discrEqs.size ≤ discrsNew.size`

  Remark:
    We should only generalize `discrs` occurrences as `match`-expression discriminants.
    For example, given the following goal.
    ```
    x : Nat
    ⊢ (match g x with
        | 0 => 1
        | Nat.succ y => g x) =
        2 * x + 1
    ```
    we should not generalize the `g x` in the rhs of the second alternative, and the two resulting goals
    for the `split` tactic  should be
    ```
    case h_1
    x x✝ : Nat
    h✝ : g x = 0
    ⊢ 1 = 2 * x + 1

    case h_2
    x x✝ y✝ : Nat
    h✝ : g x = Nat.succ y✝
    ⊢ g x = 2 * x + 1
    ```
-/
private partial def generalizeMatchDiscrs (mvarId : MVarId) (matcherDeclName : Name) (motiveType : Expr) (discrs : Array Expr) : MetaM (Array FVarId × Array FVarId × MVarId) 
goal: Lean.MetaM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.generalizeMatchDiscrs.withNewAltEqs
code: /--
  This method makes sure each discriminant is a free variable.
  Return the tuple `(discrsNew, discrEqs, mvarId)`. `discrsNew` in an array representing the new discriminants, `discrEqs` is an array of auxiliary equality hypotheses
  that connect the new discriminants to the original terms they represent.
  Remark: `discrEqs.size ≤ discrsNew.size`

  Remark:
    We should only generalize `discrs` occurrences as `match`-expression discriminants.
    For example, given the following goal.
    ```
    x : Nat
    ⊢ (match g x with
        | 0 => 1
        | Nat.succ y => g x) =
        2 * x + 1
    ```
    we should not generalize the `g x` in the rhs of the second alternative, and the two resulting goals
    for the `split` tactic  should be
    ```
    case h_1
    x x✝ : Nat
    h✝ : g x = 0
    ⊢ 1 = 2 * x + 1

    case h_2
    x x✝ y✝ : Nat
    h✝ : g x = Nat.succ y✝
    ⊢ g x = 2 * x + 1
    ```
-/
private partial def generalizeMatchDiscrs (mvarId : MVarId) (matcherDeclName : Name) (motiveType : Expr) (discrs : Array Expr) : MetaM (Array FVarId × Array FVarId × MVarId) 
goal: Lean.MetaM Lean.Expr

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.generalizeMatchDiscrs
code: /--
  This method makes sure each discriminant is a free variable.
  Return the tuple `(discrsNew, discrEqs, mvarId)`. `discrsNew` in an array representing the new discriminants, `discrEqs` is an array of auxiliary equality hypotheses
  that connect the new discriminants to the original terms they represent.
  Remark: `discrEqs.size ≤ discrsNew.size`

  Remark:
    We should only generalize `discrs` occurrences as `match`-expression discriminants.
    For example, given the following goal.
    ```
    x : Nat
    ⊢ (match g x with
        | 0 => 1
        | Nat.succ y => g x) =
        2 * x + 1
    ```
    we should not generalize the `g x` in the rhs of the second alternative, and the two resulting goals
    for the `split` tactic  should be
    ```
    case h_1
    x x✝ : Nat
    h✝ : g x = 0
    ⊢ 1 = 2 * x + 1

    case h_2
    x x✝ y✝ : Nat
    h✝ : g x = Nat.succ y✝
    ⊢ g x = 2 * x + 1
    ```
-/
private partial def generalizeMatchDiscrs (mvarId : MVarId) (matcherDeclName : Name) (motiveType : Expr) (discrs : Array Expr) : MetaM (Array FVarId × Array FVarId × MVarId) 
goal: Lean.MetaM (Array Lean.FVarId × Array Lean.FVarId × Lean.MVarId)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Split.0.Lean.Meta.Split.substDiscrEqs
code: private def substDiscrEqs (mvarId : MVarId) (fvarSubst : FVarSubst) (discrEqs : Array FVarId) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: Lean.Meta.Split.applyMatchSplitter
code: def applyMatchSplitter (mvarId : MVarId) (matcherDeclName : Name) (us : Array Level) (params : Array Expr) (discrs : Array Expr) : MetaM (List MVarId) 
goal: Lean.MetaM (List Lean.MVarId)

full_name: Lean.Meta.Split.mkDiscrGenErrorMsg
code: def mkDiscrGenErrorMsg (e : Expr) : MessageData 
goal: Lean.MessageData

full_name: Lean.Meta.Split.throwDiscrGenError
code: def throwDiscrGenError (e : Expr) : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.Split.splitMatch
code: def splitMatch (mvarId : MVarId) (e : Expr) : MetaM (List MVarId) 
goal: Lean.MetaM (List Lean.MVarId)

full_name: Lean.Meta.Split.findSplit?.go
code: /-- Return an `if-then-else` or `match-expr` to split. -/
partial def findSplit? (env : Environment) (e : Expr) (splitIte := true) (exceptionSet : ExprSet := {}) : Option Expr 
goal: Option Lean.Expr

full_name: Lean.Meta.Split.findSplit?
code: /-- Return an `if-then-else` or `match-expr` to split. -/
partial def findSplit? (env : Environment) (e : Expr) (splitIte := true) (exceptionSet : ExprSet := {}) : Option Expr 
goal: Option Lean.Expr

full_name: Lean.Meta.Split.findSplit?.isCandidate
code: /-- Return an `if-then-else` or `match-expr` to split. -/
partial def findSplit? (env : Environment) (e : Expr) (splitIte := true) (exceptionSet : ExprSet := {}) : Option Expr 
goal: Bool

full_name: Lean.Meta.splitTarget?.go
code: partial def splitTarget? (mvarId : MVarId) (splitIte := true) : MetaM (Option (List MVarId)) 
goal: Lean.MetaM (Option (List Lean.MVarId))

full_name: Lean.Meta.splitTarget?
code: partial def splitTarget? (mvarId : MVarId) (splitIte := true) : MetaM (Option (List MVarId)) 
goal: Lean.MetaM (Option (List Lean.MVarId))

full_name: Lean.Meta.splitLocalDecl?
code: def splitLocalDecl? (mvarId : MVarId) (fvarId : FVarId) : MetaM (Option (List MVarId)) 
goal: Lean.MetaM (Option (List Lean.MVarId))

full_name: Lean.Meta.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Tactic.Split._hyg.7106
code: builtin_initialize
  registerTraceClass `split.debug
  registerTraceClass `split.failure
goal: IO Unit