lean4-htt/src/Lean/Meta
Joachim Breitner 117f73fc84
feat: linter.unusedSimpArgs (#8901)
This PR adds a linter (`linter.unusedSimpArgs`) that complains when a
simp argument (`simp [foo]`) is unused. It should do the right thing if
the `simp` invocation is run multiple times, e.g. inside `all_goals`. It
does not trigger when the `simp` call is inside a macro. The linter
message contains a clickable hint to remove the simp argument.

I chose to display a separate warning for each unused argument. This
means that the user has to click multiple times to remove all of them
(and wait for re-elaboration in between). But this just means multiple
endorphine kicks, and the main benefit over a single warning that would
have to span the whole argument list is that already the squigglies tell
the users about unused arguments.

This closes #4483.

Making Init and Std clean wrt to this linter revealed close to 1000
unused simp args, a pleasant experience for anyone enjoying tidying
things: #8905
2025-06-22 09:10:21 +00:00
..
ArgsPacker
Constructions refactor: remove binductionOn, use brecOn instead (#8820) 2025-06-17 07:07:24 +00:00
Match style: replace HEq x y with x ≍ y (#8872) 2025-06-20 07:47:33 +00:00
Tactic feat: linter.unusedSimpArgs (#8901) 2025-06-22 09:10:21 +00:00
AbstractMVars.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
AbstractNestedProofs.lean feat: create private aux decls in private contexts 2025-06-03 15:53:05 +02:00
ACLt.lean fix: isDefEq, whnf, simp caching and configuration (#6053) 2024-11-18 01:17:26 +00:00
AppBuilder.lean style: replace HEq x y with x ≍ y (#8872) 2025-06-20 07:47:33 +00:00
ArgsPacker.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
Basic.lean fix: make sure local instance detection sees through reductions (#8903) 2025-06-21 06:26:32 +00:00
BinderNameHint.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
Canonicalizer.lean chore: remove the old Lean.Data.HashMap implementation (#7519) 2025-03-20 23:49:55 +00:00
Check.lean fix: reduce ambiguity of "final" in application type mismatch message (#8322) 2025-05-14 16:12:10 +00:00
CheckTactic.lean
Closure.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
Coe.lean doc: add documentation for builtin attributes (#8173) 2025-06-11 09:04:37 +00:00
CoeAttr.lean
CollectFVars.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
CollectMVars.lean
CompletionName.lean
CongrTheorems.lean fix: make mkHCongrWithArityForConst? compatible with parallelism (#8899) 2025-06-20 21:55:14 +00:00
Constructions.lean
CtorRecognizer.lean fix: have Lean.Meta.isConstructorApp'? be aware of n + k Nat offsets (#6270) 2024-12-01 18:04:32 +00:00
DecLevel.lean
Diagnostics.lean fix: add workaround for MessageData limitations (#6669) 2025-01-16 16:58:20 +00:00
DiscrTree.lean fix: replace bad simp lemmas for Id (#7352) 2025-05-22 22:45:35 +00:00
DiscrTreeTypes.lean
Eqns.lean feat: explicit defeq attribute (#8419) 2025-06-06 18:40:06 +00:00
Eval.lean refactor: introduce VisibilityMap in Lean.Environment, use it to split base in preparation for private import (#8145) 2025-04-28 10:17:18 +00:00
ExprDefEq.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
ExprLens.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
ExprTraverse.lean
ForEachExpr.lean chore: avoid runtime array bounds checks (#6134) 2024-11-21 05:04:52 +00:00
FunInfo.lean feat: refactor of find functions on List/Array/Vector (#6833) 2025-01-30 01:14:21 +00:00
GeneralizeTelescope.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
GeneralizeVars.lean
GetUnfoldableConst.lean fix: unknown identifier ranges (#8362) 2025-05-22 10:05:31 +00:00
GlobalInstances.lean
Hint.lean feat: pre-stage0 groundwork for named error messages (#8649) 2025-06-11 14:52:08 +00:00
IndPredBelow.lean feat: use omission dots for hidden let values in Infoview (#8041) 2025-05-27 23:09:11 +00:00
Inductive.lean
InferType.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
Injective.lean style: replace HEq x y with x ≍ y (#8872) 2025-06-20 07:47:33 +00:00
Instances.lean chore: follow up on #8173 post-stage0 update (#8722) 2025-06-16 09:08:35 +00:00
IntInstTesters.lean feat: divisibility constraint normalizer (#7092) 2025-02-15 04:20:40 +00:00
Iterator.lean
KAbstract.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
KExprMap.lean
LazyDiscrTree.lean feat: meta syntax 2025-06-04 18:26:05 +02:00
LevelDefEq.lean chore: mark Meta.Context.config as private (#6051) 2024-11-13 13:30:06 +11:00
LitValues.lean chore: remove prime from Fin.ofNat' (#8515) 2025-05-28 11:51:00 +00:00
Match.lean
MatchUtil.lean
NatInstTesters.lean feat: Nat divisibility constraints in cutsat (#7495) 2025-03-15 03:46:47 +00:00
Offset.lean chore: cleanup imports (#5825) 2024-10-23 23:51:13 +00:00
Order.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
PPGoal.lean feat: use omission dots for hidden let values in Infoview (#8041) 2025-05-27 23:09:11 +00:00
PProdN.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
RecursorInfo.lean feat: refactor of find functions on List/Array/Vector (#6833) 2025-01-30 01:14:21 +00:00
Reduce.lean
ReduceEval.lean
SizeOf.lean feat: explicit defeq attribute (#8419) 2025-06-06 18:40:06 +00:00
Sorry.lean feat: labeled and unique sorries (#5757) 2024-12-11 23:53:02 +00:00
Structure.lean refactor: factor out common code for structure default values (#7737) 2025-03-31 22:40:39 +00:00
SynthInstance.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
Tactic.lean feat: extract_lets and lift_lets tactics (#6432) 2025-04-21 08:57:01 +00:00
Transform.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
TransparencyMode.lean
TryThis.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
UnificationHint.lean fix: isDefEq, whnf, simp caching and configuration (#6053) 2024-11-18 01:17:26 +00:00
WHNF.lean chore: remove prime from Fin.ofNat' (#8515) 2025-05-28 11:51:00 +00:00