Skip to content

Commit 781f3e6

Browse files
committed
chore: remove many set_option linter.deprecated false (leanprover-community#40018)
Since v4.31.rc0, the "deprecated declaration" linter warning is automatically silenced when a deprecated declaration is used _inside another one_. Hence most of the 400 manual disablements of this linter in mathlib can be removed.
1 parent 5489873 commit 781f3e6

41 files changed

Lines changed: 0 additions & 417 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mathlib/Algebra/Group/Finsupp.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ noncomputable def uniqueAddEquiv (i : ι) [Subsingleton ι] : (ι →₀ M) ≃+
8686
@[simp↓ high] lemma uniqueAddEquiv_symm_apply_apply (i : ι) [Subsingleton ι] (m : M) (j : ι) :
8787
(uniqueAddEquiv i).symm m j = m := by simp [Subsingleton.elim j i]
8888

89-
set_option linter.deprecated false in
9089
/-- If `M` is the trivial monoid, then the monoid of finitely supported functions `ι →₀ M` is
9190
is isomorphic to `M`. -/
9291
@[simps!, deprecated uniqueAddEquiv (since := "2026-05-06")]
@@ -173,7 +172,6 @@ lemma support_single_add_single_subset [DecidableEq ι] {f₁ f₂ : ι} {g₁ g
173172
refine subset_trans Finsupp.support_add <| union_subset_iff.mpr ⟨?_, ?_⟩ <;>
174173
exact subset_trans Finsupp.support_single_subset (by simp)
175174

176-
set_option linter.deprecated false in
177175
@[deprecated uniqueAddEquiv_symm_apply (since := "2026-05-06")]
178176
lemma _root_.AddEquiv.finsuppUnique_symm {M : Type*} [AddZeroClass M] (d : M) :
179177
AddEquiv.finsuppUnique.symm d = single () d := by ext; simp [AddEquiv.finsuppUnique]

Mathlib/Algebra/MvPolynomial/Equiv.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,12 @@ polynomials over the ground ring. -/
123123
@[deprecated uniqueAlgEquiv (since := "2026-04-15")]
124124
abbrev pUnitAlgEquiv := uniqueAlgEquiv (R := R) PUnit
125125

126-
set_option linter.deprecated false in
127126
@[deprecated uniqueAlgEquiv_monomial (since := "2026-04-15")]
128127
theorem pUnitAlgEquiv_monomial {d : PUnit →₀ ℕ} {r : R} :
129128
MvPolynomial.pUnitAlgEquiv R (MvPolynomial.monomial d r)
130129
= Polynomial.monomial (d ()) r :=
131130
uniqueAlgEquiv_monomial _
132131

133-
set_option linter.deprecated false in
134132
@[deprecated uniqueAlgEquiv_symm_monomial (since := "2026-04-15")]
135133
theorem pUnitAlgEquiv_symm_monomial {d : PUnit →₀ ℕ} {r : R} :
136134
(MvPolynomial.pUnitAlgEquiv R).symm (Polynomial.monomial (d ()) r)
@@ -230,27 +228,23 @@ theorem eval₂_const_uniqueAlgEquiv [Unique σ] {f : MvPolynomial σ R}
230228
f.eval₂ φ (fun _ ↦ a) := by
231229
rw [← eval₂_uniqueAlgEquiv]
232230

233-
set_option linter.deprecated false in
234231
@[deprecated eval₂_uniqueAlgEquiv_symm (since := "2026-04-15")]
235232
theorem eval₂_pUnitAlgEquiv_symm {f : Polynomial R} {φ : R →+* S} {a : Unit → S} :
236233
((MvPolynomial.pUnitAlgEquiv R).symm f : MvPolynomial Unit R).eval₂ φ a =
237234
f.eval₂ φ (a ()) :=
238235
eval₂_uniqueAlgEquiv_symm
239236

240-
set_option linter.deprecated false in
241237
@[deprecated eval₂_const_uniqueAlgEquiv_symm (since := "2026-04-15")]
242238
theorem eval₂_const_pUnitAlgEquiv_symm {f : Polynomial R} {φ : R →+* S} {a : S} :
243239
((MvPolynomial.pUnitAlgEquiv R).symm f : MvPolynomial Unit R).eval₂ φ (fun _ ↦ a) =
244240
f.eval₂ φ a :=
245241
eval₂_const_uniqueAlgEquiv_symm
246242

247-
set_option linter.deprecated false in
248243
@[deprecated eval₂_uniqueAlgEquiv (since := "2026-04-15")]
249244
theorem eval₂_pUnitAlgEquiv {f : MvPolynomial PUnit R} {φ : R →+* S} {a : PUnit → S} :
250245
((MvPolynomial.pUnitAlgEquiv R) f : Polynomial R).eval₂ φ (a default) = f.eval₂ φ a :=
251246
eval₂_uniqueAlgEquiv
252247

253-
set_option linter.deprecated false in
254248
@[deprecated eval₂_const_uniqueAlgEquiv (since := "2026-04-15")]
255249
theorem eval₂_const_pUnitAlgEquiv {f : MvPolynomial PUnit R} {φ : R →+* S} {a : S} :
256250
((MvPolynomial.pUnitAlgEquiv R) f : Polynomial R).eval₂ φ a = f.eval₂ φ (fun _ ↦ a) :=

Mathlib/Analysis/Complex/UpperHalfPlane/MoebiusAction.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ section ModularScalarTowers
413413
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
414414
def coe (g : SL(2, ℤ)) : GL(2, ℝ)⁺ := ((g : SL(2, ℝ)) : GL(2, ℝ)⁺)
415415

416-
set_option linter.deprecated false in
417416
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
418417
lemma coe_inj (a b : SL(2, ℤ)) : coe a = coe b ↔ a = b := by
419418
refine ⟨fun h ↦ a.ext b fun i j ↦ ?_, congr_arg _⟩
@@ -424,22 +423,18 @@ lemma coe_inj (a b : SL(2, ℤ)) : coe a = coe b ↔ a = b := by
424423
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
425424
def coeHom : SL(2, ℤ) →* GL(2, ℝ)⁺ := toGLPos.comp <| map <| Int.castRingHom _
426425

427-
set_option linter.deprecated false in
428426
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
429427
lemma coeHom_apply (g : SL(2, ℤ)) : coeHom g = coe g := rfl
430428

431-
set_option linter.deprecated false in
432429
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
433430
theorem coe_apply_complex {g : SL(2, ℤ)} {i j : Fin 2} :
434431
(Units.val <| Subtype.val <| coe g) i j = (Subtype.val g i j : ℂ) :=
435432
rfl
436433

437-
set_option linter.deprecated false in
438434
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
439435
theorem det_coe {g : SL(2, ℤ)} : det (Units.val <| Subtype.val <| coe g) = 1 := by
440436
simp only [SpecialLinearGroup.coe_GLPos_coe_GL_coe_matrix, SpecialLinearGroup.det_coe, coe]
441437

442-
set_option linter.deprecated false in
443438
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
444439
lemma coe_one : coe 1 = 1 := by
445440
simp only [coe, map_one]
@@ -456,7 +451,6 @@ theorem SLOnGLPos_smul_apply (s : SL(2, ℤ)) (g : GL(2, ℝ)⁺) (z : ℍ) :
456451
(s • g) • z = ((s : GL(2, ℝ)⁺) * g) • z :=
457452
rfl
458453

459-
set_option linter.deprecated false in
460454
@[deprecated "use GL(2, ℝ)" (since := "2026-04-29")]
461455
lemma SL_to_GL_tower : IsScalarTower SL(2, ℤ) GL(2, ℝ)⁺ ℍ where
462456
smul_assoc s g z := by

Mathlib/Analysis/Normed/Affine/ContinuousAffineMap.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,11 @@ theorem decompLinearIsometryEquiv_symm_contLinear (p : W × (V →L[𝕜] W)) :
132132
inherit_doc decompLinearIsometryEquiv]
133133
abbrev toConstProdContinuousLinearMap := decompLinearIsometryEquiv 𝕜 𝕜 V W
134134

135-
set_option linter.deprecated false in
136135
@[deprecated fst_decompLinearIsometryEquiv (since := "2026-03-03")]
137136
theorem toConstProdContinuousLinearMap_fst (f : V →ᴬ[𝕜] W) :
138137
(toConstProdContinuousLinearMap 𝕜 V W f).fst = f 0 :=
139138
rfl
140139

141-
set_option linter.deprecated false in
142140
@[deprecated snd_decompLinearIsometryEquiv (since := "2026-03-03")]
143141
theorem toConstProdContinuousLinearMap_snd (f : V →ᴬ[𝕜] W) :
144142
(toConstProdContinuousLinearMap 𝕜 V W f).snd = f.contLinear :=

0 commit comments

Comments
 (0)