Skip to content

Commit 63dd3c9

Browse files
felixperneggerReemMelamed
authored andcommitted
chore: remove redudant nolint simpNF (leanprover-community#40680)
Remove the attribute whenever its redundant. Some of this comes from leanprover-community#23201, not sure about why others work. Co-authored-by: Batixx <s59fpern@uni-bonn.de>
1 parent b554b15 commit 63dd3c9

13 files changed

Lines changed: 16 additions & 50 deletions

File tree

Mathlib/Algebra/Group/Subgroup/Map.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ theorem mem_map_equiv {f : G ≃* N} {K : Subgroup G} {x : N} :
158158
x ∈ K.map f.toMonoidHom ↔ f.symm x ∈ K :=
159159
Set.mem_image_equiv
160160

161-
-- The simpNF linter says that the LHS can be simplified via `Subgroup.mem_map`.
162-
-- However this is a higher priority lemma.
163-
-- It seems the side condition `hf` is not applied by `simpNF`.
164-
-- https://github.com/leanprover/std4/issues/207
165-
@[to_additive (attr := simp 1100, nolint simpNF)]
161+
@[to_additive (attr := simp 1100)]
166162
theorem mem_map_iff_mem {f : G →* N} (hf : Function.Injective f) {K : Subgroup G} {x : G} :
167163
f x ∈ K.map f ↔ x ∈ K :=
168164
hf.mem_set_image

Mathlib/Algebra/Group/Submonoid/Operations.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,7 @@ theorem apply_coe_mem_map (f : F) (S : Submonoid M) (x : S) : f x ∈ S.map f :=
235235
theorem map_map (g : N →* P) (f : M →* N) : (S.map f).map g = S.map (g.comp f) :=
236236
SetLike.coe_injective <| image_image _ _ _
237237

238-
-- The simpNF linter says that the LHS can be simplified via `Submonoid.mem_map`.
239-
-- However this is a higher priority lemma.
240-
-- It seems the side condition `hf` is not applied by `simpNF`.
241-
-- https://github.com/leanprover/std4/issues/207
242-
@[to_additive (attr := simp 1100, nolint simpNF)]
238+
@[to_additive (attr := simp 1100)]
243239
theorem mem_map_iff_mem {f : F} (hf : Function.Injective f) {S : Submonoid M} {x : M} :
244240
f x ∈ S.map f ↔ x ∈ S :=
245241
hf.mem_set_image

Mathlib/CategoryTheory/Localization/Construction.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,16 @@ the category `C` -/
7070
def ιPaths (X : C) : Paths (LocQuiver W) :=
7171
⟨X⟩
7272

73-
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
74-
Assistance investigating this would be appreciated. -/
7573
/-- The morphism in the path category associated to a morphism in the original category. -/
76-
@[simp, nolint simpNF]
74+
@[simp]
7775
def ψ₁ {X Y : C} (f : X ⟶ Y) : ιPaths W X ⟶ ιPaths W Y := (Paths.of _).map (Sum.inl f)
7876

7977
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
8078
Assistance investigating this would be appreciated. -/
8179
attribute [nolint simpNF] ψ₁.eq_1
8280

83-
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
84-
Assistance investigating this would be appreciated. -/
8581
/-- The morphism in the path category corresponding to a formal inverse. -/
86-
@[simp, nolint simpNF]
82+
@[simp]
8783
def ψ₂ {X Y : C} (w : X ⟶ Y) (hw : W w) : ιPaths W Y ⟶ ιPaths W X :=
8884
(Paths.of _).map (Sum.inr ⟨w, hw⟩)
8985

Mathlib/CategoryTheory/PathCategory/Basic.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,9 @@ def pathComposition : Paths C ⥤ C where
247247
-- the `HomRel` for the kernel of any functor.
248248
-- Indeed, this should be part of an equivalence between congruence relations on a category `C`
249249
-- and full, essentially surjective functors out of `C`.
250-
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
251-
Assistance investigating this would be appreciated. -/
252250
/-- The canonical relation on the path category of a category:
253251
two paths are related if they compose to the same morphism. -/
254-
@[simp, nolint simpNF]
252+
@[simp]
255253
def pathsHomRel : HomRel (Paths C) := fun _ _ p q =>
256254
(pathComposition C).map p = (pathComposition C).map q
257255

Mathlib/CategoryTheory/WithTerminal/Basic.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ def id : ∀ X : WithTerminal C, Hom X X
8383
| of _ => 𝟙 _
8484
| star => PUnit.unit
8585

86-
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
87-
Assistance investigating this would be appreciated. -/
8886
/-- Composition of morphisms for `WithTerminal C`. -/
89-
@[simp, nolint simpNF]
87+
@[simp]
9088
def comp : ∀ {X Y Z : WithTerminal C}, Hom X Y → Hom Y Z → Hom X Z
9189
| of _X, of _Y, of _Z => fun f g => f ≫ g
9290
| of _X, _, star => fun _f _g => PUnit.unit

Mathlib/Data/Multiset/MapFold.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,7 @@ theorem map_eq_cons [DecidableEq α] (f : α → β) (s : Multiset α) (t : Mult
142142
refine ⟨a, mem_cons_self _ _, rfl, ?_⟩
143143
rw [Multiset.erase_cons_head, h]
144144

145-
-- The simpNF linter says that the LHS can be simplified via `Multiset.mem_map`.
146-
-- However this is a higher priority lemma.
147-
-- It seems the side condition `H` is not applied by `simpNF`.
148-
-- https://github.com/leanprover/std4/issues/207
149-
@[simp 1100, nolint simpNF]
145+
@[simp 1100]
150146
theorem mem_map_of_injective {f : α → β} (H : Function.Injective f) {a : α} {s : Multiset α} :
151147
f a ∈ map f s ↔ a ∈ s :=
152148
Quot.inductionOn s fun _l => List.mem_map_of_injective H

Mathlib/Data/Option/Basic.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ theorem coe_def : (fun a ↦ ↑a : α → Option α) = some :=
4747

4848
theorem mem_map {f : α → β} {y : β} {o : Option α} : y ∈ o.map f ↔ ∃ x ∈ o, f x = y := by simp
4949

50-
-- The simpNF linter says that the LHS can be simplified via `Option.mem_def`.
51-
-- However this is a higher priority lemma.
52-
-- It seems the side condition `H` is not applied by `simpNF`.
53-
-- https://github.com/leanprover/std4/issues/207
54-
@[simp 1100, nolint simpNF]
50+
@[simp 1100]
5551
theorem mem_map_of_injective {f : α → β} (H : Function.Injective f) {a : α} {o : Option α} :
5652
f a ∈ o.map f ↔ a ∈ o := by
5753
aesop

Mathlib/FieldTheory/IntermediateField/Adjoin/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,14 @@ protected theorem finrank_bot : finrank F (⊥ : IntermediateField F E) = 1 := b
287287
@[simp] theorem rank_bot' : Module.rank (⊥ : IntermediateField F E) E = Module.rank F E := by
288288
rw [← rank_mul_rank F (⊥ : IntermediateField F E) E, IntermediateField.rank_bot, one_mul]
289289

290-
@[simp, nolint simpNF] -- `simpNF` hits a (deterministic) timeout at `typeclass`
290+
@[simp]
291291
theorem finrank_bot' : finrank (⊥ : IntermediateField F E) E = finrank F E :=
292292
congr(Cardinal.toNat $(rank_bot'))
293293

294294
@[simp] protected theorem rank_top : Module.rank (⊤ : IntermediateField F E) E = 1 :=
295295
Subalgebra.bot_eq_top_iff_rank_eq_one.mp <| top_le_iff.mp fun x _ ↦ ⟨⟨x, trivial⟩, rfl⟩
296296

297-
@[simp, nolint simpNF] -- `simpNF` hits a (deterministic) timeout at `typeclass`
297+
@[simp]
298298
protected theorem finrank_top : finrank (⊤ : IntermediateField F E) E = 1 :=
299299
rank_eq_one_iff_finrank_eq_one.mp IntermediateField.rank_top
300300

Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,11 @@ theorem changeFormEquiv_symm :
346346

347347
variable (Q)
348348

349-
#adaptation_note /-- As of nightly-2026-04-29, the simpNF linter is failing here.
350-
Assistance investigating this would be appreciated. -/
351349
/-- The module isomorphism to the exterior algebra.
352350
353351
Note that this holds more generally when `Q` is divisible by two, rather than only when `1` is
354352
divisible by two; but that would be more awkward to use. -/
355-
@[simp, nolint simpNF]
353+
@[simp]
356354
def equivExterior [Invertible (2 : R)] : CliffordAlgebra Q ≃ₗ[R] ExteriorAlgebra R M :=
357355
changeFormEquiv changeForm.associated_neg_proof
358356

Mathlib/ModelTheory/Order.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ language. -/
135135
@[simps] def orderLHom : Language.order →ᴸ L where
136136
onRelation | _, .le => leSymb
137137

138-
@[simp, nolint simpNF]
138+
@[simp]
139139
theorem orderLHom_leSymb :
140140
(orderLHom L).onRelation leSymb = (leSymb : L.Relations 2) :=
141141
rfl

0 commit comments

Comments
 (0)