File: Mathlib/Tactic/Tauto.lean

full_name: Mathlib.Tactic.Tauto.initFn._@.Mathlib.Tactic.Tauto._hyg.7
code: initialize registerTraceClass `tauto
goal: IO Unit

full_name: Mathlib.Tactic.Tauto.distribNotOnceAt
code: /-- Tries to apply de-Morgan-like rules on a hypothesis. -/
def distribNotOnceAt (hypFVar : Expr) (g : MVarId) : MetaM AssertAfterResult 
goal: Lean.MetaM Lean.Meta.AssertAfterResult

full_name: Mathlib.Tactic.Tauto.DistribNotState.fvars
code: /--
State of the `distribNotAt` function. We need to carry around the list of
remaining hypothesis as fvars so that we can incrementally apply the
`AssertAfterResult.subst` from each step to each of them. Otherwise,
they could end up referring to old hypotheses.
-/
structure DistribNotState where
  /-- The list of hypothesis left to work on, renamed to be up-to-date with
  the current goal. -/
  fvars : List Expr

  /-- The current goal. -/
  currentGoal : MVarId
goal: List Lean.Expr

full_name: Mathlib.Tactic.Tauto.DistribNotState
code: /--
State of the `distribNotAt` function. We need to carry around the list of
remaining hypothesis as fvars so that we can incrementally apply the
`AssertAfterResult.subst` from each step to each of them. Otherwise,
they could end up referring to old hypotheses.
-/
structure DistribNotState where
  /-- The list of hypothesis left to work on, renamed to be up-to-date with
  the current goal. -/
  fvars : List Expr

  /-- The current goal. -/
  currentGoal : MVarId
goal: Type

full_name: Mathlib.Tactic.Tauto.DistribNotState.currentGoal
code: /--
State of the `distribNotAt` function. We need to carry around the list of
remaining hypothesis as fvars so that we can incrementally apply the
`AssertAfterResult.subst` from each step to each of them. Otherwise,
they could end up referring to old hypotheses.
-/
structure DistribNotState where
  /-- The list of hypothesis left to work on, renamed to be up-to-date with
  the current goal. -/
  fvars : List Expr

  /-- The current goal. -/
  currentGoal : MVarId
goal: Lean.MVarId

full_name: Mathlib.Tactic.Tauto.distribNotAt
code: /--
Calls `distribNotAt` on the head of `state.fvars` up to `nIters` times, returning
early on failure.
-/
partial def distribNotAt (nIters : Nat) (state : DistribNotState) : MetaM DistribNotState 
goal: Lean.MetaM Mathlib.Tactic.Tauto.DistribNotState

full_name: Mathlib.Tactic.Tauto.distribNotAux
code: /--
For each fvar in `fvars`, calls `distribNotAt` and carries along the resulting
renamings.
-/
partial def distribNotAux (fvars : List Expr) (g : MVarId) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: Mathlib.Tactic.Tauto.distribNot
code: /--
Tries to apply de-Morgan-like rules on all hypotheses.
Always succeeds, regardless of whether any progress was actually made.
-/
def distribNot : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Mathlib.Tactic.Tauto.Config
code: /-- Config for the `tauto` tactic. Currently empty. TODO: add `closer` option. -/
structure Config
goal: Type

full_name: Mathlib.Tactic.Tauto.eval._@.Mathlib.Tactic.Tauto._hyg.1953
code: /-- Function elaborating `Config`. -/
declare_config_elab elabConfig Config
goal: Lean.Expr → Lean.Elab.TermElabM Mathlib.Tactic.Tauto.Config

full_name: Mathlib.Tactic.Tauto.evalUnsafe._@.Mathlib.Tactic.Tauto._hyg.1953
code: /-- Function elaborating `Config`. -/
declare_config_elab elabConfig Config
goal: Lean.Expr → Lean.Elab.TermElabM Mathlib.Tactic.Tauto.Config

full_name: Mathlib.Tactic.Tauto.elabConfig
code: /-- Function elaborating `Config`. -/
declare_config_elab elabConfig Config
goal: Lean.Syntax → Lean.Elab.TermElabM Mathlib.Tactic.Tauto.Config

full_name: Mathlib.Tactic.Tauto.coreConstructorMatcher
code: /-- Matches propositions where we want to apply the `constructor` tactic
in the core loop of `tauto`. -/
def coreConstructorMatcher (e : Q(Prop)) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Mathlib.Tactic.Tauto.casesMatcher
code: /-- Matches propositions where we want to apply the `cases` tactic
in the core loop of `tauto`. -/
def casesMatcher (e : Q(Prop)) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Mathlib.Tactic.Tauto.«_aux_Mathlib_Tactic_Tauto___macroRules_Mathlib_Tactic_Tauto_term_<;>__1»
code: @[inherit_doc]
local infixl: 50 " <;> " => andThenOnSubgoals
goal: Lean.Macro

full_name: Mathlib.Tactic.Tauto._aux_Mathlib_Tactic_Tauto___unexpand_Lean_Elab_Tactic_andThenOnSubgoals_1
code: @[inherit_doc]
local infixl: 50 " <;> " => andThenOnSubgoals
goal: Lean.PrettyPrinter.Unexpander

full_name: Mathlib.Tactic.Tauto.tautoCore
code: /-- The core loop of the `tauto` tactic. Repeatedly tries to break down propositions
until no more progress can be made. Tries `assumption` and `contradiction` at every
step, to discharge goals as soon as possible. Does not do anything that requires
backtracking.

TODO: The Lean 3 version uses more-powerful versions of `contradiction` and `assumption`
that additionally apply `symm` and use a fancy union-find data structure to avoid
duplicated work.
-/
def tautoCore : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Mathlib.Tactic.Tauto.finishingConstructorMatcher
code: /-- Matches propositions where we want to apply the `constructor` tactic in the
finishing stage of `tauto`. -/
def finishingConstructorMatcher (e : Q(Prop)) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Mathlib.Tactic.Tauto.tautology
code: /-- Implementation of the `tauto` tactic. -/
def tautology : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Mathlib.Tactic.Tauto.tauto
code: /--
`tauto` breaks down assumptions of the form `_ ∧ _`, `_ ∨ _`, `_ ↔ _` and `∃ _, _`
and splits a goal of the form `_ ∧ _`, `_ ↔ _` or `∃ _, _` until it can be discharged
using `reflexivity` or `solve_by_elim`.
This is a finishing tactic: it either closes the goal or raises an error.

The Lean 3 version of this tactic by default attempted to avoid classical reasoning
where possible. This Lean 4 version makes no such attempt. The `itauto` tactic
is designed for that purpose.
-/
syntax (name := tauto) "tauto" (config)? : tactic
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Tauto._aux_Mathlib_Tactic_Tauto___elabRules_Mathlib_Tactic_Tauto_tauto_1
code: elab_rules : tactic | `(tactic| tauto $[$cfg:config]?) => do
  let _cfg ← elabConfig (mkOptionalNode cfg)
  tautology
goal: Lean.Elab.Tactic.Tactic