Skip to content

Commit 0c58827

Browse files
committed
lint
1 parent 04a6b93 commit 0c58827

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,18 @@ variable {J : Type w}
6060
inductive WalkingParallelFamily (J : Type w) : Type w
6161
| zero : WalkingParallelFamily J
6262
| one : WalkingParallelFamily J
63-
deriving DecidableEq, Inhabited
63+
deriving Inhabited
6464

6565
open WalkingParallelFamily
6666

67+
-- We do not use `deriving DecidableEq` here
68+
-- because it generates an instance with unnecessary hypotheses.
69+
instance : DecidableEq (WalkingParallelFamily J)
70+
| zero, zero => isTrue rfl
71+
| zero, one => isFalse fun t => by grind
72+
| one, zero => isFalse fun t => by grind
73+
| one, one => isTrue rfl
74+
6775
-- Don't generate unnecessary `sizeOf_spec` lemma which the `simpNF` linter will complain about.
6876
set_option genSizeOfSpec false in
6977
/-- The type family of morphisms for the diagram indexing a wide (co)equalizer. -/

MathlibTest/grind/lint.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import Mathlib
22

3+
#adaptation_note
4+
/--
5+
FIXME: please investigate these lemmas, and add guard conditions as needed.
6+
(These appeared at nightly-2025-12-13.)
7+
--/
8+
#grind_lint skip Path.symm_apply
9+
#grind_lint skip Set.Icc.convexCombo_symm
10+
311
-- This check verifies that `grind` annotations in Mathlib do not trigger run-away instantiations.
412
-- If this test fails, please modify newly introduced `grind` annotations to use the
513
-- `grind_pattern ... where ...` syntax to add side conditions that will prevent the run-away.

0 commit comments

Comments
 (0)