File: Mathlib/Tactic/Core.lean

full_name: Lean.toModifiers
code: /--
Return the modifiers of declaration `nm` with (optional) docstring `newDoc`.
Currently, recursive or partial definitions are not supported, and no attributes are provided.
-/
def toModifiers (nm : Name) (newDoc : Option String := none) :
    CoreM Modifiers 
goal: Lean.CoreM Lean.Elab.Modifiers

full_name: Lean.toPreDefinition
code: /--
Make a PreDefinition taking some metadata from declaration `nm`.
You can provide a new type, value and (optional) docstring, but the remaining information is taken
from `nm`.
Currently only implemented for definitions and theorems. Also see docstring of `toModifiers`
-/
def toPreDefinition (nm newNm : Name) (newType newValue : Expr) (newDoc : Option String := none) :
    CoreM PreDefinition 
goal: Lean.CoreM Lean.Elab.PreDefinition

full_name: Lean.setProtected
code: /-- Make `nm` protected. -/
def setProtected {m : Type → Type} [MonadEnv m] (nm : Name) : m Unit 
goal: m Unit

full_name: Lean.MVarId.introsWithBinderIdents
code: /-- Introduce variables, giving them names from a specified list. -/
def MVarId.introsWithBinderIdents
    (g : MVarId) (ids : List (TSyntax ``binderIdent)) :
    MetaM (List (TSyntax ``binderIdent) × Array FVarId × MVarId) 
goal: Lean.MetaM (List (Lean.TSyntax `Lean.binderIdent) × Array Lean.FVarId × Lean.MVarId)

full_name: Mathlib.Tactic.withArgs
code: syntax withArgs := " with" (ppSpace colGt ident)+
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.usingArg
code: syntax usingArg := " using " term
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.getSimpArgs
code: /-- Extract the arguments from a `simpArgs` syntax as an array of syntaxes -/
def getSimpArgs : Syntax → TacticM (Array Syntax)
  
goal: Lean.Syntax → Lean.Elab.Tactic.TacticM (Array Lean.Syntax)

full_name: Mathlib.Tactic.getDSimpArgs
code: /-- Extract the arguments from a `dsimpArgs` syntax as an array of syntaxes -/
def getDSimpArgs : Syntax → TacticM (Array Syntax)
  
goal: Lean.Syntax → Lean.Elab.Tactic.TacticM (Array Lean.Syntax)

full_name: Mathlib.Tactic.getWithArgs
code: /-- Extract the arguments from a `withArgs` syntax as an array of syntaxes -/
def getWithArgs : Syntax → TacticM (Array Syntax)
  
goal: Lean.Syntax → Lean.Elab.Tactic.TacticM (Array Lean.Syntax)

full_name: Mathlib.Tactic.getUsingArg
code: /-- Extract the argument from a `usingArg` syntax as a syntax term -/
def getUsingArg : Syntax → TacticM Syntax
  
goal: Lean.Syntax → Lean.Elab.Tactic.TacticM Lean.Syntax

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_Core___macroRules_Mathlib_Tactic_tacticRepeat1__1
code: macro "repeat1 " seq:tacticSeq : tactic => `(tactic| (($seq); repeat $seq))
goal: Lean.Macro

full_name: Mathlib.Tactic.tacticRepeat1_
code: macro "repeat1 " seq:tacticSeq : tactic => `(tactic| (($seq); repeat $seq))
goal: Lean.ParserDescr

full_name: Lean.Elab.Tactic.filterOutImplementationDetails
code: /-- Given a local context and an array of `FVarIds` assumed to be in that local context, remove all
implementation details. -/
def filterOutImplementationDetails (lctx : LocalContext) (fvarIds : Array FVarId) : Array FVarId 
goal: Array Lean.FVarId

full_name: Lean.Elab.Tactic.getFVarIdAt
code: /-- Elaborate syntax for an `FVarId` in the local context of the given goal. -/
def getFVarIdAt (goal : MVarId) (id : Syntax) : TacticM FVarId 
goal: Lean.Elab.Tactic.TacticM Lean.FVarId

full_name: Lean.Elab.Tactic.getFVarIdsAt
code: /-- Get the array of `FVarId`s in the local context of the given `goal`.

If `ids` is specified, elaborate them in the local context of the given goal to obtain the array of
`FVarId`s.

If `includeImplementationDetails` is `false` (the default), we filter out implementation details
(`implDecl`s and `auxDecl`s) from the resulting list of `FVarId`s. -/
def getFVarIdsAt (goal : MVarId) (ids : Option (Array Syntax) := none)
    (includeImplementationDetails : Bool := false) : TacticM (Array FVarId) 
goal: Lean.Elab.Tactic.TacticM (Array Lean.FVarId)

full_name: Lean.Elab.Tactic.allGoals
code: /--
Run a tactic on all goals, and always succeeds.

(This is parallel to `Lean.Elab.Tactic.evalAllGoals` in core,
which takes a `Syntax` rather than `TacticM Unit`.
This function could be moved to core and `evalAllGoals` refactored to use it.)
-/
def allGoals (tac : TacticM Unit) : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Lean.Elab.Tactic.andThenOnSubgoals
code: /-- Simulates the `<;>` tactic combinator. First runs `tac1` and then runs
    `tac2` on all newly-generated subgoals.
-/
def andThenOnSubgoals (tac1 : TacticM Unit) (tac2 : TacticM Unit) : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Lean.Elab.Tactic.iterateAtMost
code: /-- Repeats a tactic at most `n` times, stopping sooner if the
tactic fails. Always succeeds. -/
def iterateAtMost : Nat → m Unit → m Unit
  
goal: Nat → m Unit → m Unit

full_name: Lean.Elab.Tactic.iterateExactly'
code: /-- `iterateExactly' n t` executes `t` `n` times. If any iteration fails, the whole tactic fails.
-/
def iterateExactly' : Nat → m Unit → m Unit
  
goal: Nat → m Unit → m Unit

full_name: Lean.Elab.Tactic.iterateRange
code: /--
`iterateRange m n t`: Repeat the given tactic at least `m` times and
at most `n` times or until `t` fails. Fails if `t` does not run at least `m` times.
-/
def iterateRange : Nat → Nat → m Unit → m Unit
  
goal: Nat → Nat → m Unit → m Unit

full_name: Lean.Elab.Tactic.iterateUntilFailure
code: /-- Repeats a tactic until it fails. Always succeeds. -/
partial def iterateUntilFailure (tac : m Unit) : m Unit 
goal: m Unit

full_name: Lean.Elab.Tactic.iterateUntilFailureWithResults
code: /-- `iterateUntilFailureWithResults` is a helper tactic which accumulates the list of results
obtained from iterating `tac` until it fails. Always succeeds.
-/
partial def iterateUntilFailureWithResults {α : Type} (tac : m α) : m (List α) 
goal: m (List α)

full_name: Lean.Elab.Tactic.iterateUntilFailureCount
code: /-- `iterateUntilFailureCount` is similar to `iterateUntilFailure` except it counts
the number of successful calls to `tac`. Always succeeds.
-/
def iterateUntilFailureCount {α : Type} (tac : m α) : m Nat 
goal: m Nat

full_name: Mathlib.getPackageDir
code: /-- Returns the root directory which contains the package root file, e.g. `Mathlib.lean`. -/
def getPackageDir (pkg : String) : IO System.FilePath 
goal: IO System.FilePath

full_name: Mathlib.getMathlibDir
code: /-- Returns the mathlib root directory. -/
def getMathlibDir 
goal: IO System.FilePath