File: .lake/packages/lean4/src/lean/Init/TacticsExtra.lean

full_name: _private.«.lake».packages.lean4.src.lean.Init.TacticsExtra.0.Lean.Parser.Tactic.expandIfThenElse
code: private def expandIfThenElse
    (ifTk thenTk elseTk pos neg : Syntax)
    (mkIf : Term → Term → MacroM Term) : MacroM (TSyntax `tactic) 
goal: Lean.MacroM (Lean.TSyntax `tactic)

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacDepIfThenElse_1»
code: macro_rules
  | `(tactic| if%$tk $h : $c then%$ttk $pos else%$etk $neg) =>
    -- Limit ref variability for incrementality; see Note [Incremental Macros]
    withRef tk do
      expandIfThenElse tk ttk etk pos neg fun pos neg => `(if $h : $c then $pos else $neg)
goal: Lean.Macro

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacIfThenElse_1»
code: macro_rules
  | `(tactic| if%$tk $c then%$ttk $pos else%$etk $neg) =>
    -- Limit ref variability for incrementality; see Note [Incremental Macros]
    withRef tk do
      expandIfThenElse tk ttk etk pos neg fun pos neg => `(if h : $c then $pos else $neg)
goal: Lean.Macro

full_name: Lean.Parser.Tactic.tacticIterate____
code: /--
`iterate n tac` runs `tac` exactly `n` times.
`iterate tac` runs `tac` repeatedly until failure.

`iterate`'s argument is a tactic sequence,
so multiple tactics can be run using `iterate n (tac₁; tac₂; ⋯)` or
```lean
iterate n
  tac₁
  tac₂
  ⋯
```
-/
syntax "iterate" (ppSpace num)? ppSpace tacticSeq : tactic
goal: Lean.ParserDescr

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacticIterate_____1»
code: macro_rules
  | `(tactic| iterate $seq:tacticSeq) =>
    `(tactic| try ($seq:tacticSeq); iterate $seq:tacticSeq)
  | `(tactic| iterate $n $seq:tacticSeq) =>
    match n.1.toNat with
    | 0 => `(tactic| skip)
    | n+1 => `(tactic| ($seq:tacticSeq); iterate $(quote n) $seq:tacticSeq)
goal: Lean.Macro

full_name: Lean.Parser.Tactic.tacticRw_mod_cast___
code: /--
Rewrites with the given rules, normalizing casts prior to each step.
-/
syntax "rw_mod_cast" (config)? rwRuleSeq (location)? : tactic
goal: Lean.ParserDescr

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacticRw_mod_cast____1»
code: macro_rules
  | `(tactic| rw_mod_cast $[$config]? [$rules,*] $[$loc]?) => do
    let tacs ← rules.getElems.mapM fun rule =>
      `(tactic| (norm_cast at *; rw $[$config]? [$rule] $[$loc]?))
    `(tactic| ($[$tacs]*))
goal: Lean.Macro

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacticExact_mod_cast__1»
code: macro "exact_mod_cast " e:term : tactic => `(tactic| exact mod_cast ($e : _))
goal: Lean.Macro

full_name: Lean.Parser.Tactic.tacticExact_mod_cast_
code: macro "exact_mod_cast " e:term : tactic => `(tactic| exact mod_cast ($e : _))
goal: Lean.ParserDescr

full_name: Lean.Parser.Tactic.tacticApply_mod_cast_
code: macro "apply_mod_cast " e:term : tactic => `(tactic| apply mod_cast ($e : _))
goal: Lean.ParserDescr

full_name: Lean.Parser.Tactic.«_aux_.lake_packages_lean4_src_lean_Init_TacticsExtra___macroRules_Lean_Parser_Tactic_tacticApply_mod_cast__1»
code: macro "apply_mod_cast " e:term : tactic => `(tactic| apply mod_cast ($e : _))
goal: Lean.Macro