ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Tactic/Widget/Conv.lean

full_name: _private.Mathlib.Tactic.Widget.Conv.0.SolveReturn
code: private structure SolveReturn where
  expr : Expr
  val? : Option String
  listRest : List Nat
goal: Type

full_name: _private.Mathlib.Tactic.Widget.Conv.0.SolveReturn.val?
code: private structure SolveReturn where
  expr : Expr
  val? : Option String
  listRest : List Nat
goal: Option String

full_name: _private.Mathlib.Tactic.Widget.Conv.0.SolveReturn.listRest
code: private structure SolveReturn where
  expr : Expr
  val? : Option String
  listRest : List Nat
goal: List Nat

full_name: _private.Mathlib.Tactic.Widget.Conv.0.SolveReturn.expr
code: private structure SolveReturn where
  expr : Expr
  val? : Option String
  listRest : List Nat
goal: Lean.Expr

full_name: _private.Mathlib.Tactic.Widget.Conv.0.solveLevel
code: private def solveLevel (expr : Expr) (path : List Nat) : MetaM SolveReturn 
goal: Lean.MetaM SolveReturn

full_name: insertEnter
code: /-- Return the link text and inserted text above and below of the conv widget. -/
@[nolint unusedArguments]
def insertEnter (locations : Array Lean.SubExpr.GoalsLocation) (goalType : Expr)
    (params : SelectInsertParams): MetaM (String × String × Option (String.Pos × String.Pos)) 
goal: Lean.MetaM (String × String × Option (String.Pos × String.Pos))

full_name: ConvSelectionPanel.rpc
code: /-- Rpc function for the conv widget. -/
@[server_rpc_method]
def ConvSelectionPanel.rpc 
goal: Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.Html)

full_name: ConvSelectionPanel
code: /-- The conv widget. -/
@[widget_module]
def ConvSelectionPanel : Component SelectInsertParams 
goal: ProofWidgets.Component SelectInsertParams

full_name: tacticConv?
code: /-- Display a widget panel allowing to generate a `conv` call zooming to the subexpression selected
in the goal. -/
elab stx:"conv?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo ConvSelectionPanel.javascriptHash
   (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Tactic_Widget_Conv___elabRules_tacticConv?_1
code: /-- Display a widget panel allowing to generate a `conv` call zooming to the subexpression selected
in the goal. -/
elab stx:"conv?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo ConvSelectionPanel.javascriptHash
   (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/Widget/CommDiag.lean

full_name: Lean.Expr.app7?
code: /-- If the expression is a function application of `fName` with 7 arguments, return those arguments.
Otherwise return `none`. -/
@[inline] def _root_.Lean.Expr.app7? (e : Expr) (fName : Name) :
    Option (Expr × Expr × Expr × Expr × Expr × Expr × Expr) 
goal: Option (Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr)

full_name: Mathlib.Tactic.Widget.homType?
code: /-- Given a Hom type `α ⟶ β`, return `(α, β)`. Otherwise `none`. -/
def homType? (e : Expr) : Option (Expr × Expr) 
goal: Option (Lean.Expr × Lean.Expr)

full_name: Mathlib.Tactic.Widget.homComp?
code: /-- Given composed homs `g ≫ h`, return `(g, h)`. Otherwise `none`. -/
def homComp? (f : Expr) : Option (Expr × Expr) 
goal: Option (Lean.Expr × Lean.Expr)

full_name: Mathlib.Tactic.Widget.ExprEmbeds
code: /-- Expressions to display as labels in a diagram. -/
abbrev ExprEmbeds 
goal: Type

full_name: Mathlib.Tactic.Widget.mkCommDiag
code: /-- Construct a commutative diagram from a Penrose `sub`stance program and expressions `embeds` to
display as labels in the diagram. -/
def mkCommDiag (sub : String) (embeds : ExprEmbeds) : MetaM Html 
goal: Lean.MetaM ProofWidgets.Html

full_name: Mathlib.Tactic.Widget.subTriangle
code: /--
Triangle with `homs = [f,g,h]` and `objs = [A,B,C]`
```
A f B
  h g
    C
```
-/
def subTriangle 
goal: String

full_name: Mathlib.Tactic.Widget.commTriangleM?
code: /-- Given a commutative triangle `f ≫ g = h` or `e ≡ h = f ≫ g`, return a triangle diagram.
Otherwise `none`. -/
def commTriangleM? (e : Expr) : MetaM (Option Html) 
goal: Lean.MetaM (Option ProofWidgets.Html)

full_name: Mathlib.Tactic.Widget.commutativeTrianglePresenter
code: @[expr_presenter]
def commutativeTrianglePresenter : ExprPresenter 
goal: ProofWidgets.ExprPresenter

full_name: Mathlib.Tactic.Widget.subSquare
code: /--
Square with `homs = [f,g,h,i]` and `objs = [A,B,C,D]`
```
A f B
i   g
D h C
```
-/
def subSquare 
goal: String

full_name: Mathlib.Tactic.Widget.commSquareM?
code: /-- Given a commutative square `f ≫ g = i ≫ h`, return a square diagram. Otherwise `none`. -/
def commSquareM? (e : Expr) : MetaM (Option Html) 
goal: Lean.MetaM (Option ProofWidgets.Html)

full_name: Mathlib.Tactic.Widget.commutativeSquarePresenter
code: @[expr_presenter]
def commutativeSquarePresenter : ExprPresenter 
goal: ProofWidgets.ExprPresenter
File: Mathlib/Tactic/Widget/GCongr.lean

full_name: makeGCongrString
code: /-- Return the link text and inserted text above and below of the gcongr widget. -/
@[nolint unusedArguments]
def makeGCongrString (pos : Array Lean.SubExpr.GoalsLocation) (goalType : Expr)
    (_ : SelectInsertParams) : MetaM (String × String × Option (String.Pos × String.Pos)) 
goal: SelectInsertParams → Lean.MetaM (String × String × Option (String.Pos × String.Pos))

full_name: GCongrSelectionPanel.rpc
code: /-- Rpc function for the gcongr widget. -/
@[server_rpc_method]
def GCongrSelectionPanel.rpc 
goal: Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.Html)

full_name: GCongrSelectionPanel
code: /-- The gcongr widget. -/
@[widget_module]
def GCongrSelectionPanel : Component SelectInsertParams 
goal: ProofWidgets.Component SelectInsertParams

full_name: tacticGcongr?
code: /-- Display a widget panel allowing to generate a `gcongr` call with holes specified by selecting
subexpressions in the goal. -/
elab stx:"gcongr?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo GCongrSelectionPanel.javascriptHash
    (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Tactic_Widget_GCongr___elabRules_tacticGcongr?_1
code: /-- Display a widget panel allowing to generate a `gcongr` call with holes specified by selecting
subexpressions in the goal. -/
elab stx:"gcongr?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo GCongrSelectionPanel.javascriptHash
    (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/Widget/CongrM.lean

full_name: makeCongrMString
code: /-- Return the link text and inserted text above and below of the congrm widget. -/
@[nolint unusedArguments]
def makeCongrMString (pos : Array Lean.SubExpr.GoalsLocation) (goalType : Expr)
    (_ : SelectInsertParams) : MetaM (String × String × Option (String.Pos × String.Pos)) 
goal: SelectInsertParams → Lean.MetaM (String × String × Option (String.Pos × String.Pos))

full_name: CongrMSelectionPanel.rpc
code: /-- Rpc function for the congrm widget. -/
@[server_rpc_method]
def CongrMSelectionPanel.rpc 
goal: Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.Html)

full_name: CongrMSelectionPanel
code: /-- The congrm widget. -/
@[widget_module]
def CongrMSelectionPanel : Component SelectInsertParams 
goal: ProofWidgets.Component SelectInsertParams

full_name: tacticCongrm?
code: /-- Display a widget panel allowing to generate a `congrm` call with holes specified by selecting
subexpressions in the goal. -/
elab stx:"congrm?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo CongrMSelectionPanel.javascriptHash
    (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Tactic_Widget_CongrM___elabRules_tacticCongrm?_1
code: /-- Display a widget panel allowing to generate a `congrm` call with holes specified by selecting
subexpressions in the goal. -/
elab stx:"congrm?" : tactic => do
  let some replaceRange := (← getFileMap).rangeOfStx? stx | return
  Widget.savePanelWidgetInfo CongrMSelectionPanel.javascriptHash
    (pure <| json% { replaceRange: $(replaceRange) }) stx
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/Observe.lean

full_name: Mathlib.Tactic.LibrarySearch.observe
code: /-- `observe hp : p` asserts the proposition `p`, and tries to prove it using `exact?`.
If no proof is found, the tactic fails.
In other words, this tactic is equivalent to `have hp : p := by exact?`.

If `hp` is omitted, then the placeholder `this` is used.

The variant `observe? hp : p` will emit a trace message of the form `have hp : p := proof_term`.
This may be particularly useful to speed up proofs. -/
syntax (name := observe) "observe" "?"? (ppSpace ident)? " : " term
  (" using " (colGt term),+)? : tactic
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.LibrarySearch._aux_Mathlib_Tactic_Observe___elabRules_Mathlib_Tactic_LibrarySearch_observe_1
code: elab_rules : tactic |
  `(tactic| observe%$tk $[?%$trace]? $[$n?:ident]? : $t:term $[using $[$required:term],*]?) => do
  let name : Name := match n? with
    | none   => `this
    | some n => n.getId
  withMainContext do
    let (type, _) ← elabTermWithHoles t none (← getMainTag) true
    let .mvar goal ← mkFreshExprMVar type | failure
    if let some _ ← librarySearch goal then
      reportOutOfHeartbeats `library_search tk
      throwError "observe did not find a solution"
    else
      let v := (← instantiateMVars (mkMVar goal)).headBeta
      if trace.isSome then
        addHaveSuggestion tk (some name) type v
      let (_, newGoal) ← (← getMainGoal).note name v
      replaceMainGoal [newGoal]
goal: Lean.Elab.Tactic.Tactic

full_name: Mathlib.Tactic.LibrarySearch.«tacticObserve?__:_»
code: macro "observe?" h:(ppSpace ident)? " : " t:term : tactic =>
  `(tactic| observe ? $[$h]? : $t)
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.LibrarySearch.«_aux_Mathlib_Tactic_Observe___macroRules_Mathlib_Tactic_LibrarySearch_tacticObserve?__:__1»
code: macro "observe?" h:(ppSpace ident)? " : " t:term : tactic =>
  `(tactic| observe ? $[$h]? : $t)
goal: Lean.Macro

full_name: Mathlib.Tactic.LibrarySearch.«tacticObserve?__:_Using__,,»
code: macro "observe?" h:(ppSpace ident)? " : " t:term " using " terms:(colGt term),+ : tactic =>
  `(tactic| observe ? $[$h]? : $t using $[$terms],*)
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.LibrarySearch.«_aux_Mathlib_Tactic_Observe___macroRules_Mathlib_Tactic_LibrarySearch_tacticObserve?__:_Using__,,_1»
code: macro "observe?" h:(ppSpace ident)? " : " t:term " using " terms:(colGt term),+ : tactic =>
  `(tactic| observe ? $[$h]? : $t using $[$terms],*)
goal: Lean.Macro
File: Mathlib/Tactic/ApplyCongr.lean

full_name: Lean.Elab.Tactic.applyCongr
code: /--
Apply a congruence lemma inside `conv` mode.

When called without an argument `apply_congr` will try applying all lemmas marked with `@[congr]`.
Otherwise `apply_congr e` will apply the lemma `e`.

Recall that a goal that appears as `∣ X` in `conv` mode
represents a goal of `⊢ X = ?m`,
i.e. an equation with a metavariable for the right hand side.

To successfully use `apply_congr e`, `e` will need to be an equation
(possibly after function arguments),
which can be unified with a goal of the form `X = ?m`.
The right hand side of `e` will then determine the metavariable,
and `conv` will subsequently replace `X` with that right hand side.

As usual, `apply_congr` can create new goals;
any of these which are _not_ equations with a metavariable on the right hand side
will be hard to deal with in `conv` mode.
Thus `apply_congr` automatically calls `intros` on any new goals,
and fails if they are not then equations.

In particular it is useful for rewriting inside the operand of a `Finset.sum`,
as it provides an extra hypothesis asserting we are inside the domain.

For example:

```lean
example (f g : ℤ → ℤ) (S : Finset ℤ) (h : ∀ m ∈ S, f m = g m) :
    Finset.sum S f = Finset.sum S g := by
  conv_lhs =>
    -- If we just call `congr` here, in the second goal we're helpless,
    -- because we are only given the opportunity to rewrite `f`.
    -- However `apply_congr` uses the appropriate `@[congr]` lemma,
    -- so we get to rewrite `f x`, in the presence of the crucial `H : x ∈ S` hypothesis.
    apply_congr
    · skip
    · simp [*]
```

In the above example, when the `apply_congr` tactic is called it gives the hypothesis `H : x ∈ S`
which is then used to rewrite the `f x` to `g x`.
-/
def Lean.Elab.Tactic.applyCongr (q : Option Expr) : TacticM Unit 
goal: Lean.Elab.Tactic.TacticM Unit

full_name: Lean.Parser.Tactic.applyCongr
code: syntax (name := Lean.Parser.Tactic.applyCongr) "apply_congr" (ppSpace colGt term)? : conv
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Tactic_ApplyCongr___elabRules_Lean_Parser_Tactic_applyCongr_1
code: elab_rules : conv
  | `(conv| apply_congr$[ $t?]?) => do
    let e? ← t?.mapM (fun t => elabTerm t.raw none)
    applyCongr e?
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/Constructor.lean

full_name: _aux_Mathlib_Tactic_Constructor___elabRules_tacticFconstructor_1
code: /--
`fconstructor` is like `constructor`
(it calls `apply` using the first matching constructor of an inductive datatype)
except that it does not reorder goals.
-/
elab "fconstructor" : tactic => withMainContext do
  let mvarIds' ← (← getMainGoal).constructor {newGoals := .all}
  Term.synthesizeSyntheticMVarsNoPostponing
  replaceMainGoal mvarIds'
goal: Lean.Elab.Tactic.Tactic

full_name: tacticFconstructor
code: /--
`fconstructor` is like `constructor`
(it calls `apply` using the first matching constructor of an inductive datatype)
except that it does not reorder goals.
-/
elab "fconstructor" : tactic => withMainContext do
  let mvarIds' ← (← getMainGoal).constructor {newGoals := .all}
  Term.synthesizeSyntheticMVarsNoPostponing
  replaceMainGoal mvarIds'
goal: Lean.ParserDescr

full_name: tacticEconstructor
code: /--
`econstructor` is like `constructor`
(it calls `apply` using the first matching constructor of an inductive datatype)
except only non-dependent premises are added as new goals.
-/
elab "econstructor" : tactic => withMainContext do
  let mvarIds' ← (← getMainGoal).constructor {newGoals := .nonDependentOnly}
  Term.synthesizeSyntheticMVarsNoPostponing
  replaceMainGoal mvarIds'
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Tactic_Constructor___elabRules_tacticEconstructor_1
code: /--
`econstructor` is like `constructor`
(it calls `apply` using the first matching constructor of an inductive datatype)
except only non-dependent premises are added as new goals.
-/
elab "econstructor" : tactic => withMainContext do
  let mvarIds' ← (← getMainGoal).constructor {newGoals := .nonDependentOnly}
  Term.synthesizeSyntheticMVarsNoPostponing
  replaceMainGoal mvarIds'
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/Recall.lean

full_name: Mathlib.Tactic.Recall.recall
code: /--
The `recall` command redeclares a previous definition for illustrative purposes.
This can be useful for files that give an expository account of some theory in Lean.

The syntax of the command mirrors `def`, so all the usual bells and whistles work.
```
recall List.cons_append (a : α) (as bs : List α) : (a :: as) ++ bs = a :: (as ++ bs) := rfl
```
Also, one can leave out the body.
```
recall Nat.add_comm (n m : Nat) : n + m = m + n
```

The command verifies that the new definition type-checks and that the type and value
provided are definitionally equal to the original declaration. However, this does not
capture some details (like binders), so the following works without error.
```
recall Nat.add_comm {n m : Nat} : n + m = m + n
```
-/
syntax (name := recall) "recall " ident ppIndent(optDeclSig) (declVal)? : command
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Recall._aux_Mathlib_Tactic_Recall___elabRules_Mathlib_Tactic_Recall_recall_1
code: elab_rules : command
  | `(recall $id $sig:optDeclSig $[$val?]?) => withoutModifyingEnv do
    let declName := id.getId
    let some info := (← getEnv).find? declName
      | throwError "unknown constant '{declName}'"
    let declConst : Expr := mkConst declName <| info.levelParams.map Level.param
    discard <| liftTermElabM <| addTermInfo id declConst
    let newId := mkIdentFrom id (← mkAuxName declName 1)
    if let some val := val? then
      let some infoVal := info.value?
        | throwErrorAt val "constant '{declName}' has no defined value"
      elabCommand <| ← `(noncomputable def $newId $sig:optDeclSig $val)
      let some newInfo := (← getEnv).find? newId.getId | return -- def already threw
      liftTermElabM do
        let mvs ← newInfo.levelParams.mapM fun _ => mkFreshLevelMVar
        let newType := newInfo.type.instantiateLevelParams newInfo.levelParams mvs
        unless (← isDefEq info.type newType) do
          throwTypeMismatchError none info.type newInfo.type declConst
        let newVal := newInfo.value?.get!.instantiateLevelParams newInfo.levelParams mvs
        unless (← isDefEq infoVal newVal) do
          let err := m!"\
            value mismatch{indentExpr declConst}\nhas value{indentExpr newVal}\n\
            but is expected to have value{indentExpr infoVal}"
          throwErrorAt val err
    else
      let (binders, type?) := expandOptDeclSig sig
      if let some type := type? then
        runTermElabM fun vars => do
          withAutoBoundImplicit do
            elabBinders binders.getArgs fun xs => do
              let xs ← addAutoBoundImplicits xs
              let type ← elabType type
              Term.synthesizeSyntheticMVarsNoPostponing
              let type ← mkForallFVars xs type
              let type ← mkForallFVars vars type (usedOnly := true)
              unless (← isDefEq info.type type) do
                throwTypeMismatchError none info.type type declConst
      else
        unless binders.getNumArgs == 0 do
          throwError "expected type after ':'"
goal: Lean.Elab.Command.CommandElab
File: Mathlib/Tactic/ToLevel.lean

full_name: Lean.ToLevel.toLevel
code: /-- A class to create `Level` expressions that denote particular universe levels in Lean.
`Lean.ToLevel.toLevel.{u}` evaluates to a `Lean.Level` term representing `u` -/
@[pp_with_univ]
class ToLevel.{u} where
  /-- A `Level` that represents the universe level `u`. -/
  toLevel : Level
  /-- The universe itself. This is only here to avoid the "unused universe parameter" error. -/
  univ : Type u := Sort u
goal: Lean.Level

full_name: Lean.ToLevel.univ
code: /-- A class to create `Level` expressions that denote particular universe levels in Lean.
`Lean.ToLevel.toLevel.{u}` evaluates to a `Lean.Level` term representing `u` -/
@[pp_with_univ]
class ToLevel.{u} where
  /-- A `Level` that represents the universe level `u`. -/
  toLevel : Level
  /-- The universe itself. This is only here to avoid the "unused universe parameter" error. -/
  univ : Type u := Sort u
goal: Type u

full_name: Lean.instToLevel
code: instance : ToLevel.{0} 
goal: Lean.ToLevel.{0}

full_name: Lean.instToLevel_1
code: instance [ToLevel.{u}] : ToLevel.{u+1} 
goal: Lean.ToLevel.{u + 1}

full_name: Lean.ToLevel.max
code: /-- `ToLevel` for `max u v`. This is not an instance since it causes divergence. -/
def ToLevel.max [ToLevel.{u}] [ToLevel.{v}] : ToLevel.{max u v} 
goal: Lean.ToLevel.{max u v}

full_name: Lean.ToLevel.imax
code: /-- `ToLevel` for `imax u v`. This is not an instance since it causes divergence. -/
def ToLevel.imax [ToLevel.{u}] [ToLevel.{v}] : ToLevel.{imax u v} 
goal: Lean.ToLevel.{imax u v}
File: Mathlib/Tactic/Measurability/Init.lean

full_name: initFn._@.Mathlib.Tactic.Measurability.Init._hyg.5
code: declare_aesop_rule_sets [Measurable]
goal: IO Unit
File: Mathlib/Tactic/Monotonicity/Attr.lean

full_name: Mathlib.Tactic.Monotonicity.mono.side
code: syntax mono.side := &"left" <|> &"right" <|> &"both"
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Monotonicity.Attr.mono
code: /-- A lemma stating the monotonicity of some function, with respect to appropriate relations on its
domain and range, and possibly with side conditions. -/
syntax (name := mono) "mono" (ppSpace mono.side)? : attr
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Monotonicity.Attr.ext
code: @[inherit_doc mono]
initialize ext : LabelExtension ← (
  let descr := "A lemma stating the monotonicity of some function, with respect to appropriate
relations on its domain and range, and possibly with side conditions."
  let mono := `mono
  registerLabelAttr mono descr mono)
goal: Lean.LabelExtension

full_name: Mathlib.Tactic.Monotonicity.Attr.initFn._@.Mathlib.Tactic.Monotonicity.Attr._hyg.82
code: @[inherit_doc mono]
initialize ext : LabelExtension ← (
  let descr := "A lemma stating the monotonicity of some function, with respect to appropriate
relations on its domain and range, and possibly with side conditions."
  let mono := `mono
  registerLabelAttr mono descr mono)
goal: IO Lean.LabelExtension
File: Mathlib/Tactic/Eqns.lean

full_name: eqns
code: syntax (name := eqns) "eqns" (ppSpace ident)* : attr
goal: Lean.ParserDescr

full_name: initFn._@.Mathlib.Tactic.Eqns._hyg.26
code: initialize eqnsAttribute : NameMapExtension (Array Name) ←
  registerNameMapAttribute {
    name  := `eqns
    descr := "Overrides the equation lemmas for a declaration to the provided list"
    add   := fun
    | declName, `(attr| eqns $[$names]*) => do
      if let some _ := Meta.eqnsExt.getState (← getEnv) |>.map.find? declName then
        throwError "There already exist stored eqns for '{declName}'; registering new equations \
          will not have the desired effect."
      names.mapM realizeGlobalConstNoOverloadWithInfo
    | _, _ => Lean.Elab.throwUnsupportedSyntax }
goal: IO (Lean.NameMapExtension (Array Lean.Name))

full_name: eqnsAttribute
code: initialize eqnsAttribute : NameMapExtension (Array Name) ←
  registerNameMapAttribute {
    name  := `eqns
    descr := "Overrides the equation lemmas for a declaration to the provided list"
    add   := fun
    | declName, `(attr| eqns $[$names]*) => do
      if let some _ := Meta.eqnsExt.getState (← getEnv) |>.map.find? declName then
        throwError "There already exist stored eqns for '{declName}'; registering new equations \
          will not have the desired effect."
      names.mapM realizeGlobalConstNoOverloadWithInfo
    | _, _ => Lean.Elab.throwUnsupportedSyntax }
goal: Lean.NameMapExtension (Array Lean.Name)

full_name: initFn._@.Mathlib.Tactic.Eqns._hyg.315
code: initialize Lean.Meta.registerGetEqnsFn (fun name => do
  pure (eqnsAttribute.find? (← getEnv) name))
goal: IO Unit
File: Mathlib/Tactic/Monotonicity/Basic.lean

full_name: Mathlib.Tactic.Monotonicity.mono
code: /--
`mono` applies monotonicity rules and local hypotheses repetitively.  For example,
```lean
example (x y z k : ℤ)
    (h : 3 ≤ (4 : ℤ))
    (h' : z ≤ y) :
    (k + 3 + x) - y ≤ (k + 4 + x) - z := by
  mono
```
-/
syntax (name := mono) "mono" "*"? (ppSpace mono.side)?
  (" with " (colGt term),+)? (" using " (colGt simpArg),+)? : tactic
goal: Lean.ParserDescr

full_name: Mathlib.Tactic.Monotonicity._aux_Mathlib_Tactic_Monotonicity_Basic___elabRules_Mathlib_Tactic_Monotonicity_mono_1
code: elab_rules : tactic
| `(tactic| mono $[*]? $[$h:mono.side]? $[ with%$w $a:term,*]? $[ using%$u $s,*]? ) => do
  let msg (s : String) := s ++ " syntax is not yet supported in 'mono'"
  if let some h := h then throwErrorAt h (msg "'left'/'right'/'both'")
  if let some w := w then throwErrorAt w (msg "'with'")
  if let some u := u then throwErrorAt u (msg "'using'")
  let cfg ← elabApplyRulesConfig <| mkNullNode #[]
  let cfg := { cfg with
    backtracking := false
    transparency := .reducible
    exfalso := false }
  liftMetaTactic fun g => do processSyntax cfg false false [] [] #[mkIdent `mono] [g]
goal: Lean.Elab.Tactic.Tactic