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

full_name: Lean.Meta.Contradiction.Config
code: structure Contradiction.Config where
  useDecide  : Bool := true
  /-- Check whether any of the hypotheses is an empty type. -/
  emptyType  : Bool := true
  /-- When checking for empty types, `searchFuel` specifies the number of goals visited. -/
  searchFuel : Nat  := 16
  /-- Support for hypotheses such as
     ```
     h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
     ```
     This kind of hypotheses appear when proving conditional equation theorems for match expressions. -/
  genDiseq : Bool := false
goal: Type

full_name: Lean.Meta.Contradiction.Config.searchFuel
code: structure Contradiction.Config where
  useDecide  : Bool := true
  /-- Check whether any of the hypotheses is an empty type. -/
  emptyType  : Bool := true
  /-- When checking for empty types, `searchFuel` specifies the number of goals visited. -/
  searchFuel : Nat  := 16
  /-- Support for hypotheses such as
     ```
     h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
     ```
     This kind of hypotheses appear when proving conditional equation theorems for match expressions. -/
  genDiseq : Bool := false
goal: Nat

full_name: Lean.Meta.Contradiction.Config.useDecide
code: structure Contradiction.Config where
  useDecide  : Bool := true
  /-- Check whether any of the hypotheses is an empty type. -/
  emptyType  : Bool := true
  /-- When checking for empty types, `searchFuel` specifies the number of goals visited. -/
  searchFuel : Nat  := 16
  /-- Support for hypotheses such as
     ```
     h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
     ```
     This kind of hypotheses appear when proving conditional equation theorems for match expressions. -/
  genDiseq : Bool := false
goal: Bool

full_name: Lean.Meta.Contradiction.Config.emptyType
code: structure Contradiction.Config where
  useDecide  : Bool := true
  /-- Check whether any of the hypotheses is an empty type. -/
  emptyType  : Bool := true
  /-- When checking for empty types, `searchFuel` specifies the number of goals visited. -/
  searchFuel : Nat  := 16
  /-- Support for hypotheses such as
     ```
     h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
     ```
     This kind of hypotheses appear when proving conditional equation theorems for match expressions. -/
  genDiseq : Bool := false
goal: Bool

full_name: Lean.Meta.Contradiction.Config.genDiseq
code: structure Contradiction.Config where
  useDecide  : Bool := true
  /-- Check whether any of the hypotheses is an empty type. -/
  emptyType  : Bool := true
  /-- When checking for empty types, `searchFuel` specifies the number of goals visited. -/
  searchFuel : Nat  := 16
  /-- Support for hypotheses such as
     ```
     h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
     ```
     This kind of hypotheses appear when proving conditional equation theorems for match expressions. -/
  genDiseq : Bool := false
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.nestedFalseElim
code: /--
  Try to close the current goal by looking for a proof of `False` nested in a `False.Elim` application in the target.
  Return `true` iff the goal has been closed.
-/
private def nestedFalseElim (mvarId : MVarId) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.isElimEmptyInductiveCandidate
code: private def isElimEmptyInductiveCandidate (fvarId : FVarId) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Lean.Meta.ElimEmptyInductive.M
code: abbrev M 
goal: Type

full_name: Lean.Meta.ElimEmptyInductive.instMonadBacktrackSavedStateM
code: instance : MonadBacktrack SavedState M 
goal: Lean.MonadBacktrack Lean.Meta.SavedState Lean.Meta.ElimEmptyInductive.M

full_name: Lean.Meta.ElimEmptyInductive.elim
code: partial def elim (mvarId : MVarId) (fvarId : FVarId) : M Bool 
goal: Lean.Meta.ElimEmptyInductive.M Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.elimEmptyInductive
code: private def elimEmptyInductive (mvarId : MVarId) (fvarId : FVarId) (fuel : Nat) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.isGenDiseq
code: /--
  See `Simp.isEqnThmHypothesis`
-/
private abbrev isGenDiseq (e : Expr) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.mkGenDiseqMask
code: /--
  Given `e` s.t. `isGenDiseq e`, generate a bit-mask `mask` s.t. `mask[i] = true` iff
  the `i`-th binder is an equality without forward dependencies.

  See `processGenDiseq`
-/
private def mkGenDiseqMask (e : Expr) : Array Bool 
goal: Array Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.mkGenDiseqMask.go
code: /--
  Given `e` s.t. `isGenDiseq e`, generate a bit-mask `mask` s.t. `mask[i] = true` iff
  the `i`-th binder is an equality without forward dependencies.

  See `processGenDiseq`
-/
private def mkGenDiseqMask (e : Expr) : Array Bool 
goal: Array Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction.0.Lean.Meta.processGenDiseq
code: /--
  Close goal if `localDecl` is a "generalized disequality". Example:
  ```
  h : (x y : Nat) (ys : List Nat) → x = 0 → y::ys = [a, b, c] → False
  ```
  This kind of hypotheses is created when we generate conditional equations for match expressions.
-/
private def processGenDiseq (mvarId : MVarId) (localDecl : LocalDecl) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Lean.MVarId.contradictionCore
code: /--
Return `true` if goal `mvarId` has contradictory hypotheses.
See `MVarId.contradiction` for the list of tests performed by this method.
-/
def _root_.Lean.MVarId.contradictionCore (mvarId : MVarId) (config : Contradiction.Config) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Lean.MVarId.contradiction
code: /--
Try to close the goal using "contradictions" such as
- Contradictory hypotheses `h₁ : p` and `h₂ : ¬ p`.
- Contradictory disequality `h : x ≠ x`.
- Contradictory equality between different constructors, e.g., `h : List.nil = List.cons x xs`.
- Empty inductive types, e.g., `x : Fin 0`.
- Decidable propositions that evaluate to false, i.e., a hypothesis `h : p` s.t. `decide p` reduces to `false`.
  This is only tried if `Config.useDecide = true`.

Throw exception if goal failed to be closed.
-/
def _root_.Lean.MVarId.contradiction (mvarId : MVarId) (config : Contradiction.Config := {}) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.contradiction
code: @[deprecated MVarId.contradiction (since := "2022-07-15")]
def contradiction (mvarId : MVarId) (config : Contradiction.Config := {}) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Tactic.Contradiction._hyg.4450
code: builtin_initialize registerTraceClass `Meta.Tactic.contradiction
goal: IO Unit