From d8fa853a3ec32bd830aa849c6cbff549d3d59507 Mon Sep 17 00:00:00 2001 From: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com> Date: Tue, 27 Feb 2024 07:41:13 +0000 Subject: [PATCH] chore: classify `simp can prove` porting notes (#10930) Classify by adding issue number (#10618) to porting notes claiming anything semantically equivalent to - "`simp` can prove this" - "`simp` can simplify this`" - "was `@[simp]`, now can be proved by `simp`" - "was `@[simp]`, but `simp` can prove it" - "removed simp attribute as the equality can already be obtained by `simp`" - "`simp` can already prove this" - "`simp` already proves this" - "`simp` can prove these" --- Mathlib/Algebra/Order/Monoid/WithTop.lean | 10 ++-- .../BoxIntegral/Partition/Additive.lean | 2 +- .../Analysis/InnerProductSpace/TwoDim.lean | 4 +- .../Analysis/SpecialFunctions/Integrals.lean | 23 ++++---- .../SpecialFunctions/Trigonometric/Basic.lean | 8 +-- .../Abelian/NonPreadditive.lean | 2 +- Mathlib/CategoryTheory/Limits/Opposites.lean | 16 +++--- .../Limits/Shapes/BinaryProducts.lean | 6 +-- .../Limits/Shapes/Biproducts.lean | 2 +- Mathlib/CategoryTheory/PUnit.lean | 2 +- Mathlib/Data/Set/Finite.lean | 2 +- Mathlib/GroupTheory/Perm/Sign.lean | 6 +-- .../Dimension/Constructions.lean | 2 +- .../Integral/IntervalIntegral.lean | 54 +++++++++---------- Mathlib/Order/Lattice.lean | 14 ++--- Mathlib/RingTheory/HahnSeries/Basic.lean | 2 +- .../RingTheory/HahnSeries/Multiplication.lean | 4 +- .../Polynomial/Cyclotomic/Eval.lean | 4 +- 18 files changed, 82 insertions(+), 81 deletions(-) diff --git a/Mathlib/Algebra/Order/Monoid/WithTop.lean b/Mathlib/Algebra/Order/Monoid/WithTop.lean index 4309f4ca971c2..203d185c5eab9 100644 --- a/Mathlib/Algebra/Order/Monoid/WithTop.lean +++ b/Mathlib/Algebra/Order/Monoid/WithTop.lean @@ -163,12 +163,12 @@ theorem add_eq_coe : | some a, some b, c => by norm_cast; simp #align with_top.add_eq_coe WithTop.add_eq_coe --- Porting note: simp can already prove this. +-- Porting note (#10618): simp can already prove this. -- @[simp] theorem add_coe_eq_top_iff {x : WithTop α} {y : α} : x + y = ⊤ ↔ x = ⊤ := by simp #align with_top.add_coe_eq_top_iff WithTop.add_coe_eq_top_iff --- Porting note: simp can already prove this. +-- Porting note (#10618): simp can already prove this. -- @[simp] theorem coe_add_eq_top_iff {y : WithTop α} : ↑x + y = ⊤ ↔ y = ⊤ := by simp #align with_top.coe_add_eq_top_iff WithTop.coe_add_eq_top_iff @@ -428,7 +428,7 @@ theorem zero_lt_top [OrderedAddCommMonoid α] : (0 : WithTop α) < ⊤ := coe_lt_top 0 #align with_top.zero_lt_top WithTop.zero_lt_top --- Porting note: simp can already prove this. +-- Porting note (#10618): simp can already prove this. -- @[simp] @[norm_cast] theorem zero_lt_coe [OrderedAddCommMonoid α] (a : α) : (0 : WithTop α) < a ↔ 0 < a := @@ -638,13 +638,13 @@ theorem add_eq_coe : a + b = x ↔ ∃ a' b' : α, ↑a' = a ∧ ↑b' = b ∧ a WithTop.add_eq_coe #align with_bot.add_eq_coe WithBot.add_eq_coe --- Porting note: simp can already prove this. +-- Porting note (#10618): simp can already prove this. -- @[simp] theorem add_coe_eq_bot_iff : a + y = ⊥ ↔ a = ⊥ := WithTop.add_coe_eq_top_iff #align with_bot.add_coe_eq_bot_iff WithBot.add_coe_eq_bot_iff --- Porting note: simp can already prove this. +-- Porting note (#10618): simp can already prove this. -- @[simp] theorem coe_add_eq_bot_iff : ↑x + b = ⊥ ↔ b = ⊥ := WithTop.coe_add_eq_top_iff diff --git a/Mathlib/Analysis/BoxIntegral/Partition/Additive.lean b/Mathlib/Analysis/BoxIntegral/Partition/Additive.lean index b0381d34ffc8a..b8df5728b9dac 100644 --- a/Mathlib/Analysis/BoxIntegral/Partition/Additive.lean +++ b/Mathlib/Analysis/BoxIntegral/Partition/Additive.lean @@ -78,7 +78,7 @@ theorem coe_injective : Injective fun (f : ι →ᵇᵃ[I₀] M) x => f x := DFunLike.coe_injective #align box_integral.box_additive_map.coe_injective BoxIntegral.BoxAdditiveMap.coe_injective --- porting note: was @[simp], now can be proved by `simp` +-- Porting note (#10618): was @[simp], now can be proved by `simp` theorem coe_inj {f g : ι →ᵇᵃ[I₀] M} : (f : Box ι → M) = g ↔ f = g := DFunLike.coe_fn_eq #align box_integral.box_additive_map.coe_inj BoxIntegral.BoxAdditiveMap.coe_inj diff --git a/Mathlib/Analysis/InnerProductSpace/TwoDim.lean b/Mathlib/Analysis/InnerProductSpace/TwoDim.lean index c5ab09b5e2608..65ea7dc5a3b8d 100644 --- a/Mathlib/Analysis/InnerProductSpace/TwoDim.lean +++ b/Mathlib/Analysis/InnerProductSpace/TwoDim.lean @@ -283,7 +283,7 @@ theorem rightAngleRotation_symm : exact LinearIsometryEquiv.toLinearIsometry_injective rfl #align orientation.right_angle_rotation_symm Orientation.rightAngleRotation_symm --- @[simp] -- Porting note: simp already proves this +-- @[simp] -- Porting note (#10618): simp already proves this theorem inner_rightAngleRotation_self (x : E) : ⟪J x, x⟫ = 0 := by simp #align orientation.inner_right_angle_rotation_self Orientation.inner_rightAngleRotation_self @@ -308,7 +308,7 @@ theorem areaForm_rightAngleRotation_right (x y : E) : ω x (J y) = ⟪x, y⟫ := rw [← o.inner_rightAngleRotation_left, o.inner_comp_rightAngleRotation] #align orientation.area_form_right_angle_rotation_right Orientation.areaForm_rightAngleRotation_right --- @[simp] -- Porting note: simp already proves this +-- @[simp] -- Porting note (#10618): simp already proves this theorem areaForm_comp_rightAngleRotation (x y : E) : ω (J x) (J y) = ω x y := by simp #align orientation.area_form_comp_right_angle_rotation Orientation.areaForm_comp_rightAngleRotation diff --git a/Mathlib/Analysis/SpecialFunctions/Integrals.lean b/Mathlib/Analysis/SpecialFunctions/Integrals.lean index 7b2d81cbd402c..aa65bc1664c80 100644 --- a/Mathlib/Analysis/SpecialFunctions/Integrals.lean +++ b/Mathlib/Analysis/SpecialFunctions/Integrals.lean @@ -274,64 +274,65 @@ theorem intervalIntegrable_inv_one_add_sq : /-! ### Integrals of the form `c * ∫ x in a..b, f (c * x + d)` -/ --- Porting note: was @[simp]; simpNF says LHS does not simplify when applying lemma on itself +-- Porting note (#10618): was @[simp]; +-- simpNF says LHS does not simplify when applying lemma on itself theorem mul_integral_comp_mul_right : (c * ∫ x in a..b, f (x * c)) = ∫ x in a * c..b * c, f x := smul_integral_comp_mul_right f c #align interval_integral.mul_integral_comp_mul_right intervalIntegral.mul_integral_comp_mul_right --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem mul_integral_comp_mul_left : (c * ∫ x in a..b, f (c * x)) = ∫ x in c * a..c * b, f x := smul_integral_comp_mul_left f c #align interval_integral.mul_integral_comp_mul_left intervalIntegral.mul_integral_comp_mul_left --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_mul_integral_comp_div : (c⁻¹ * ∫ x in a..b, f (x / c)) = ∫ x in a / c..b / c, f x := inv_smul_integral_comp_div f c #align interval_integral.inv_mul_integral_comp_div intervalIntegral.inv_mul_integral_comp_div --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem mul_integral_comp_mul_add : (c * ∫ x in a..b, f (c * x + d)) = ∫ x in c * a + d..c * b + d, f x := smul_integral_comp_mul_add f c d #align interval_integral.mul_integral_comp_mul_add intervalIntegral.mul_integral_comp_mul_add --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem mul_integral_comp_add_mul : (c * ∫ x in a..b, f (d + c * x)) = ∫ x in d + c * a..d + c * b, f x := smul_integral_comp_add_mul f c d #align interval_integral.mul_integral_comp_add_mul intervalIntegral.mul_integral_comp_add_mul --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_mul_integral_comp_div_add : (c⁻¹ * ∫ x in a..b, f (x / c + d)) = ∫ x in a / c + d..b / c + d, f x := inv_smul_integral_comp_div_add f c d #align interval_integral.inv_mul_integral_comp_div_add intervalIntegral.inv_mul_integral_comp_div_add --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_mul_integral_comp_add_div : (c⁻¹ * ∫ x in a..b, f (d + x / c)) = ∫ x in d + a / c..d + b / c, f x := inv_smul_integral_comp_add_div f c d #align interval_integral.inv_mul_integral_comp_add_div intervalIntegral.inv_mul_integral_comp_add_div --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem mul_integral_comp_mul_sub : (c * ∫ x in a..b, f (c * x - d)) = ∫ x in c * a - d..c * b - d, f x := smul_integral_comp_mul_sub f c d #align interval_integral.mul_integral_comp_mul_sub intervalIntegral.mul_integral_comp_mul_sub --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem mul_integral_comp_sub_mul : (c * ∫ x in a..b, f (d - c * x)) = ∫ x in d - c * b..d - c * a, f x := smul_integral_comp_sub_mul f c d #align interval_integral.mul_integral_comp_sub_mul intervalIntegral.mul_integral_comp_sub_mul --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_mul_integral_comp_div_sub : (c⁻¹ * ∫ x in a..b, f (x / c - d)) = ∫ x in a / c - d..b / c - d, f x := inv_smul_integral_comp_div_sub f c d #align interval_integral.inv_mul_integral_comp_div_sub intervalIntegral.inv_mul_integral_comp_div_sub --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_mul_integral_comp_sub_div : (c⁻¹ * ∫ x in a..b, f (d - x / c)) = ∫ x in d - b / c..d - a / c, f x := inv_smul_integral_comp_sub_div f c d diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean index c00158722ec75..a97ed286e8053 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean @@ -396,22 +396,22 @@ theorem cos_int_mul_two_pi_sub (x : ℝ) (n : ℤ) : cos (n * (2 * π) - x) = co cos_neg x ▸ cos_periodic.int_mul_sub_eq n #align real.cos_int_mul_two_pi_sub Real.cos_int_mul_two_pi_sub --- Porting note: was @[simp] but simp can prove it +-- Porting note (#10618): was @[simp], but simp can prove it theorem cos_nat_mul_two_pi_add_pi (n : ℕ) : cos (n * (2 * π) + π) = -1 := by simpa only [cos_zero] using (cos_periodic.nat_mul n).add_antiperiod_eq cos_antiperiodic #align real.cos_nat_mul_two_pi_add_pi Real.cos_nat_mul_two_pi_add_pi --- Porting note: was @[simp] but simp can prove it +-- Porting note (#10618): was @[simp], but simp can prove it theorem cos_int_mul_two_pi_add_pi (n : ℤ) : cos (n * (2 * π) + π) = -1 := by simpa only [cos_zero] using (cos_periodic.int_mul n).add_antiperiod_eq cos_antiperiodic #align real.cos_int_mul_two_pi_add_pi Real.cos_int_mul_two_pi_add_pi --- Porting note: was @[simp] but simp can prove it +-- Porting note (#10618): was @[simp], but simp can prove it theorem cos_nat_mul_two_pi_sub_pi (n : ℕ) : cos (n * (2 * π) - π) = -1 := by simpa only [cos_zero] using (cos_periodic.nat_mul n).sub_antiperiod_eq cos_antiperiodic #align real.cos_nat_mul_two_pi_sub_pi Real.cos_nat_mul_two_pi_sub_pi --- Porting note: was @[simp] but simp can prove it +-- Porting note (#10618): was @[simp], but simp can prove it theorem cos_int_mul_two_pi_sub_pi (n : ℤ) : cos (n * (2 * π) - π) = -1 := by simpa only [cos_zero] using (cos_periodic.int_mul n).sub_antiperiod_eq cos_antiperiodic #align real.cos_int_mul_two_pi_sub_pi Real.cos_int_mul_two_pi_sub_pi diff --git a/Mathlib/CategoryTheory/Abelian/NonPreadditive.lean b/Mathlib/CategoryTheory/Abelian/NonPreadditive.lean index 1c0db9e4e8a1b..bb42999bade53 100644 --- a/Mathlib/CategoryTheory/Abelian/NonPreadditive.lean +++ b/Mathlib/CategoryTheory/Abelian/NonPreadditive.lean @@ -280,7 +280,7 @@ abbrev σ {A : C} : A ⨯ A ⟶ A := end --- Porting note: simp can prove these +-- Porting note (#10618): simp can prove these @[reassoc] theorem diag_σ {X : C} : diag X ≫ σ = 0 := by rw [cokernel.condition_assoc, zero_comp] #align category_theory.non_preadditive_abelian.diag_σ CategoryTheory.NonPreadditiveAbelian.diag_σ diff --git a/Mathlib/CategoryTheory/Limits/Opposites.lean b/Mathlib/CategoryTheory/Limits/Opposites.lean index 620470e8cfe94..3fd4d095d7cc4 100644 --- a/Mathlib/CategoryTheory/Limits/Opposites.lean +++ b/Mathlib/CategoryTheory/Limits/Opposites.lean @@ -633,12 +633,12 @@ def unop {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : (Cocone.whisker walkingCospanOpEquiv.functor c)) #align category_theory.limits.pushout_cocone.unop CategoryTheory.Limits.PushoutCocone.unop --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem unop_fst {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : c.unop.fst = c.inl.unop := by simp #align category_theory.limits.pushout_cocone.unop_fst CategoryTheory.Limits.PushoutCocone.unop_fst --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem unop_snd {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : c.unop.snd = c.inr.unop := by aesop_cat #align category_theory.limits.pushout_cocone.unop_snd CategoryTheory.Limits.PushoutCocone.unop_snd @@ -651,12 +651,12 @@ def op {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : Pullbac (Cone.whisker walkingSpanOpEquiv.inverse (Cocone.op c)) #align category_theory.limits.pushout_cocone.op CategoryTheory.Limits.PushoutCocone.op --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem op_fst {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : c.op.fst = c.inl.op := by aesop_cat #align category_theory.limits.pushout_cocone.op_fst CategoryTheory.Limits.PushoutCocone.op_fst --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem op_snd {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : c.op.snd = c.inr.op := by aesop_cat #align category_theory.limits.pushout_cocone.op_snd CategoryTheory.Limits.PushoutCocone.op_snd @@ -675,12 +675,12 @@ def unop {X Y Z : Cᵒᵖ} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : (Cone.whisker walkingSpanOpEquiv.functor c)) #align category_theory.limits.pullback_cone.unop CategoryTheory.Limits.PullbackCone.unop --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem unop_inl {X Y Z : Cᵒᵖ} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : c.unop.inl = c.fst.unop := by aesop_cat #align category_theory.limits.pullback_cone.unop_inl CategoryTheory.Limits.PullbackCone.unop_inl --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem unop_inr {X Y Z : Cᵒᵖ} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : c.unop.inr = c.snd.unop := by aesop_cat #align category_theory.limits.pullback_cone.unop_inr CategoryTheory.Limits.PullbackCone.unop_inr @@ -692,12 +692,12 @@ def op {X Y Z : C} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : PushoutC (Cocone.whisker walkingCospanOpEquiv.inverse (Cone.op c)) #align category_theory.limits.pullback_cone.op CategoryTheory.Limits.PullbackCone.op --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem op_inl {X Y Z : C} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : c.op.inl = c.fst.op := by aesop_cat #align category_theory.limits.pullback_cone.op_inl CategoryTheory.Limits.PullbackCone.op_inl --- porting note: removed simp attribute as the equality can already be obtained by simp +-- Porting note (#10618): removed simp attribute as the equality can already be obtained by simp theorem op_inr {X Y Z : C} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) : c.op.inr = c.snd.op := by aesop_cat #align category_theory.limits.pullback_cone.op_inr CategoryTheory.Limits.PullbackCone.op_inr diff --git a/Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean b/Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean index 125170cd91706..a3a67f1be1bc0 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean @@ -808,19 +808,19 @@ instance prod.map_mono {C : Type*} [Category C] {W X Y Z : C} (f : W ⟶ Y) (g : simpa using congr_arg (fun f => f ≫ prod.snd) h⟩ #align category_theory.limits.prod.map_mono CategoryTheory.Limits.prod.map_mono -@[reassoc] -- Porting note: simp can prove these +@[reassoc] -- Porting note (#10618): simp can prove these theorem prod.diag_map {X Y : C} (f : X ⟶ Y) [HasBinaryProduct X X] [HasBinaryProduct Y Y] : diag X ≫ prod.map f f = f ≫ diag Y := by simp #align category_theory.limits.prod.diag_map CategoryTheory.Limits.prod.diag_map #align category_theory.limits.prod.diag_map_assoc CategoryTheory.Limits.prod.diag_map_assoc -@[reassoc] -- Porting note: simp can prove these +@[reassoc] -- Porting note (#10618): simp can prove these theorem prod.diag_map_fst_snd {X Y : C} [HasBinaryProduct X Y] [HasBinaryProduct (X ⨯ Y) (X ⨯ Y)] : diag (X ⨯ Y) ≫ prod.map prod.fst prod.snd = 𝟙 (X ⨯ Y) := by simp #align category_theory.limits.prod.diag_map_fst_snd CategoryTheory.Limits.prod.diag_map_fst_snd #align category_theory.limits.prod.diag_map_fst_snd_assoc CategoryTheory.Limits.prod.diag_map_fst_snd_assoc -@[reassoc] -- Porting note: simp can prove these +@[reassoc] -- Porting note (#10618): simp can prove these theorem prod.diag_map_fst_snd_comp [HasLimitsOfShape (Discrete WalkingPair) C] {X X' Y Y' : C} (g : X ⟶ Y) (g' : X' ⟶ Y') : diag (X ⨯ X') ≫ prod.map (prod.fst ≫ g) (prod.snd ≫ g') = prod.map g g' := by simp diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean b/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean index a4b7bb3ebe79e..9ec810842454c 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean @@ -807,7 +807,7 @@ theorem biproduct.toSubtype_eq_desc [DecidablePred p] : biproduct.hom_ext' _ _ (by simp) #align category_theory.limits.biproduct.to_subtype_eq_desc CategoryTheory.Limits.biproduct.toSubtype_eq_desc -@[reassoc] -- Porting note: simp can prove both versions +@[reassoc] -- Porting note (#10618): simp can prove both versions theorem biproduct.ι_toSubtype_subtype (j : Subtype p) : biproduct.ι f j ≫ biproduct.toSubtype f p = biproduct.ι (Subtype.restrict p f) j := by ext diff --git a/Mathlib/CategoryTheory/PUnit.lean b/Mathlib/CategoryTheory/PUnit.lean index f5420b6b18ea9..59e11ede74451 100644 --- a/Mathlib/CategoryTheory/PUnit.lean +++ b/Mathlib/CategoryTheory/PUnit.lean @@ -31,7 +31,7 @@ namespace Functor def star : C ⥤ Discrete PUnit.{w + 1} := (Functor.const _).obj ⟨⟨⟩⟩ #align category_theory.functor.star CategoryTheory.Functor.star --- Porting note: simp can simplify this +-- Porting note (#10618): simp can simplify this attribute [nolint simpNF] star_map_down_down variable {C} diff --git a/Mathlib/Data/Set/Finite.lean b/Mathlib/Data/Set/Finite.lean index 64e7a988e9aaa..f9fa9b595a968 100644 --- a/Mathlib/Data/Set/Finite.lean +++ b/Mathlib/Data/Set/Finite.lean @@ -547,7 +547,7 @@ theorem finite_toSet (s : Finset α) : (s : Set α).Finite := Set.toFinite _ #align finset.finite_to_set Finset.finite_toSet --- porting note: was @[simp], now `simp` can prove it +-- Porting note (#10618): was @[simp], now `simp` can prove it theorem finite_toSet_toFinset (s : Finset α) : s.finite_toSet.toFinset = s := by rw [toFinite_toFinset, toFinset_coe] #align finset.finite_to_set_to_finset Finset.finite_toSet_toFinset diff --git a/Mathlib/GroupTheory/Perm/Sign.lean b/Mathlib/GroupTheory/Perm/Sign.lean index 5564e17febe09..4ba9e3feb3c41 100644 --- a/Mathlib/GroupTheory/Perm/Sign.lean +++ b/Mathlib/GroupTheory/Perm/Sign.lean @@ -548,7 +548,7 @@ section SignType.sign variable [Fintype α] ---@[simp] porting note: simp can prove +--@[simp] Porting note (#10618): simp can prove theorem sign_mul (f g : Perm α) : sign (f * g) = sign f * sign g := MonoidHom.map_mul sign f g #align equiv.perm.sign_mul Equiv.Perm.sign_mul @@ -558,7 +558,7 @@ theorem sign_trans (f g : Perm α) : sign (f.trans g) = sign g * sign f := by rw [← mul_def, sign_mul] #align equiv.perm.sign_trans Equiv.Perm.sign_trans ---@[simp] porting note: simp can prove +--@[simp] Porting note (#10618): simp can prove theorem sign_one : sign (1 : Perm α) = 1 := MonoidHom.map_one sign #align equiv.perm.sign_one Equiv.Perm.sign_one @@ -568,7 +568,7 @@ theorem sign_refl : sign (Equiv.refl α) = 1 := MonoidHom.map_one sign #align equiv.perm.sign_refl Equiv.Perm.sign_refl ---@[simp] porting note: simp can prove +--@[simp] Porting note (#10618): simp can prove theorem sign_inv (f : Perm α) : sign f⁻¹ = sign f := by rw [MonoidHom.map_inv sign f, Int.units_inv_eq_self] #align equiv.perm.sign_inv Equiv.Perm.sign_inv diff --git a/Mathlib/LinearAlgebra/Dimension/Constructions.lean b/Mathlib/LinearAlgebra/Dimension/Constructions.lean index e9aaf633781f5..90b25e14a5a41 100644 --- a/Mathlib/LinearAlgebra/Dimension/Constructions.lean +++ b/Mathlib/LinearAlgebra/Dimension/Constructions.lean @@ -319,7 +319,7 @@ theorem FiniteDimensional.finrank_fintype_fun_eq_card : finrank R (η → R) = F #align finite_dimensional.finrank_fintype_fun_eq_card FiniteDimensional.finrank_fintype_fun_eq_card /-- The vector space of functions on `Fin n` has finrank equal to `n`. -/ --- @[simp] -- Porting note: simp already proves this +-- @[simp] -- Porting note (#10618): simp already proves this theorem FiniteDimensional.finrank_fin_fun {n : ℕ} : finrank R (Fin n → R) = n := by simp #align finite_dimensional.finrank_fin_fun FiniteDimensional.finrank_fin_fun diff --git a/Mathlib/MeasureTheory/Integral/IntervalIntegral.lean b/Mathlib/MeasureTheory/Integral/IntervalIntegral.lean index cbc8e6389b28b..46f668d2ef169 100644 --- a/Mathlib/MeasureTheory/Integral/IntervalIntegral.lean +++ b/Mathlib/MeasureTheory/Integral/IntervalIntegral.lean @@ -695,7 +695,7 @@ Porting note: some `@[simp]` attributes in this section were removed to make the happy. TODO: find out if these lemmas are actually good or bad `simp` lemmas. -/ --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_mul_right (hc : c ≠ 0) : (∫ x in a..b, f (x * c)) = c⁻¹ • ∫ x in a * c..b * c, f x := by have A : MeasurableEmbedding fun x => x * c := @@ -709,35 +709,35 @@ theorem integral_comp_mul_right (hc : c ≠ 0) : · simp [h, mul_div_cancel, hc, abs_of_pos] #align interval_integral.integral_comp_mul_right intervalIntegral.integral_comp_mul_right --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_mul_right (c) : (c • ∫ x in a..b, f (x * c)) = ∫ x in a * c..b * c, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_mul_right] #align interval_integral.smul_integral_comp_mul_right intervalIntegral.smul_integral_comp_mul_right --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_mul_left (hc : c ≠ 0) : (∫ x in a..b, f (c * x)) = c⁻¹ • ∫ x in c * a..c * b, f x := by simpa only [mul_comm c] using integral_comp_mul_right f hc #align interval_integral.integral_comp_mul_left intervalIntegral.integral_comp_mul_left --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_mul_left (c) : (c • ∫ x in a..b, f (c * x)) = ∫ x in c * a..c * b, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_mul_left] #align interval_integral.smul_integral_comp_mul_left intervalIntegral.smul_integral_comp_mul_left --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_div (hc : c ≠ 0) : (∫ x in a..b, f (x / c)) = c • ∫ x in a / c..b / c, f x := by simpa only [inv_inv] using integral_comp_mul_right f (inv_ne_zero hc) #align interval_integral.integral_comp_div intervalIntegral.integral_comp_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_smul_integral_comp_div (c) : (c⁻¹ • ∫ x in a..b, f (x / c)) = ∫ x in a / c..b / c, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_div] #align interval_integral.inv_smul_integral_comp_div intervalIntegral.inv_smul_integral_comp_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_add_right (d) : (∫ x in a..b, f (x + d)) = ∫ x in a + d..b + d, f x := have A : MeasurableEmbedding fun x => x + d := (Homeomorph.addRight d).closedEmbedding.measurableEmbedding @@ -747,73 +747,73 @@ theorem integral_comp_add_right (d) : (∫ x in a..b, f (x + d)) = ∫ x in a + _ = ∫ x in a + d..b + d, f x := by rw [map_add_right_eq_self] #align interval_integral.integral_comp_add_right intervalIntegral.integral_comp_add_right --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] nonrec theorem integral_comp_add_left (d) : (∫ x in a..b, f (d + x)) = ∫ x in d + a..d + b, f x := by simpa only [add_comm d] using integral_comp_add_right f d #align interval_integral.integral_comp_add_left intervalIntegral.integral_comp_add_left --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_mul_add (hc : c ≠ 0) (d) : (∫ x in a..b, f (c * x + d)) = c⁻¹ • ∫ x in c * a + d..c * b + d, f x := by rw [← integral_comp_add_right, ← integral_comp_mul_left _ hc] #align interval_integral.integral_comp_mul_add intervalIntegral.integral_comp_mul_add --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_mul_add (c d) : (c • ∫ x in a..b, f (c * x + d)) = ∫ x in c * a + d..c * b + d, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_mul_add] #align interval_integral.smul_integral_comp_mul_add intervalIntegral.smul_integral_comp_mul_add --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_add_mul (hc : c ≠ 0) (d) : (∫ x in a..b, f (d + c * x)) = c⁻¹ • ∫ x in d + c * a..d + c * b, f x := by rw [← integral_comp_add_left, ← integral_comp_mul_left _ hc] #align interval_integral.integral_comp_add_mul intervalIntegral.integral_comp_add_mul --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_add_mul (c d) : (c • ∫ x in a..b, f (d + c * x)) = ∫ x in d + c * a..d + c * b, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_add_mul] #align interval_integral.smul_integral_comp_add_mul intervalIntegral.smul_integral_comp_add_mul --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_div_add (hc : c ≠ 0) (d) : (∫ x in a..b, f (x / c + d)) = c • ∫ x in a / c + d..b / c + d, f x := by simpa only [div_eq_inv_mul, inv_inv] using integral_comp_mul_add f (inv_ne_zero hc) d #align interval_integral.integral_comp_div_add intervalIntegral.integral_comp_div_add --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_smul_integral_comp_div_add (c d) : (c⁻¹ • ∫ x in a..b, f (x / c + d)) = ∫ x in a / c + d..b / c + d, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_div_add] #align interval_integral.inv_smul_integral_comp_div_add intervalIntegral.inv_smul_integral_comp_div_add --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_add_div (hc : c ≠ 0) (d) : (∫ x in a..b, f (d + x / c)) = c • ∫ x in d + a / c..d + b / c, f x := by simpa only [div_eq_inv_mul, inv_inv] using integral_comp_add_mul f (inv_ne_zero hc) d #align interval_integral.integral_comp_add_div intervalIntegral.integral_comp_add_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_smul_integral_comp_add_div (c d) : (c⁻¹ • ∫ x in a..b, f (d + x / c)) = ∫ x in d + a / c..d + b / c, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_add_div] #align interval_integral.inv_smul_integral_comp_add_div intervalIntegral.inv_smul_integral_comp_add_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_mul_sub (hc : c ≠ 0) (d) : (∫ x in a..b, f (c * x - d)) = c⁻¹ • ∫ x in c * a - d..c * b - d, f x := by simpa only [sub_eq_add_neg] using integral_comp_mul_add f hc (-d) #align interval_integral.integral_comp_mul_sub intervalIntegral.integral_comp_mul_sub --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_mul_sub (c d) : (c • ∫ x in a..b, f (c * x - d)) = ∫ x in c * a - d..c * b - d, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_mul_sub] #align interval_integral.smul_integral_comp_mul_sub intervalIntegral.smul_integral_comp_mul_sub --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_sub_mul (hc : c ≠ 0) (d) : (∫ x in a..b, f (d - c * x)) = c⁻¹ • ∫ x in d - c * b..d - c * a, f x := by simp only [sub_eq_add_neg, neg_mul_eq_neg_mul] @@ -821,47 +821,47 @@ theorem integral_comp_sub_mul (hc : c ≠ 0) (d) : simp only [inv_neg, smul_neg, neg_neg, neg_smul] #align interval_integral.integral_comp_sub_mul intervalIntegral.integral_comp_sub_mul --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem smul_integral_comp_sub_mul (c d) : (c • ∫ x in a..b, f (d - c * x)) = ∫ x in d - c * b..d - c * a, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_sub_mul] #align interval_integral.smul_integral_comp_sub_mul intervalIntegral.smul_integral_comp_sub_mul --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_div_sub (hc : c ≠ 0) (d) : (∫ x in a..b, f (x / c - d)) = c • ∫ x in a / c - d..b / c - d, f x := by simpa only [div_eq_inv_mul, inv_inv] using integral_comp_mul_sub f (inv_ne_zero hc) d #align interval_integral.integral_comp_div_sub intervalIntegral.integral_comp_div_sub --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_smul_integral_comp_div_sub (c d) : (c⁻¹ • ∫ x in a..b, f (x / c - d)) = ∫ x in a / c - d..b / c - d, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_div_sub] #align interval_integral.inv_smul_integral_comp_div_sub intervalIntegral.inv_smul_integral_comp_div_sub --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_sub_div (hc : c ≠ 0) (d) : (∫ x in a..b, f (d - x / c)) = c • ∫ x in d - b / c..d - a / c, f x := by simpa only [div_eq_inv_mul, inv_inv] using integral_comp_sub_mul f (inv_ne_zero hc) d #align interval_integral.integral_comp_sub_div intervalIntegral.integral_comp_sub_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inv_smul_integral_comp_sub_div (c d) : (c⁻¹ • ∫ x in a..b, f (d - x / c)) = ∫ x in d - b / c..d - a / c, f x := by by_cases hc : c = 0 <;> simp [hc, integral_comp_sub_div] #align interval_integral.inv_smul_integral_comp_sub_div intervalIntegral.inv_smul_integral_comp_sub_div --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_sub_right (d) : (∫ x in a..b, f (x - d)) = ∫ x in a - d..b - d, f x := by simpa only [sub_eq_add_neg] using integral_comp_add_right f (-d) #align interval_integral.integral_comp_sub_right intervalIntegral.integral_comp_sub_right --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_sub_left (d) : (∫ x in a..b, f (d - x)) = ∫ x in d - b..d - a, f x := by simpa only [one_mul, one_smul, inv_one] using integral_comp_sub_mul f one_ne_zero d #align interval_integral.integral_comp_sub_left intervalIntegral.integral_comp_sub_left --- porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem integral_comp_neg : (∫ x in a..b, f (-x)) = ∫ x in -b..-a, f x := by simpa only [zero_sub] using integral_comp_sub_left f 0 #align interval_integral.integral_comp_neg intervalIntegral.integral_comp_neg diff --git a/Mathlib/Order/Lattice.lean b/Mathlib/Order/Lattice.lean index b5f1142602f9c..81194751bb493 100644 --- a/Mathlib/Order/Lattice.lean +++ b/Mathlib/Order/Lattice.lean @@ -229,7 +229,7 @@ theorem sup_le_sup_right (h₁ : a ≤ b) (c) : a ⊔ c ≤ b ⊔ c := sup_le_sup h₁ le_rfl #align sup_le_sup_right sup_le_sup_right --- Porting note: was @[simp], but now proved by simp so not needed. +-- Porting note (#10618): was @[simp], but now proved by simp so not needed. theorem sup_idem : a ⊔ a = a := by simp #align sup_idem sup_idem @@ -250,11 +250,11 @@ theorem sup_left_right_swap (a b c : α) : a ⊔ b ⊔ c = c ⊔ b ⊔ a := by rw [sup_comm, @sup_comm _ _ a, sup_assoc] #align sup_left_right_swap sup_left_right_swap --- Porting note: was @[simp], but now proved by simp so not needed. +-- Porting note (#10618): was @[simp], but now proved by simp so not needed. theorem sup_left_idem : a ⊔ (a ⊔ b) = a ⊔ b := by simp #align sup_left_idem sup_left_idem --- Porting note: was @[simp], but now proved by simp so not needed. +-- Porting note (#10618): was @[simp], but now proved by simp so not needed. theorem sup_right_idem : a ⊔ b ⊔ b = a ⊔ b := by simp #align sup_right_idem sup_right_idem @@ -475,7 +475,7 @@ theorem inf_le_inf_left (a : α) {b c : α} (h : b ≤ c) : a ⊓ b ≤ a ⊓ c inf_le_inf le_rfl h #align inf_le_inf_left inf_le_inf_left --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inf_idem : a ⊓ a = a := @sup_idem αᵒᵈ _ _ #align inf_idem inf_idem @@ -501,12 +501,12 @@ theorem inf_left_right_swap (a b c : α) : a ⊓ b ⊓ c = c ⊓ b ⊓ a := @sup_left_right_swap αᵒᵈ _ _ _ _ #align inf_left_right_swap inf_left_right_swap --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inf_left_idem : a ⊓ (a ⊓ b) = a ⊓ b := @sup_left_idem αᵒᵈ _ a b #align inf_left_idem inf_left_idem --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem inf_right_idem : a ⊓ b ⊓ b = a ⊓ b := @sup_right_idem αᵒᵈ _ a b #align inf_right_idem inf_right_idem @@ -667,7 +667,7 @@ theorem inf_le_sup : a ⊓ b ≤ a ⊔ b := inf_le_left.trans le_sup_left #align inf_le_sup inf_le_sup --- Porting note: was @[simp] +-- Porting note (#10618): was @[simp] theorem sup_le_inf : a ⊔ b ≤ a ⊓ b ↔ a = b := by simp [le_antisymm_iff, and_comm] #align sup_le_inf sup_le_inf diff --git a/Mathlib/RingTheory/HahnSeries/Basic.lean b/Mathlib/RingTheory/HahnSeries/Basic.lean index 4d5f1da5ca141..ddda758858f73 100644 --- a/Mathlib/RingTheory/HahnSeries/Basic.lean +++ b/Mathlib/RingTheory/HahnSeries/Basic.lean @@ -193,7 +193,7 @@ theorem eq_of_mem_support_single {b : Γ} (h : b ∈ support (single a r)) : b = support_single_subset h #align hahn_series.eq_of_mem_support_single HahnSeries.eq_of_mem_support_single ---@[simp] Porting note: simp can prove it +--@[simp] Porting note (#10618): simp can prove it theorem single_eq_zero : single a (0 : R) = 0 := (single a).map_zero #align hahn_series.single_eq_zero HahnSeries.single_eq_zero diff --git a/Mathlib/RingTheory/HahnSeries/Multiplication.lean b/Mathlib/RingTheory/HahnSeries/Multiplication.lean index cd461c644363b..6b245fd96d60a 100644 --- a/Mathlib/RingTheory/HahnSeries/Multiplication.lean +++ b/Mathlib/RingTheory/HahnSeries/Multiplication.lean @@ -458,12 +458,12 @@ def C : R →+* HahnSeries Γ R where map_mul' x y := by rw [single_mul_single, zero_add] #align hahn_series.C HahnSeries.C ---@[simp] Porting note: simp can prove it +--@[simp] Porting note (#10618): simp can prove it theorem C_zero : C (0 : R) = (0 : HahnSeries Γ R) := C.map_zero #align hahn_series.C_zero HahnSeries.C_zero ---@[simp] Porting note: simp can prove it +--@[simp] Porting note (#10618): simp can prove it theorem C_one : C (1 : R) = (1 : HahnSeries Γ R) := C.map_one #align hahn_series.C_one HahnSeries.C_one diff --git a/Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean b/Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean index 8e7ca17b564b6..f44d06e41a030 100644 --- a/Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean +++ b/Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean @@ -34,7 +34,7 @@ theorem eval_one_cyclotomic_prime {R : Type*} [CommRing R] {p : ℕ} [hn : Fact Finset.card_range, smul_one_eq_coe] #align polynomial.eval_one_cyclotomic_prime Polynomial.eval_one_cyclotomic_prime --- @[simp] -- Porting note: simp already proves this +-- @[simp] -- Porting note (#10618): simp already proves this theorem eval₂_one_cyclotomic_prime {R S : Type*} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ} [Fact p.Prime] : eval₂ f 1 (cyclotomic p R) = p := by simp #align polynomial.eval₂_one_cyclotomic_prime Polynomial.eval₂_one_cyclotomic_prime @@ -46,7 +46,7 @@ theorem eval_one_cyclotomic_prime_pow {R : Type*} [CommRing R] {p : ℕ} (k : eval_finset_sum, Finset.card_range, smul_one_eq_coe] #align polynomial.eval_one_cyclotomic_prime_pow Polynomial.eval_one_cyclotomic_prime_pow --- @[simp] -- Porting note: simp already proves this +-- @[simp] -- Porting note (#10618): simp already proves this theorem eval₂_one_cyclotomic_prime_pow {R S : Type*} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ} (k : ℕ) [Fact p.Prime] : eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = p := by simp #align polynomial.eval₂_one_cyclotomic_prime_pow Polynomial.eval₂_one_cyclotomic_prime_pow