Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Mathlib/Algebra/Category/AlgCat/FilteredColimits.lean
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ section

variable {c : Cocone (F ⋙ forget₂ _ RingCat)} [IsFilteredOrEmpty J]

set_option backward.defeqAttrib.useBackward true in
set_option backward.isDefEq.respectTransparency false in
/-- (Implementation): The algebra instance on the cocone point of the underlying diagram of rings
is induced from the `j`-th inclusion map. Any choice of `j` gives a propositionally equal algebra
Expand All @@ -41,6 +42,7 @@ private abbrev AlgCat.algebraOfIsFiltered (hc : IsColimit c) (j : J) : Algebra R
obtain ⟨k, hjk, y, rfl⟩ := Concrete.exists_hom_ι_eq_of_isColimit _ hc x j
simp [← dsimp% c.w hjk, ← dsimp% (c.ι.app k).hom.map_mul, Algebra.commutes']

set_option backward.defeqAttrib.useBackward true in
set_option backward.isDefEq.respectTransparency false in
/-- The cocone of the underlying diagram of rings lifted to `AlgCat R`. The algebra instance
on the cocone point is induced from the `j`-th inclusion map. -/
Expand All @@ -57,6 +59,7 @@ private def AlgCat.coconeOfIsFiltered (hc : IsColimit c) (j : J) : Cocone F wher
ext
exact c.ι.naturality_apply _ _

set_option backward.defeqAttrib.useBackward true in
set_option backward.isDefEq.respectTransparency false in
/-- The lifted cocone is colimiting. -/
private def AlgCat.isColimitCoconeOfIsFiltered (hc : IsColimit c) (j : J) :
Expand Down
21 changes: 18 additions & 3 deletions Mathlib/Algebra/Exact/Sequence.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,23 @@ public lemma sum_neg_one_pow_finrank_eq_zero_of_exact {n : ℕ} (V : Fin (n + 2)
simp_rw [← smul_eq_mul]
refine Fin.sum_neg_one_pow_eq_zero _ (fun i ↦ finrank k (f i).range) ?_ (fun i ↦ ?_) ?_
· aesop
· grind [(h_exact i).linearMap_ker_eq, (f i.succ).finrank_range_add_finrank_ker]
· grind [finrank_top]
· #adaptation_note /-- Prior to v4.31.0-rc1, this proof was
```
grind [(h_exact i).linearMap_ker_eq, (f i.succ).finrank_range_add_finrank_ker]
```
-/
have hrn := (f i.succ).finrank_range_add_finrank_ker
have hker : finrank k ↥(LinearMap.ker (f i.succ)) =
finrank k ↥(LinearMap.range (f i.castSucc)) :=
congrArg (fun S : Submodule k (V i.succ.castSucc) => finrank k ↥S)
(h_exact i).linearMap_ker_eq
omega
· #adaptation_note /-- Prior to v4.31.0-rc1, this proof was
```
grind [finrank_top]
```
-/
rw [surj, finrank_top, Fin.succ_last]

/- An unrolled version of `Module.sum_neg_one_pow_finrank_eq_zero_of_exact`. This is an auxiliary
lemma en route to `Module.sum_neg_one_pow_finrank_eq_zero_of_exact_six`. -/
Expand Down Expand Up @@ -78,7 +93,7 @@ private lemma sum_neg_one_pow_finrank_eq_zero_of_exact_six_aux {V₀ V₁ V₂ V
| 0 => ‹_› | 1 => ‹_› | 2 => ‹_› | 3 => ‹_› | 4 => ‹_› | 5 => ‹_›
letI fs (i : Fin 5) : Vs i.castSucc →ₗ[k] Vs i.succ := match i with
| 0 => f₀ | 1 => f₁ | 2 => f₂ | 3 => f₃ | 4 => f₄
simpa [Fin.sum_univ_six] using Module.sum_neg_one_pow_finrank_eq_zero_of_exact Vs fs inj
simpa [Fin.sum_univ_six] using! Module.sum_neg_one_pow_finrank_eq_zero_of_exact Vs fs inj
(fun i ↦ by fin_cases i; exacts [exact₁, exact₂, exact₃, exact₄]) surj

/-- This is an unrolled, universe-polymorphic version of
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/AlgebraicGeometry/Birational/Dominant.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace Scheme

namespace PartialMap

set_option backward.defeqAttrib.useBackward true in
/-- Restricting a dominant partial map to a dense open yields a dominant partial map. -/
lemma isDominant_restrict_hom (f : X.PartialMap Y) [IsDominant f.hom] (U : X.Opens)
(hU : Dense (U : Set X)) (hU' : U ≤ f.domain) : IsDominant (f.restrict U hU hU').hom := by
Expand All @@ -54,6 +55,7 @@ lemma isDominant_hom_iff_isDominant_restrict_hom (f : X.PartialMap Y) (U : X.Ope
⟨fun _ ↦ f.isDominant_restrict_hom U hU hU',
fun _ ↦ f.isDominant_hom_of_isDominant_restrict_hom U hU hU'⟩

set_option backward.defeqAttrib.useBackward true in
/-- Dominance of the underlying morphism is invariant under equivalence of partial maps. -/
lemma isDominant_hom_iff_of_equiv (f g : X.PartialMap Y) (h : f.equiv g) :
IsDominant f.hom ↔ IsDominant g.hom := by
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ theorem d_squared (n : ℕ) : objD X (n + 1) ≫ objD X n = 0 := by
simp_rw [S, Finset.compl_filter, Finset.mem_filter_univ, not_le] at hij'
refine ⟨(j'.pred <| ?_, Fin.castSucc i'), ?_, ?_⟩
· rintro rfl
simp only [Fin.val_zero, not_lt_zero'] at hij'
simp only [Fin.val_zero, not_lt_zero] at hij'
· simpa [S] using! Nat.le_sub_one_of_lt hij'
· simp only [φ, Fin.castLT_castSucc, Fin.succ_pred]
· -- identification of corresponding terms in both sums
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/IteratedDeriv/Analytic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ lemma iteratedDeriv_mul_pow_sub_of_analytic {k t : ℕ} {z₀ : 𝕜} {R R₁ :
(z - z₀) ^ (t + 1) * ((k + (t + 1))! / (t + 1)! * deriv R₁ z +
(R₂ z + (z - z₀) * deriv R₂ z)) := by
have hsub : HasDerivAt (· - z₀) 1 z := (hasDerivAt_id z).sub_const z₀
simpa using ((hsub.fun_pow (t + 1)).mul
simpa using! ((hsub.fun_pow (t + 1)).mul
(((hf1 z).differentiableAt.hasDerivAt.const_mul ((k + (t + 1))! / (t + 1)! : 𝕜)).add
(hsub.mul (hR₂ z).differentiableAt.hasDerivAt))).deriv
_ = (z - z₀) ^ t * ((k + 1 + t)! / t ! * R₁ z + (z - z₀) * R₂' z) := by
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ lemma hasPointwiseRightKanExtensionAt_iff_of_equivalence
isoWhiskerLeft L E.unitIso.symm ≪≫ L.rightUnitor) Y' Y
(E.inverse.mapIso e.symm ≪≫ E.unitIso.symm.app Y)

set_option backward.defeqAttrib.useBackward true in
lemma HasPointwiseLeftKanExtensionAt.of_natIso {L L' : C ⥤ D} {F F' : C ⥤ H} (Y : D)
[L.HasPointwiseLeftKanExtensionAt F Y] (e₁ : L ≅ L') (e₂ : F ≅ F') :
L'.HasPointwiseLeftKanExtensionAt F' Y := by
Expand All @@ -176,6 +177,7 @@ lemma hasPointwiseLeftKanExtensionAt_iff_of_natIso {L L' : C ⥤ D} {F F' : C
L.HasPointwiseLeftKanExtensionAt F Y ↔ L'.HasPointwiseLeftKanExtensionAt F' Y :=
⟨fun _ ↦ .of_natIso Y e₁ e₂, fun _ ↦ .of_natIso Y e₁.symm e₂.symm⟩

set_option backward.defeqAttrib.useBackward true in
lemma HasPointwiseRightKanExtensionAt.of_natIso {L L' : C ⥤ D} {F F' : C ⥤ H} (Y : D)
[L.HasPointwiseRightKanExtensionAt F Y] (e₁ : L ≅ L') (e₂ : F ≅ F') :
L'.HasPointwiseRightKanExtensionAt F' Y := by
Expand Down
1 change: 1 addition & 0 deletions Mathlib/CategoryTheory/Limits/ConcreteCategory/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ theorem colimit_rep_eq_iff_exists [HasColimit F] {i j : J} (x : ToType (F.obj i)
colimit.ι F i x = colimit.ι F j y ↔ ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y :=
⟨Concrete.colimit_exists_of_rep_eq.{s} _ _ _, Concrete.colimit_rep_eq_of_exists _ _ _⟩

set_option backward.defeqAttrib.useBackward true in
omit [IsFiltered J] in
theorem exists_hom_ι_eq_of_isColimit [IsFilteredOrEmpty J] {D : Cocone F} (hD : IsColimit D)
(x : ToType D.pt) (k : J) :
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def normalizeIsoApp' :
@[simp] theorem normalizeIsoApp'_unit (n : NormalMonoidalObject C) :
normalizeIsoApp' C (𝟙_ (F C)) n = ρ_ _ := rfl

set_option backward.defeqAttrib.useBackward true in
theorem normalizeIsoApp_eq :
∀ (X : F C) (n : N C), normalizeIsoApp C X n = normalizeIsoApp' C X n.as
| of _, _ => rfl
Expand Down Expand Up @@ -279,6 +280,7 @@ theorem normalize_naturality (n : NormalMonoidalObject C) {X Y : F C} (f : X ⟶

end

set_option backward.defeqAttrib.useBackward true in
/-- The isomorphism between `n ⊗ X` and `normalize X n` is natural (in both `X` and `n`, but
naturality in `n` is trivial and was "proved" in `normalizeIsoAux`). This is the real heart
of our proof of the coherence theorem. -/
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/CategoryTheory/MorphismProperty/LocalEpi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def localEpi (P : ObjectProperty C) : MorphismProperty C := fun _ _ f ↦
∀ ⦃Z⦄, P Z → Function.Injective fun (g : _ ⟶ Z) ↦ f ≫ g

instance : P.localEpi.IsMultiplicative where
id_mem X Z _ := by simpa using Function.injective_id
id_mem X Z _ := by simpa using! Function.injective_id
comp_mem f g hf hg T hT _ _ huv := hg hT (hf hT <| by simpa using huv)

lemma localEpi.of_epi {X Y : C} (f : X ⟶ Y) [Epi f] : P.localEpi f := by
Expand Down Expand Up @@ -101,6 +101,7 @@ variable {D : Type*} [Category* D] {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G)
[G.Faithful] [G.Full]
include adj

set_option backward.isDefEq.respectTransparency false in
lemma localEpi_mem_range_iff_epi {X Y : C} (f : X ⟶ Y) :
localEpi (· ∈ Set.range G.obj) f ↔ Epi (F.map f) := by
rw [← dsimp% (localEpi (· ∈ Set.range G.obj)).postcomp_iff _ _ (isLocal_adj_unit_app adj Y),
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/CategoryTheory/MorphismProperty/OverAdjunction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def Over.mapCongr [Q.RespectsIso] {X Y : T} {f g : X ⟶ Y} (hfg : f = g) (hf :
NatIso.ofComponents (fun Y ↦ Over.isoMk (Iso.refl _))

set_option backward.defeqAttrib.useBackward true in
set_option linter.overlappingInstances false in
/-- `Over.map` preserves identities. -/
@[simps!]
def Over.mapId [P.IsMultiplicative] [Q.RespectsIso] (X : T) (f : X ⟶ X := 𝟙 X)
Expand Down Expand Up @@ -237,6 +238,7 @@ def Under.mapCongr [Q.RespectsIso] {X Y : T} {f g : X ⟶ Y} (hfg : f = g) (hf :
NatIso.ofComponents (fun Y ↦ Under.isoMk (Iso.refl _))

set_option backward.defeqAttrib.useBackward true in
set_option linter.overlappingInstances false in
/-- `Under.map` preserves identities. -/
@[simps!]
def Under.mapId [P.IsMultiplicative] [Q.RespectsIso] (X : T) (f : X ⟶ X := 𝟙 X)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ instance (J : Type u) [SmallCategory J] [IsCardinalFiltered J κ] :
simp only [(isCardinalFiltered κ).prop_iff_of_iso
(p.isColimit.coconePointUniqueUpToIso
(Limits.isColimitCocone (colimit.isColimit (p.diag ⋙ forget PartOrdEmb)))),
isCardinalFiltered_iff, Limits.cocone_pt_coe]
isCardinalFiltered_iff]
exact Limits.CoconePt.isCardinalFiltered_pt _ p.prop_diag_obj

end PartOrdEmb
Expand Down Expand Up @@ -138,6 +138,7 @@ variable {J : CardinalFilteredPoset κ} (P : Set J.obj → Prop)
[IsDirectedOrder (Subtype P)] [Nonempty (Subtype P)]
[∀ (S : Subtype P), IsCardinalFiltered S.val κ]

set_option backward.defeqAttrib.useBackward true in
/-- Given a predicate `P : Set J.obj → Prop` on the underlying type
of `J : CardinalFilteredPoset κ` such that all the subsets satisfying `P`
are `κ`-filtered, this is the functor `Subtype P ⥤ CardinalFilteredPoset κ`
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Finsupp/Single.lean
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ lemma apply_surjective (a : α) : Surjective fun f : α →₀ M ↦ f a :=
RightInverse.surjective fun _ ↦ single_eq_same

theorem support_single_ne_bot (i : α) (h : b ≠ 0) : (single i b).support ≠ ⊥ := by
simpa only [support_single_ne_zero _ h] using! singleton_ne_empty _
simpa only [support_single _ h] using! singleton_ne_empty _

theorem support_single_disjoint {b' : M} (hb : b ≠ 0) (hb' : b' ≠ 0) {i j : α} :
Disjoint (single i b).support (single j b').support ↔ i ≠ j := by
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/FieldTheory/Galois/IsGaloisGroup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ theorem map_quotientMk' [Finite G] [IsGaloisGroup G K L] (h : E ≤ F) :
isInvariant := ⟨fun x h ↦ by
obtain ⟨a, ha⟩ := hE.isInvariant.isInvariant (algebraMap F L x) (by
rintro ⟨g, hg⟩
simpa only [← algebraMap.smul'] using congr_arg (algebraMap F L) <| h ⟨g, ⟨g, hg, rfl⟩⟩)
simpa only [← algebraMap.smul'] using! congr_arg (algebraMap F L) <| h ⟨g, ⟨g, hg, rfl⟩⟩)
exact ⟨a, FaithfulSMul.algebraMap_injective F L
(by rw [← IsScalarTower.algebraMap_apply, ha])⟩⟩ }

Expand Down
1 change: 1 addition & 0 deletions Mathlib/GroupTheory/FreeGroup/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ protected theorem sublist : Red L₁ L₂ → L₂ <+ L₁ :=
theorem length_le (h : Red L₁ L₂) : L₂.length ≤ L₁.length :=
h.sublist.length_le

set_option linter.auxLemma false in
@[to_additive (attr := deprecated "Should not be needed." (since := "2026-04-10"))]
theorem sizeof_of_step : ∀ {L₁ L₂ : List (α × Bool)},
Step L₁ L₂ → sizeOf L₂ < sizeOf L₁
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/Measure/MeasureSpace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ lemma apply_eq_zero_of_isEmpty [IsEmpty α] {_ : MeasurableSpace α} (μ : Measu
instance instSubsingleton [IsEmpty α] {m : MeasurableSpace α} : Subsingleton (Measure α) :=
⟨fun μ ν => by ext1 s _; rw [apply_eq_zero_of_isEmpty, apply_eq_zero_of_isEmpty]⟩

set_option warning.simp.varHead false in
@[nontriviality]
theorem eq_zero_of_isEmpty [IsEmpty α] {_m : MeasurableSpace α} (μ : Measure α) : μ = 0 :=
Subsingleton.elim μ 0
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/VectorMeasure/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ lemma apply_eq_zero_of_isEmpty [IsEmpty α] (μ : VectorMeasure α M) (s : Set
instance [IsEmpty α] : Subsingleton (VectorMeasure α M) :=
⟨fun μ ν => by ext; rw [apply_eq_zero_of_isEmpty, apply_eq_zero_of_isEmpty]⟩

set_option warning.simp.varHead false in
@[nontriviality]
theorem eq_zero_of_isEmpty [IsEmpty α] (μ : VectorMeasure α M) : μ = 0 :=
Subsingleton.elim μ 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Authors: Chris Birkbeck
module -- shake: keep-all

public import Mathlib.NumberTheory.ModularForms.LevelOne.DimensionFormula
public import Mathlib.Tactic.Linter.DeprecatedModule

deprecated_module "Use `Mathlib.NumberTheory.ModularForms.LevelOne.DimensionFormula` instead."
(since := "2026-05-06")
2 changes: 1 addition & 1 deletion Mathlib/Probability/Independence/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ theorem iIndepFun_iff_map_fun_eq_pi_map [Fintype ι] {β : ι → Type*}
simp
intro h S s hs
specialize h₀ (s := fun i ↦ if i ∈ S then s i else univ)
fun i ↦ by beta_reduce; split_ifs with hiS <;> simp [hiS, hs]
fun i ↦ by split_ifs with hiS <;> simp [hiS, hs]
simp only [apply_ite, preimage_univ, measure_univ, Finset.prod_ite_mem, Finset.univ_inter,
Finset.prod_ite, Finset.filter_univ_mem, iInter_ite, iInter_univ, inter_univ, h,
Measure.pi_pi] at h₀
Expand Down
5 changes: 3 additions & 2 deletions Mathlib/RingTheory/AdjoinRoot.lean
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def mapAlgEquiv (f : S ≃ₐ[R] T) (p : S[X]) (q : T[X]) (h : Associated (p.map
-- FIXME: Coercion hell. See https://github.com/leanprover-community/mathlib4/issues/31365.
have : (RingHomClass.toRingHom f.toRingEquiv.symm).comp (RingHomClass.toRingHom f) =
.id S := by ext; exact f.symm_apply_apply _
simpa [Polynomial.map_map, this] using! map_dvd f.symm.toRingHom h.dvd)
simpa [Polynomial.map_map, -RingEquiv.symm_mk, this] using! map_dvd f.symm.toRingHom h.dvd)
(by ext <;> simp) (by ext <;> simp)

@[simp] lemma coe_mapAlgEquiv (f : S ≃ₐ[R] T) (p : S[X]) (q : T[X]) (h) :
Expand All @@ -442,7 +442,8 @@ def mapAlgEquiv (f : S ≃ₐ[R] T) (p : S[X]) (q : T[X]) (h : Associated (p.map
-- FIXME: Coercion hell. See https://github.com/leanprover-community/mathlib4/issues/31365.
have : (RingHomClass.toRingHom f.toRingEquiv.symm).comp (RingHomClass.toRingHom f) =
.id S := by ext; exact f.symm_apply_apply _
simpa [Polynomial.map_map, this] using! associated_map_map f.symm.toRingHom h.symm) := rfl
simpa [Polynomial.map_map, -RingEquiv.symm_mk, this]
using! associated_map_map f.symm.toRingHom h.symm) := rfl

variable (R) in
/-- The canonical algebraic homomorphism from `AdjoinRoot f` to `AdjoinRoot g`, where
Expand Down
15 changes: 0 additions & 15 deletions MathlibTest/DeprecatedModuleTest.lean

This file was deleted.

2 changes: 1 addition & 1 deletion MathlibTest/Linter/DeprecatedModule/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deprecated_module "We can also give more details about the deprecation" (since :
/--
info: Deprecated modules

'MathlibTest.DeprecatedModule' deprecates to
'MathlibTest.Linter.DeprecatedModule.Basic' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'We can also give more details about the deprecation'
-/
Expand Down
4 changes: 2 additions & 2 deletions MathlibTest/Linter/DeprecatedModule/ImportAsAll.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Core Lean 4 generates deprecation warnings at import time.
module

import all MathlibTest.DeprecatedModuleNew -- deprecated_module: ignore
import all MathlibTest.Linter.DeprecatedModule.ImportBase -- deprecated_module: ignore

/-!
This file imports a deprecated module with `import all`.
Expand All @@ -12,7 +12,7 @@ This file imports a deprecated module with `import all`.
/--
info: Deprecated modules

'MathlibTest.DeprecatedModuleNew' deprecates to
'MathlibTest.Linter.DeprecatedModule.ImportBase' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'Testing public import deprecation'
-/
Expand Down
2 changes: 1 addition & 1 deletion MathlibTest/Linter/DeprecatedModule/ImportAsMeta.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This file imports a deprecated module with `meta import`.
/--
info: Deprecated modules

'MathlibTest.DeprecatedModuleNew' deprecates to
'MathlibTest.Linter.DeprecatedModule.ImportBase' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'Testing public import deprecation'
-/
Expand Down
23 changes: 13 additions & 10 deletions MathlibTest/Linter/DeprecatedModule/ImportAsPlain.lean
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import MathlibTest.Linter.DeprecatedModule.ImportBase
-- This file tests that a plain `import` of a deprecated module produces warnings.
-- Core Lean 4 generates deprecation warnings at import time.
module --deprecated_module: ignore

/--
warning: Testing public import deprecation
'MathlibTest.Linter.DeprecatedModule.ImportBase' has been deprecated: please replace this import by
import MathlibTest.Linter.DeprecatedModule.ImportBase

import Mathlib.Tactic.Linter.DocPrime
import Mathlib.Tactic.Linter.DocString
/-!
This file imports a deprecated module with a plain `import`.
-/

/--
info: Deprecated modules

Note: This linter can be disabled with `set_option linter.deprecated.module false`
'MathlibTest.Linter.DeprecatedModule.ImportBase' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'Testing public import deprecation'
-/
#guard_msgs in
/-!
This file imports a deprecated module.
-/
#show_deprecated_modules
2 changes: 1 addition & 1 deletion MathlibTest/Linter/DeprecatedModule/ImportAsPublic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This file imports a deprecated module with `public import`.
/--
info: Deprecated modules

'MathlibTest.DeprecatedModuleNew' deprecates to
'MathlibTest.Linter.DeprecatedModule.ImportBase' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'Testing public import deprecation'
-/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This file imports a deprecated module with `public meta import`.
/--
info: Deprecated modules

'MathlibTest.DeprecatedModuleNew' deprecates to
'MathlibTest.Linter.DeprecatedModule.ImportBase' deprecates to
#[Mathlib.Tactic.Linter.DocPrime, Mathlib.Tactic.Linter.DocString]
with message 'Testing public import deprecation'
-/
Expand Down
Loading