Enables the 'unnecessary <;>' linter. This will warn whenever the <;> tactic combinator
is used when ; would work.
example : True := by apply id <;> trivial
The <;> is unnecessary here because apply id only makes one subgoal.
Prefer apply id; trivial instead.
In some cases, the <;> is syntactically necessary because a single tactic is expected:
example : True := by
cases () with apply id <;> apply id
| unit => trivial
In this case, you should use parentheses, as in (apply id; apply id):
example : True := by
cases () with (apply id; apply id)
| unit => trivial
The set of tactic syntax kinds that act on multiple goals — meaning tac differs from
focus tac. Used to suppress false positives where tac1 <;> tac2 cannot be replaced by
(tac1; tac2) because that would expose tac2 to a different set of goals.
Other modules can extend this set in their own builtin_initialize block by calling
addBuiltinMultigoalKinds.
Register k as a multigoal tactic syntax kind.
Equations
Instances For
Register ks as multigoal tactic syntax kinds.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Whether k is a multigoal tactic kind, per multigoalKindsRef.
Equations
- Lean.Linter.Extra.UnnecessarySeqFocus.isMultigoalKind k = do let __do_lift ← ST.Ref.get Lean.Linter.Extra.UnnecessarySeqFocus.multigoalKindsRef pure (__do_lift.contains k)
Instances For
The monad for collecting used tactic syntaxes.
Equations
Instances For
Traverse the info tree down a given path.
Each (n, i) means that the array must have length n and we will descend into the i'th child.
Equations
- One or more equations did not get rendered due to their size.
- Lean.Linter.Extra.UnnecessarySeqFocus.getPath x✝¹ x✝ [] = some x✝¹
Instances For
Search for tactic executions in the info tree and remove executed tactic syntaxes.
Search for tactic executions in the info tree and remove executed tactic syntaxes.
Enables the 'unnecessary <;>' linter. This will warn whenever the <;> tactic combinator
is used when ; would work.
example : True := by apply id <;> trivial
The <;> is unnecessary here because apply id only makes one subgoal.
Prefer apply id; trivial instead.
In some cases, the <;> is syntactically necessary because a single tactic is expected:
example : True := by
cases () with apply id <;> apply id
| unit => trivial
In this case, you should use parentheses, as in (apply id; apply id):
example : True := by
cases () with (apply id; apply id)
| unit => trivial
Equations
- One or more equations did not get rendered due to their size.