File: Mathlib/Tactic/Basic.lean

full_name: Mathlib.Tactic.variables
code: syntax (name := «variables») "variables" (ppSpace bracketedBinder)* : command
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.elabVariables
code: @[command_elab «variables»] def elabVariables : CommandElab
  
goal: Lean.Elab.Command.CommandElab

full_name: Mathlib.Tactic.pushFVarAliasInfo
code: /-- Given two arrays of `FVarId`s, one from an old local context and the other from a new local
context, pushes `FVarAliasInfo`s into the info tree for corresponding pairs of `FVarId`s.
Recall that variables linked this way should be considered to be semantically identical.

The effect of this is, for example, the unused variable linter will see that variables
from the first array are used if corresponding variables in the second array are used. -/
def pushFVarAliasInfo {m : Type → Type} [Monad m] [MonadInfoTree m]
    (oldFVars newFVars : Array FVarId) (newLCtx : LocalContext) : m Unit 
goal: m Unit

full_name: Mathlib.Tactic.introv
code: /--
The tactic `introv` allows the user to automatically introduce the variables of a theorem and
explicitly name the non-dependent hypotheses.
Any dependent hypotheses are assigned their default names.

Examples:
```
example : ∀ a b : Nat, a = b → b = a := by
  introv h,
  exact h.symm
```
The state after `introv h` is
```
a b : ℕ,
h : a = b
⊢ b = a
```

```
example : ∀ a b : Nat, a = b → ∀ c, b = c → a = c := by
  introv h₁ h₂,
  exact h₁.trans h₂
```
The state after `introv h₁ h₂` is
```
a b : ℕ,
h₁ : a = b,
c : ℕ,
h₂ : b = c
⊢ a = c
```
-/
syntax (name := introv) "introv " (ppSpace colGt binderIdent)* : tactic
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.evalIntrov.introsDep
code: @[tactic introv] partial def evalIntrov : Tactic 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Mathlib.Tactic.evalIntrov
code: @[tactic introv] partial def evalIntrov : Tactic 
goal: Lean.Elab.Tactic.Tactic

full_name: Mathlib.Tactic.evalIntrov.intro1PStep
code: @[tactic introv] partial def evalIntrov : Tactic 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_Basic___macroRules_Mathlib_Tactic_tacticAssumption'_1
code: macro "assumption'" : tactic => `(tactic| any_goals assumption)
goal: Lean.Macro

full_name: Mathlib.Tactic.tacticAssumption'
code: macro "assumption'" : tactic => `(tactic| any_goals assumption)
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.tacticMatch_target_
code: elab "match_target " t:term : tactic => do
  withMainContext do
    let (val) ← elabTerm t (← inferType (← getMainTarget))
    if not (← isDefEq val (← getMainTarget)) then
      throwError "failed"
goal: Lean.ParserDescr

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_Basic___elabRules_Mathlib_Tactic_tacticMatch_target__1
code: elab "match_target " t:term : tactic => do
  withMainContext do
    let (val) ← elabTerm t (← inferType (← getMainTarget))
    if not (← isDefEq val (← getMainTarget)) then
      throwError "failed"
goal: Lean.Elab.Tactic.Tactic

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_Basic___elabRules_Mathlib_Tactic_clearAuxDecl_1
code: /-- This tactic clears all auxiliary declarations from the context. -/
elab (name := clearAuxDecl) "clear_aux_decl" : tactic => withMainContext do
  let mut g ← getMainGoal
  for ldec in ← getLCtx do
    if ldec.isAuxDecl then
      g ← g.tryClear ldec.fvarId
  replaceMainGoal [g]
goal: Lean.Elab.Tactic.Tactic

full_name: Mathlib.Tactic.clearAuxDecl
code: /-- This tactic clears all auxiliary declarations from the context. -/
elab (name := clearAuxDecl) "clear_aux_decl" : tactic => withMainContext do
  let mut g ← getMainGoal
  for ldec in ← getLCtx do
    if ldec.isAuxDecl then
      g ← g.tryClear ldec.fvarId
  replaceMainGoal [g]
goal: Lean.ParserDescr

full_name: Lean.MVarId.clearValue
code: /-- Clears the value of the local definition `fvarId`. Ensures that the resulting goal state
is still type correct. Throws an error if it is a local hypothesis without a value. -/
def _root_.Lean.MVarId.clearValue (mvarId : MVarId) (fvarId : FVarId) : MetaM MVarId 
goal: Lean.MetaM Lean.MVarId

full_name: Mathlib.Tactic.clearValue
code: /-- `clear_value n₁ n₂ ...` clears the bodies of the local definitions `n₁, n₂ ...`, changing them
into regular hypotheses. A hypothesis `n : α := t` is changed to `n : α`.

The order of `n₁ n₂ ...` does not matter, and values will be cleared in reverse order of
where they appear in the context. -/
elab (name := clearValue) "clear_value" hs:(ppSpace colGt term:max)+ : tactic => do
  let fvarIds ← getFVarIds hs
  let fvarIds ← withMainContext <| sortFVarIds fvarIds
  for fvarId in fvarIds.reverse do
    withMainContext do
      let mvarId ← (← getMainGoal).clearValue fvarId
      replaceMainGoal [mvarId]
goal: Lean.ParserDescr

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_Basic___elabRules_Mathlib_Tactic_clearValue_1
code: /-- `clear_value n₁ n₂ ...` clears the bodies of the local definitions `n₁, n₂ ...`, changing them
into regular hypotheses. A hypothesis `n : α := t` is changed to `n : α`.

The order of `n₁ n₂ ...` does not matter, and values will be cleared in reverse order of
where they appear in the context. -/
elab (name := clearValue) "clear_value" hs:(ppSpace colGt term:max)+ : tactic => do
  let fvarIds ← getFVarIds hs
  let fvarIds ← withMainContext <| sortFVarIds fvarIds
  for fvarId in fvarIds.reverse do
    withMainContext do
      let mvarId ← (← getMainGoal).clearValue fvarId
      replaceMainGoal [mvarId]
goal: Lean.Elab.Tactic.Tactic