From d305c85e699234a5e90a3c4adbe37430ccf171ce Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Sat, 19 Aug 2023 10:14:32 -0500 Subject: [PATCH] Snapshot --- Archive/Wiedijk100Theorems/BallotProblem.lean | 2 +- Archive/Wiedijk100Theorems/Partition.lean | 2 +- Counterexamples/HomogeneousPrimeNotPrime.lean | 6 ++--- Counterexamples/Phillips.lean | 2 +- .../Algebra/Algebra/NonUnitalSubalgebra.lean | 4 +-- Mathlib/Algebra/Algebra/Unitization.lean | 24 ++++++++--------- Mathlib/Algebra/BigOperators/Fin.lean | 4 +-- .../Category/ModuleCat/Adjunctions.lean | 2 +- .../Algebra/Category/Ring/Constructions.lean | 2 +- Mathlib/Algebra/CharP/Basic.lean | 10 +++---- Mathlib/Algebra/CharP/CharAndCard.lean | 6 ++--- .../Computation/Approximations.lean | 2 +- Mathlib/Algebra/CubicDiscriminant.lean | 6 ++--- Mathlib/Algebra/DirectLimit.lean | 2 +- Mathlib/Algebra/DirectSum/Internal.lean | 20 +++++++------- Mathlib/Algebra/DualNumber.lean | 2 +- Mathlib/Algebra/FreeAlgebra.lean | 10 +++---- Mathlib/Algebra/Group/Pi.lean | 4 +-- Mathlib/Algebra/Module/LocalizedModule.lean | 4 +-- Mathlib/Algebra/MonoidAlgebra/Basic.lean | 4 +-- .../Algebra/MonoidAlgebra/NoZeroDivisors.lean | 2 +- Mathlib/Algebra/Order/CompleteField.lean | 2 +- Mathlib/Algebra/QuadraticDiscriminant.lean | 2 +- Mathlib/Algebra/Ring/BooleanRing.lean | 2 +- Mathlib/Algebra/Squarefree.lean | 2 +- Mathlib/Algebra/Star/CHSH.lean | 2 +- Mathlib/Algebra/Star/Order.lean | 2 +- Mathlib/Algebra/Symmetrized.lean | 10 +++---- Mathlib/Algebra/TrivSqZeroExt.lean | 10 +++---- .../Morphisms/QuasiCompact.lean | 2 +- .../Morphisms/QuasiSeparated.lean | 2 +- Mathlib/AlgebraicGeometry/StructureSheaf.lean | 4 +-- Mathlib/Analysis/Analytic/Basic.lean | 2 +- Mathlib/Analysis/Analytic/Inverse.lean | 2 +- Mathlib/Analysis/Asymptotics/Asymptotics.lean | 8 +++--- .../Asymptotics/SuperpolynomialDecay.lean | 10 +++---- .../BumpFunction/FiniteDimension.lean | 4 +-- Mathlib/Analysis/Calculus/Deriv/Mul.lean | 4 +-- Mathlib/Analysis/Calculus/Deriv/ZPow.lean | 4 +-- .../Analysis/Calculus/FDeriv/Symmetric.lean | 4 +-- Mathlib/Analysis/Calculus/Monotone.lean | 2 +- Mathlib/Analysis/Complex/Circle.lean | 2 +- Mathlib/Analysis/Complex/UnitDisc/Basic.lean | 4 +-- .../Complex/UpperHalfPlane/Basic.lean | 10 +++---- .../Complex/UpperHalfPlane/Metric.lean | 2 +- Mathlib/Analysis/ConstantSpeed.lean | 6 ++--- Mathlib/Analysis/Convex/Caratheodory.lean | 2 +- Mathlib/Analysis/Convex/Segment.lean | 8 +++--- .../Convex/SpecificFunctions/Deriv.lean | 8 +++--- Mathlib/Analysis/Fourier/AddCircle.lean | 2 +- .../Analysis/Fourier/FourierTransform.lean | 2 +- Mathlib/Analysis/InnerProductSpace/Basic.lean | 12 ++++----- .../InnerProductSpace/GramSchmidtOrtho.lean | 2 +- .../InnerProductSpace/LaxMilgram.lean | 2 +- .../Analysis/InnerProductSpace/OfNorm.lean | 10 +++---- .../InnerProductSpace/Orthogonal.lean | 2 +- .../InnerProductSpace/Projection.lean | 8 +++--- .../Analysis/InnerProductSpace/Symmetric.lean | 4 +-- .../Analysis/InnerProductSpace/TwoDim.lean | 2 +- .../Analysis/LocallyConvex/WithSeminorms.lean | 2 +- Mathlib/Analysis/MeanInequalities.lean | 4 +-- Mathlib/Analysis/Normed/Group/AddCircle.lean | 4 +-- Mathlib/Analysis/Normed/Ring/Seminorm.lean | 6 ++--- Mathlib/Analysis/NormedSpace/Banach.lean | 2 +- Mathlib/Analysis/NormedSpace/ENorm.lean | 2 +- Mathlib/Analysis/NormedSpace/Extend.lean | 2 +- .../NormedSpace/HahnBanach/Extension.lean | 6 ++--- Mathlib/Analysis/NormedSpace/IsROrC.lean | 2 +- Mathlib/Analysis/NormedSpace/MStructure.lean | 10 +++---- Mathlib/Analysis/NormedSpace/Multilinear.lean | 4 +-- .../Analysis/NormedSpace/OperatorNorm.lean | 8 +++--- .../NormedSpace/QuaternionExponential.lean | 6 ++--- Mathlib/Analysis/NormedSpace/Spectrum.lean | 4 +-- .../Analysis/NormedSpace/Star/Multiplier.lean | 2 +- Mathlib/Analysis/ODE/Gronwall.lean | 14 +++++----- Mathlib/Analysis/Seminorm.lean | 8 +++--- .../SpecialFunctions/Complex/Arg.lean | 6 ++--- .../SpecialFunctions/Gamma/Basic.lean | 2 +- .../Analysis/SpecialFunctions/Gamma/Beta.lean | 6 ++--- .../Analysis/SpecialFunctions/Gaussian.lean | 8 +++--- .../Analysis/SpecialFunctions/PolarCoord.lean | 2 +- .../SpecialFunctions/Polynomials.lean | 4 +-- .../SpecialFunctions/Pow/Asymptotics.lean | 2 +- .../SpecialFunctions/Pow/Complex.lean | 6 ++--- .../Analysis/SpecialFunctions/Pow/Deriv.lean | 4 +-- .../Analysis/SpecialFunctions/Pow/NNReal.lean | 2 +- .../Analysis/SpecialFunctions/Pow/Real.lean | 6 ++--- Mathlib/Analysis/SpecialFunctions/Sqrt.lean | 2 +- .../Analysis/SpecialFunctions/Stirling.lean | 2 +- .../SpecialFunctions/Trigonometric/Angle.lean | 10 +++---- .../SpecialFunctions/Trigonometric/Basic.lean | 4 +-- .../Trigonometric/Chebyshev.lean | 2 +- .../Trigonometric/Complex.lean | 8 +++--- .../Trigonometric/EulerSineProd.lean | 18 ++++++------- .../Trigonometric/Series.lean | 2 +- Mathlib/Analysis/SpecificLimits/Basic.lean | 4 +-- Mathlib/Analysis/SpecificLimits/FloorPow.lean | 4 +-- Mathlib/CategoryTheory/Closed/Cartesian.lean | 2 +- Mathlib/Combinatorics/Additive/Behrend.lean | 2 +- .../Combinatorics/SimpleGraph/DegreeSum.lean | 2 +- .../SimpleGraph/Regularity/Lemma.lean | 2 +- Mathlib/Data/IsROrC/Basic.lean | 8 +++--- Mathlib/Data/Matrix/Basic.lean | 4 +-- Mathlib/Data/Matrix/Block.lean | 2 +- Mathlib/Data/Matrix/Hadamard.lean | 6 ++--- Mathlib/Data/Matrix/Kronecker.lean | 12 ++++----- Mathlib/Data/MvPolynomial/Basic.lean | 6 ++--- Mathlib/Data/MvPolynomial/Variables.lean | 4 +-- Mathlib/Data/Nat/Totient.lean | 4 +-- Mathlib/Data/Num/Lemmas.lean | 4 +-- Mathlib/Data/Ordmap/Ordset.lean | 2 +- Mathlib/Data/Polynomial/DenomsClearable.lean | 2 +- Mathlib/Data/Polynomial/Div.lean | 12 ++++----- Mathlib/Data/Polynomial/Expand.lean | 4 +-- Mathlib/Data/Polynomial/FieldDivision.lean | 10 +++---- Mathlib/Data/Polynomial/HasseDeriv.lean | 18 ++++++------- Mathlib/Data/Polynomial/Laurent.lean | 4 +-- Mathlib/Data/Polynomial/Mirror.lean | 8 +++--- Mathlib/Data/Polynomial/RingDivision.lean | 14 +++++----- Mathlib/Data/Polynomial/Splits.lean | 4 +-- Mathlib/Data/Polynomial/Taylor.lean | 2 +- Mathlib/Data/Polynomial/UnitTrinomial.lean | 2 +- Mathlib/Data/Real/Pi/Wallis.lean | 2 +- Mathlib/Data/ZMod/Basic.lean | 12 ++++----- Mathlib/Dynamics/Ergodic/Conservative.lean | 2 +- Mathlib/FieldTheory/ChevalleyWarning.lean | 2 +- Mathlib/FieldTheory/Finite/Basic.lean | 2 +- .../IsAlgClosed/AlgebraicClosure.lean | 2 +- Mathlib/FieldTheory/Minpoly/Basic.lean | 2 +- Mathlib/FieldTheory/Minpoly/Field.lean | 2 +- .../Minpoly/IsIntegrallyClosed.lean | 2 +- Mathlib/FieldTheory/Normal.lean | 2 +- .../FieldTheory/PolynomialGaloisGroup.lean | 4 +-- Mathlib/FieldTheory/RatFunc.lean | 2 +- Mathlib/FieldTheory/Separable.lean | 6 ++--- Mathlib/FieldTheory/SeparableDegree.lean | 2 +- .../SplittingField/Construction.lean | 2 +- Mathlib/FieldTheory/Tower.lean | 2 +- .../Euclidean/Angle/Oriented/Basic.lean | 6 ++--- .../Euclidean/Angle/Oriented/Rotation.lean | 6 ++--- .../Euclidean/Angle/Unoriented/Basic.lean | 8 +++--- .../Angle/Unoriented/RightAngle.lean | 2 +- Mathlib/Geometry/Euclidean/Basic.lean | 2 +- .../Geometry/Euclidean/Inversion/Basic.lean | 6 ++--- Mathlib/Geometry/Euclidean/MongePoint.lean | 2 +- Mathlib/Geometry/Euclidean/Sphere/Power.lean | 2 +- .../Euclidean/Sphere/SecondInter.lean | 2 +- Mathlib/Geometry/Euclidean/Triangle.lean | 6 ++--- .../Manifold/Algebra/SmoothFunctions.lean | 4 +-- Mathlib/GroupTheory/Schreier.lean | 2 +- .../GroupTheory/SpecificGroups/Cyclic.lean | 2 +- .../SpecificGroups/Quaternion.lean | 4 +-- Mathlib/LinearAlgebra/BilinearForm.lean | 18 ++++++------- Mathlib/LinearAlgebra/Charpoly/Basic.lean | 2 +- .../CliffordAlgebra/Contraction.lean | 4 +-- .../LinearAlgebra/CliffordAlgebra/Equivs.lean | 2 +- .../LinearAlgebra/CliffordAlgebra/Even.lean | 2 +- .../CliffordAlgebra/EvenEquiv.lean | 2 +- Mathlib/LinearAlgebra/Determinant.lean | 2 +- Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean | 2 +- .../LinearAlgebra/ExteriorAlgebra/Basic.lean | 8 +++--- Mathlib/LinearAlgebra/Lagrange.lean | 8 +++--- Mathlib/LinearAlgebra/Matrix/Adjugate.lean | 6 ++--- Mathlib/LinearAlgebra/Matrix/Block.lean | 4 +-- .../LinearAlgebra/Matrix/Charpoly/Coeff.lean | 2 +- Mathlib/LinearAlgebra/Matrix/Determinant.lean | 12 ++++----- Mathlib/LinearAlgebra/Matrix/DotProduct.lean | 2 +- .../Matrix/SpecialLinearGroup.lean | 2 +- Mathlib/LinearAlgebra/Matrix/ToLin.lean | 2 +- .../LinearAlgebra/Matrix/Transvection.lean | 4 +-- Mathlib/LinearAlgebra/Matrix/ZPow.lean | 2 +- .../LinearAlgebra/QuadraticForm/Complex.lean | 4 +-- Mathlib/LinearAlgebra/QuadraticForm/Real.lean | 4 +-- Mathlib/LinearAlgebra/Vandermonde.lean | 2 +- .../MeasureTheory/Constructions/Polish.lean | 2 +- .../Constructions/Prod/Basic.lean | 4 +-- .../MeasureTheory/Covering/Besicovitch.lean | 4 +-- .../Covering/Differentiation.lean | 8 +++--- .../MeasureTheory/Covering/LiminfLimsup.lean | 4 +-- .../Decomposition/UnsignedHahn.lean | 2 +- .../Function/ConditionalExpectation/Real.lean | 10 +++---- .../Function/ConvergenceInMeasure.lean | 2 +- Mathlib/MeasureTheory/Function/Jacobian.lean | 18 ++++++------- .../MeasureTheory/Function/LpSeminorm.lean | 8 +++--- .../MeasureTheory/Function/SimpleFunc.lean | 6 ++--- .../Function/StronglyMeasurable/Basic.lean | 2 +- .../Function/UniformIntegrable.lean | 4 +-- Mathlib/MeasureTheory/Integral/Average.lean | 2 +- Mathlib/MeasureTheory/Integral/Bochner.lean | 4 +-- .../Integral/IntegralEqImproper.lean | 2 +- Mathlib/MeasureTheory/Integral/Layercake.lean | 6 ++--- Mathlib/MeasureTheory/Integral/Lebesgue.lean | 8 +++--- .../Integral/MeanInequalities.lean | 4 +-- .../MeasureTheory/Integral/PeakFunction.lean | 4 +-- .../MeasureTheory/Integral/SetIntegral.lean | 2 +- Mathlib/MeasureTheory/Integral/SetToL1.lean | 4 +-- .../Integral/VitaliCaratheodory.lean | 6 ++--- Mathlib/MeasureTheory/Measure/Doubling.lean | 2 +- .../MeasureTheory/Measure/FiniteMeasure.lean | 4 +-- Mathlib/MeasureTheory/Measure/GiryMonad.lean | 4 +-- .../MeasureTheory/Measure/Haar/OfBasis.lean | 2 +- Mathlib/MeasureTheory/Measure/Hausdorff.lean | 6 ++--- .../MeasureTheory/Measure/Lebesgue/Basic.lean | 4 +-- .../Measure/ProbabilityMeasure.lean | 2 +- Mathlib/NumberTheory/ArithmeticFunction.lean | 6 ++--- Mathlib/NumberTheory/Bernoulli.lean | 2 +- .../NumberTheory/BernoulliPolynomials.lean | 6 ++--- .../NumberTheory/Cyclotomic/Discriminant.lean | 2 +- .../DiophantineApproximation.lean | 6 ++--- Mathlib/NumberTheory/FunctionField.lean | 4 +-- Mathlib/NumberTheory/KummerDedekind.lean | 2 +- .../LegendreSymbol/AddCharacter.lean | 2 +- .../NumberTheory/LegendreSymbol/Basic.lean | 4 +-- .../NumberTheory/LegendreSymbol/GaussSum.lean | 4 +-- .../LegendreSymbol/JacobiSymbol.lean | 2 +- .../LegendreSymbol/MulCharacter.lean | 4 +-- .../LegendreSymbol/QuadraticChar/Basic.lean | 4 +-- .../QuadraticChar/GaussSum.lean | 2 +- .../LegendreSymbol/QuadraticReciprocity.lean | 2 +- Mathlib/NumberTheory/Modular.lean | 2 +- .../ModularForms/CongruenceSubgroups.lean | 2 +- .../ModularForms/JacobiTheta/Basic.lean | 4 +-- .../ModularForms/SlashActions.lean | 2 +- Mathlib/NumberTheory/Multiplicity.lean | 2 +- .../NumberTheory/NumberField/Embeddings.lean | 2 +- Mathlib/NumberTheory/Padics/Hensel.lean | 4 +-- .../NumberTheory/Padics/PadicIntegers.lean | 2 +- Mathlib/NumberTheory/Padics/PadicNumbers.lean | 8 +++--- Mathlib/NumberTheory/Padics/RingHoms.lean | 4 +-- Mathlib/NumberTheory/Pell.lean | 10 +++---- Mathlib/NumberTheory/PythagoreanTriples.lean | 8 +++--- Mathlib/NumberTheory/RamificationInertia.lean | 2 +- Mathlib/NumberTheory/ZetaFunction.lean | 12 ++++----- Mathlib/NumberTheory/ZetaValues.lean | 6 ++--- Mathlib/NumberTheory/Zsqrtd/Basic.lean | 6 ++--- Mathlib/Probability/CondCount.lean | 2 +- Mathlib/Probability/Independence/Kernel.lean | 2 +- Mathlib/Probability/Integration.lean | 4 +-- Mathlib/Probability/Kernel/Composition.lean | 2 +- .../Probability/Kernel/Disintegration.lean | 8 +++--- .../Probability/Martingale/Upcrossing.lean | 4 +-- .../Constructions.lean | 4 +-- .../ProbabilityMassFunction/Monad.lean | 10 +++---- Mathlib/Probability/StrongLaw.lean | 2 +- .../GroupCohomology/Resolution.lean | 4 +-- Mathlib/RingTheory/AdjoinRoot.lean | 4 +-- Mathlib/RingTheory/Algebraic.lean | 4 +-- Mathlib/RingTheory/ClassGroup.lean | 2 +- .../DedekindDomain/AdicValuation.lean | 4 +-- Mathlib/RingTheory/DedekindDomain/Ideal.lean | 6 ++--- Mathlib/RingTheory/Discriminant.lean | 2 +- Mathlib/RingTheory/EisensteinCriterion.lean | 8 +++--- Mathlib/RingTheory/FractionalIdeal.lean | 8 +++--- Mathlib/RingTheory/FreeCommRing.lean | 2 +- Mathlib/RingTheory/GradedAlgebra/Basic.lean | 8 +++--- Mathlib/RingTheory/HahnSeries.lean | 18 ++++++------- Mathlib/RingTheory/Henselian.lean | 2 +- Mathlib/RingTheory/Ideal/Norm.lean | 4 +-- Mathlib/RingTheory/IntegralClosure.lean | 10 +++---- Mathlib/RingTheory/IntegralDomain.lean | 2 +- Mathlib/RingTheory/IsAdjoinRoot.lean | 2 +- Mathlib/RingTheory/IsTensorProduct.lean | 4 +-- Mathlib/RingTheory/Kaehler.lean | 4 +-- Mathlib/RingTheory/LocalProperties.lean | 6 ++--- Mathlib/RingTheory/Localization/Integral.lean | 6 ++--- .../LocalizationLocalization.lean | 2 +- Mathlib/RingTheory/Localization/NumDen.lean | 2 +- .../RingTheory/MvPolynomial/Homogeneous.lean | 2 +- .../MvPolynomial/WeightedHomogeneous.lean | 2 +- Mathlib/RingTheory/Nilpotent.lean | 10 +++---- .../RingTheory/NonUnitalSubring/Basic.lean | 8 +++--- Mathlib/RingTheory/Nullstellensatz.lean | 2 +- Mathlib/RingTheory/Perfection.lean | 8 +++--- Mathlib/RingTheory/Polynomial/Basic.lean | 4 +-- Mathlib/RingTheory/Polynomial/Bernstein.lean | 6 ++--- .../Polynomial/Cyclotomic/Basic.lean | 2 +- Mathlib/RingTheory/Polynomial/Dickson.lean | 4 +-- .../RingTheory/Polynomial/Hermite/Basic.lean | 6 ++--- .../RingTheory/Polynomial/RationalRoot.lean | 2 +- Mathlib/RingTheory/PolynomialAlgebra.lean | 2 +- Mathlib/RingTheory/PowerBasis.lean | 2 +- Mathlib/RingTheory/PowerSeries/Basic.lean | 26 +++++++++---------- Mathlib/RingTheory/PrincipalIdealDomain.lean | 4 +-- Mathlib/RingTheory/RootsOfUnity/Basic.lean | 4 +-- Mathlib/RingTheory/RootsOfUnity/Complex.lean | 2 +- Mathlib/RingTheory/TensorProduct.lean | 14 +++++----- .../RingTheory/UniqueFactorizationDomain.lean | 18 ++++++------- Mathlib/RingTheory/Valuation/Basic.lean | 2 +- .../RingTheory/Valuation/ValuationRing.lean | 8 +++--- Mathlib/RingTheory/WittVector/Defs.lean | 4 +-- Mathlib/RingTheory/WittVector/Frobenius.lean | 2 +- Mathlib/RingTheory/WittVector/IsPoly.lean | 4 +-- Mathlib/RingTheory/WittVector/MulP.lean | 4 +-- .../RingTheory/WittVector/Verschiebung.lean | 2 +- .../RingTheory/WittVector/WittPolynomial.lean | 2 +- .../Algebra/Module/CharacterSpace.lean | 2 +- .../Algebra/Nonarchimedean/Basic.lean | 2 +- Mathlib/Topology/Algebra/Valuation.lean | 4 +-- .../Topology/ContinuousFunction/Ideals.lean | 2 +- .../ContinuousFunction/ZeroAtInfty.lean | 2 +- Mathlib/Topology/MetricSpace/Closeds.lean | 2 +- Mathlib/Topology/MetricSpace/Dilation.lean | 2 +- Mathlib/Topology/MetricSpace/PiNat.lean | 2 +- Mathlib/Topology/PartitionOfUnity.lean | 2 +- Mathlib/Topology/TietzeExtension.lean | 2 +- 305 files changed, 707 insertions(+), 707 deletions(-) diff --git a/Archive/Wiedijk100Theorems/BallotProblem.lean b/Archive/Wiedijk100Theorems/BallotProblem.lean index 4b8078bae0315..191f8eb2e7a15 100644 --- a/Archive/Wiedijk100Theorems/BallotProblem.lean +++ b/Archive/Wiedijk100Theorems/BallotProblem.lean @@ -242,7 +242,7 @@ theorem first_vote_pos : exact subset_union_left _ _ rw [(condCount_eq_zero_iff <| (countedSequence_finite _ _).image _).2 this, condCount, cond_apply _ list_int_measurableSet, hint, count_injective_image List.cons_injective, - count_countedSequence, count_countedSequence, one_mul, MulZeroClass.zero_mul, add_zero, + count_countedSequence, count_countedSequence, one_mul, zero_mul, add_zero, Nat.cast_add, Nat.cast_one] · rw [mul_comm, ← div_eq_mul_inv, ENNReal.div_eq_div_iff] · norm_cast diff --git a/Archive/Wiedijk100Theorems/Partition.lean b/Archive/Wiedijk100Theorems/Partition.lean index 3e1e6162c341c..06eca4e9e8f53 100644 --- a/Archive/Wiedijk100Theorems/Partition.lean +++ b/Archive/Wiedijk100Theorems/Partition.lean @@ -289,7 +289,7 @@ theorem num_series' [Field α] (i : ℕ) : rw [Nat.mul_sub_left_distrib, ← hp, ← a_left, mul_one, Nat.add_sub_cancel] · rintro ⟨rfl, rfl⟩ match p with - | 0 => rw [MulZeroClass.mul_zero] at hp; cases hp + | 0 => rw [mul_zero] at hp; cases hp | p + 1 => rw [hp]; simp [mul_add] · suffices (filter (fun a : ℕ × ℕ => i + 1 ∣ a.fst ∧ a.snd = i + 1) (Nat.antidiagonal n.succ)).card = diff --git a/Counterexamples/HomogeneousPrimeNotPrime.lean b/Counterexamples/HomogeneousPrimeNotPrime.lean index c3c1a2bf219aa..6e5f13a6523e5 100644 --- a/Counterexamples/HomogeneousPrimeNotPrime.lean +++ b/Counterexamples/HomogeneousPrimeNotPrime.lean @@ -89,9 +89,9 @@ theorem grading.mul_mem : a * b ∈ grading R (i + j) | 0, 0, a, b, (ha : a.1 = a.2), (hb : b.1 = b.2) => show a.1 * b.1 = a.2 * b.2 by rw [ha, hb] | 0, 1, a, b, (_ : a.1 = a.2), (hb : b.1 = 0) => - show a.1 * b.1 = 0 by rw [hb, MulZeroClass.mul_zero] - | 1, 0, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul] - | 1, 1, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul] + show a.1 * b.1 = 0 by rw [hb, mul_zero] + | 1, 0, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, zero_mul] + | 1, 1, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, zero_mul] #align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.mul_mem Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.mul_mem end diff --git a/Counterexamples/Phillips.lean b/Counterexamples/Phillips.lean index 98c2b06fb3968..3ba49625aefce 100644 --- a/Counterexamples/Phillips.lean +++ b/Counterexamples/Phillips.lean @@ -313,7 +313,7 @@ theorem exists_discrete_support_nonpos (f : BoundedAdditiveMeasure α) : have I2 : ∀ n : ℕ, (n : ℝ) * (ε / 2) ≤ f ↑(s n) := by intro n induction' n with n IH - · simp only [BoundedAdditiveMeasure.empty, id.def, Nat.cast_zero, MulZeroClass.zero_mul, + · simp only [BoundedAdditiveMeasure.empty, id.def, Nat.cast_zero, zero_mul, Function.iterate_zero, Subtype.coe_mk, Nat.zero_eq] rfl · have : (↑(s (n + 1)) : Set α) = ↑(s (n + 1)) \ ↑(s n) ∪ ↑(s n) := by diff --git a/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean b/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean index 7ac2eda7ceb15..fde72a33e1248 100644 --- a/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean +++ b/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean @@ -502,10 +502,10 @@ def adjoin (s : Set A) : NonUnitalSubalgebra R A := · refine' Submodule.span_induction hb _ _ _ _ · exact fun x (hx : x ∈ NonUnitalSubsemiring.closure s) y (hy : y ∈ NonUnitalSubsemiring.closure s) => Submodule.subset_span (mul_mem hy hx) - · exact fun x _hx => (MulZeroClass.mul_zero x).symm ▸ Submodule.zero_mem _ + · exact fun x _hx => (mul_zero x).symm ▸ Submodule.zero_mem _ · exact fun x y hx hy z hz => (mul_add z x y).symm ▸ add_mem (hx z hz) (hy z hz) · exact fun r x hx y hy => (mul_smul_comm r y x).symm ▸ SMulMemClass.smul_mem r (hx y hy) - · exact (MulZeroClass.zero_mul b).symm ▸ Submodule.zero_mem _ + · exact (zero_mul b).symm ▸ Submodule.zero_mem _ · exact fun x y => (add_mul x y b).symm ▸ add_mem · exact fun r x hx => (smul_mul_assoc r x b).symm ▸ SMulMemClass.smul_mem r hx } diff --git a/Mathlib/Algebra/Algebra/Unitization.lean b/Mathlib/Algebra/Algebra/Unitization.lean index 8a419177f154e..bcc514bc3823c 100644 --- a/Mathlib/Algebra/Algebra/Unitization.lean +++ b/Mathlib/Algebra/Algebra/Unitization.lean @@ -403,7 +403,7 @@ theorem inl_mul [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] (inl (r₁ * r₂) : Unitization R A) = inl r₁ * inl r₂ := ext rfl <| show (0 : A) = r₁ • (0 : A) + r₂ • (0 : A) + 0 * 0 by - simp only [smul_zero, add_zero, MulZeroClass.mul_zero] + simp only [smul_zero, add_zero, mul_zero] #align unitization.inl_mul Unitization.inl_mul theorem inl_mul_inl [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] (r₁ r₂ : R) : @@ -420,7 +420,7 @@ variable (R) @[simp] theorem inr_mul [Semiring R] [AddCommMonoid A] [Mul A] [SMulWithZero R A] (a₁ a₂ : A) : (↑(a₁ * a₂) : Unitization R A) = a₁ * a₂ := - ext (MulZeroClass.mul_zero _).symm <| + ext (mul_zero _).symm <| show a₁ * a₂ = (0 : R) • a₂ + (0 : R) • a₁ + a₁ * a₂ by simp only [zero_smul, zero_add] #align unitization.coe_mul Unitization.inr_mul @@ -428,16 +428,16 @@ end theorem inl_mul_inr [Semiring R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] (r : R) (a : A) : ((inl r : Unitization R A) * a) = ↑(r • a) := - ext (MulZeroClass.mul_zero r) <| + ext (mul_zero r) <| show r • a + (0 : R) • (0 : A) + 0 * a = r • a by - rw [smul_zero, add_zero, MulZeroClass.zero_mul, add_zero] + rw [smul_zero, add_zero, zero_mul, add_zero] #align unitization.inl_mul_coe Unitization.inl_mul_inr theorem inr_mul_inl [Semiring R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] (r : R) (a : A) : a * (inl r : Unitization R A) = ↑(r • a) := - ext (MulZeroClass.zero_mul r) <| + ext (zero_mul r) <| show (0 : R) • (0 : A) + r • a + a * 0 = r • a by - rw [smul_zero, zero_add, MulZeroClass.mul_zero, add_zero] + rw [smul_zero, zero_add, mul_zero, add_zero] #align unitization.coe_mul_inl Unitization.inr_mul_inl instance instMulOneClass [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] : @@ -446,11 +446,11 @@ instance instMulOneClass [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAct one_mul := fun x => ext (one_mul x.1) <| show (1 : R) • x.2 + x.1 • (0 : A) + 0 * x.2 = x.2 by - rw [one_smul, smul_zero, add_zero, MulZeroClass.zero_mul, add_zero] + rw [one_smul, smul_zero, add_zero, zero_mul, add_zero] mul_one := fun x => ext (mul_one x.1) <| show (x.1 • (0 : A)) + (1 : R) • x.2 + x.2 * (0 : A) = x.2 by - rw [smul_zero, zero_add, one_smul, MulZeroClass.mul_zero, add_zero] } + rw [smul_zero, zero_add, one_smul, mul_zero, add_zero] } #align unitization.mul_one_class Unitization.instMulOneClass instance instNonAssocSemiring [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A] : @@ -458,13 +458,13 @@ instance instNonAssocSemiring [Semiring R] [NonUnitalNonAssocSemiring A] [Module { Unitization.instMulOneClass, Unitization.instAddCommMonoid with zero_mul := fun x => - ext (MulZeroClass.zero_mul x.1) <| + ext (zero_mul x.1) <| show (0 : R) • x.2 + x.1 • (0 : A) + 0 * x.2 = 0 by - rw [zero_smul, zero_add, smul_zero, MulZeroClass.zero_mul, add_zero] + rw [zero_smul, zero_add, smul_zero, zero_mul, add_zero] mul_zero := fun x => - ext (MulZeroClass.mul_zero x.1) <| + ext (mul_zero x.1) <| show x.1 • (0 : A) + (0 : R) • x.2 + x.2 * 0 = 0 by - rw [smul_zero, zero_add, zero_smul, MulZeroClass.mul_zero, add_zero] + rw [smul_zero, zero_add, zero_smul, mul_zero, add_zero] left_distrib := fun x₁ x₂ x₃ => ext (mul_add x₁.1 x₂.1 x₃.1) <| show x₁.1 • (x₂.2 + x₃.2) + (x₂.1 + x₃.1) • x₁.2 + x₁.2 * (x₂.2 + x₃.2) = diff --git a/Mathlib/Algebra/BigOperators/Fin.lean b/Mathlib/Algebra/BigOperators/Fin.lean index c9c142c10d973..c109e5c7d8409 100644 --- a/Mathlib/Algebra/BigOperators/Fin.lean +++ b/Mathlib/Algebra/BigOperators/Fin.lean @@ -353,7 +353,7 @@ theorem finFunctionFinEquiv_single {m n : ℕ} [NeZero m] (i : Fin n) (j : Fin m (finFunctionFinEquiv (Pi.single i j) : ℕ) = j * m ^ (i : ℕ) := by rw [finFunctionFinEquiv_apply, Fintype.sum_eq_single i, Pi.single_eq_same] rintro x hx - rw [Pi.single_eq_of_ne hx, Fin.val_zero', MulZeroClass.zero_mul] + rw [Pi.single_eq_of_ne hx, Fin.val_zero', zero_mul] #align fin_function_fin_equiv_single finFunctionFinEquiv_single /-- Equivalence between `∀ i : Fin m, Fin (n i)` and `Fin (∏ i : Fin m, n i)`. -/ @@ -437,7 +437,7 @@ theorem finPiFinEquiv_single {m : ℕ} {n : Fin m → ℕ} [∀ i, NeZero (n i)] j * ∏ j, n (Fin.castLE i.is_lt.le j) := by rw [finPiFinEquiv_apply, Fintype.sum_eq_single i, Pi.single_eq_same] rintro x hx - rw [Pi.single_eq_of_ne hx, Fin.val_zero', MulZeroClass.zero_mul] + rw [Pi.single_eq_of_ne hx, Fin.val_zero', zero_mul] #align fin_pi_fin_equiv_single finPiFinEquiv_single namespace List diff --git a/Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean b/Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean index 23987d20df11c..fdd94f25941f2 100644 --- a/Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean +++ b/Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean @@ -270,7 +270,7 @@ instance categoryFree : Category (Free R C) where -- This imitates the proof of associativity for `MonoidAlgebra`. simp only [sum_sum_index, sum_single_index, single_zero, single_add, eq_self_iff_true, forall_true_iff, forall₃_true_iff, add_mul, mul_add, Category.assoc, mul_assoc, - MulZeroClass.zero_mul, MulZeroClass.mul_zero, sum_zero, sum_add] + zero_mul, mul_zero, sum_zero, sum_add] #align category_theory.category_Free CategoryTheory.categoryFree namespace Free diff --git a/Mathlib/Algebra/Category/Ring/Constructions.lean b/Mathlib/Algebra/Category/Ring/Constructions.lean index b253007149106..bfc70abc933b0 100644 --- a/Mathlib/Algebra/Category/Ring/Constructions.lean +++ b/Mathlib/Algebra/Category/Ring/Constructions.lean @@ -161,7 +161,7 @@ instance commRingCat_hasStrictTerminalObjects : HasStrictTerminalObjects CommRin rw [← f.map_one, ← f.map_zero] congr replace e : 0 * x = 1 * x := congr_arg (· * x) e - rw [one_mul, MulZeroClass.zero_mul, ← f.map_zero] at e + rw [one_mul, zero_mul, ← f.map_zero] at e exact e set_option linter.uppercaseLean3 false in #align CommRing.CommRing_has_strict_terminal_objects CommRingCat.commRingCat_hasStrictTerminalObjects diff --git a/Mathlib/Algebra/CharP/Basic.lean b/Mathlib/Algebra/CharP/Basic.lean index 0c32aacc4e643..94cab2fe0480a 100644 --- a/Mathlib/Algebra/CharP/Basic.lean +++ b/Mathlib/Algebra/CharP/Basic.lean @@ -177,12 +177,12 @@ theorem CharP.exists [NonAssocSemiring R] : ∃ p, CharP R p := rwa [← Nat.mod_add_div x (Nat.find (not_forall.1 H)), Nat.cast_add, Nat.cast_mul, of_not_not (not_not_of_not_imp <| Nat.find_spec (not_forall.1 H)), - MulZeroClass.zero_mul, add_zero] at H1, + zero_mul, add_zero] at H1, H2⟩)), fun H1 => by rw [← Nat.mul_div_cancel' H1, Nat.cast_mul, of_not_not (not_not_of_not_imp <| Nat.find_spec (not_forall.1 H)), - MulZeroClass.zero_mul]⟩⟩⟩ + zero_mul]⟩⟩⟩ #align char_p.exists CharP.exists theorem CharP.exists_unique [NonAssocSemiring R] : ∃! p, CharP R p := @@ -582,7 +582,7 @@ instance (priority := 100) CharOne.subsingleton [CharP R 1] : Subsingleton R := r = 1 * r := by rw [one_mul] _ = (1 : ℕ) * r := by rw [Nat.cast_one] _ = 0 * r := by rw [CharP.cast_eq_zero] - _ = 0 := by rw [MulZeroClass.zero_mul] + _ = 0 := by rw [zero_mul] theorem false_of_nontrivial_of_char_one [Nontrivial R] [CharP R 1] : False := false_of_nontrivial_of_subsingleton R @@ -654,14 +654,14 @@ theorem charP_of_ne_zero (hn : Fintype.card R = n) (hR : ∀ i < n, (i : R) = 0 intro k constructor · intro h - rw [← Nat.mod_add_div k n, Nat.cast_add, Nat.cast_mul, H, MulZeroClass.zero_mul, + rw [← Nat.mod_add_div k n, Nat.cast_add, Nat.cast_mul, H, zero_mul, add_zero] at h rw [Nat.dvd_iff_mod_eq_zero] apply hR _ (Nat.mod_lt _ _) h rw [← hn, gt_iff_lt, Fintype.card_pos_iff] exact ⟨0⟩ · rintro ⟨k, rfl⟩ - rw [Nat.cast_mul, H, MulZeroClass.zero_mul] } + rw [Nat.cast_mul, H, zero_mul] } #align char_p_of_ne_zero charP_of_ne_zero theorem charP_of_prime_pow_injective (R) [Ring R] [Fintype R] (p : ℕ) [hp : Fact p.Prime] (n : ℕ) diff --git a/Mathlib/Algebra/CharP/CharAndCard.lean b/Mathlib/Algebra/CharP/CharAndCard.lean index 4cf7d55c2c45a..527870b30231b 100644 --- a/Mathlib/Algebra/CharP/CharAndCard.lean +++ b/Mathlib/Algebra/CharP/CharAndCard.lean @@ -35,14 +35,14 @@ theorem isUnit_iff_not_dvd_char_of_ringChar_ne_zero (R : Type*) [CommRing R] (p have h₄ := mt (CharP.int_cast_eq_zero_iff R (ringChar R) q).mp apply_fun ((↑) : ℕ → R) at hq apply_fun (· * ·) a at hq - rw [Nat.cast_mul, hch, MulZeroClass.mul_zero, ← mul_assoc, ha, one_mul] at hq + rw [Nat.cast_mul, hch, mul_zero, ← mul_assoc, ha, one_mul] at hq norm_cast at h₄ exact h₄ h₃ hq.symm · intro h rcases(hp.coprime_iff_not_dvd.mpr h).isCoprime with ⟨a, b, hab⟩ apply_fun ((↑) : ℤ → R) at hab push_cast at hab - rw [hch, MulZeroClass.mul_zero, add_zero, mul_comm] at hab + rw [hch, mul_zero, add_zero, mul_comm] at hab exact isUnit_of_mul_eq_one (p : R) a hab #align is_unit_iff_not_dvd_char_of_ring_char_ne_zero isUnit_iff_not_dvd_char_of_ringChar_ne_zero @@ -70,7 +70,7 @@ theorem prime_dvd_char_iff_dvd_card {R : Type*} [CommRing R] [Fintype R] (p : rw [hr, nsmul_eq_mul] at hr₁ rcases IsUnit.exists_left_inv ((isUnit_iff_not_dvd_char R p).mpr h₀) with ⟨u, hu⟩ apply_fun (· * ·) u at hr₁ - rw [MulZeroClass.mul_zero, ← mul_assoc, hu, one_mul] at hr₁ + rw [mul_zero, ← mul_assoc, hu, one_mul] at hr₁ exact mt AddMonoid.addOrderOf_eq_one_iff.mpr (ne_of_eq_of_ne hr (Nat.Prime.ne_one Fact.out)) hr₁ #align prime_dvd_char_iff_dvd_card prime_dvd_char_iff_dvd_card diff --git a/Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean b/Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean index b3b036964ef35..c57784793a3c2 100644 --- a/Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean +++ b/Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean @@ -560,7 +560,7 @@ theorem abs_sub_convergents_le' {b : K} -- to consider the case `(GeneralizedContinuedFraction.of v).denominators n = 0`. rcases (zero_le_of_denom (K := K)).eq_or_gt with ((hB : (GeneralizedContinuedFraction.of v).denominators n = 0) | hB) - · simp only [hB, MulZeroClass.mul_zero, MulZeroClass.zero_mul, div_zero, le_refl] + · simp only [hB, mul_zero, zero_mul, div_zero, le_refl] · apply one_div_le_one_div_of_le · have : 0 < b := zero_lt_one.trans_le (of_one_le_get?_part_denom nth_part_denom_eq) apply_rules [mul_pos] diff --git a/Mathlib/Algebra/CubicDiscriminant.lean b/Mathlib/Algebra/CubicDiscriminant.lean index 0dbda7aa066c5..e2ec838230a3d 100644 --- a/Mathlib/Algebra/CubicDiscriminant.lean +++ b/Mathlib/Algebra/CubicDiscriminant.lean @@ -135,7 +135,7 @@ theorem toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q := #align cubic.to_poly_injective Cubic.toPoly_injective theorem of_a_eq_zero (ha : P.a = 0) : P.toPoly = C P.b * X ^ 2 + C P.c * X + C P.d := by - rw [toPoly, ha, C_0, MulZeroClass.zero_mul, zero_add] + rw [toPoly, ha, C_0, zero_mul, zero_add] #align cubic.of_a_eq_zero Cubic.of_a_eq_zero theorem of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d := @@ -143,7 +143,7 @@ theorem of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d := #align cubic.of_a_eq_zero' Cubic.of_a_eq_zero' theorem of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly = C P.c * X + C P.d := by - rw [of_a_eq_zero ha, hb, C_0, MulZeroClass.zero_mul, zero_add] + rw [of_a_eq_zero ha, hb, C_0, zero_mul, zero_add] #align cubic.of_b_eq_zero Cubic.of_b_eq_zero theorem of_b_eq_zero' : toPoly ⟨0, 0, c, d⟩ = C c * X + C d := @@ -151,7 +151,7 @@ theorem of_b_eq_zero' : toPoly ⟨0, 0, c, d⟩ = C c * X + C d := #align cubic.of_b_eq_zero' Cubic.of_b_eq_zero' theorem of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly = C P.d := by - rw [of_b_eq_zero ha hb, hc, C_0, MulZeroClass.zero_mul, zero_add] + rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add] #align cubic.of_c_eq_zero Cubic.of_c_eq_zero theorem of_c_eq_zero' : toPoly ⟨0, 0, 0, d⟩ = C d := diff --git a/Mathlib/Algebra/DirectLimit.lean b/Mathlib/Algebra/DirectLimit.lean index b5a62a9458019..062668ff8e600 100644 --- a/Mathlib/Algebra/DirectLimit.lean +++ b/Mathlib/Algebra/DirectLimit.lean @@ -605,7 +605,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom -- porting note: RingHom.map_mul was `(restriction _).map_mul` rw [RingHom.map_mul, (FreeCommRing.lift _).map_mul, ← of.zero_exact_aux2 G f' hyt hj this hjk (Set.subset_union_right (↑s) t), iht, - (f' j k hjk).map_zero, MulZeroClass.mul_zero] + (f' j k hjk).map_zero, mul_zero] #align ring.direct_limit.of.zero_exact_aux Ring.DirectLimit.of.zero_exact_aux /-- A component that corresponds to zero in the direct limit is already zero in some diff --git a/Mathlib/Algebra/DirectSum/Internal.lean b/Mathlib/Algebra/DirectSum/Internal.lean index 645af38db25ea..67a020ee476dd 100644 --- a/Mathlib/Algebra/DirectSum/Internal.lean +++ b/Mathlib/Algebra/DirectSum/Internal.lean @@ -92,8 +92,8 @@ instance gnonUnitalNonAssocSemiring [Add ι] [NonUnitalNonAssocSemiring R] [SetL [AddSubmonoidClass σ R] (A : ι → σ) [SetLike.GradedMul A] : DirectSum.GNonUnitalNonAssocSemiring fun i => A i := { SetLike.gMul A with - mul_zero := fun _ => Subtype.ext (MulZeroClass.mul_zero _) - zero_mul := fun _ => Subtype.ext (MulZeroClass.zero_mul _) + mul_zero := fun _ => Subtype.ext (mul_zero _) + zero_mul := fun _ => Subtype.ext (zero_mul _) mul_add := fun _ _ _ => Subtype.ext (mul_add _ _ _) add_mul := fun _ _ _ => Subtype.ext (add_mul _ _ _) } #align set_like.gnon_unital_non_assoc_semiring SetLike.gnonUnitalNonAssocSemiring @@ -102,8 +102,8 @@ instance gnonUnitalNonAssocSemiring [Add ι] [NonUnitalNonAssocSemiring R] [SetL instance gsemiring [AddMonoid ι] [Semiring R] [SetLike σ R] [AddSubmonoidClass σ R] (A : ι → σ) [SetLike.GradedMonoid A] : DirectSum.GSemiring fun i => A i := { SetLike.gMonoid A with - mul_zero := fun _ => Subtype.ext (MulZeroClass.mul_zero _) - zero_mul := fun _ => Subtype.ext (MulZeroClass.zero_mul _) + mul_zero := fun _ => Subtype.ext (mul_zero _) + zero_mul := fun _ => Subtype.ext (zero_mul _) mul_add := fun _ _ _ => Subtype.ext (mul_add _ _ _) add_mul := fun _ _ _ => Subtype.ext (add_mul _ _ _) natCast := fun n => ⟨n, SetLike.nat_cast_mem_graded _ _⟩ @@ -183,12 +183,12 @@ theorem coe_of_mul_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r rw [coe_mul_apply_eq_dfinsupp_sum] apply (DFinsupp.sum_single_index _).trans swap - · simp_rw [ZeroMemClass.coe_zero, MulZeroClass.zero_mul, ite_self] + · simp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self] exact DFinsupp.sum_zero simp_rw [DFinsupp.sum, H, Finset.sum_ite_eq'] split_ifs with h rfl - rw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, MulZeroClass.mul_zero] + rw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, mul_zero] #align direct_sum.coe_of_mul_apply_aux DirectSum.coe_of_mul_apply_aux theorem coe_mul_of_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] (r : ⨁ i, A i) {i : ι} @@ -198,12 +198,12 @@ theorem coe_mul_of_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] (r : ⨁ i, rw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm] apply (DFinsupp.sum_single_index _).trans swap - · simp_rw [ZeroMemClass.coe_zero, MulZeroClass.mul_zero, ite_self] + · simp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self] exact DFinsupp.sum_zero simp_rw [DFinsupp.sum, H, Finset.sum_ite_eq'] split_ifs with h rfl - rw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, MulZeroClass.zero_mul] + rw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, zero_mul] #align direct_sum.coe_mul_of_apply_aux DirectSum.coe_mul_of_apply_aux theorem coe_of_mul_apply_add [AddLeftCancelMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r : A i) @@ -230,7 +230,7 @@ theorem coe_of_mul_apply_of_not_le {i : ι} (r : A i) (r' : ⨁ i, A i) (n : ι) rw [coe_mul_apply_eq_dfinsupp_sum] apply (DFinsupp.sum_single_index _).trans swap - · simp_rw [ZeroMemClass.coe_zero, MulZeroClass.zero_mul, ite_self] + · simp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self] exact DFinsupp.sum_zero · rw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero] exact fun x _ H => h ((self_le_add_right i x).trans_eq H) @@ -242,7 +242,7 @@ theorem coe_mul_of_apply_of_not_le (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) rw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm] apply (DFinsupp.sum_single_index _).trans swap - · simp_rw [ZeroMemClass.coe_zero, MulZeroClass.mul_zero, ite_self] + · simp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self] exact DFinsupp.sum_zero · rw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero] exact fun x _ H => h ((self_le_add_left i x).trans_eq H) diff --git a/Mathlib/Algebra/DualNumber.lean b/Mathlib/Algebra/DualNumber.lean index 07fe510a537fe..2e378003953c6 100644 --- a/Mathlib/Algebra/DualNumber.lean +++ b/Mathlib/Algebra/DualNumber.lean @@ -84,7 +84,7 @@ theorem eps_mul_eps [Semiring R] : (ε * ε : R[ε]) = 0 := @[simp] theorem inr_eq_smul_eps [MulZeroOneClass R] (r : R) : inr r = (r • ε : R[ε]) := - ext (MulZeroClass.mul_zero r).symm (mul_one r).symm + ext (mul_zero r).symm (mul_one r).symm #align dual_number.inr_eq_smul_eps DualNumber.inr_eq_smul_eps /-- For two algebra morphisms out of `R[ε]` to agree, it suffices for them to agree on `ε`. -/ diff --git a/Mathlib/Algebra/FreeAlgebra.lean b/Mathlib/Algebra/FreeAlgebra.lean index c5a32650ff881..63e0915a392db 100644 --- a/Mathlib/Algebra/FreeAlgebra.lean +++ b/Mathlib/Algebra/FreeAlgebra.lean @@ -138,8 +138,8 @@ inductive Rel : Pre R X → Pre R X → Prop-- force `of_scalar` to be a central | right_distrib {a b c : Pre R X} : Rel ((a + b) * c) (a * c + b * c)-- other relations needed for semiring - | MulZeroClass.zero_mul {a : Pre R X} : Rel (0 * a) 0 - | MulZeroClass.mul_zero {a : Pre R X} : Rel (a * 0) 0-- compatibility + | zero_mul {a : Pre R X} : Rel (0 * a) 0 + | mul_zero {a : Pre R X} : Rel (a * 0) 0-- compatibility | add_compat_left {a b c : Pre R X} : Rel a b → Rel (a + c) (b + c) | add_compat_right {a b c : Pre R X} : Rel a b → Rel (c + a) (c + b) @@ -197,10 +197,10 @@ instance instMonoidWithZero : MonoidWithZero (FreeAlgebra R X) where exact Quot.sound Rel.mul_one zero_mul := by rintro ⟨⟩ - exact Quot.sound Rel.MulZeroClass.zero_mul + exact Quot.sound Rel.zero_mul mul_zero := by rintro ⟨⟩ - exact Quot.sound Rel.MulZeroClass.mul_zero + exact Quot.sound Rel.mul_zero instance instDistrib : Distrib (FreeAlgebra R X) where left_distrib := by @@ -229,7 +229,7 @@ instance instAddCommMonoid : AddCommMonoid (FreeAlgebra R X) where rintro ⟨⟩ change Quot.mk _ (_ * _) = _ rw [map_zero] - exact Quot.sound Rel.MulZeroClass.zero_mul + exact Quot.sound Rel.zero_mul nsmul_succ n := by rintro ⟨a⟩ dsimp only [HSMul.hSMul, instSMul, Quot.map] diff --git a/Mathlib/Algebra/Group/Pi.lean b/Mathlib/Algebra/Group/Pi.lean index bfd097d94c175..fa7fc11558c16 100644 --- a/Mathlib/Algebra/Group/Pi.lean +++ b/Mathlib/Algebra/Group/Pi.lean @@ -523,12 +523,12 @@ theorem Pi.single_mul [∀ i, MulZeroClass <| f i] (i : I) (x y : f i) : theorem Pi.single_mul_left_apply [∀ i, MulZeroClass <| f i] (a : f i) : Pi.single i (a * x i) j = Pi.single i a j * x j := - (Pi.apply_single (fun i => (· * x i)) (fun _ => MulZeroClass.zero_mul _) _ _ _).symm + (Pi.apply_single (fun i => (· * x i)) (fun _ => zero_mul _) _ _ _).symm #align pi.single_mul_left_apply Pi.single_mul_left_apply theorem Pi.single_mul_right_apply [∀ i, MulZeroClass <| f i] (a : f i) : Pi.single i (x i * a) j = x j * Pi.single i a j := - (Pi.apply_single (fun i => (· * ·) (x i)) (fun _ => MulZeroClass.mul_zero _) _ _ _).symm + (Pi.apply_single (fun i => (· * ·) (x i)) (fun _ => mul_zero _) _ _ _).symm #align pi.single_mul_right_apply Pi.single_mul_right_apply theorem Pi.single_mul_left [∀ i, MulZeroClass <| f i] (a : f i) : diff --git a/Mathlib/Algebra/Module/LocalizedModule.lean b/Mathlib/Algebra/Module/LocalizedModule.lean index 11dd5606298e8..dbf064901ad42 100644 --- a/Mathlib/Algebra/Module/LocalizedModule.lean +++ b/Mathlib/Algebra/Module/LocalizedModule.lean @@ -268,10 +268,10 @@ instance {A : Type _} [Semiring A] [Algebra R A] {S : Submonoid R} : mul_right_comm] zero_mul := by rintro ⟨a, s⟩ - exact mk_eq.mpr ⟨1, by simp only [MulZeroClass.zero_mul, smul_zero]⟩ + exact mk_eq.mpr ⟨1, by simp only [zero_mul, smul_zero]⟩ mul_zero := by rintro ⟨a, s⟩ - exact mk_eq.mpr ⟨1, by simp only [MulZeroClass.mul_zero, smul_zero]⟩ + exact mk_eq.mpr ⟨1, by simp only [mul_zero, smul_zero]⟩ mul_assoc := by rintro ⟨a₁, s₁⟩ ⟨a₂, s₂⟩ ⟨a₃, s₃⟩ apply mk_eq.mpr _ diff --git a/Mathlib/Algebra/MonoidAlgebra/Basic.lean b/Mathlib/Algebra/MonoidAlgebra/Basic.lean index e5cf083cd9437..830345ad09252 100644 --- a/Mathlib/Algebra/MonoidAlgebra/Basic.lean +++ b/Mathlib/Algebra/MonoidAlgebra/Basic.lean @@ -562,7 +562,7 @@ theorem mul_single_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : Monoi classical rw [mul_apply, Finsupp.sum_comm, Finsupp.sum_single_index] swap - · simp_rw [Finsupp.sum, MulZeroClass.mul_zero, ite_self, Finset.sum_const_zero] + · simp_rw [Finsupp.sum, mul_zero, ite_self, Finset.sum_const_zero] · apply Finset.sum_eq_zero simp_rw [ite_eq_right_iff] rintro g'' _hg'' rfl @@ -593,7 +593,7 @@ theorem single_mul_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : Monoi classical rw [mul_apply, Finsupp.sum_single_index] swap - · simp_rw [Finsupp.sum, MulZeroClass.zero_mul, ite_self, Finset.sum_const_zero] + · simp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero] · apply Finset.sum_eq_zero simp_rw [ite_eq_right_iff] rintro g'' _hg'' rfl diff --git a/Mathlib/Algebra/MonoidAlgebra/NoZeroDivisors.lean b/Mathlib/Algebra/MonoidAlgebra/NoZeroDivisors.lean index 28bcacf3770b9..68b4820e19751 100644 --- a/Mathlib/Algebra/MonoidAlgebra/NoZeroDivisors.lean +++ b/Mathlib/Algebra/MonoidAlgebra/NoZeroDivisors.lean @@ -61,7 +61,7 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} { · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl) · by_cases af : a0 ∈ f.support · exact if_neg (h af bg (Or.inr b0)) - · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, ite_self] + · simp only [not_mem_support_iff.mp af, zero_mul, ite_self] · exact fun bf0 => by simp [not_mem_support_iff.mp bf0] #align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne diff --git a/Mathlib/Algebra/Order/CompleteField.lean b/Mathlib/Algebra/Order/CompleteField.lean index e65446a6a0c45..7fa25ff48bbb9 100644 --- a/Mathlib/Algebra/Order/CompleteField.lean +++ b/Mathlib/Algebra/Order/CompleteField.lean @@ -301,7 +301,7 @@ def inducedOrderRingHom : α →+*o β := · convert this (-x) (neg_pos.2 h) using 1 · rw [neg_mul, mul_neg, neg_neg] · simp_rw [AddMonoidHom.map_neg, neg_mul, mul_neg, neg_neg] - · simp only [MulZeroClass.mul_zero, AddMonoidHom.map_zero] + · simp only [mul_zero, AddMonoidHom.map_zero] · exact this x h -- prove that the (Sup of rationals less than x) ^ 2 is the Sup of the set of rationals less -- than (x ^ 2) by showing it is an upper bound and any smaller number is not an upper bound diff --git a/Mathlib/Algebra/QuadraticDiscriminant.lean b/Mathlib/Algebra/QuadraticDiscriminant.lean index c8315732262a0..92c92dbe25139 100644 --- a/Mathlib/Algebra/QuadraticDiscriminant.lean +++ b/Mathlib/Algebra/QuadraticDiscriminant.lean @@ -104,7 +104,7 @@ theorem exists_quadratic_eq_zero (ha : a ≠ 0) (h : ∃ s, discrim a b c = s * /-- Root of a quadratic when its discriminant equals zero -/ theorem quadratic_eq_zero_iff_of_discrim_eq_zero (ha : a ≠ 0) (h : discrim a b c = 0) (x : K) : a * x * x + b * x + c = 0 ↔ x = -b / (2 * a) := by - have : discrim a b c = 0 * 0 := by rw [h, MulZeroClass.mul_zero] + have : discrim a b c = 0 * 0 := by rw [h, mul_zero] rw [quadratic_eq_zero_iff ha this, add_zero, sub_zero, or_self_iff] #align quadratic_eq_zero_iff_of_discrim_eq_zero quadratic_eq_zero_iff_of_discrim_eq_zero diff --git a/Mathlib/Algebra/Ring/BooleanRing.lean b/Mathlib/Algebra/Ring/BooleanRing.lean index 786024adb3e7b..aba982ea7a385 100644 --- a/Mathlib/Algebra/Ring/BooleanRing.lean +++ b/Mathlib/Algebra/Ring/BooleanRing.lean @@ -255,7 +255,7 @@ def toBooleanAlgebra : BooleanAlgebra α := le_top := fun a => show a + 1 + a * 1 = 1 by rw [mul_one, (add_comm a 1), add_assoc, add_self, add_zero] bot := 0 - bot_le := fun a => show 0 + a + 0 * a = a by rw [MulZeroClass.zero_mul, zero_add, add_zero] + bot_le := fun a => show 0 + a + 0 * a = a by rw [zero_mul, zero_add, add_zero] compl := fun a => 1 + a inf_compl_le_bot := fun a => show a * (1 + a) + 0 + a * (1 + a) * 0 = 0 by norm_num [mul_add, mul_self, add_self] diff --git a/Mathlib/Algebra/Squarefree.lean b/Mathlib/Algebra/Squarefree.lean index 71a3b5ac89275..cdf88fd873e1d 100644 --- a/Mathlib/Algebra/Squarefree.lean +++ b/Mathlib/Algebra/Squarefree.lean @@ -163,7 +163,7 @@ theorem irreducible_sq_not_dvd_iff_eq_zero_and_no_irreducibles_or_squarefree (r have : x ≠ 0 := by rintro rfl apply hr - simpa only [zero_dvd_iff, MulZeroClass.mul_zero] using hx + simpa only [zero_dvd_iff, mul_zero] using hx obtain ⟨j, hj₁, hj₂⟩ := WfDvdMonoid.exists_irreducible_factor i this exact h _ hj₁ ((mul_dvd_mul hj₂ hj₂).trans hx) #align irreducible_sq_not_dvd_iff_eq_zero_and_no_irreducibles_or_squarefree irreducible_sq_not_dvd_iff_eq_zero_and_no_irreducibles_or_squarefree diff --git a/Mathlib/Algebra/Star/CHSH.lean b/Mathlib/Algebra/Star/CHSH.lean index ffef52b581cc6..99d0b4e402f30 100644 --- a/Mathlib/Algebra/Star/CHSH.lean +++ b/Mathlib/Algebra/Star/CHSH.lean @@ -112,7 +112,7 @@ theorem CHSH_id [CommRing R] {A₀ A₁ B₀ B₁ : R} (A₀_inv : A₀ ^ 2 = 1) simp only [A₁_inv, B₁_inv, sub_eq_add_neg, add_mul, mul_add, sub_mul, mul_sub, add_assoc, neg_add, neg_sub, sub_add, sub_sub, neg_mul, ← sq, A₀_inv, B₀_inv, ← sq, ← mul_assoc, one_mul, mul_one, add_right_neg, add_zero, sub_eq_add_neg, A₀_inv, mul_one, add_right_neg, - MulZeroClass.zero_mul] + zero_mul] set_option linter.uppercaseLean3 false in #align CHSH_id CHSH_id diff --git a/Mathlib/Algebra/Star/Order.lean b/Mathlib/Algebra/Star/Order.lean index f309066942f47..a34cb52e255ad 100644 --- a/Mathlib/Algebra/Star/Order.lean +++ b/Mathlib/Algebra/Star/Order.lean @@ -159,7 +159,7 @@ theorem star_mul_self_nonneg' (r : R) : 0 ≤ r * star r := by theorem conjugate_nonneg {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ star c * a * c := by rw [StarOrderedRing.nonneg_iff] at ha refine' AddSubmonoid.closure_induction ha (fun x hx => _) - (by rw [MulZeroClass.mul_zero, MulZeroClass.zero_mul]) fun x y hx hy => _ + (by rw [mul_zero, zero_mul]) fun x y hx hy => _ · obtain ⟨x, rfl⟩ := hx convert star_mul_self_nonneg (x * c) using 1 rw [star_mul, ← mul_assoc, mul_assoc _ _ c] diff --git a/Mathlib/Algebra/Symmetrized.lean b/Mathlib/Algebra/Symmetrized.lean index 99fceb780e1d1..25d941dd4f344 100644 --- a/Mathlib/Algebra/Symmetrized.lean +++ b/Mathlib/Algebra/Symmetrized.lean @@ -295,11 +295,11 @@ instance nonAssocSemiring [Semiring α] [Invertible (2 : α)] : NonAssocSemiring mul := (· * ·) zero := 0 zero_mul := fun _ => by - rw [mul_def, unsym_zero, MulZeroClass.zero_mul, MulZeroClass.mul_zero, add_zero, - MulZeroClass.mul_zero, sym_zero] + rw [mul_def, unsym_zero, zero_mul, mul_zero, add_zero, + mul_zero, sym_zero] mul_zero := fun _ => by - rw [mul_def, unsym_zero, MulZeroClass.zero_mul, MulZeroClass.mul_zero, add_zero, - MulZeroClass.mul_zero, sym_zero] + rw [mul_def, unsym_zero, zero_mul, mul_zero, add_zero, + mul_zero, sym_zero] mul_one := fun _ => by rw [mul_def, unsym_one, mul_one, one_mul, ← two_mul, invOf_mul_self_assoc, sym_unsym] one_mul := fun _ => by @@ -368,7 +368,7 @@ instance [Ring α] [Invertible (2 : α)] : IsCommJordan αˢʸᵐ where rw [add_mul, ← add_assoc, ← mul_assoc, ← mul_assoc] rw [unsym_mul_self] rw [← mul_assoc, ← mul_assoc, ← mul_assoc, ← mul_assoc, ← sub_eq_zero, ← mul_sub] - convert MulZeroClass.mul_zero (⅟ (2 : α) * ⅟ (2 : α)) + convert mul_zero (⅟ (2 : α) * ⅟ (2 : α)) rw [add_sub_add_right_eq_sub, add_assoc, add_assoc, add_sub_add_left_eq_sub, add_comm, add_sub_add_right_eq_sub, sub_eq_zero] diff --git a/Mathlib/Algebra/TrivSqZeroExt.lean b/Mathlib/Algebra/TrivSqZeroExt.lean index d07e7f02a27c4..b4c0ee01d3d91 100644 --- a/Mathlib/Algebra/TrivSqZeroExt.lean +++ b/Mathlib/Algebra/TrivSqZeroExt.lean @@ -481,7 +481,7 @@ variable (R) @[simp] theorem inr_mul_inr [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (m₁ m₂ : M) : (inr m₁ * inr m₂ : tsze R M) = 0 := - ext (MulZeroClass.mul_zero _) <| + ext (mul_zero _) <| show (0 : R) • m₂ + (0 : Rᵐᵒᵖ) • m₁ = 0 by rw [zero_smul, zero_add, zero_smul] #align triv_sq_zero_ext.inr_mul_inr TrivSqZeroExt.inr_mul_inr @@ -489,13 +489,13 @@ end theorem inl_mul_inr [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) : (inl r * inr m : tsze R M) = inr (r • m) := - ext (MulZeroClass.mul_zero r) <| + ext (mul_zero r) <| show r • m + (0 : Rᵐᵒᵖ) • (0 : M) = r • m by rw [smul_zero, add_zero] #align triv_sq_zero_ext.inl_mul_inr TrivSqZeroExt.inl_mul_inr theorem inr_mul_inl [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) : (inr m * inl r : tsze R M) = inr (op r • m) := - ext (MulZeroClass.zero_mul r) <| + ext (zero_mul r) <| show (0 : R) • (0 : M) + op r • m = op r • m by rw [smul_zero, zero_add] #align triv_sq_zero_ext.inr_mul_inl TrivSqZeroExt.inr_mul_inl @@ -555,10 +555,10 @@ instance nonAssocSemiring [Semiring R] [AddCommMonoid M] [Module R M] [Module R NonAssocSemiring (tsze R M) := { TrivSqZeroExt.addMonoidWithOne, TrivSqZeroExt.mulOneClass, TrivSqZeroExt.addCommMonoid with zero_mul := fun x => - ext (MulZeroClass.zero_mul x.1) <| + ext (zero_mul x.1) <| show (0 : R) • x.2 + op x.1 • (0 : M) = 0 by rw [zero_smul, zero_add, smul_zero] mul_zero := fun x => - ext (MulZeroClass.mul_zero x.1) <| + ext (mul_zero x.1) <| show x.1 • (0 : M) + (0 : Rᵐᵒᵖ) • x.2 = 0 by rw [smul_zero, zero_add, zero_smul] left_distrib := fun x₁ x₂ x₃ => ext (mul_add x₁.1 x₂.1 x₃.1) <| diff --git a/Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean b/Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean index e175ab96ee1ce..6e831017f254a 100644 --- a/Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean +++ b/Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean @@ -341,7 +341,7 @@ theorem exists_pow_mul_eq_zero_of_res_basicOpen_eq_zero_of_isCompact (X : Scheme (hn i) dsimp at hn simp only [← map_mul, ← map_pow] at hn - rwa [MulZeroClass.mul_zero, ← mul_assoc, ← pow_add, tsub_add_cancel_of_le] at hn + rwa [mul_zero, ← mul_assoc, ← pow_add, tsub_add_cancel_of_le] at hn apply Finset.le_sup (Finset.mem_univ i) #align algebraic_geometry.exists_pow_mul_eq_zero_of_res_basic_open_eq_zero_of_is_compact AlgebraicGeometry.exists_pow_mul_eq_zero_of_res_basicOpen_eq_zero_of_isCompact diff --git a/Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean b/Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean index 49f109e5dc7f2..64d2a0a40efa2 100644 --- a/Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean +++ b/Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean @@ -536,7 +536,7 @@ theorem is_localization_basicOpen_of_qcqs {X : Scheme} {U : Opens X.carrier} (hU refine' ⟨⟨_, n, rfl⟩, _⟩ simpa [mul_comm z] using e · rintro ⟨⟨_, n, rfl⟩, e : f ^ n * z = 0⟩ - rw [← ((RingedSpace.isUnit_res_basicOpen _ f).pow n).mul_right_inj, MulZeroClass.mul_zero, ← + rw [← ((RingedSpace.isUnit_res_basicOpen _ f).pow n).mul_right_inj, mul_zero, ← map_pow] -- Porting note: this one lemma needs `erw` erw [← map_mul] diff --git a/Mathlib/AlgebraicGeometry/StructureSheaf.lean b/Mathlib/AlgebraicGeometry/StructureSheaf.lean index 7fbcf266e6064..bf3b21039e02b 100644 --- a/Mathlib/AlgebraicGeometry/StructureSheaf.lean +++ b/Mathlib/AlgebraicGeometry/StructureSheaf.lean @@ -352,7 +352,7 @@ theorem res_const' (f g : R) (V hv) : theorem const_zero (f : R) (U hu) : const R 0 f U hu = 0 := Subtype.eq <| funext fun x => IsLocalization.mk'_eq_iff_eq_mul.2 <| by - erw [RingHom.map_zero, Subring.coe_zero, Pi.zero_apply, MulZeroClass.zero_mul] + erw [RingHom.map_zero, Subring.coe_zero, Pi.zero_apply, zero_mul] #align algebraic_geometry.structure_sheaf.const_zero AlgebraicGeometry.StructureSheaf.const_zero theorem const_self (f : R) (U hu) : const R f f U hu = 1 := @@ -655,7 +655,7 @@ theorem toBasicOpen_injective (f : R) : Function.Injective (toBasicOpen R f) := -- We define `I` as the ideal of *all* elements `r` satisfying the above equation. let I : Ideal R := { carrier := { r : R | r * (d * a) = r * (b * c) } - zero_mem' := by simp only [Set.mem_setOf_eq, MulZeroClass.zero_mul] + zero_mem' := by simp only [Set.mem_setOf_eq, zero_mul] add_mem' := fun {r₁ r₂} hr₁ hr₂ => by dsimp at hr₁ hr₂ ⊢; simp only [add_mul, hr₁, hr₂] smul_mem' := fun {r₁ r₂} hr₂ => by dsimp at hr₂ ⊢; simp only [mul_assoc, hr₂] } -- Our claim now reduces to showing that `f` is contained in the radical of `I` diff --git a/Mathlib/Analysis/Analytic/Basic.lean b/Mathlib/Analysis/Analytic/Basic.lean index d4b0cd1b6ab40..c2ea92998ece4 100644 --- a/Mathlib/Analysis/Analytic/Basic.lean +++ b/Mathlib/Analysis/Analytic/Basic.lean @@ -815,7 +815,7 @@ theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ℝ≥0} (hf : HasFPowerS refine' Metric.tendstoUniformlyOn_iff.2 fun ε εpos => _ have L : Tendsto (fun n => (C : ℝ) * a ^ n) atTop (𝓝 ((C : ℝ) * 0)) := tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2) - rw [MulZeroClass.mul_zero] at L + rw [mul_zero] at L refine' (L.eventually (gt_mem_nhds εpos)).mono fun n hn y hy => _ rw [dist_eq_norm] exact (hp y hy n).trans_lt hn diff --git a/Mathlib/Analysis/Analytic/Inverse.lean b/Mathlib/Analysis/Analytic/Inverse.lean index bdd6be7b4d0ef..4002faa92ad69 100644 --- a/Mathlib/Analysis/Analytic/Inverse.lean +++ b/Mathlib/Analysis/Analytic/Inverse.lean @@ -567,7 +567,7 @@ theorem radius_rightInv_pos_of_radius_pos (p : FormalMultilinearSeries 𝕜 E F) apply le_radius_of_bound _ ((I + 1) * a) fun n => ?_ by_cases hn : n = 0 · have : ‖p.rightInv i n‖ = ‖p.rightInv i 0‖ := by congr <;> try rw [hn] - simp only [this, norm_zero, MulZeroClass.zero_mul, rightInv_coeff_zero] + simp only [this, norm_zero, zero_mul, rightInv_coeff_zero] apply_rules [mul_nonneg, add_nonneg, norm_nonneg, zero_le_one, apos.le] · have one_le_n : 1 ≤ n := bot_lt_iff_ne_bot.2 hn calc diff --git a/Mathlib/Analysis/Asymptotics/Asymptotics.lean b/Mathlib/Analysis/Asymptotics/Asymptotics.lean index 43fd249476d7f..7a6fa449707f8 100644 --- a/Mathlib/Analysis/Asymptotics/Asymptotics.lean +++ b/Mathlib/Analysis/Asymptotics/Asymptotics.lean @@ -283,7 +283,7 @@ theorem isLittleO_iff_nat_mul_le_aux (h₀ : (∀ x, 0 ≤ ‖f x‖) ∨ ∀ x, constructor · rintro H (_ | n) · refine' (H.def one_pos).mono fun x h₀' => _ - rw [Nat.cast_zero, MulZeroClass.zero_mul] + rw [Nat.cast_zero, zero_mul] refine' h₀.elim (fun hf => (hf x).trans _) fun hg => hg x rwa [one_mul] at h₀' · have : (0 : ℝ) < n.succ := Nat.cast_pos.2 n.succ_pos @@ -1255,7 +1255,7 @@ variable {g g' l} @[simp] theorem isBigOWith_zero_right_iff : (IsBigOWith c l f'' fun _x => (0 : F')) ↔ f'' =ᶠ[l] 0 := by - simp only [IsBigOWith_def, exists_prop, true_and_iff, norm_zero, MulZeroClass.mul_zero, + simp only [IsBigOWith_def, exists_prop, true_and_iff, norm_zero, mul_zero, norm_le_zero_iff, EventuallyEq, Pi.zero_apply] #align asymptotics.is_O_with_zero_right_iff Asymptotics.isBigOWith_zero_right_iff @@ -1319,7 +1319,7 @@ theorem isLittleO_top : f'' =o[⊤] g'' ↔ ∀ x, f'' x = 0 := by simp only [isLittleO_iff, eventually_top] refine' fun h x => norm_le_zero_iff.1 _ have : Tendsto (fun c : ℝ => c * ‖g'' x‖) (𝓝[>] 0) (𝓝 0) := - ((continuous_id.mul continuous_const).tendsto' _ _ (MulZeroClass.zero_mul _)).mono_left + ((continuous_id.mul continuous_const).tendsto' _ _ (zero_mul _)).mono_left inf_le_left exact le_of_tendsto_of_tendsto tendsto_const_nhds this @@ -1704,7 +1704,7 @@ theorem IsBigOWith.inv_rev {f : α → 𝕜} {g : α → 𝕜'} (h : IsBigOWith (h₀ : ∀ᶠ x in l, f x = 0 → g x = 0) : IsBigOWith c l (fun x => (g x)⁻¹) fun x => (f x)⁻¹ := by refine' IsBigOWith.of_bound (h.bound.mp (h₀.mono fun x h₀ hle => _)) cases' eq_or_ne (f x) 0 with hx hx - · simp only [hx, h₀ hx, inv_zero, norm_zero, MulZeroClass.mul_zero]; rfl + · simp only [hx, h₀ hx, inv_zero, norm_zero, mul_zero]; rfl · have hc : 0 < c := pos_of_mul_pos_left ((norm_pos_iff.2 hx).trans_le hle) (norm_nonneg _) replace hle := inv_le_inv_of_le (norm_pos_iff.2 hx) hle simpa only [norm_inv, mul_inv, ← div_eq_inv_mul, div_le_iff hc] using hle diff --git a/Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean b/Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean index 9492660f3a677..bbeb1efa25d28 100644 --- a/Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean +++ b/Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean @@ -78,7 +78,7 @@ theorem SuperpolynomialDecay.congr (hf : SuperpolynomialDecay l k f) (hfg : ∀ @[simp] theorem superpolynomialDecay_zero (l : Filter α) (k : α → β) : SuperpolynomialDecay l k 0 := - fun z => by simpa only [Pi.zero_apply, MulZeroClass.mul_zero] using tendsto_const_nhds + fun z => by simpa only [Pi.zero_apply, mul_zero] using tendsto_const_nhds #align asymptotics.superpolynomial_decay_zero Asymptotics.superpolynomialDecay_zero theorem SuperpolynomialDecay.add [ContinuousAdd β] (hf : SuperpolynomialDecay l k f) @@ -88,12 +88,12 @@ theorem SuperpolynomialDecay.add [ContinuousAdd β] (hf : SuperpolynomialDecay l theorem SuperpolynomialDecay.mul [ContinuousMul β] (hf : SuperpolynomialDecay l k f) (hg : SuperpolynomialDecay l k g) : SuperpolynomialDecay l k (f * g) := fun z => by - simpa only [mul_assoc, one_mul, MulZeroClass.mul_zero, pow_zero] using (hf z).mul (hg 0) + simpa only [mul_assoc, one_mul, mul_zero, pow_zero] using (hf z).mul (hg 0) #align asymptotics.superpolynomial_decay.mul Asymptotics.SuperpolynomialDecay.mul theorem SuperpolynomialDecay.mul_const [ContinuousMul β] (hf : SuperpolynomialDecay l k f) (c : β) : SuperpolynomialDecay l k fun n => f n * c := fun z => by - simpa only [← mul_assoc, MulZeroClass.zero_mul] using Tendsto.mul_const c (hf z) + simpa only [← mul_assoc, zero_mul] using Tendsto.mul_const c (hf z) #align asymptotics.superpolynomial_decay.mul_const Asymptotics.SuperpolynomialDecay.mul_const theorem SuperpolynomialDecay.const_mul [ContinuousMul β] (hf : SuperpolynomialDecay l k f) (c : β) : @@ -228,7 +228,7 @@ theorem superpolynomialDecay_iff_abs_isBoundedUnder (hk : Tendsto k l atTop) : obtain ⟨m, hm⟩ := h (z + 1) have h1 : Tendsto (fun _ : α => (0 : β)) l (𝓝 0) := tendsto_const_nhds have h2 : Tendsto (fun a : α => |(k a)⁻¹| * m) l (𝓝 0) := - MulZeroClass.zero_mul m ▸ + zero_mul m ▸ Tendsto.mul_const m ((tendsto_zero_iff_abs_tendsto_zero _).1 hk.inv_tendsto_atTop) refine' tendsto_of_tendsto_of_tendsto_of_le_of_le' h1 h2 (eventually_of_forall fun x => abs_nonneg _) @@ -248,7 +248,7 @@ theorem superpolynomialDecay_iff_zpow_tendsto_zero (hk : Tendsto k l atTop) : · have : Tendsto (fun a => k a ^ z) l (𝓝 0) := Tendsto.comp (tendsto_zpow_atTop_zero (not_le.1 hz)) hk have h : Tendsto f l (𝓝 0) := by simpa using h 0 - exact MulZeroClass.zero_mul (0 : β) ▸ this.mul h + exact zero_mul (0 : β) ▸ this.mul h #align asymptotics.superpolynomial_decay_iff_zpow_tendsto_zero Asymptotics.superpolynomialDecay_iff_zpow_tendsto_zero variable {f} diff --git a/Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean b/Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean index 938b8e6ea7857..044fa04bc85f8 100644 --- a/Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean +++ b/Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean @@ -173,7 +173,7 @@ theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) : intro n contrapose! hx exact g_s n hx - simp only [this, MulZeroClass.mul_zero, tsum_zero] + simp only [this, mul_zero, tsum_zero] · intro x hx obtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n); exact s_g x hx have I : 0 < r n * g n x := mul_pos (rpos n) (lt_of_le_of_ne (g_nonneg n x) (Ne.symm hn)) @@ -399,7 +399,7 @@ theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ b have Bx : φ x = 0 := B _ (mem_ball_self Dpos) have B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B rw [convolution_eq_right' _ (le_of_eq (w_support E Dpos)) B'] - simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, MulZeroClass.mul_zero, integral_const] + simp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, mul_zero, integral_const] #align exists_cont_diff_bump_base.Y_eq_zero_of_not_mem_ball ExistsContDiffBumpBase.y_eq_zero_of_not_mem_ball theorem y_nonneg (D : ℝ) (x : E) : 0 ≤ y D x := diff --git a/Mathlib/Analysis/Calculus/Deriv/Mul.lean b/Mathlib/Analysis/Calculus/Deriv/Mul.lean index 6acba34419d37..0c7607069fd67 100644 --- a/Mathlib/Analysis/Calculus/Deriv/Mul.lean +++ b/Mathlib/Analysis/Calculus/Deriv/Mul.lean @@ -231,9 +231,9 @@ theorem deriv_mul_const (hc : DifferentiableAt 𝕜 c x) (d : 𝔸) : theorem deriv_mul_const_field (v : 𝕜') : deriv (fun y => u y * v) x = deriv u x * v := by by_cases hu : DifferentiableAt 𝕜 u x · exact deriv_mul_const hu v - · rw [deriv_zero_of_not_differentiableAt hu, MulZeroClass.zero_mul] + · rw [deriv_zero_of_not_differentiableAt hu, zero_mul] rcases eq_or_ne v 0 with (rfl | hd) - · simp only [MulZeroClass.mul_zero, deriv_const] + · simp only [mul_zero, deriv_const] · refine' deriv_zero_of_not_differentiableAt (mt (fun H => _) hu) simpa only [mul_inv_cancel_right₀ hd] using H.mul_const v⁻¹ #align deriv_mul_const_field deriv_mul_const_field diff --git a/Mathlib/Analysis/Calculus/Deriv/ZPow.lean b/Mathlib/Analysis/Calculus/Deriv/ZPow.lean index 3a7bd6c81b7c5..a0fe4d6ba03c6 100644 --- a/Mathlib/Analysis/Calculus/Deriv/ZPow.lean +++ b/Mathlib/Analysis/Calculus/Deriv/ZPow.lean @@ -92,7 +92,7 @@ theorem deriv_zpow (m : ℤ) (x : 𝕜) : deriv (fun x => x ^ m) x = m * x ^ (m · rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ - rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, MulZeroClass.mul_zero] + rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero] #align deriv_zpow deriv_zpow @[simp] @@ -128,7 +128,7 @@ theorem iter_deriv_pow (n : ℕ) (x : 𝕜) (k : ℕ) : · rw [Int.ofNat_sub hkn] · have : (∏ i in Finset.range k, (n - i : 𝕜)) = 0 := Finset.prod_eq_zero (Finset.mem_range.2 hnk) (sub_self _) - simp only [this, MulZeroClass.zero_mul] + simp only [this, zero_mul] #align iter_deriv_pow iter_deriv_pow @[simp] diff --git a/Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean b/Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean index 2a72d697c3dc7..d736e100624eb 100644 --- a/Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean +++ b/Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean @@ -83,7 +83,7 @@ theorem Convex.taylor_approx_two_segment {v w : E} (hv : x + v ∈ interior s) have : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[>] (0 : ℝ)) (𝓝 (0 * (‖v‖ + ‖w‖))) := (continuous_id.mul continuous_const).continuousWithinAt apply (tendsto_order.1 this).2 δ - simpa only [MulZeroClass.zero_mul] using δpos + simpa only [zero_mul] using δpos have E2 : ∀ᶠ h in 𝓝[>] (0 : ℝ), (h : ℝ) < 1 := mem_nhdsWithin_Ioi_iff_exists_Ioo_subset.2 ⟨(1 : ℝ), by simp only [mem_Ioi, zero_lt_one], fun x hx => hx.2⟩ @@ -166,7 +166,7 @@ theorem Convex.taylor_approx_two_segment {v w : E} (hv : x + v ∈ interior s) norm_image_sub_le_of_norm_deriv_le_segment' g_deriv g'_bound 1 (right_mem_Icc.2 zero_le_one) convert I using 1 · congr 1 - simp only [Nat.one_ne_zero, add_zero, one_mul, zero_div, MulZeroClass.zero_mul, sub_zero, + simp only [Nat.one_ne_zero, add_zero, one_mul, zero_div, zero_mul, sub_zero, zero_smul, Ne.def, not_false_iff, bit0_eq_zero, zero_pow'] abel · simp only [Real.norm_eq_abs, abs_mul, add_nonneg (norm_nonneg v) (norm_nonneg w), abs_of_nonneg, diff --git a/Mathlib/Analysis/Calculus/Monotone.lean b/Mathlib/Analysis/Calculus/Monotone.lean index a847aad24ebab..c9cce07405def 100644 --- a/Mathlib/Analysis/Calculus/Monotone.lean +++ b/Mathlib/Analysis/Calculus/Monotone.lean @@ -51,7 +51,7 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l : have : Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x))) := by apply Tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds) exact ((tendsto_id.sub_const x).const_mul c).const_add 1 - simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this + simp only [_root_.sub_self, add_zero, mul_zero] at this apply Tendsto.congr' (Eventually.filter_mono hl _) this filter_upwards [self_mem_nhdsWithin] with y hy field_simp [sub_ne_zero.2 hy] diff --git a/Mathlib/Analysis/Complex/Circle.lean b/Mathlib/Analysis/Complex/Circle.lean index fb5159152a83d..93f6f7a263e43 100644 --- a/Mathlib/Analysis/Complex/Circle.lean +++ b/Mathlib/Analysis/Complex/Circle.lean @@ -125,7 +125,7 @@ theorem expMapCircle_apply (t : ℝ) : ↑(expMapCircle t) = Complex.exp (t * Co @[simp] theorem expMapCircle_zero : expMapCircle 0 = 1 := Subtype.ext <| by - rw [expMapCircle_apply, ofReal_zero, MulZeroClass.zero_mul, exp_zero, Submonoid.coe_one] + rw [expMapCircle_apply, ofReal_zero, zero_mul, exp_zero, Submonoid.coe_one] #align exp_map_circle_zero expMapCircle_zero @[simp] diff --git a/Mathlib/Analysis/Complex/UnitDisc/Basic.lean b/Mathlib/Analysis/Complex/UnitDisc/Basic.lean index 95d1da7945e69..40e2e9e3d0487 100644 --- a/Mathlib/Analysis/Complex/UnitDisc/Basic.lean +++ b/Mathlib/Analysis/Complex/UnitDisc/Basic.lean @@ -98,8 +98,8 @@ theorem mk_neg (z : ℂ) (hz : abs (-z) < 1) : mk (-z) hz = -mk z (abs.map_neg z instance : SemigroupWithZero 𝔻 := { instCommSemigroup with zero := mk 0 <| (map_zero _).trans_lt one_pos - zero_mul := fun _ => coe_injective <| MulZeroClass.zero_mul _ - mul_zero := fun _ => coe_injective <| MulZeroClass.mul_zero _ } + zero_mul := fun _ => coe_injective <| zero_mul _ + mul_zero := fun _ => coe_injective <| mul_zero _ } @[simp] theorem coe_zero : ((0 : 𝔻) : ℂ) = 0 := diff --git a/Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean b/Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean index 9062e6370cd50..abf895901ceef 100644 --- a/Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean +++ b/Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean @@ -168,9 +168,9 @@ theorem linear_ne_zero (cd : Fin 2 → ℝ) (z : ℍ) (h : cd ≠ 0) : (cd 0 : have : cd 0 = 0 := by -- we will need this twice apply_fun Complex.im at h - simpa only [z.im_ne_zero, Complex.add_im, add_zero, coe_im, MulZeroClass.zero_mul, or_false_iff, + simpa only [z.im_ne_zero, Complex.add_im, add_zero, coe_im, zero_mul, or_false_iff, Complex.ofReal_im, Complex.zero_im, Complex.mul_im, mul_eq_zero] using h - simp only [this, MulZeroClass.zero_mul, Complex.ofReal_zero, zero_add, Complex.ofReal_eq_zero] + simp only [this, zero_mul, Complex.ofReal_zero, zero_add, Complex.ofReal_eq_zero] at h ext i fin_cases i <;> assumption @@ -183,10 +183,10 @@ theorem denom_ne_zero (g : GL(2, ℝ)⁺) (z : ℍ) : denom g z ≠ 0 := by simp only [GeneralLinearGroup.det_apply_val] at DET have H1 : (↑ₘg 1 0 : ℝ) = 0 ∨ z.im = 0 := by simpa [num, denom] using congr_arg Complex.im H cases' H1 with H1 - · simp only [H1, Complex.ofReal_zero, denom, MulZeroClass.zero_mul, zero_add, + · simp only [H1, Complex.ofReal_zero, denom, zero_mul, zero_add, Complex.ofReal_eq_zero] at H rw [Matrix.det_fin_two (↑ₘg : Matrix (Fin 2) (Fin 2) ℝ)] at DET - simp only [H, H1, MulZeroClass.mul_zero, sub_zero, lt_self_iff_false] at DET + simp only [H, H1, mul_zero, sub_zero, lt_self_iff_false] at DET · change z.im > 0 at hz linarith #align upper_half_plane.denom_ne_zero UpperHalfPlane.denom_ne_zero @@ -479,7 +479,7 @@ theorem modular_T_zpow_smul (z : ℍ) (n : ℤ) : ModularGroup.T ^ n • z = (n -- Porting note: added `coeToGL` and merged `rw` and `simp` simp [coeToGL, ModularGroup.coe_T_zpow, of_apply, cons_val_zero, algebraMap.coe_one, Complex.ofReal_one, one_mul, cons_val_one, - head_cons, algebraMap.coe_zero, MulZeroClass.zero_mul, zero_add, div_one] + head_cons, algebraMap.coe_zero, zero_mul, zero_add, div_one] #align upper_half_plane.modular_T_zpow_smul UpperHalfPlane.modular_T_zpow_smul theorem modular_T_smul (z : ℍ) : ModularGroup.T • z = (1 : ℝ) +ᵥ z := by diff --git a/Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean b/Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean index 0805b4c89eb28..5199c8a55a7a4 100644 --- a/Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean +++ b/Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean @@ -129,7 +129,7 @@ theorem dist_le_dist_coe_div_sqrt (z w : ℍ) : dist z w ≤ dist (z : ℂ) w / to `TopologicalSpace`. We replace it later. -/ def metricSpaceAux : MetricSpace ℍ where dist := dist - dist_self z := by rw [dist_eq, dist_self, zero_div, arsinh_zero, MulZeroClass.mul_zero] + dist_self z := by rw [dist_eq, dist_self, zero_div, arsinh_zero, mul_zero] dist_comm := UpperHalfPlane.dist_comm dist_triangle := UpperHalfPlane.dist_triangle eq_of_dist_eq_zero {z w} h := by diff --git a/Mathlib/Analysis/ConstantSpeed.lean b/Mathlib/Analysis/ConstantSpeed.lean index 5989d901d9878..c939c34fae203 100644 --- a/Mathlib/Analysis/ConstantSpeed.lean +++ b/Mathlib/Analysis/ConstantSpeed.lean @@ -66,7 +66,7 @@ theorem hasConstantSpeedOnWith_of_subsingleton (f : ℝ → E) {s : Set ℝ} (hs (l : ℝ≥0) : HasConstantSpeedOnWith f s l := by rintro x hx y hy; cases hs hx hy rw [eVariationOn.subsingleton f (fun y hy z hz => hs hy.1 hz.1 : (s ∩ Icc x x).Subsingleton)] - simp only [sub_self, MulZeroClass.mul_zero, ENNReal.ofReal_zero] + simp only [sub_self, mul_zero, ENNReal.ofReal_zero] #align has_constant_speed_on_with_of_subsingleton hasConstantSpeedOnWith_of_subsingleton theorem hasConstantSpeedOnWith_iff_ordered : @@ -127,7 +127,7 @@ theorem HasConstantSpeedOnWith.union {t : Set ℝ} (hfs : HasConstantSpeedOnWith exacts [⟨⟨hs.1, hs.2 zs, le_rfl⟩, fun w ⟨_, _, wx⟩ => wx⟩, ⟨⟨ht.1, le_rfl, ht.2 yt⟩, fun w ⟨_, xw, _⟩ => xw⟩] · cases le_antisymm zy ((hs.2 ys).trans (ht.2 zt)) - simp only [Icc_self, sub_self, MulZeroClass.mul_zero, ENNReal.ofReal_zero] + simp only [Icc_self, sub_self, mul_zero, ENNReal.ofReal_zero] exact eVariationOn.subsingleton _ fun _ ⟨_, uz⟩ _ ⟨_, vz⟩ => uz.trans vz.symm · have : (s ∪ t) ∩ Icc z y = t ∩ Icc z y := by ext w; constructor @@ -157,7 +157,7 @@ theorem HasConstantSpeedOnWith.Icc_Icc {x y z : ℝ} (hfs : HasConstantSpeedOnWi theorem hasConstantSpeedOnWith_zero_iff : HasConstantSpeedOnWith f s 0 ↔ ∀ (x) (_ : x ∈ s) (y) (_ : y ∈ s), edist (f x) (f y) = 0 := by dsimp [HasConstantSpeedOnWith] - simp only [MulZeroClass.zero_mul, ENNReal.ofReal_zero, ← eVariationOn.eq_zero_iff] + simp only [zero_mul, ENNReal.ofReal_zero, ← eVariationOn.eq_zero_iff] constructor · by_contra' obtain ⟨h, hfs⟩ := this diff --git a/Mathlib/Analysis/Convex/Caratheodory.lean b/Mathlib/Analysis/Convex/Caratheodory.lean index 4d891becbece8..c925952710fd8 100644 --- a/Mathlib/Analysis/Convex/Caratheodory.lean +++ b/Mathlib/Analysis/Convex/Caratheodory.lean @@ -75,7 +75,7 @@ theorem mem_convexHull_erase [DecidableEq E] {t : Finset E} (h : ¬AffineIndepen ∑ e in t.erase i₀, k e = ∑ e in t, k e := by conv_rhs => rw [← insert_erase hi₀, sum_insert (not_mem_erase i₀ t), hk, zero_add] _ = ∑ e in t, (f e - f i₀ / g i₀ * g e) := rfl - _ = 1 := by rw [sum_sub_distrib, fsum, ← mul_sum, gsum, MulZeroClass.mul_zero, sub_zero] + _ = 1 := by rw [sum_sub_distrib, fsum, ← mul_sum, gsum, mul_zero, sub_zero] refine' ⟨⟨i₀, hi₀⟩, k, _, by convert ksum, _⟩ · simp only [and_imp, sub_nonneg, mem_erase, Ne.def, Subtype.coe_mk] intro e _ het diff --git a/Mathlib/Analysis/Convex/Segment.lean b/Mathlib/Analysis/Convex/Segment.lean index fceda318911d1..e42fb95cafd8d 100644 --- a/Mathlib/Analysis/Convex/Segment.lean +++ b/Mathlib/Analysis/Convex/Segment.lean @@ -551,13 +551,13 @@ theorem Convex.mem_Ioc (h : x < y) : · obtain ⟨a, b, ha, hb, hab, rfl⟩ := (Convex.mem_Icc h.le).1 (Ioc_subset_Icc_self hz) obtain rfl | hb' := hb.eq_or_lt · rw [add_zero] at hab - rw [hab, one_mul, MulZeroClass.zero_mul, add_zero] at hz + rw [hab, one_mul, zero_mul, add_zero] at hz exact (hz.1.ne rfl).elim · exact ⟨a, b, ha, hb', hab, rfl⟩ · rintro ⟨a, b, ha, hb, hab, rfl⟩ obtain rfl | ha' := ha.eq_or_lt · rw [zero_add] at hab - rwa [hab, one_mul, MulZeroClass.zero_mul, zero_add, right_mem_Ioc] + rwa [hab, one_mul, zero_mul, zero_add, right_mem_Ioc] · exact Ioo_subset_Ioc_self ((Convex.mem_Ioo h).2 ⟨a, b, ha', hb, hab, rfl⟩) #align convex.mem_Ioc Convex.mem_Ioc @@ -569,13 +569,13 @@ theorem Convex.mem_Ico (h : x < y) : · obtain ⟨a, b, ha, hb, hab, rfl⟩ := (Convex.mem_Icc h.le).1 (Ico_subset_Icc_self hz) obtain rfl | ha' := ha.eq_or_lt · rw [zero_add] at hab - rw [hab, one_mul, MulZeroClass.zero_mul, zero_add] at hz + rw [hab, one_mul, zero_mul, zero_add] at hz exact (hz.2.ne rfl).elim · exact ⟨a, b, ha', hb, hab, rfl⟩ · rintro ⟨a, b, ha, hb, hab, rfl⟩ obtain rfl | hb' := hb.eq_or_lt · rw [add_zero] at hab - rwa [hab, one_mul, MulZeroClass.zero_mul, add_zero, left_mem_Ico] + rwa [hab, one_mul, zero_mul, add_zero, left_mem_Ico] · exact Ioo_subset_Ico_self ((Convex.mem_Ioo h).2 ⟨a, b, ha, hb', hab, rfl⟩) #align convex.mem_Ico Convex.mem_Ico diff --git a/Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean b/Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean index 37a815589225b..3c181d31256b0 100644 --- a/Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean +++ b/Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean @@ -124,10 +124,10 @@ theorem deriv_sqrt_mul_log (x : ℝ) : deriv (fun x => sqrt x * log x) x = (2 + log x) / (2 * sqrt x) := by cases' lt_or_le 0 x with hx hx · exact (hasDerivAt_sqrt_mul_log hx.ne').deriv - · rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.mul_zero, div_zero] + · rw [sqrt_eq_zero_of_nonpos hx, mul_zero, div_zero] refine' HasDerivWithinAt.deriv_eq_zero _ (uniqueDiffOn_Iic 0 x hx) refine' (hasDerivWithinAt_const x _ 0).congr_of_mem (fun x hx => _) hx - rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.zero_mul] + rw [sqrt_eq_zero_of_nonpos hx, zero_mul] #align deriv_sqrt_mul_log deriv_sqrt_mul_log theorem deriv_sqrt_mul_log' : @@ -139,10 +139,10 @@ theorem deriv2_sqrt_mul_log (x : ℝ) : deriv^[2] (fun x => sqrt x * log x) x = -log x / (4 * sqrt x ^ 3) := by simp only [Nat.iterate, deriv_sqrt_mul_log'] cases' le_or_lt x 0 with hx hx - · rw [sqrt_eq_zero_of_nonpos hx, zero_pow zero_lt_three, MulZeroClass.mul_zero, div_zero] + · rw [sqrt_eq_zero_of_nonpos hx, zero_pow zero_lt_three, mul_zero, div_zero] refine' HasDerivWithinAt.deriv_eq_zero _ (uniqueDiffOn_Iic 0 x hx) refine' (hasDerivWithinAt_const _ _ 0).congr_of_mem (fun x hx => _) hx - rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.mul_zero, div_zero] + rw [sqrt_eq_zero_of_nonpos hx, mul_zero, div_zero] · have h₀ : sqrt x ≠ 0 := sqrt_ne_zero'.2 hx convert (((hasDerivAt_log hx.ne').const_add 2).div ((hasDerivAt_sqrt hx.ne').const_mul 2) <| mul_ne_zero two_ne_zero h₀).deriv using 1 diff --git a/Mathlib/Analysis/Fourier/AddCircle.lean b/Mathlib/Analysis/Fourier/AddCircle.lean index d2a28b998feab..07355521998d9 100644 --- a/Mathlib/Analysis/Fourier/AddCircle.lean +++ b/Mathlib/Analysis/Fourier/AddCircle.lean @@ -186,7 +186,7 @@ theorem fourier_zero' {x : AddCircle T} : @toCircle T 0 = (1 : ℂ) := by -- @[simp] -- Porting note: simp normal form is *also* `fourier_zero'` theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 := by - rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, MulZeroClass.mul_zero, + rw [← QuotientAddGroup.mk_zero, fourier_coe_apply, Complex.ofReal_zero, mul_zero, zero_div, Complex.exp_zero] #align fourier_eval_zero fourier_eval_zero diff --git a/Mathlib/Analysis/Fourier/FourierTransform.lean b/Mathlib/Analysis/Fourier/FourierTransform.lean index 12eb2b7b70bf6..924e66a3f71e2 100644 --- a/Mathlib/Analysis/Fourier/FourierTransform.lean +++ b/Mathlib/Analysis/Fourier/FourierTransform.lean @@ -231,7 +231,7 @@ namespace Real /-- The standard additive character of `ℝ`, given by `fun x ↦ exp (2 * π * x * I)`. -/ def fourierChar : Multiplicative ℝ →* 𝕊 where toFun z := expMapCircle (2 * π * Multiplicative.toAdd z) - map_one' := by simp only; rw [toAdd_one, MulZeroClass.mul_zero, expMapCircle_zero] + map_one' := by simp only; rw [toAdd_one, mul_zero, expMapCircle_zero] map_mul' x y := by simp only; rw [toAdd_mul, mul_add, expMapCircle_add] #align real.fourier_char Real.fourierChar diff --git a/Mathlib/Analysis/InnerProductSpace/Basic.lean b/Mathlib/Analysis/InnerProductSpace/Basic.lean index cdd301bc8fe43..caab926e99cd4 100644 --- a/Mathlib/Analysis/InnerProductSpace/Basic.lean +++ b/Mathlib/Analysis/InnerProductSpace/Basic.lean @@ -245,7 +245,7 @@ theorem inner_smul_right (x y : F) {r : 𝕜} : ⟪x, r • y⟫ = r * ⟪x, y theorem inner_zero_left (x : F) : ⟪0, x⟫ = 0 := by rw [← zero_smul 𝕜 (0 : F), inner_smul_left]; - simp only [MulZeroClass.zero_mul, RingHom.map_zero] + simp only [zero_mul, RingHom.map_zero] #align inner_product_space.core.inner_zero_left InnerProductSpace.Core.inner_zero_left theorem inner_zero_right (x : F) : ⟪x, 0⟫ = 0 := by @@ -330,7 +330,7 @@ showing the core is a normed group. -/ theorem inner_mul_inner_self_le (x y : F) : ‖⟪x, y⟫‖ * ‖⟪y, x⟫‖ ≤ re ⟪x, x⟫ * re ⟪y, y⟫ := by rcases eq_or_ne x 0 with (rfl | hx) - · simpa only [inner_zero_left, map_zero, MulZeroClass.zero_mul, norm_zero] using le_rfl + · simpa only [inner_zero_left, map_zero, zero_mul, norm_zero] using le_rfl · have hx' : 0 < normSqF x := inner_self_nonneg.lt_of_ne' (mt normSq_eq_zero.1 hx) rw [← sub_nonneg, ← mul_nonneg_iff_right_nonneg_of_pos hx', ← normSq, ← normSq, norm_inner_symm y, ← sq, ← cauchy_schwarz_aux] @@ -555,7 +555,7 @@ theorem DFinsupp.inner_sum {ι : Type*} [dec : DecidableEq ι] {α : ι → Type @[simp] theorem inner_zero_left (x : E) : ⟪0, x⟫ = 0 := by - rw [← zero_smul 𝕜 (0 : E), inner_smul_left, RingHom.map_zero, MulZeroClass.zero_mul] + rw [← zero_smul 𝕜 (0 : E), inner_smul_left, RingHom.map_zero, zero_mul] #align inner_zero_left inner_zero_left theorem inner_re_zero_left (x : E) : re ⟪0, x⟫ = 0 := by @@ -731,7 +731,7 @@ theorem linearIndependent_of_ne_zero_of_inner_eq_zero {ι : Type*} {v : ι → E convert Finset.sum_eq_single (β := 𝕜) i ?_ ?_ · rw [inner_smul_right] · intro j _hj hji - rw [inner_smul_right, ho i j hji.symm, MulZeroClass.mul_zero] + rw [inner_smul_right, ho i j hji.symm, mul_zero] · exact fun h => False.elim (h hi) simpa [hg, hz] using h' #align linear_independent_of_ne_zero_of_inner_eq_zero linearIndependent_of_ne_zero_of_inner_eq_zero @@ -1736,8 +1736,8 @@ theorem inner_sum_smul_sum_smul_of_sum_eq_zero {ι₁ : Type*} {s₁ : Finset ι simp_rw [sum_inner, inner_sum, real_inner_smul_left, real_inner_smul_right, real_inner_eq_norm_mul_self_add_norm_mul_self_sub_norm_sub_mul_self_div_two, ← div_sub_div_same, ← div_add_div_same, mul_sub_left_distrib, left_distrib, Finset.sum_sub_distrib, - Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.sum_mul, h₁, h₂, MulZeroClass.zero_mul, - MulZeroClass.mul_zero, Finset.sum_const_zero, zero_add, zero_sub, Finset.mul_sum, neg_div, + Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.sum_mul, h₁, h₂, zero_mul, + mul_zero, Finset.sum_const_zero, zero_add, zero_sub, Finset.mul_sum, neg_div, Finset.sum_div, mul_div_assoc, mul_assoc] #align inner_sum_smul_sum_smul_of_sum_eq_zero inner_sum_smul_sum_smul_of_sum_eq_zero diff --git a/Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean b/Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean index 84783bc3d7f33..9603ad9dc618f 100644 --- a/Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean +++ b/Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean @@ -99,7 +99,7 @@ theorem gramSchmidt_orthogonal (f : ι → E) {a b : ι} (h₀ : a ≠ b) : inner_smul_right] rw [Finset.sum_eq_single_of_mem a (Finset.mem_Iio.mpr h₀)] · by_cases h : gramSchmidt 𝕜 f a = 0 - · simp only [h, inner_zero_left, zero_div, MulZeroClass.zero_mul, sub_zero] + · simp only [h, inner_zero_left, zero_div, zero_mul, sub_zero] · rw [IsROrC.ofReal_pow, ← inner_self_eq_norm_sq_to_K, div_mul_cancel, sub_self] rwa [inner_self_ne_zero] intro i hi hia diff --git a/Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean b/Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean index 71dadd6ac8c63..65671e3625264 100644 --- a/Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean +++ b/Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean @@ -94,7 +94,7 @@ theorem range_eq_top (coercive : IsCoercive B) : range B♯ = ⊤ := by intro v w mem_w_orthogonal rcases coercive with ⟨C, C_pos, coercivity⟩ obtain rfl : w = 0 := by - rw [← norm_eq_zero, ← mul_self_eq_zero, ← mul_right_inj' C_pos.ne', MulZeroClass.mul_zero, ← + rw [← norm_eq_zero, ← mul_self_eq_zero, ← mul_right_inj' C_pos.ne', mul_zero, ← mul_assoc] apply le_antisymm · calc diff --git a/Mathlib/Analysis/InnerProductSpace/OfNorm.lean b/Mathlib/Analysis/InnerProductSpace/OfNorm.lean index b454e58cbd10c..7c13ed8df5a8a 100644 --- a/Mathlib/Analysis/InnerProductSpace/OfNorm.lean +++ b/Mathlib/Analysis/InnerProductSpace/OfNorm.lean @@ -144,7 +144,7 @@ theorem inner_.conj_symm (x y : E) : conj (inner_ 𝕜 y x) = inner_ 𝕜 x y := simp only [map_sub, map_add, algebraMap_eq_ofReal, ← ofReal_mul, conj_ofReal, map_mul, conj_I] rw [add_comm y x, norm_sub_rev] by_cases hI : (I : 𝕜) = 0 - · simp only [hI, neg_zero, MulZeroClass.zero_mul] + · simp only [hI, neg_zero, zero_mul] -- Porting note: this replaces `norm_I_of_ne_zero` which does not exist in Lean 4 have : ‖(I : 𝕜)‖ = 1 := by rw [← mul_self_inj_of_nonneg (norm_nonneg I) zero_le_one, one_mul, ← norm_mul, @@ -243,8 +243,8 @@ theorem add_left (x y z : E) : inner_ 𝕜 (x + y) z = inner_ 𝕜 x z + inner_ theorem nat (n : ℕ) (x y : E) : inner_ 𝕜 ((n : 𝕜) • x) y = (n : 𝕜) * inner_ 𝕜 x y := by induction' n with n ih - · simp only [inner_, Nat.zero_eq, zero_sub, Nat.cast_zero, MulZeroClass.zero_mul, - eq_self_iff_true, zero_smul, zero_add, MulZeroClass.mul_zero, sub_self, norm_neg, smul_zero] + · simp only [inner_, Nat.zero_eq, zero_sub, Nat.cast_zero, zero_mul, + eq_self_iff_true, zero_smul, zero_add, mul_zero, sub_self, norm_neg, smul_zero] · simp only [Nat.cast_succ, add_smul, one_smul] rw [add_left, ih, add_mul, one_mul] #align inner_product_spaceable.nat InnerProductSpaceable.nat @@ -260,8 +260,8 @@ private theorem int_prop (n : ℤ) : innerProp' E (n : 𝕜) := by · rw [Int.sign_eq_neg_one_of_neg hn, innerProp_neg_one ((n.natAbs : 𝕜) • x), nat] simp only [map_neg, neg_mul, one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero, eq_self_iff_true, Int.cast_one, map_one, neg_inj, Nat.cast_eq_zero, Int.cast_neg] - · simp only [inner_, Int.cast_zero, zero_sub, Nat.cast_zero, MulZeroClass.zero_mul, - eq_self_iff_true, Int.sign_zero, zero_smul, zero_add, MulZeroClass.mul_zero, smul_zero, + · simp only [inner_, Int.cast_zero, zero_sub, Nat.cast_zero, zero_mul, + eq_self_iff_true, Int.sign_zero, zero_smul, zero_add, mul_zero, smul_zero, sub_self, norm_neg, Int.natAbs_zero] · rw [Int.sign_eq_one_of_pos hn] simp only [one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero, eq_self_iff_true, diff --git a/Mathlib/Analysis/InnerProductSpace/Orthogonal.lean b/Mathlib/Analysis/InnerProductSpace/Orthogonal.lean index 39829f71d5e7d..d8fa753dd31d4 100644 --- a/Mathlib/Analysis/InnerProductSpace/Orthogonal.lean +++ b/Mathlib/Analysis/InnerProductSpace/Orthogonal.lean @@ -43,7 +43,7 @@ def orthogonal : Submodule 𝕜 E where carrier := { v | ∀ u ∈ K, ⟪u, v⟫ = 0 } zero_mem' _ _ := inner_zero_right _ add_mem' hx hy u hu := by rw [inner_add_right, hx u hu, hy u hu, add_zero] - smul_mem' c x hx u hu := by rw [inner_smul_right, hx u hu, MulZeroClass.mul_zero] + smul_mem' c x hx u hu := by rw [inner_smul_right, hx u hu, mul_zero] #align submodule.orthogonal Submodule.orthogonal @[inherit_doc] diff --git a/Mathlib/Analysis/InnerProductSpace/Projection.lean b/Mathlib/Analysis/InnerProductSpace/Projection.lean index 39c29e513d3a8..4f238cdc4e181 100644 --- a/Mathlib/Analysis/InnerProductSpace/Projection.lean +++ b/Mathlib/Analysis/InnerProductSpace/Projection.lean @@ -173,14 +173,14 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h exact sqrt_zero.symm have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat - simp only [MulZeroClass.mul_zero] + simp only [mul_zero] have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by convert(@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat - simp only [MulZeroClass.mul_zero] + simp only [mul_zero] have eq₂ : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by convert this.mul tendsto_one_div_add_atTop_nhds_0_nat - simp only [MulZeroClass.mul_zero] + simp only [mul_zero] convert eq₁.add eq₂ simp only [add_zero] -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`. @@ -487,7 +487,7 @@ def orthogonalProjection : E →L[𝕜] K := have ho : ∀ w ∈ K, ⟪c • x - c • orthogonalProjectionFn K x, w⟫ = 0 := by intro w hw rw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw, - MulZeroClass.mul_zero] + mul_zero] ext simp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho] } 1 fun x => by diff --git a/Mathlib/Analysis/InnerProductSpace/Symmetric.lean b/Mathlib/Analysis/InnerProductSpace/Symmetric.lean index 42fa82af5d0b3..35cd6196fd355 100644 --- a/Mathlib/Analysis/InnerProductSpace/Symmetric.lean +++ b/Mathlib/Analysis/InnerProductSpace/Symmetric.lean @@ -170,13 +170,13 @@ theorem IsSymmetric.inner_map_polarization {T : E →ₗ[𝕜] E} (hT : T.IsSymm I * ⟪T (x - (I : 𝕜) • y), x - (I : 𝕜) • y⟫) / 4 := by rcases@I_mul_I_ax 𝕜 _ with (h | h) - · simp_rw [h, MulZeroClass.zero_mul, sub_zero, add_zero, map_add, map_sub, inner_add_left, + · simp_rw [h, zero_mul, sub_zero, add_zero, map_add, map_sub, inner_add_left, inner_add_right, inner_sub_left, inner_sub_right, hT x, ← inner_conj_symm x (T y)] suffices (re ⟪T y, x⟫ : 𝕜) = ⟪T y, x⟫ by rw [conj_eq_iff_re.mpr this] ring · rw [← re_add_im ⟪T y, x⟫] - simp_rw [h, MulZeroClass.mul_zero, add_zero] + simp_rw [h, mul_zero, add_zero] norm_cast · simp_rw [map_add, map_sub, inner_add_left, inner_add_right, inner_sub_left, inner_sub_right, LinearMap.map_smul, inner_smul_left, inner_smul_right, IsROrC.conj_I, mul_add, mul_sub, diff --git a/Mathlib/Analysis/InnerProductSpace/TwoDim.lean b/Mathlib/Analysis/InnerProductSpace/TwoDim.lean index ad9ff5e3243ac..d3153767d6ced 100644 --- a/Mathlib/Analysis/InnerProductSpace/TwoDim.lean +++ b/Mathlib/Analysis/InnerProductSpace/TwoDim.lean @@ -464,7 +464,7 @@ theorem nonneg_inner_and_areaForm_eq_zero_iff_sameRay (x y : E) : · intro h obtain ⟨r, hr, rfl⟩ := h.exists_nonneg_left hx simp only [inner_smul_right, real_inner_self_eq_norm_sq, LinearMap.map_smulₛₗ, - areaForm_apply_self, Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, eq_self_iff_true, + areaForm_apply_self, Algebra.id.smul_eq_mul, mul_zero, eq_self_iff_true, and_true_iff] positivity #align orientation.nonneg_inner_and_area_form_eq_zero_iff_same_ray Orientation.nonneg_inner_and_areaForm_eq_zero_iff_sameRay diff --git a/Mathlib/Analysis/LocallyConvex/WithSeminorms.lean b/Mathlib/Analysis/LocallyConvex/WithSeminorms.lean index 32914e4d500c2..92d2f42a2e3f0 100644 --- a/Mathlib/Analysis/LocallyConvex/WithSeminorms.lean +++ b/Mathlib/Analysis/LocallyConvex/WithSeminorms.lean @@ -150,7 +150,7 @@ theorem basisSets_smul_right (v : E) (U : Set E) (hU : U ∈ p.basisSets) : · simp_rw [(lt_div_iff h).symm] rw [← _root_.ball_zero_eq] exact Metric.ball_mem_nhds 0 (div_pos hr h) - simp_rw [le_antisymm (not_lt.mp h) (map_nonneg _ v), MulZeroClass.mul_zero, hr] + simp_rw [le_antisymm (not_lt.mp h) (map_nonneg _ v), mul_zero, hr] exact IsOpen.mem_nhds isOpen_univ (mem_univ 0) #align seminorm_family.basis_sets_smul_right SeminormFamily.basisSets_smul_right diff --git a/Mathlib/Analysis/MeanInequalities.lean b/Mathlib/Analysis/MeanInequalities.lean index 4901b9971b55c..2bb8327742321 100644 --- a/Mathlib/Analysis/MeanInequalities.lean +++ b/Mathlib/Analysis/MeanInequalities.lean @@ -160,7 +160,7 @@ theorem arith_mean_weighted_of_constant (w z : ι → ℝ) (x : ℝ) (hw' : ∑ ∑ i in s, w i * z i = ∑ i in s, w i * x := by refine' sum_congr rfl fun i hi => _ cases' eq_or_ne (w i) 0 with hwi hwi - · rw [hwi, MulZeroClass.zero_mul, MulZeroClass.zero_mul] + · rw [hwi, zero_mul, zero_mul] · rw [hx i hi hwi] _ = x := by rw [← sum_mul, hw', one_mul] #align real.arith_mean_weighted_of_constant Real.arith_mean_weighted_of_constant @@ -335,7 +335,7 @@ private theorem inner_le_Lp_mul_Lp_of_norm_le_one (f g : ι → ℝ≥0) {p q : private theorem inner_le_Lp_mul_Lp_of_norm_eq_zero (f g : ι → ℝ≥0) {p q : ℝ} (hpq : p.IsConjugateExponent q) (hf : ∑ i in s, f i ^ p = 0) : ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q) := by - simp only [hf, hpq.ne_zero, one_div, sum_eq_zero_iff, zero_rpow, MulZeroClass.zero_mul, + simp only [hf, hpq.ne_zero, one_div, sum_eq_zero_iff, zero_rpow, zero_mul, inv_eq_zero, Ne.def, not_false_iff, le_zero_iff, mul_eq_zero] intro i his left diff --git a/Mathlib/Analysis/Normed/Group/AddCircle.lean b/Mathlib/Analysis/Normed/Group/AddCircle.lean index 520f8f8df6f1e..a1db652083f61 100644 --- a/Mathlib/Analysis/Normed/Group/AddCircle.lean +++ b/Mathlib/Analysis/Normed/Group/AddCircle.lean @@ -228,7 +228,7 @@ theorem coe_real_preimage_closedBall_inter_eq {x ε : ℝ} (s : Set ℝ) · have : p ≤ ↑z * p nlinarith linarith [abs_eq_self.mpr hp.le] - · simp only [MulZeroClass.mul_zero, add_zero, abs_zero, zero_div] at hy₁ hy₂ hε + · simp only [mul_zero, add_zero, abs_zero, zero_div] at hy₁ hy₂ hε linarith · cases' Int.cast_le_neg_one_or_one_le_cast_of_ne_zero ℝ hz with hz' hz' · have : -p ≤ ↑z * p @@ -268,7 +268,7 @@ theorem le_add_order_smul_norm_of_isOfFinAddOrder {u : AddCircle p} (hu : IsOfFi rw [hn, nsmul_eq_mul, ← mul_assoc, mul_comm _ p, mul_assoc, mul_div_cancel' _ hu, mul_le_mul_left hp.out, Nat.one_le_cast, Nat.one_le_iff_ne_zero] contrapose! hu' - simpa only [hu', Nat.cast_zero, zero_div, MulZeroClass.mul_zero, norm_eq_zero] using hn + simpa only [hu', Nat.cast_zero, zero_div, mul_zero, norm_eq_zero] using hn #align add_circle.le_add_order_smul_norm_of_is_of_fin_add_order AddCircle.le_add_order_smul_norm_of_isOfFinAddOrder end FiniteOrderPoints diff --git a/Mathlib/Analysis/Normed/Ring/Seminorm.lean b/Mathlib/Analysis/Normed/Ring/Seminorm.lean index 0cdcfad9b69ef..7f494e762968f 100644 --- a/Mathlib/Analysis/Normed/Ring/Seminorm.lean +++ b/Mathlib/Analysis/Normed/Ring/Seminorm.lean @@ -108,7 +108,7 @@ theorem ext {p q : RingSeminorm R} : (∀ x, p x = q x) → p = q := instance : Zero (RingSeminorm R) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with mul_le' := - fun _ _ => (MulZeroClass.zero_mul _).ge }⟩ + fun _ _ => (zero_mul _).ge }⟩ theorem eq_zero_iff {p : RingSeminorm R} : p = 0 ↔ ∀ x, p x = 0 := FunLike.ext_iff @@ -156,7 +156,7 @@ theorem seminorm_one_eq_one_iff_ne_zero (hp : p 1 ≤ 1) : p 1 = 1 ↔ p ≠ 0 : obtain hp0 | hp0 := (map_nonneg p (1 : R)).eq_or_gt · exfalso refine h (ext fun x => (map_nonneg _ _).antisymm' ?_) - simpa only [hp0, mul_one, MulZeroClass.mul_zero] using map_mul_le_mul p x 1 + simpa only [hp0, mul_one, mul_zero] using map_mul_le_mul p x 1 · refine' hp.antisymm ((le_mul_iff_one_le_left hp0).1 _) simpa only [one_mul] using map_mul_le_mul p (1 : R) _ #align ring_seminorm.seminorm_one_eq_one_iff_ne_zero RingSeminorm.seminorm_one_eq_one_iff_ne_zero @@ -345,7 +345,7 @@ def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f le_antisymm (le_trans (map_mul_le_mul f _ _) (by rw [← RingSeminorm.toFun_eq_coe, ← AddGroupSeminorm.toFun_eq_coe, hx, - MulZeroClass.zero_mul])) + zero_mul])) (map_nonneg f _) exact hc hc0 } #align ring_seminorm.to_ring_norm RingSeminorm.toRingNorm diff --git a/Mathlib/Analysis/NormedSpace/Banach.lean b/Mathlib/Analysis/NormedSpace/Banach.lean index bbf166d10671a..e95553dc8bb4a 100644 --- a/Mathlib/Analysis/NormedSpace/Banach.lean +++ b/Mathlib/Analysis/NormedSpace/Banach.lean @@ -226,7 +226,7 @@ theorem exists_preimage_norm_le (surj : Surjective f) : rw [tendsto_iff_norm_tendsto_zero] simp only [sub_zero] refine' squeeze_zero (fun _ => norm_nonneg _) hnle _ - rw [← MulZeroClass.zero_mul ‖y‖] + rw [← zero_mul ‖y‖] refine' (_root_.tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds <;> norm_num have feq : f x = y - 0 := tendsto_nhds_unique L₁ L₂ rw [sub_zero] at feq diff --git a/Mathlib/Analysis/NormedSpace/ENorm.lean b/Mathlib/Analysis/NormedSpace/ENorm.lean index 776a6bea71d99..151c98eb10c7a 100644 --- a/Mathlib/Analysis/NormedSpace/ENorm.lean +++ b/Mathlib/Analysis/NormedSpace/ENorm.lean @@ -141,7 +141,7 @@ noncomputable instance : Top (ENorm 𝕜 V) := map_smul_le' := fun c x => by simp only split_ifs with hcx hx hx <;> simp only [smul_eq_zero, not_or] at hcx - · simp only [MulZeroClass.mul_zero, le_refl] + · simp only [mul_zero, le_refl] · have : c = 0 := by tauto simp [this] · tauto diff --git a/Mathlib/Analysis/NormedSpace/Extend.lean b/Mathlib/Analysis/NormedSpace/Extend.lean index c452eb04a6215..e71c718e8ecc6 100644 --- a/Mathlib/Analysis/NormedSpace/Extend.lean +++ b/Mathlib/Analysis/NormedSpace/Extend.lean @@ -86,7 +86,7 @@ theorem extendTo𝕜'_apply (fr : F →ₗ[ℝ] ℝ) (x : F) : @[simp] theorem extendTo𝕜'_apply_re (fr : F →ₗ[ℝ] ℝ) (x : F) : re (fr.extendTo𝕜' x : 𝕜) = fr x := by - simp only [extendTo𝕜'_apply, map_sub, MulZeroClass.zero_mul, MulZeroClass.mul_zero, sub_zero, + simp only [extendTo𝕜'_apply, map_sub, zero_mul, mul_zero, sub_zero, isROrC_simps] #align linear_map.extend_to_𝕜'_apply_re LinearMap.extendTo𝕜'_apply_re diff --git a/Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean b/Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean index ac24d6389f435..c66d614d34c63 100644 --- a/Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean +++ b/Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean @@ -87,10 +87,10 @@ theorem exists_extension_norm_eq (p : Subspace 𝕜 F) (f : p →L[𝕜] 𝕜) : rw [this] apply ext · simp only [add_zero, Algebra.id.smul_eq_mul, I_re, ofReal_im, AddMonoidHom.map_add, zero_sub, - I_im', MulZeroClass.zero_mul, ofReal_re, eq_self_iff_true, sub_zero, mul_neg, ofReal_neg, - mul_re, MulZeroClass.mul_zero, sub_neg_eq_add, ContinuousLinearMap.map_smul] + I_im', zero_mul, ofReal_re, eq_self_iff_true, sub_zero, mul_neg, ofReal_neg, + mul_re, mul_zero, sub_neg_eq_add, ContinuousLinearMap.map_smul] · simp only [Algebra.id.smul_eq_mul, I_re, ofReal_im, AddMonoidHom.map_add, zero_sub, I_im', - MulZeroClass.zero_mul, ofReal_re, mul_neg, mul_im, zero_add, ofReal_neg, mul_re, + zero_mul, ofReal_re, mul_neg, mul_im, zero_add, ofReal_neg, mul_re, sub_neg_eq_add, ContinuousLinearMap.map_smul] -- And we derive the equality of the norms by bounding on both sides. refine' ⟨h, le_antisymm _ _⟩ diff --git a/Mathlib/Analysis/NormedSpace/IsROrC.lean b/Mathlib/Analysis/NormedSpace/IsROrC.lean index 126ddd8c6128e..a75b64bec10ae 100644 --- a/Mathlib/Analysis/NormedSpace/IsROrC.lean +++ b/Mathlib/Analysis/NormedSpace/IsROrC.lean @@ -56,7 +56,7 @@ theorem LinearMap.bound_of_sphere_bound {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : (h : ∀ z ∈ sphere (0 : E) r, ‖f z‖ ≤ c) (z : E) : ‖f z‖ ≤ c / r * ‖z‖ := by by_cases z_zero : z = 0 · rw [z_zero] - simp only [LinearMap.map_zero, norm_zero, MulZeroClass.mul_zero] + simp only [LinearMap.map_zero, norm_zero, mul_zero] exact le_rfl set z₁ := ((r : 𝕜) * (‖z‖ : 𝕜)⁻¹) • z with hz₁ have norm_f_z₁ : ‖f z₁‖ ≤ c := by diff --git a/Mathlib/Analysis/NormedSpace/MStructure.lean b/Mathlib/Analysis/NormedSpace/MStructure.lean index 46652eee3d511..04757611a8c9b 100644 --- a/Mathlib/Analysis/NormedSpace/MStructure.lean +++ b/Mathlib/Analysis/NormedSpace/MStructure.lean @@ -133,7 +133,7 @@ theorem commute [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : rw [add_le_add_iff_left, two_smul, ← two_mul] at e1 rw [le_antisymm_iff] refine' ⟨_, norm_nonneg _⟩ - rwa [← MulZeroClass.mul_zero (2 : ℝ), mul_le_mul_left (show (0 : ℝ) < 2 by norm_num)] at e1 + rwa [← mul_zero (2 : ℝ), mul_le_mul_left (show (0 : ℝ) < 2 by norm_num)] at e1 have QP_eq_QPQ : Q * P = Q * P * Q := by have e1 : P * (1 - Q) = P * (1 - Q) - (Q * P - Q * P * Q) := calc @@ -220,7 +220,7 @@ theorem le_def [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) : #align is_Lprojection.le_def IsLprojection.le_def instance Subtype.zero : Zero { P : M // IsLprojection X P } := - ⟨⟨0, ⟨by rw [IsIdempotentElem, MulZeroClass.zero_mul], fun x => by + ⟨⟨0, ⟨by rw [IsIdempotentElem, zero_mul], fun x => by simp only [zero_smul, norm_zero, sub_zero, one_smul, zero_add]⟩⟩⟩ @[simp] @@ -241,7 +241,7 @@ instance Subtype.boundedOrder [FaithfulSMul M X] : top := 1 le_top P := (mul_one (P : M)).symm bot := 0 - bot_le P := (MulZeroClass.zero_mul (P : M)).symm + bot_le P := (zero_mul (P : M)).symm @[simp] theorem coe_bot [FaithfulSMul M X] : @@ -271,7 +271,7 @@ theorem distrib_lattice_lemma [FaithfulSMul M X] {P Q R : { P : M // IsLprojecti ← mul_assoc (R : M) (↑Q * ↑R) _, ← coe_inf Q, (Pᶜ.prop.commute R.prop).eq, ((Q ⊓ R).prop.commute Pᶜ.prop).eq, (R.prop.commute (Q ⊓ R).prop).eq, coe_inf Q, mul_assoc (Q : M), ←mul_assoc, mul_assoc (R : M), (Pᶜ.prop.commute P.prop).eq, mul_compl_self, - MulZeroClass.zero_mul, MulZeroClass.mul_zero, zero_add, add_zero, ← mul_assoc, P.prop.proj.eq, + zero_mul, mul_zero, zero_add, add_zero, ← mul_assoc, P.prop.proj.eq, R.prop.proj.eq, ←coe_inf Q, mul_assoc, ((Q ⊓ R).prop.commute Pᶜ.prop).eq, ← mul_assoc, Pᶜ.prop.proj.eq] #align is_Lprojection.distrib_lattice_lemma IsLprojection.distrib_lattice_lemma @@ -307,7 +307,7 @@ instance Subtype.distribLattice [FaithfulSMul M X] : have e₁ : ↑((P ⊔ Q) ⊓ (P ⊔ R)) = ↑P + ↑Q * (R : M) * ↑Pᶜ := by rw [coe_inf, coe_sup, coe_sup, ← add_sub, ← add_sub, ← compl_mul, ← compl_mul, add_mul, mul_add, (Pᶜ.prop.commute Q.prop).eq, mul_add, ← mul_assoc, mul_assoc (Q: M), - (Pᶜ.prop.commute P.prop).eq, mul_compl_self, MulZeroClass.zero_mul, MulZeroClass.mul_zero, + (Pᶜ.prop.commute P.prop).eq, mul_compl_self, zero_mul, mul_zero, zero_add, add_zero, ← mul_assoc, mul_assoc (Q : M), P.prop.proj.eq, Pᶜ.prop.proj.eq, mul_assoc, (Pᶜ.prop.commute R.prop).eq, ← mul_assoc] have e₂ : ↑((P ⊔ Q) ⊓ (P ⊔ R)) * ↑(P ⊔ Q ⊓ R) = (P : M) + ↑Q * ↑R * ↑Pᶜ := by diff --git a/Mathlib/Analysis/NormedSpace/Multilinear.lean b/Mathlib/Analysis/NormedSpace/Multilinear.lean index ffb956b8f4b6b..c9ea4c907ee19 100644 --- a/Mathlib/Analysis/NormedSpace/Multilinear.lean +++ b/Mathlib/Analysis/NormedSpace/Multilinear.lean @@ -1093,7 +1093,7 @@ def mkContinuousLinear (f : G →ₗ[𝕜] MultilinearMap 𝕜 E G') (C : ℝ) (max C 0) fun x => by rw [LinearMap.coe_mk, AddHom.coe_mk] -- Porting note: added exact ((f x).mkContinuous_norm_le' _).trans_eq <| by - rw [max_mul_of_nonneg _ _ (norm_nonneg x), MulZeroClass.zero_mul] + rw [max_mul_of_nonneg _ _ (norm_nonneg x), zero_mul] #align multilinear_map.mk_continuous_linear MultilinearMap.mkContinuousLinear theorem mkContinuousLinear_norm_le' (f : G →ₗ[𝕜] MultilinearMap 𝕜 E G') (C : ℝ) @@ -1124,7 +1124,7 @@ def mkContinuousMultilinear (f : MultilinearMap 𝕜 E (MultilinearMap 𝕜 E' G (max C 0) fun m => by simp only [coe_mk] refine ((f m).mkContinuous_norm_le' _).trans_eq ?_ - rw [max_mul_of_nonneg, MulZeroClass.zero_mul] + rw [max_mul_of_nonneg, zero_mul] exact prod_nonneg fun _ _ => norm_nonneg _ #align multilinear_map.mk_continuous_multilinear MultilinearMap.mkContinuousMultilinear diff --git a/Mathlib/Analysis/NormedSpace/OperatorNorm.lean b/Mathlib/Analysis/NormedSpace/OperatorNorm.lean index a112711a681d7..a86695945e4c6 100644 --- a/Mathlib/Analysis/NormedSpace/OperatorNorm.lean +++ b/Mathlib/Analysis/NormedSpace/OperatorNorm.lean @@ -151,7 +151,7 @@ theorem op_norm_le_bound' (f : E →SL[σ₁₂] F) {M : ℝ} (hMp : 0 ≤ M) (hM : ∀ x, ‖x‖ ≠ 0 → ‖f x‖ ≤ M * ‖x‖) : ‖f‖ ≤ M := op_norm_le_bound f hMp fun x => (ne_or_eq ‖x‖ 0).elim (hM x) fun h => by - simp only [h, MulZeroClass.mul_zero, norm_image_of_norm_zero f f.2 h, le_refl] + simp only [h, mul_zero, norm_image_of_norm_zero f f.2 h, le_refl] #align continuous_linear_map.op_norm_le_bound' ContinuousLinearMap.op_norm_le_bound' theorem op_norm_le_of_lipschitz {f : E →SL[σ₁₂] F} {K : ℝ≥0} (hf : LipschitzWith K f) : ‖f‖ ≤ K := @@ -184,7 +184,7 @@ theorem le_op_norm : ‖f x‖ ≤ ‖f‖ * ‖x‖ := by obtain ⟨C, _, hC⟩ := f.bound replace hC := hC x by_cases h : ‖x‖ = 0 - · rwa [h, MulZeroClass.mul_zero] at hC ⊢ + · rwa [h, mul_zero] at hC ⊢ have hlt : 0 < ‖x‖ := lt_of_le_of_ne (norm_nonneg x) (Ne.symm h) exact (div_le_iff hlt).mp (le_csInf bounds_nonempty fun c ⟨_, hc⟩ => (div_le_iff hlt).mpr <| by apply hc) @@ -268,7 +268,7 @@ theorem op_norm_add_le : ‖f + g‖ ≤ ‖f‖ + ‖g‖ := /-- The norm of the `0` operator is `0`. -/ theorem op_norm_zero : ‖(0 : E →SL[σ₁₂] F)‖ = 0 := le_antisymm (csInf_le bounds_bddBelow ⟨le_rfl, fun _ => le_of_eq (by - rw [MulZeroClass.zero_mul] + rw [zero_mul] exact norm_zero)⟩) (op_norm_nonneg _) #align continuous_linear_map.op_norm_zero ContinuousLinearMap.op_norm_zero @@ -1498,7 +1498,7 @@ theorem op_norm_zero_iff [RingHomIsometric σ₁₂] : ‖f‖ = 0 ↔ f = 0 := (fun hn => ContinuousLinearMap.ext fun x => norm_le_zero_iff.1 (calc _ ≤ ‖f‖ * ‖x‖ := le_op_norm _ _ - _ = _ := by rw [hn, MulZeroClass.zero_mul])) + _ = _ := by rw [hn, zero_mul])) (by rintro rfl exact op_norm_zero) diff --git a/Mathlib/Analysis/NormedSpace/QuaternionExponential.lean b/Mathlib/Analysis/NormedSpace/QuaternionExponential.lean index 64522bd87bf5d..3dc379305b4b4 100644 --- a/Mathlib/Analysis/NormedSpace/QuaternionExponential.lean +++ b/Mathlib/Analysis/NormedSpace/QuaternionExponential.lean @@ -49,9 +49,9 @@ theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s simp_rw [norm_zero] at hc convert hc using 1 ext (_ | n) : 1 - · rw [pow_zero, Nat.zero_eq, MulZeroClass.mul_zero, pow_zero, Nat.factorial_zero, Nat.cast_one, + · rw [pow_zero, Nat.zero_eq, mul_zero, pow_zero, Nat.factorial_zero, Nat.cast_one, div_one, one_mul, Pi.single_eq_same, coe_one] - · rw [zero_pow (mul_pos two_pos (Nat.succ_pos _)), MulZeroClass.mul_zero, zero_div, + · rw [zero_pow (mul_pos two_pos (Nat.succ_pos _)), mul_zero, zero_div, Pi.single_eq_of_ne n.succ_ne_zero, coe_zero] simp_rw [expSeries_apply_eq] have hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq @@ -124,7 +124,7 @@ theorem normSq_exp (q : ℍ[ℝ]) : normSq (exp ℝ q) = exp ℝ q.re ^ 2 := obtain hv | hv := eq_or_ne ‖q.im‖ 0 · simp [hv] rw [normSq_add, normSq_smul, star_smul, coe_mul_eq_smul, smul_re, smul_re, star_re, im_re, - smul_zero, smul_zero, MulZeroClass.mul_zero, add_zero, div_pow, normSq_coe, + smul_zero, smul_zero, mul_zero, add_zero, div_pow, normSq_coe, normSq_eq_norm_mul_self, ← sq, div_mul_cancel _ (pow_ne_zero _ hv)] _ = exp ℝ q.re ^ 2 := by rw [Real.cos_sq_add_sin_sq, mul_one] diff --git a/Mathlib/Analysis/NormedSpace/Spectrum.lean b/Mathlib/Analysis/NormedSpace/Spectrum.lean index 2e59a9c4260d1..8047e6528b21f 100644 --- a/Mathlib/Analysis/NormedSpace/Spectrum.lean +++ b/Mathlib/Analysis/NormedSpace/Spectrum.lean @@ -184,7 +184,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) : spectralRadius 𝕜 a ≤ atTop.liminf fun n : ℕ => (‖a ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ) := by refine' ENNReal.le_of_forall_lt_one_mul_le fun ε hε => _ by_cases ε = 0 - · simp only [h, MulZeroClass.zero_mul, zero_le'] + · simp only [h, zero_mul, zero_le'] have hε' : ε⁻¹ ≠ ∞ := fun h' => h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝ≥0∞ => x⁻¹) h') simp only [ENNReal.mul_le_iff_le_inv h (hε.trans_le le_top).ne, mul_comm ε⁻¹, @@ -284,7 +284,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) : le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _) (le_max_left _ _) · by_cases ‖a‖₊ = 0 - · simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ] + · simp only [h, zero_mul, zero_le', pow_succ] · rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ r_pos := ENNReal.inv_pos.mpr coe_ne_top diff --git a/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean b/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean index 7a83c547599c6..4dd61e92c088c 100644 --- a/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean +++ b/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean @@ -122,7 +122,7 @@ instance instAdd : Add 𝓜(𝕜, A) where instance instZero : Zero 𝓜(𝕜, A) where zero := { toProd := 0 - central := fun x y => (MulZeroClass.zero_mul y).trans (MulZeroClass.mul_zero x).symm } + central := fun x y => (zero_mul y).trans (mul_zero x).symm } instance instNeg : Neg 𝓜(𝕜, A) where neg a := diff --git a/Mathlib/Analysis/ODE/Gronwall.lean b/Mathlib/Analysis/ODE/Gronwall.lean index e9a41ac67e9c7..26d120f4918b3 100644 --- a/Mathlib/Analysis/ODE/Gronwall.lean +++ b/Mathlib/Analysis/ODE/Gronwall.lean @@ -60,7 +60,7 @@ theorem hasDerivAt_gronwallBound (δ K ε x : ℝ) : HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x := by by_cases hK : K = 0 · subst K - simp only [gronwallBound_K0, MulZeroClass.zero_mul, zero_add] + simp only [gronwallBound_K0, zero_mul, zero_add] convert ((hasDerivAt_id x).const_mul ε).const_add δ rw [mul_one] · simp only [gronwallBound_of_K_ne_0 hK] @@ -78,19 +78,19 @@ theorem hasDerivAt_gronwallBound_shift (δ K ε x a : ℝ) : theorem gronwallBound_x0 (δ K ε : ℝ) : gronwallBound δ K ε 0 = δ := by by_cases hK : K = 0 - · simp only [gronwallBound, if_pos hK, MulZeroClass.mul_zero, add_zero] - · simp only [gronwallBound, if_neg hK, MulZeroClass.mul_zero, exp_zero, sub_self, mul_one, + · simp only [gronwallBound, if_pos hK, mul_zero, add_zero] + · simp only [gronwallBound, if_neg hK, mul_zero, exp_zero, sub_self, mul_one, add_zero] #align gronwall_bound_x0 gronwallBound_x0 theorem gronwallBound_ε0 (δ K x : ℝ) : gronwallBound δ K 0 x = δ * exp (K * x) := by by_cases hK : K = 0 - · simp only [gronwallBound_K0, hK, MulZeroClass.zero_mul, exp_zero, add_zero, mul_one] - · simp only [gronwallBound_of_K_ne_0 hK, zero_div, MulZeroClass.zero_mul, add_zero] + · simp only [gronwallBound_K0, hK, zero_mul, exp_zero, add_zero, mul_one] + · simp only [gronwallBound_of_K_ne_0 hK, zero_div, zero_mul, add_zero] #align gronwall_bound_ε0 gronwallBound_ε0 theorem gronwallBound_ε0_δ0 (K x : ℝ) : gronwallBound 0 K 0 x = 0 := by - simp only [gronwallBound_ε0, MulZeroClass.zero_mul] + simp only [gronwallBound_ε0, zero_mul] #align gronwall_bound_ε0_δ0 gronwallBound_ε0_δ0 theorem gronwallBound_continuous_ε (δ K x : ℝ) : Continuous fun ε => gronwallBound δ K ε x := by @@ -238,7 +238,7 @@ theorem ODE_solution_unique_of_mem_set {v : ℝ → E → E} {s : ℝ → Set E} (hg : ContinuousOn g (Icc a b)) (hg' : ∀ t ∈ Ico a b, HasDerivWithinAt g (v t (g t)) (Ici t) t) (hgs : ∀ t ∈ Ico a b, g t ∈ s t) (ha : f a = g a) : ∀ t ∈ Icc a b, f t = g t := fun t ht ↦ by have := dist_le_of_trajectories_ODE_of_mem_set hv hf hf' hfs hg hg' hgs (dist_le_zero.2 ha) t ht - rwa [MulZeroClass.zero_mul, dist_le_zero] at this + rwa [zero_mul, dist_le_zero] at this set_option linter.uppercaseLean3 false in #align ODE_solution_unique_of_mem_set ODE_solution_unique_of_mem_set diff --git a/Mathlib/Analysis/Seminorm.lean b/Mathlib/Analysis/Seminorm.lean index 5e06723a031dc..c246ce3cf065b 100644 --- a/Mathlib/Analysis/Seminorm.lean +++ b/Mathlib/Analysis/Seminorm.lean @@ -78,7 +78,7 @@ def Seminorm.of [SeminormedRing 𝕜] [AddCommGroup E] [Module 𝕜 E] (f : E (add_le : ∀ x y : E, f (x + y) ≤ f x + f y) (smul : ∀ (a : 𝕜) (x : E), f (a • x) = ‖a‖ * f x) : Seminorm 𝕜 E where toFun := f - map_zero' := by rw [← zero_smul 𝕜 (0 : E), smul, norm_zero, MulZeroClass.zero_mul] + map_zero' := by rw [← zero_smul 𝕜 (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul 𝕜, smul, norm_neg, ← smul, one_smul] @@ -140,7 +140,7 @@ theorem ext {p q : Seminorm 𝕜 E} (h : ∀ x, (p : E → ℝ) x = q x) : p = q instance instZero : Zero (Seminorm 𝕜 E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with - smul' := fun _ _ => (MulZeroClass.mul_zero _).symm }⟩ + smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm 𝕜 E) = 0 := @@ -492,7 +492,7 @@ noncomputable instance instInf : Inf (Seminorm 𝕜 E) where smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 - · rw [norm_zero, MulZeroClass.zero_mul, zero_smul] + · rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` @@ -992,7 +992,7 @@ theorem closedBall_iSup {p : ι → Seminorm 𝕜 E} (hp : BddAbove (range p)) ( theorem ball_norm_mul_subset {p : Seminorm 𝕜 E} {k : 𝕜} {r : ℝ} : p.ball 0 (‖k‖ * r) ⊆ k • p.ball 0 r := by rcases eq_or_ne k 0 with (rfl | hk) - · rw [norm_zero, MulZeroClass.zero_mul, ball_eq_emptyset _ le_rfl] + · rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl] exact empty_subset _ · intro x rw [Set.mem_smul_set, Seminorm.mem_ball_zero] diff --git a/Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean b/Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean index 698b52d8fafbb..84b330a88367a 100644 --- a/Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean +++ b/Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean @@ -165,7 +165,7 @@ theorem arg_nonneg_iff {z : ℂ} : 0 ≤ arg z ↔ 0 ≤ z.im := by contrapose! intro h exact Real.sin_neg_of_neg_of_neg_pi_lt h (neg_pi_lt_arg _)⟩ - _ ↔ _ := by rw [sin_arg, le_div_iff (abs.pos h₀), MulZeroClass.zero_mul] + _ ↔ _ := by rw [sin_arg, le_div_iff (abs.pos h₀), zero_mul] #align complex.arg_nonneg_iff Complex.arg_nonneg_iff @@ -175,7 +175,7 @@ theorem arg_neg_iff {z : ℂ} : arg z < 0 ↔ z.im < 0 := #align complex.arg_neg_iff Complex.arg_neg_iff theorem arg_real_mul (x : ℂ) {r : ℝ} (hr : 0 < r) : arg (r * x) = arg x := by - rcases eq_or_ne x 0 with (rfl | hx); · rw [MulZeroClass.mul_zero] + rcases eq_or_ne x 0 with (rfl | hx); · rw [mul_zero] conv_lhs => rw [← abs_mul_cos_add_sin_mul_I x, ← mul_assoc, ← ofReal_mul, arg_mul_cos_add_sin_mul_I (mul_pos hr (abs.pos hx)) x.arg_mem_Ioc] @@ -254,7 +254,7 @@ theorem arg_eq_pi_div_two_iff {z : ℂ} : arg z = π / 2 ↔ z.re = 0 ∧ 0 < z. simp [h₀] · cases' z with x y rintro ⟨rfl : x = 0, hy : 0 < y⟩ - rw [← arg_I, ← arg_real_mul I hy, ofReal_mul', I_re, I_im, MulZeroClass.mul_zero, mul_one] + rw [← arg_I, ← arg_real_mul I hy, ofReal_mul', I_re, I_im, mul_zero, mul_one] #align complex.arg_eq_pi_div_two_iff Complex.arg_eq_pi_div_two_iff theorem arg_eq_neg_pi_div_two_iff {z : ℂ} : arg z = -(π / 2) ↔ z.re = 0 ∧ z.im < 0 := by diff --git a/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean index 8a771ad00cf5c..78241d02a3ed3 100644 --- a/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean @@ -229,7 +229,7 @@ theorem partialGamma_add_one {s : ℂ} (hs : 0 < s.re) {X : ℝ} (hX : 0 ≤ X) rw [this] have t := @integral_const_mul 0 X volume _ _ s fun x : ℝ => (-x).exp * x ^ (s - 1) rw [← t, ofReal_zero, zero_cpow] - · rw [MulZeroClass.mul_zero, add_zero]; congr 2; ext1; ring + · rw [mul_zero, add_zero]; congr 2; ext1; ring · contrapose! hs; rw [hs, zero_re] #align complex.partial_Gamma_add_one Complex.partialGamma_add_one diff --git a/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean b/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean index 25e9dc7f9a30b..19004bb83df9d 100644 --- a/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean +++ b/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean @@ -432,7 +432,7 @@ theorem Gamma_mul_Gamma_one_sub (z : ℂ) : Gamma z * Gamma (1 - z) = π / sin ( cases k · rw [Int.ofNat_eq_coe, Int.cast_ofNat, Complex.Gamma_neg_nat_eq_zero, zero_mul] · rw [Int.cast_negSucc, neg_neg, Nat.cast_add, Nat.cast_one, add_comm, sub_add_cancel', - Complex.Gamma_neg_nat_eq_zero, MulZeroClass.mul_zero] + Complex.Gamma_neg_nat_eq_zero, mul_zero] refine' tendsto_nhds_unique ((GammaSeq_tendsto_Gamma z).mul (GammaSeq_tendsto_Gamma <| 1 - z)) _ have : ↑π / sin (↑π * z) = 1 * (π / sin (π * z)) := by rw [one_mul] convert Tendsto.congr' ((eventually_ne_atTop 0).mp (eventually_of_forall fun n hn => @@ -451,7 +451,7 @@ theorem Gamma_ne_zero {s : ℂ} (hs : ∀ m : ℕ, s ≠ -m) : Gamma s ≠ 0 := by_cases h_im : s.im = 0 · have : s = ↑s.re := by conv_lhs => rw [← Complex.re_add_im s] - rw [h_im, ofReal_zero, MulZeroClass.zero_mul, add_zero] + rw [h_im, ofReal_zero, zero_mul, add_zero] rw [this, Gamma_ofReal, ofReal_ne_zero] refine' Real.Gamma_ne_zero fun n => _ specialize hs n @@ -531,7 +531,7 @@ theorem one_div_Gamma_eq_self_mul_one_div_Gamma_add_one (s : ℂ) : (Gamma s)⁻¹ = s * (Gamma (s + 1))⁻¹ := by rcases ne_or_eq s 0 with (h | rfl) · rw [Gamma_add_one s h, mul_inv, mul_inv_cancel_left₀ h] - · rw [zero_add, Gamma_zero, inv_zero, MulZeroClass.zero_mul] + · rw [zero_add, Gamma_zero, inv_zero, zero_mul] #align complex.one_div_Gamma_eq_self_mul_one_div_Gamma_add_one Complex.one_div_Gamma_eq_self_mul_one_div_Gamma_add_one /-- The reciprocal of the Gamma function is differentiable everywhere (including the points where diff --git a/Mathlib/Analysis/SpecialFunctions/Gaussian.lean b/Mathlib/Analysis/SpecialFunctions/Gaussian.lean index c7e94b2d77c81..51e199d0bba54 100644 --- a/Mathlib/Analysis/SpecialFunctions/Gaussian.lean +++ b/Mathlib/Analysis/SpecialFunctions/Gaussian.lean @@ -173,7 +173,7 @@ theorem integral_mul_cexp_neg_mul_sq {b : ℂ} (hb : 0 < b.re) : (tendsto_pow_atTop two_ne_zero)) convert integral_Ioi_of_hasDerivAt_of_tendsto' (fun x _ => (A ↑x).comp_ofReal) (integrable_mul_cexp_neg_mul_sq hb).integrableOn B using 1 - simp only [MulZeroClass.mul_zero, ofReal_zero, zero_pow', Ne.def, bit0_eq_zero, Nat.one_ne_zero, + simp only [mul_zero, ofReal_zero, zero_pow', Ne.def, bit0_eq_zero, Nat.one_ne_zero, not_false_iff, Complex.exp_zero, mul_one, sub_neg_eq_add, zero_add] #align integral_mul_cexp_neg_mul_sq integral_mul_cexp_neg_mul_sq @@ -257,7 +257,7 @@ theorem integral_gaussian_complex {b : ℂ} (hb : 0 < re b) : refine' ContinuousAt.continuousOn fun b hb => (continuousAt_cpow_const (Or.inl _)).comp (continuousAt_const.div continuousAt_id (nv hb)) - rw [div_re, ofReal_im, ofReal_re, MulZeroClass.zero_mul, zero_div, add_zero] + rw [div_re, ofReal_im, ofReal_re, zero_mul, zero_div, add_zero] exact div_pos (mul_pos pi_pos hb) (normSq_pos.mpr (nv hb)) · -- equality at 1 have : ∀ x : ℝ, cexp (-(1 : ℂ) * (x : ℂ) ^ 2) = exp (-(1 : ℝ) * x ^ 2) := by @@ -489,8 +489,8 @@ theorem integral_cexp_neg_mul_sq_add_real_mul_I (hb : 0 < b.re) (c : ℝ) : (by refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp exact differentiable_pow 2) - simpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, MulZeroClass.zero_mul, add_zero, neg_re, - ofReal_re, add_re, mul_re, I_re, MulZeroClass.mul_zero, I_im, tsub_zero, add_im, mul_im, + simpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, zero_mul, add_zero, neg_re, + ofReal_re, add_re, mul_re, I_re, mul_zero, I_im, tsub_zero, add_im, mul_im, mul_one, zero_add, Algebra.id.smul_eq_mul, ofReal_neg] using this simp_rw [id.def, ← HI₁] have : I₁ = fun T : ℝ => I₂ T + verticalIntegral b c T := by diff --git a/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean b/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean index 55935e208d0a2..4624b5c0fc2cb 100644 --- a/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean +++ b/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean @@ -72,7 +72,7 @@ def polarCoord : LocalHomeomorph (ℝ × ℝ) (ℝ × ℝ) where rintro ⟨x, y⟩ _ have A : sqrt (x ^ 2 + y ^ 2) = Complex.abs (x + y * Complex.I) := by simp [Complex.abs_def, Complex.normSq, pow_two, MonoidWithZeroHom.coe_mk, Complex.add_re, - Complex.ofReal_re, Complex.mul_re, Complex.I_re, MulZeroClass.mul_zero, Complex.ofReal_im, + Complex.ofReal_re, Complex.mul_re, Complex.I_re, mul_zero, Complex.ofReal_im, Complex.I_im, sub_self, add_zero, Complex.add_im, Complex.mul_im, mul_one, zero_add] have Z := Complex.abs_mul_cos_add_sin_mul_I (x + y * Complex.I) simp only [← Complex.ofReal_cos, ← Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← diff --git a/Mathlib/Analysis/SpecialFunctions/Polynomials.lean b/Mathlib/Analysis/SpecialFunctions/Polynomials.lean index 646ac1b6fda91..d29dda5eb8260 100644 --- a/Mathlib/Analysis/SpecialFunctions/Polynomials.lean +++ b/Mathlib/Analysis/SpecialFunctions/Polynomials.lean @@ -107,7 +107,7 @@ theorem tendsto_nhds_iff {c : 𝕜} : refine' ⟨fun h => _, fun h => _⟩ · have := P.isEquivalent_atTop_lead.tendsto_nhds h by_cases hP : P.leadingCoeff = 0 - · simp only [hP, MulZeroClass.zero_mul, tendsto_const_nhds_iff] at this + · simp only [hP, zero_mul, tendsto_const_nhds_iff] at this refine' ⟨_root_.trans hP this, by simp [leadingCoeff_eq_zero.1 hP]⟩ · rw [tendsto_const_mul_pow_nhds_iff hP, natDegree_eq_zero_iff_degree_le_zero] at this exact this.symm @@ -140,7 +140,7 @@ theorem div_tendsto_zero_of_degree_lt (hdeg : P.degree < Q.degree) : · simp [hP, tendsto_const_nhds] rw [← natDegree_lt_natDegree_iff hP] at hdeg refine' (isEquivalent_atTop_div P Q).symm.tendsto_nhds _ - rw [← MulZeroClass.mul_zero] + rw [← mul_zero] refine' (tendsto_zpow_atTop_zero _).const_mul _ linarith #align polynomial.div_tendsto_zero_of_degree_lt Polynomial.div_tendsto_zero_of_degree_lt diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean b/Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean index 7fb789811e7ae..ee6cbc4969b31 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean @@ -107,7 +107,7 @@ theorem tendsto_rpow_div_mul_add (a b c : ℝ) (hb : 0 ≠ b) : Tendsto.congr' _ ((tendsto_exp_nhds_0_nhds_1.comp (by - simpa only [MulZeroClass.mul_zero, pow_one] using + simpa only [mul_zero, pow_one] using (@tendsto_const_nhds _ _ _ a _).mul (tendsto_div_pow_mul_exp_add_atTop b c 1 hb))).comp tendsto_log_atTop) diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean b/Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean index c755fafd1dad9..145f6aeaa6e2b 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean @@ -118,7 +118,7 @@ theorem cpow_nat_cast (x : ℂ) : ∀ n : ℕ, x ^ (n : ℂ) = x ^ n | n + 1 => if hx : x = 0 then by simp only [hx, pow_succ, Complex.zero_cpow (Nat.cast_ne_zero.2 (Nat.succ_ne_zero _)), - MulZeroClass.zero_mul] + zero_mul] else by simp [cpow_add, hx, pow_add, cpow_nat_cast x n] #align complex.cpow_nat_cast Complex.cpow_nat_cast @@ -166,9 +166,9 @@ theorem mul_cpow_ofReal_nonneg {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (r : rcases eq_or_ne r 0 with (rfl | hr) · simp only [cpow_zero, mul_one] rcases eq_or_lt_of_le ha with (rfl | ha') - · rw [ofReal_zero, MulZeroClass.zero_mul, zero_cpow hr, MulZeroClass.zero_mul] + · rw [ofReal_zero, zero_mul, zero_cpow hr, zero_mul] rcases eq_or_lt_of_le hb with (rfl | hb') - · rw [ofReal_zero, MulZeroClass.mul_zero, zero_cpow hr, MulZeroClass.mul_zero] + · rw [ofReal_zero, mul_zero, zero_cpow hr, mul_zero] have ha'' : (a : ℂ) ≠ 0 := ofReal_ne_zero.mpr ha'.ne' have hb'' : (b : ℂ) ≠ 0 := ofReal_ne_zero.mpr hb'.ne' rw [cpow_def_of_ne_zero (mul_ne_zero ha'' hb''), log_ofReal_mul ha' hb'', ofReal_log ha, diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean b/Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean index be07a7e14f91f..4148476484278 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean @@ -53,7 +53,7 @@ theorem hasStrictDerivAt_const_cpow {x y : ℂ} (h : x ≠ 0 ∨ y ≠ 0) : HasStrictDerivAt (fun y => x ^ y) (x ^ y * log x) y := by rcases em (x = 0) with (rfl | hx) · replace h := h.neg_resolve_left rfl - rw [log_zero, MulZeroClass.mul_zero] + rw [log_zero, mul_zero] refine' (hasStrictDerivAt_const _ 0).congr_of_eventuallyEq _ exact (isOpen_ne.eventually_mem h).mono fun y hy => (zero_cpow hy).symm · simpa only [cpow_def_of_ne_zero hx, mul_one] using @@ -161,7 +161,7 @@ theorem HasStrictDerivAt.const_cpow (hf : HasStrictDerivAt f f' x) (h : c ≠ 0 theorem Complex.hasStrictDerivAt_cpow_const (h : 0 < x.re ∨ x.im ≠ 0) : HasStrictDerivAt (fun z : ℂ => z ^ c) (c * x ^ (c - 1)) x := by - simpa only [MulZeroClass.mul_zero, add_zero, mul_one] using + simpa only [mul_zero, add_zero, mul_one] using (hasStrictDerivAt_id x).cpow (hasStrictDerivAt_const x c) h #align complex.has_strict_deriv_at_cpow_const Complex.hasStrictDerivAt_cpow_const diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean b/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean index 794f69aa08639..91a713403acea 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean @@ -422,7 +422,7 @@ theorem zero_rpow_def (y : ℝ) : (0 : ℝ≥0∞) ^ y = if 0 < y then 0 else if theorem zero_rpow_mul_self (y : ℝ) : (0 : ℝ≥0∞) ^ y * (0 : ℝ≥0∞) ^ y = (0 : ℝ≥0∞) ^ y := by rw [zero_rpow_def] split_ifs - exacts [MulZeroClass.zero_mul _, one_mul _, top_mul_top] + exacts [zero_mul _, one_mul _, top_mul_top] #align ennreal.zero_rpow_mul_self ENNReal.zero_rpow_mul_self @[norm_cast] diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean b/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean index 4f6802c172f9a..10e3c11c5ef05 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean @@ -252,7 +252,7 @@ theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) : have hne : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr hlt.ne rw [cpow_def_of_ne_zero hne, cpow_def_of_ne_zero (neg_ne_zero.2 hne), ← exp_add, ← add_mul, log, log, abs.map_neg, arg_ofReal_of_neg hlt, ← ofReal_neg, - arg_ofReal_of_nonneg (neg_nonneg.2 hx), ofReal_zero, MulZeroClass.zero_mul, add_zero] + arg_ofReal_of_nonneg (neg_nonneg.2 hx), ofReal_zero, zero_mul, add_zero] #align complex.of_real_cpow_of_nonpos Complex.ofReal_cpow_of_nonpos theorem abs_cpow_of_ne_zero {z : ℂ} (hz : z ≠ 0) (w : ℂ) : @@ -290,7 +290,7 @@ theorem abs_cpow_inv_nat (x : ℂ) (n : ℕ) : abs (x ^ (n⁻¹ : ℂ)) = Comple theorem abs_cpow_eq_rpow_re_of_pos {x : ℝ} (hx : 0 < x) (y : ℂ) : abs (x ^ y) = x ^ y.re := by rw [abs_cpow_of_ne_zero (ofReal_ne_zero.mpr hx.ne'), arg_ofReal_of_nonneg hx.le, - MulZeroClass.zero_mul, Real.exp_zero, div_one, abs_of_nonneg hx.le] + zero_mul, Real.exp_zero, div_one, abs_of_nonneg hx.le] #align complex.abs_cpow_eq_rpow_re_of_pos Complex.abs_cpow_eq_rpow_re_of_pos theorem abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) : @@ -700,7 +700,7 @@ theorem sqrt_eq_rpow (x : ℝ) : sqrt x = x ^ (1 / (2 : ℝ)) := by norm_num · have : 1 / (2 : ℝ) * π = π / (2 : ℝ) ring - rw [sqrt_eq_zero_of_nonpos h.le, rpow_def_of_neg h, this, cos_pi_div_two, MulZeroClass.mul_zero] + rw [sqrt_eq_zero_of_nonpos h.le, rpow_def_of_neg h, this, cos_pi_div_two, mul_zero] #align real.sqrt_eq_rpow Real.sqrt_eq_rpow theorem rpow_div_two_eq_sqrt {x : ℝ} (r : ℝ) (hx : 0 ≤ x) : x ^ (r / 2) = sqrt x ^ r := by diff --git a/Mathlib/Analysis/SpecialFunctions/Sqrt.lean b/Mathlib/Analysis/SpecialFunctions/Sqrt.lean index 5aaa9dc5611d6..d1eb65345f1cf 100644 --- a/Mathlib/Analysis/SpecialFunctions/Sqrt.lean +++ b/Mathlib/Analysis/SpecialFunctions/Sqrt.lean @@ -46,7 +46,7 @@ noncomputable def sqLocalHomeomorph : LocalHomeomorph ℝ ℝ where theorem deriv_sqrt_aux {x : ℝ} (hx : x ≠ 0) : HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x ∧ ∀ n, ContDiffAt ℝ n sqrt x := by cases' hx.lt_or_lt with hx hx - · rw [sqrt_eq_zero_of_nonpos hx.le, MulZeroClass.mul_zero, div_zero] + · rw [sqrt_eq_zero_of_nonpos hx.le, mul_zero, div_zero] have : sqrt =ᶠ[𝓝 x] fun _ => 0 := (gt_mem_nhds hx).mono fun x hx => sqrt_eq_zero_of_nonpos hx.le exact ⟨(hasStrictDerivAt_const x (0 : ℝ)).congr_of_eventuallyEq this.symm, fun n => diff --git a/Mathlib/Analysis/SpecialFunctions/Stirling.lean b/Mathlib/Analysis/SpecialFunctions/Stirling.lean index 58b0c1be06d24..6bee19d570c5d 100644 --- a/Mathlib/Analysis/SpecialFunctions/Stirling.lean +++ b/Mathlib/Analysis/SpecialFunctions/Stirling.lean @@ -55,7 +55,7 @@ noncomputable def stirlingSeq (n : ℕ) : ℝ := @[simp] theorem stirlingSeq_zero : stirlingSeq 0 = 0 := by - rw [stirlingSeq, cast_zero, MulZeroClass.mul_zero, Real.sqrt_zero, MulZeroClass.zero_mul, + rw [stirlingSeq, cast_zero, mul_zero, Real.sqrt_zero, zero_mul, div_zero] #align stirling.stirling_seq_zero Stirling.stirlingSeq_zero diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean index d12ce49ed7663..6d4cfa1b71eaa 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean @@ -255,10 +255,10 @@ theorem cos_eq_iff_coe_eq_or_eq_neg {θ ψ : ℝ} : · rw [angle_eq_iff_two_pi_dvd_sub, ← coe_neg, angle_eq_iff_two_pi_dvd_sub] rintro (⟨k, H⟩ | ⟨k, H⟩) rw [← sub_eq_zero, cos_sub_cos, H, mul_assoc 2 π k, mul_div_cancel_left _ (two_ne_zero' ℝ), - mul_comm π _, sin_int_mul_pi, MulZeroClass.mul_zero] + mul_comm π _, sin_int_mul_pi, mul_zero] rw [← sub_eq_zero, cos_sub_cos, ← sub_neg_eq_add, H, mul_assoc 2 π k, - mul_div_cancel_left _ (two_ne_zero' ℝ), mul_comm π _, sin_int_mul_pi, MulZeroClass.mul_zero, - MulZeroClass.zero_mul] + mul_div_cancel_left _ (two_ne_zero' ℝ), mul_comm π _, sin_int_mul_pi, mul_zero, + zero_mul] #align real.angle.cos_eq_iff_coe_eq_or_eq_neg Real.Angle.cos_eq_iff_coe_eq_or_eq_neg theorem sin_eq_iff_coe_eq_or_add_eq_pi {θ ψ : ℝ} : @@ -277,13 +277,13 @@ theorem sin_eq_iff_coe_eq_or_add_eq_pi {θ ψ : ℝ} : · rw [angle_eq_iff_two_pi_dvd_sub, ← eq_sub_iff_add_eq, ← coe_sub, angle_eq_iff_two_pi_dvd_sub] rintro (⟨k, H⟩ | ⟨k, H⟩) rw [← sub_eq_zero, sin_sub_sin, H, mul_assoc 2 π k, mul_div_cancel_left _ (two_ne_zero' ℝ), - mul_comm π _, sin_int_mul_pi, MulZeroClass.mul_zero, MulZeroClass.zero_mul] + mul_comm π _, sin_int_mul_pi, mul_zero, zero_mul] have H' : θ + ψ = 2 * k * π + π := by rwa [← sub_add, sub_add_eq_add_sub, sub_eq_iff_eq_add, mul_assoc, mul_comm π _, ← mul_assoc] at H rw [← sub_eq_zero, sin_sub_sin, H', add_div, mul_assoc 2 _ π, mul_div_cancel_left _ (two_ne_zero' ℝ), cos_add_pi_div_two, sin_int_mul_pi, neg_zero, - MulZeroClass.mul_zero] + mul_zero] #align real.angle.sin_eq_iff_coe_eq_or_add_eq_pi Real.Angle.sin_eq_iff_coe_eq_or_add_eq_pi theorem cos_sin_inj {θ ψ : ℝ} (Hcos : cos θ = cos ψ) (Hsin : sin θ = sin ψ) : (θ : Angle) = ψ := by diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean index 75afcef45e99f..0db5ea5e6b4b9 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean @@ -520,7 +520,7 @@ theorem sin_ne_zero_iff {x : ℝ} : sin x ≠ 0 ↔ ∀ n : ℤ, (n : ℝ) * π theorem sin_eq_zero_iff_cos_eq {x : ℝ} : sin x = 0 ↔ cos x = 1 ∨ cos x = -1 := by rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq x, sq, sq, ← sub_eq_iff_eq_add, sub_self] - exact ⟨fun h => by rw [h, MulZeroClass.mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩ + exact ⟨fun h => by rw [h, mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩ #align real.sin_eq_zero_iff_cos_eq Real.sin_eq_zero_iff_cos_eq theorem cos_eq_one_iff (x : ℝ) : cos x = 1 ↔ ∃ n : ℤ, (n : ℝ) * (2 * π) = x := @@ -1098,7 +1098,7 @@ open Real theorem sin_eq_zero_iff_cos_eq {z : ℂ} : sin z = 0 ↔ cos z = 1 ∨ cos z = -1 := by rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self] - exact ⟨fun h => by rw [h, MulZeroClass.mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩ + exact ⟨fun h => by rw [h, mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩ #align complex.sin_eq_zero_iff_cos_eq Complex.sin_eq_zero_iff_cos_eq @[simp] diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean index f76acbec376ff..01c2e7a722cc8 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean @@ -72,7 +72,7 @@ variable (θ : ℂ) value `cos (n * θ)`. -/ @[simp] theorem T_complex_cos : ∀ n, (T ℂ n).eval (cos θ) = cos (n * θ) - | 0 => by simp only [T_zero, eval_one, Nat.cast_zero, MulZeroClass.zero_mul, cos_zero] + | 0 => by simp only [T_zero, eval_one, Nat.cast_zero, zero_mul, cos_zero] | 1 => by simp only [eval_X, one_mul, T_one, Nat.cast_one] | n + 2 => by -- Porting note: partially rewrote proof for lean4 numerals. diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean index bc3c0f0cfc140..e776100272383 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean @@ -30,7 +30,7 @@ open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by - rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, MulZeroClass.zero_mul, + rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] @@ -63,9 +63,9 @@ theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h - rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← MulZeroClass.zero_mul (1 / 2 : ℂ), mul_one_div, + rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] - simpa only [zero_div, MulZeroClass.zero_mul, Ne.def, not_false_iff, field_simps] using + simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff @@ -176,7 +176,7 @@ theorem cos_surjective : Function.Surjective cos := by ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl - simp only [zero_add, one_ne_zero, MulZeroClass.mul_zero] at hw + simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean index e91cb65b17750..743f6583cf95a 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean @@ -75,9 +75,9 @@ theorem integral_cos_mul_cos_pow_aux (hn : 2 ≤ n) (hz : z ≠ 0) : convert (config := { sameFun := true }) integral_mul_deriv_eq_deriv_mul der1 (fun x _ => antideriv_cos_comp_const_mul hz x) _ _ using 2 · ext1 x; rw [mul_comm] - · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.sin_zero, zero_div, - MulZeroClass.mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero, - zero_pow (by positivity : 0 < n), MulZeroClass.zero_mul, zero_sub, ← integral_neg, ← + · rw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div, + mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero, + zero_pow (by positivity : 0 < n), zero_mul, zero_sub, ← integral_neg, ← integral_const_mul] refine' integral_congr fun x _ => _ field_simp; ring @@ -117,8 +117,8 @@ theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) : ring_nf · -- now a tedious rearrangement of terms -- gather into a single integral, and deal with continuity subgoals: - rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, MulZeroClass.zero_mul, - MulZeroClass.mul_zero, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_sub, ← + rw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, zero_mul, + mul_zero, zero_mul, zero_mul, sub_zero, zero_sub, ← integral_neg, ← integral_const_mul, ← integral_const_mul, ← integral_sub] rotate_left · apply Continuous.intervalIntegrable @@ -217,10 +217,10 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) : rcases eq_or_ne z 0 with (rfl | hz) · simp induction' n with n hn - · simp_rw [Nat.zero_eq, MulZeroClass.mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one, + · simp_rw [Nat.zero_eq, mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one, integral_one, sub_zero] rw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero, - MulZeroClass.mul_zero, Complex.sin_zero, zero_div, sub_zero, + mul_zero, Complex.sin_zero, zero_div, sub_zero, (by push_cast; field_simp; ring : 2 * z * ↑(π / 2) = π * z)] field_simp [Complex.ofReal_ne_zero.mpr pi_pos.ne'] ring @@ -233,7 +233,7 @@ theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) : rw [integral_cos_pow_eq] dsimp only rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ, - MulZeroClass.zero_mul, MulZeroClass.zero_mul, MulZeroClass.zero_mul, sub_zero, zero_div, + zero_mul, zero_mul, zero_mul, sub_zero, zero_div, zero_add, ← mul_assoc, ← mul_assoc, mul_comm (1 / 2 : ℝ) _, Nat.cast_mul, Nat.cast_eq_ofNat] rw [this] change @@ -325,7 +325,7 @@ theorem _root_.Complex.tendsto_euler_sin_prod (z : ℂ) : (Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).continuousOn convert tendsto_integral_cos_pow_mul_div this using 1 · ext1 n; congr 2 with x : 1; rw [mul_comm] - · rw [Complex.ofReal_zero, MulZeroClass.mul_zero, Complex.cos_zero] + · rw [Complex.ofReal_zero, mul_zero, Complex.cos_zero] #align complex.tendsto_euler_sin_prod Complex.tendsto_euler_sin_prod /-- Euler's infinite product formula for the real sine function. -/ diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean index 152d6c526b592..1776aa4a6924c 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean @@ -59,7 +59,7 @@ theorem Complex.hasSum_sin' (z : ℂ) : convert hasSum_fintype (_ : Fin 2 → ℂ) using 1 rw [Fin.sum_univ_two] simp_rw [Fin.val_zero, Fin.val_one, add_zero, pow_succ', pow_mul, mul_pow, neg_sq, sub_self, - MulZeroClass.zero_mul, zero_div, zero_add, neg_mul, mul_neg, neg_div, ← neg_add', ← two_mul, + zero_mul, zero_div, zero_add, neg_mul, mul_neg, neg_div, ← neg_add', ← two_mul, neg_mul, neg_div, mul_assoc, mul_div_cancel_left _ (two_ne_zero : (2 : ℂ) ≠ 0), Complex.div_I] #align complex.has_sum_sin' Complex.hasSum_sin' diff --git a/Mathlib/Analysis/SpecificLimits/Basic.lean b/Mathlib/Analysis/SpecificLimits/Basic.lean index 336b1130b27d9..d4d700d75becd 100644 --- a/Mathlib/Analysis/SpecificLimits/Basic.lean +++ b/Mathlib/Analysis/SpecificLimits/Basic.lean @@ -33,7 +33,7 @@ theorem tendsto_inverse_atTop_nhds_0_nat : Tendsto (fun n : ℕ => (n : ℝ)⁻ #align tendsto_inverse_at_top_nhds_0_nat tendsto_inverse_atTop_nhds_0_nat theorem tendsto_const_div_atTop_nhds_0_nat (C : ℝ) : Tendsto (fun n : ℕ => C / n) atTop (𝓝 0) := by - simpa only [MulZeroClass.mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_0_nat + simpa only [mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_0_nat #align tendsto_const_div_at_top_nhds_0_nat tendsto_const_div_atTop_nhds_0_nat theorem NNReal.tendsto_inverse_atTop_nhds_0_nat : @@ -76,7 +76,7 @@ theorem tendsto_coe_nat_div_add_atTop {𝕜 : Type*} [DivisionRing 𝕜] [Topolo · exact fun n : ℕ => 1 / (1 + x / n) · field_simp [Nat.cast_ne_zero.mpr hn] · have : 𝓝 (1 : 𝕜) = 𝓝 (1 / (1 + x * (0 : 𝕜))) := by - rw [MulZeroClass.mul_zero, add_zero, div_one] + rw [mul_zero, add_zero, div_one] rw [this] refine' tendsto_const_nhds.div (tendsto_const_nhds.add _) (by simp) simp_rw [div_eq_mul_inv] diff --git a/Mathlib/Analysis/SpecificLimits/FloorPow.lean b/Mathlib/Analysis/SpecificLimits/FloorPow.lean index 4e5821ccd9a20..cad03fd7dc87d 100644 --- a/Mathlib/Analysis/SpecificLimits/FloorPow.lean +++ b/Mathlib/Analysis/SpecificLimits/FloorPow.lean @@ -169,7 +169,7 @@ theorem tendsto_div_of_monotone_of_exists_subseq_tendsto_div (u : ℕ → ℝ) ( have L : Tendsto (fun ε => d + ε * (1 + l)) (𝓝[>] 0) (𝓝 (d + 0 * (1 + l))) := by apply Tendsto.mono_left _ nhdsWithin_le_nhds exact tendsto_const_nhds.add (tendsto_id.mul tendsto_const_nhds) - simp only [MulZeroClass.zero_mul, add_zero] at L + simp only [zero_mul, add_zero] at L exact (((tendsto_order.1 L).2 l hd).and self_mem_nhdsWithin).exists filter_upwards [B ε εpos, Ioi_mem_atTop 0]with n hn npos simp_rw [div_eq_inv_mul] @@ -188,7 +188,7 @@ theorem tendsto_div_of_monotone_of_exists_subseq_tendsto_div (u : ℕ → ℝ) ( exact tendsto_const_nhds.add (tendsto_id.mul ((tendsto_const_nhds.add tendsto_id).add tendsto_const_nhds)) - simp only [MulZeroClass.zero_mul, add_zero] at L + simp only [zero_mul, add_zero] at L exact (((tendsto_order.1 L).2 d hd).and self_mem_nhdsWithin).exists filter_upwards [A ε εpos, Ioi_mem_atTop 0]with n hn npos simp_rw [div_eq_inv_mul] diff --git a/Mathlib/CategoryTheory/Closed/Cartesian.lean b/Mathlib/CategoryTheory/Closed/Cartesian.lean index f499acc9c6294..f8c52d7393adc 100644 --- a/Mathlib/CategoryTheory/Closed/Cartesian.lean +++ b/Mathlib/CategoryTheory/Closed/Cartesian.lean @@ -336,7 +336,7 @@ def powZero {I : C} (t : IsInitial I) [CartesianClosed C] : I ⟹ B ≅ ⊤_ C w hom := default inv := CartesianClosed.curry ((mulZero t).hom ≫ t.to _) hom_inv_id := by - -- Porting note: mathport thought that the `mulZero` here was `MulZeroClass.mul_zero`! + -- Porting note: mathport thought that the `mulZero` here was `mul_zero`! rw [← curry_natural_left, curry_eq_iff, ← cancel_epi (mulZero t).inv] apply t.hom_ext #align category_theory.pow_zero CategoryTheory.powZero diff --git a/Mathlib/Combinatorics/Additive/Behrend.lean b/Mathlib/Combinatorics/Additive/Behrend.lean index 4bf8c1bd7495f..8aa26ff8101a8 100644 --- a/Mathlib/Combinatorics/Additive/Behrend.lean +++ b/Mathlib/Combinatorics/Additive/Behrend.lean @@ -116,7 +116,7 @@ theorem sphere_subset_preimage_metric_sphere : (sphere n d k : Set (Fin n → @[simps] def map (d : ℕ) : (Fin n → ℕ) →+ ℕ where toFun a := ∑ i, a i * d ^ (i : ℕ) - map_zero' := by simp_rw [Pi.zero_apply, MulZeroClass.zero_mul, sum_const_zero] + map_zero' := by simp_rw [Pi.zero_apply, zero_mul, sum_const_zero] map_add' a b := by simp_rw [Pi.add_apply, add_mul, sum_add_distrib] #align behrend.map Behrend.map diff --git a/Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean b/Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean index 879178b0f9be9..8a7a15a9053d4 100644 --- a/Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean +++ b/Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean @@ -120,7 +120,7 @@ theorem even_card_odd_degree_vertices [Fintype V] [DecidableRel G.Adj] : Even (univ.filter fun v => Odd (G.degree v)).card := by classical have h := congr_arg (fun n => ↑n : ℕ → ZMod 2) G.sum_degrees_eq_twice_card_edges - simp only [ZMod.nat_cast_self, MulZeroClass.zero_mul, Nat.cast_mul] at h + simp only [ZMod.nat_cast_self, zero_mul, Nat.cast_mul] at h rw [Nat.cast_sum, ← sum_filter_ne_zero] at h rw [@sum_congr _ _ _ _ (fun v => (G.degree v : ZMod 2)) (fun _v => (1 : ZMod 2)) _ rfl] at h · simp only [filter_congr, mul_one, nsmul_eq_mul, sum_const, Ne.def] at h diff --git a/Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean b/Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean index ce1f6379009f8..8a4ccf0de75c3 100644 --- a/Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean +++ b/Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean @@ -119,7 +119,7 @@ theorem szemeredi_regularity (hε : 0 < ε) (hl : l ≤ card α) : induction' i with i ih -- For `i = 0`, the dummy equipartition is enough. · refine' ⟨dum, hdum₁, hdum₂.ge, hdum₂.le, Or.inr _⟩ - rw [Nat.cast_zero, MulZeroClass.mul_zero] + rw [Nat.cast_zero, mul_zero] exact_mod_cast dum.energy_nonneg G -- For the induction step at `i + 1`, find `P` the equipartition at `i`. obtain ⟨P, hP₁, hP₂, hP₃, hP₄⟩ := ih diff --git a/Mathlib/Data/IsROrC/Basic.lean b/Mathlib/Data/IsROrC/Basic.lean index cac1523197268..4285a781a34aa 100644 --- a/Mathlib/Data/IsROrC/Basic.lean +++ b/Mathlib/Data/IsROrC/Basic.lean @@ -414,11 +414,11 @@ open List in theorem is_real_TFAE (z : K) : TFAE [conj z = z, ∃ r : ℝ, (r : K) = z, ↑(re z) = z, im z = 0] := by tfae_have 1 → 4 · intro h - rw [← @ofReal_inj K, im_eq_conj_sub, h, sub_self, MulZeroClass.mul_zero, zero_div, + rw [← @ofReal_inj K, im_eq_conj_sub, h, sub_self, mul_zero, zero_div, ofReal_zero] tfae_have 4 → 3 · intro h - conv_rhs => rw [← re_add_im z, h, ofReal_zero, MulZeroClass.zero_mul, add_zero] + conv_rhs => rw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero] tfae_have 3 → 2; exact fun h => ⟨_, h⟩ tfae_have 2 → 1; exact fun ⟨r, hr⟩ => hr ▸ conj_ofReal _ tfae_finish @@ -454,7 +454,7 @@ variable {K} /-- The norm squared function. -/ def normSq : K →*₀ ℝ where toFun z := re z * re z + im z * im z - map_zero' := by simp only [add_zero, MulZeroClass.mul_zero, map_zero] + map_zero' := by simp only [add_zero, mul_zero, map_zero] map_one' := by simp only [one_im, add_zero, mul_one, one_re, mul_zero] map_mul' z w := by simp only [mul_im, mul_re] @@ -828,7 +828,7 @@ noncomputable instance Real.isROrC : IsROrC ℝ where conj_I_ax := by simp only [RingHom.map_zero, neg_zero] norm_sq_eq_def_ax z := by simp only [sq, Real.norm_eq_abs, ← abs_mul, abs_mul_self z, add_zero, mul_zero, AddMonoidHom.zero_apply, AddMonoidHom.id_apply] - mul_im_I_ax z := by simp only [MulZeroClass.mul_zero, AddMonoidHom.zero_apply] + mul_im_I_ax z := by simp only [mul_zero, AddMonoidHom.zero_apply] le_iff_re_im := (and_iff_left rfl).symm #align real.is_R_or_C Real.isROrC diff --git a/Mathlib/Data/Matrix/Basic.lean b/Mathlib/Data/Matrix/Basic.lean index 36fed2020d4d5..0d3e51527708c 100644 --- a/Mathlib/Data/Matrix/Basic.lean +++ b/Mathlib/Data/Matrix/Basic.lean @@ -1797,7 +1797,7 @@ theorem diagonal_mulVec_single [Fintype n] [DecidableEq n] [NonUnitalNonAssocSem (j : n) (x : R) : (diagonal v).mulVec (Pi.single j x) = Pi.single j (v j * x) := by ext i rw [mulVec_diagonal] - exact Pi.apply_single (fun i x => v i * x) (fun i => MulZeroClass.mul_zero _) j x i + exact Pi.apply_single (fun i x => v i * x) (fun i => mul_zero _) j x i #align matrix.diagonal_mul_vec_single Matrix.diagonal_mulVec_single -- @[simp] -- Porting note: not in simpNF @@ -1805,7 +1805,7 @@ theorem single_vecMul_diagonal [Fintype n] [DecidableEq n] [NonUnitalNonAssocSem (j : n) (x : R) : vecMul (Pi.single j x) (diagonal v) = Pi.single j (x * v j) := by ext i rw [vecMul_diagonal] - exact Pi.apply_single (fun i x => x * v i) (fun i => MulZeroClass.zero_mul _) j x i + exact Pi.apply_single (fun i x => x * v i) (fun i => zero_mul _) j x i #align matrix.single_vec_mul_diagonal Matrix.single_vecMul_diagonal end NonUnitalNonAssocSemiring diff --git a/Mathlib/Data/Matrix/Block.lean b/Mathlib/Data/Matrix/Block.lean index 926cc6ac2e14a..bdb55880ff9c9 100644 --- a/Mathlib/Data/Matrix/Block.lean +++ b/Mathlib/Data/Matrix/Block.lean @@ -758,7 +758,7 @@ theorem blockDiagonal'_mul [NonUnitalNonAssocSemiring α] [∀ i, Fintype (n' i) · simp only [if_pos, dif_pos] -- porting note: added split_ifs <;> simp · intro j' hj' - exact Finset.sum_eq_zero fun _ _ => by rw [dif_neg hj'.symm, MulZeroClass.zero_mul] + exact Finset.sum_eq_zero fun _ _ => by rw [dif_neg hj'.symm, zero_mul] #align matrix.block_diagonal'_mul Matrix.blockDiagonal'_mul section diff --git a/Mathlib/Data/Matrix/Hadamard.lean b/Mathlib/Data/Matrix/Hadamard.lean index de23291b984e3..d6534df9ee9d8 100644 --- a/Mathlib/Data/Matrix/Hadamard.lean +++ b/Mathlib/Data/Matrix/Hadamard.lean @@ -100,12 +100,12 @@ variable [MulZeroClass α] @[simp] theorem hadamard_zero : A ⊙ (0 : Matrix m n α) = 0 := - ext fun _ _ => MulZeroClass.mul_zero _ + ext fun _ _ => mul_zero _ #align matrix.hadamard_zero Matrix.hadamard_zero @[simp] theorem zero_hadamard : (0 : Matrix m n α) ⊙ A = 0 := - ext fun _ _ => MulZeroClass.zero_mul _ + ext fun _ _ => zero_mul _ #align matrix.zero_hadamard Matrix.zero_hadamard end Zero @@ -134,7 +134,7 @@ variable [DecidableEq n] [MulZeroClass α] theorem diagonal_hadamard_diagonal (v : n → α) (w : n → α) : diagonal v ⊙ diagonal w = diagonal (v * w) := - ext fun _ _ => (apply_ite₂ _ _ _ _ _ _).trans (congr_arg _ <| MulZeroClass.zero_mul 0) + ext fun _ _ => (apply_ite₂ _ _ _ _ _ _).trans (congr_arg _ <| zero_mul 0) #align matrix.diagonal_hadamard_diagonal Matrix.diagonal_hadamard_diagonal end Diagonal diff --git a/Mathlib/Data/Matrix/Kronecker.lean b/Mathlib/Data/Matrix/Kronecker.lean index 326af1f26d903..cdeac634e4c5a 100644 --- a/Mathlib/Data/Matrix/Kronecker.lean +++ b/Mathlib/Data/Matrix/Kronecker.lean @@ -291,12 +291,12 @@ hypotheses which can be filled by properties of `*`. -/ -- @[simp] -- Porting note: simp can prove this theorem zero_kronecker [MulZeroClass α] (B : Matrix n p α) : (0 : Matrix l m α) ⊗ₖ B = 0 := - kroneckerMap_zero_left _ MulZeroClass.zero_mul B + kroneckerMap_zero_left _ zero_mul B #align matrix.zero_kronecker Matrix.zero_kronecker -- @[simp] -- Porting note: simp can prove this theorem kronecker_zero [MulZeroClass α] (A : Matrix l m α) : A ⊗ₖ (0 : Matrix n p α) = 0 := - kroneckerMap_zero_right _ MulZeroClass.mul_zero A + kroneckerMap_zero_right _ mul_zero A #align matrix.kronecker_zero Matrix.kronecker_zero theorem add_kronecker [Distrib α] (A₁ A₂ : Matrix l m α) (B : Matrix n p α) : @@ -321,24 +321,24 @@ theorem kronecker_smul [Monoid R] [Monoid α] [MulAction R α] [SMulCommClass R theorem diagonal_kronecker_diagonal [MulZeroClass α] [DecidableEq m] [DecidableEq n] (a : m → α) (b : n → α) : diagonal a ⊗ₖ diagonal b = diagonal fun mn => a mn.1 * b mn.2 := - kroneckerMap_diagonal_diagonal _ MulZeroClass.zero_mul MulZeroClass.mul_zero _ _ + kroneckerMap_diagonal_diagonal _ zero_mul mul_zero _ _ #align matrix.diagonal_kronecker_diagonal Matrix.diagonal_kronecker_diagonal theorem kronecker_diagonal [MulZeroClass α] [DecidableEq n] (A : Matrix l m α) (b : n → α) : A ⊗ₖ diagonal b = blockDiagonal fun i => MulOpposite.op (b i) • A := - kroneckerMap_diagonal_right _ MulZeroClass.mul_zero _ _ + kroneckerMap_diagonal_right _ mul_zero _ _ #align matrix.kronecker_diagonal Matrix.kronecker_diagonal theorem diagonal_kronecker [MulZeroClass α] [DecidableEq l] (a : l → α) (B : Matrix m n α) : diagonal a ⊗ₖ B = Matrix.reindex (Equiv.prodComm _ _) (Equiv.prodComm _ _) (blockDiagonal fun i => a i • B) := - kroneckerMap_diagonal_left _ MulZeroClass.zero_mul _ _ + kroneckerMap_diagonal_left _ zero_mul _ _ #align matrix.diagonal_kronecker Matrix.diagonal_kronecker -- @[simp] -- Porting note: simp can prove this theorem one_kronecker_one [MulZeroOneClass α] [DecidableEq m] [DecidableEq n] : (1 : Matrix m m α) ⊗ₖ (1 : Matrix n n α) = 1 := - kroneckerMap_one_one _ MulZeroClass.zero_mul MulZeroClass.mul_zero (one_mul _) + kroneckerMap_one_one _ zero_mul mul_zero (one_mul _) #align matrix.one_kronecker_one Matrix.one_kronecker_one theorem kronecker_one [MulZeroOneClass α] [DecidableEq n] (A : Matrix l m α) : diff --git a/Mathlib/Data/MvPolynomial/Basic.lean b/Mathlib/Data/MvPolynomial/Basic.lean index 1cf6c381831d8..7e1152c3e81aa 100644 --- a/Mathlib/Data/MvPolynomial/Basic.lean +++ b/Mathlib/Data/MvPolynomial/Basic.lean @@ -768,7 +768,7 @@ theorem coeff_mul_monomial' (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ coeff m (p * monomial s r) = if s ≤ m then coeff (m - s) p * r else 0 := by classical obtain rfl | hr := eq_or_ne r 0 - · simp only [monomial_zero, coeff_zero, MulZeroClass.mul_zero, ite_self] + · simp only [monomial_zero, coeff_zero, mul_zero, ite_self] haveI : Nontrivial R := nontrivial_of_ne _ _ hr split_ifs with h · conv_rhs => rw [← coeff_mul_monomial _ s] @@ -845,7 +845,7 @@ theorem C_dvd_iff_dvd_coeff (r : R) (φ : MvPolynomial σ R) : C r ∣ φ ↔ split_ifs with hi · rw [hc] · rw [not_mem_support_iff] at hi - rwa [MulZeroClass.mul_zero] + rwa [mul_zero] #align mv_polynomial.C_dvd_iff_dvd_coeff MvPolynomial.C_dvd_iff_dvd_coeff @[simp] lemma isRegular_X : IsRegular (X n : MvPolynomial σ R) := by @@ -1566,7 +1566,7 @@ theorem eval₂Hom_eq_zero (f : R →+* S₂) (g : σ → S₂) (φ : MvPolynomi rw [φ.as_sum, map_sum] refine Finset.sum_eq_zero fun d hd => ?_ obtain ⟨i, hi, hgi⟩ : ∃ i ∈ d.support, g i = 0 := h d (Finsupp.mem_support_iff.mp hd) - rw [eval₂Hom_monomial, Finsupp.prod, Finset.prod_eq_zero hi, MulZeroClass.mul_zero] + rw [eval₂Hom_monomial, Finsupp.prod, Finset.prod_eq_zero hi, mul_zero] rw [hgi, zero_pow] rwa [pos_iff_ne_zero, ← Finsupp.mem_support_iff] #align mv_polynomial.eval₂_hom_eq_zero MvPolynomial.eval₂Hom_eq_zero diff --git a/Mathlib/Data/MvPolynomial/Variables.lean b/Mathlib/Data/MvPolynomial/Variables.lean index 9aacf59fbdfa4..f8d2bf97934ce 100644 --- a/Mathlib/Data/MvPolynomial/Variables.lean +++ b/Mathlib/Data/MvPolynomial/Variables.lean @@ -686,7 +686,7 @@ theorem totalDegree_smul_le [CommSemiring S] [DistribMulAction R S] (a : R) (f : theorem totalDegree_pow (a : MvPolynomial σ R) (n : ℕ) : (a ^ n).totalDegree ≤ n * a.totalDegree := by induction' n with n ih - · simp only [Nat.zero_eq, MulZeroClass.zero_mul, pow_zero, totalDegree_one] + · simp only [Nat.zero_eq, zero_mul, pow_zero, totalDegree_one] rw [pow_succ] calc totalDegree (a * a ^ n) ≤ a.totalDegree + (a ^ n).totalDegree := totalDegree_mul _ _ @@ -809,7 +809,7 @@ theorem eval₂Hom_eq_constantCoeff_of_vars (f : R →+* S) {g : σ → S} {p : rw [Finset.nonempty_iff_ne_empty, Ne.def, Finsupp.support_eq_empty] rintro rfl contradiction - rw [Finsupp.prod, Finset.prod_eq_zero hi, MulZeroClass.mul_zero] + rw [Finsupp.prod, Finset.prod_eq_zero hi, mul_zero] rw [hp, zero_pow (Nat.pos_of_ne_zero <| Finsupp.mem_support_iff.mp hi)] rw [mem_vars] exact ⟨d, hd, hi⟩ diff --git a/Mathlib/Data/Nat/Totient.lean b/Mathlib/Data/Nat/Totient.lean index 8608cd4422d1b..c94929f190366 100644 --- a/Mathlib/Data/Nat/Totient.lean +++ b/Mathlib/Data/Nat/Totient.lean @@ -84,7 +84,7 @@ theorem Ico_filter_coprime_le {a : ℕ} (k n : ℕ) (a_pos : 0 < a) : conv_lhs => rw [← Nat.mod_add_div n a] induction' n / a with i ih · rw [← filter_coprime_Ico_eq_totient a k] - simp only [add_zero, mul_one, MulZeroClass.mul_zero, le_of_lt (mod_lt n a_pos), + simp only [add_zero, mul_one, mul_zero, le_of_lt (mod_lt n a_pos), Nat.zero_eq, zero_add] --Porting note: below line was `mono` refine Finset.card_mono ?_ @@ -136,7 +136,7 @@ theorem totient_even {n : ℕ} (hn : 2 < n) : Even n.totient := by theorem totient_mul {m n : ℕ} (h : m.coprime n) : φ (m * n) = φ m * φ n := if hmn0 : m * n = 0 then by cases' Nat.mul_eq_zero.1 hmn0 with h h <;> - simp only [totient_zero, MulZeroClass.mul_zero, MulZeroClass.zero_mul, h] + simp only [totient_zero, mul_zero, zero_mul, h] else by haveI : NeZero (m * n) := ⟨hmn0⟩ haveI : NeZero m := ⟨left_ne_zero_of_mul hmn0⟩ diff --git a/Mathlib/Data/Num/Lemmas.lean b/Mathlib/Data/Num/Lemmas.lean index 15b15ab136c4b..3a8a191e81aee 100644 --- a/Mathlib/Data/Num/Lemmas.lean +++ b/Mathlib/Data/Num/Lemmas.lean @@ -1344,8 +1344,8 @@ theorem cast_succ [AddGroupWithOne α] (n) : ((succ n : ZNum) : α) = n + 1 := b @[simp, norm_cast] theorem mul_to_int : ∀ m n, ((m * n : ZNum) : ℤ) = m * n - | 0, a => by cases a <;> exact (MulZeroClass.zero_mul _).symm - | b, 0 => by cases b <;> exact (MulZeroClass.mul_zero _).symm + | 0, a => by cases a <;> exact (zero_mul _).symm + | b, 0 => by cases b <;> exact (mul_zero _).symm | pos a, pos b => PosNum.cast_mul a b | pos a, neg b => show -↑(a * b) = ↑a * -↑b by rw [PosNum.cast_mul, neg_mul_eq_mul_neg] | neg a, pos b => show -↑(a * b) = -↑a * ↑b by rw [PosNum.cast_mul, neg_mul_eq_neg_mul] diff --git a/Mathlib/Data/Ordmap/Ordset.lean b/Mathlib/Data/Ordmap/Ordset.lean index c63923228a6c6..c0bb1f43d5ca3 100644 --- a/Mathlib/Data/Ordmap/Ordset.lean +++ b/Mathlib/Data/Ordmap/Ordset.lean @@ -1193,7 +1193,7 @@ theorem Valid'.node4L {l} {x : α} {m} {y : α} {r o₁ o₂} (hl : Valid' o₁ · rw [Nat.succ_add] at mm; rcases mm with (_ | ⟨⟨⟩⟩) rcases hm.3.1.resolve_left mm with ⟨mm₁, mm₂⟩ cases' Nat.eq_zero_or_pos (size ml) with ml0 ml0 - · rw [ml0, MulZeroClass.mul_zero, le_zero_iff] at mm₂ + · rw [ml0, mul_zero, le_zero_iff] at mm₂ rw [ml0, mm₂] at mm; cases mm (by decide) have : 2 * size l ≤ size ml + size mr + 1 := by have := Nat.mul_le_mul_left ratio lr₁ diff --git a/Mathlib/Data/Polynomial/DenomsClearable.lean b/Mathlib/Data/Polynomial/DenomsClearable.lean index abd8091d1d9b5..8ebf930d50de3 100644 --- a/Mathlib/Data/Polynomial/DenomsClearable.lean +++ b/Mathlib/Data/Polynomial/DenomsClearable.lean @@ -42,7 +42,7 @@ def DenomsClearable (a b : R) (N : ℕ) (f : R[X]) (i : R →+* K) : Prop := theorem denomsClearable_zero (N : ℕ) (a : R) (bu : bi * i b = 1) : DenomsClearable a b N 0 i := ⟨0, bi, bu, by - simp only [eval_zero, RingHom.map_zero, MulZeroClass.mul_zero, Polynomial.map_zero]⟩ + simp only [eval_zero, RingHom.map_zero, mul_zero, Polynomial.map_zero]⟩ #align denoms_clearable_zero denomsClearable_zero theorem denomsClearable_C_mul_X_pow {N : ℕ} (a : R) (bu : bi * i b = 1) {n : ℕ} (r : R) diff --git a/Mathlib/Data/Polynomial/Div.lean b/Mathlib/Data/Polynomial/Div.lean index 6e4ad93ca55d2..820aa1582432e 100644 --- a/Mathlib/Data/Polynomial/Div.lean +++ b/Mathlib/Data/Polynomial/Div.lean @@ -242,7 +242,7 @@ theorem modByMonic_eq_sub_mul_div : else by unfold modByMonic divByMonic divModByMonicAux dsimp - rw [dif_pos hq, if_neg h, dif_pos hq, if_neg h, MulZeroClass.mul_zero, sub_zero] + rw [dif_pos hq, if_neg h, dif_pos hq, if_neg h, mul_zero, sub_zero] termination_by modByMonic_eq_sub_mul_div p q hq => p #align polynomial.mod_by_monic_eq_sub_mul_div Polynomial.modByMonic_eq_sub_mul_div @@ -253,7 +253,7 @@ theorem modByMonic_add_div (p : R[X]) {q : R[X]} (hq : Monic q) : p %ₘ q + q * theorem divByMonic_eq_zero_iff [Nontrivial R] (hq : Monic q) : p /ₘ q = 0 ↔ degree p < degree q := ⟨fun h => by have := modByMonic_add_div p hq; - rwa [h, MulZeroClass.mul_zero, add_zero, modByMonic_eq_self_iff hq] at this, + rwa [h, mul_zero, add_zero, modByMonic_eq_self_iff hq] at this, fun h => by have : ¬degree q ≤ degree p := not_le_of_gt h unfold divByMonic divModByMonicAux; dsimp; rw [dif_pos hq, if_neg (mt And.left this)]⟩ @@ -391,7 +391,7 @@ theorem dvd_iff_modByMonic_eq_zero (hq : Monic q) : p %ₘ q = 0 ↔ q ∣ p := have hrpq0 : leadingCoeff (r - p /ₘ q) ≠ 0 := fun h => hpq0 <| leadingCoeff_eq_zero.1 - (by rw [hmod, leadingCoeff_eq_zero.1 h, MulZeroClass.mul_zero, leadingCoeff_zero]) + (by rw [hmod, leadingCoeff_eq_zero.1 h, mul_zero, leadingCoeff_zero]) have hlc : leadingCoeff q * leadingCoeff (r - p /ₘ q) ≠ 0 := by rwa [Monic.def.1 hq, one_mul] rw [degree_mul' hlc, degree_eq_natDegree hq.ne_zero, degree_eq_natDegree (mt leadingCoeff_eq_zero.2 hrpq0)] at this @@ -422,7 +422,7 @@ theorem modByMonic_X_sub_C_eq_C_eval (p : R[X]) (a : R) : p %ₘ (X - C a) = C ( nontriviality R have h : (p %ₘ (X - C a)).eval a = p.eval a := by rw [modByMonic_eq_sub_mul_div _ (monic_X_sub_C a), eval_sub, eval_mul, eval_sub, eval_X, - eval_C, sub_self, MulZeroClass.zero_mul, sub_zero] + eval_C, sub_self, zero_mul, sub_zero] have : degree (p %ₘ (X - C a)) < 1 := degree_X_sub_C a ▸ degree_modByMonic_lt p (monic_X_sub_C a) have : degree (p %ₘ (X - C a)) ≤ 0 := by @@ -437,7 +437,7 @@ set_option linter.uppercaseLean3 false in theorem mul_divByMonic_eq_iff_isRoot : (X - C a) * (p /ₘ (X - C a)) = p ↔ IsRoot p a := ⟨fun h => by - rw [← h, IsRoot.def, eval_mul, eval_sub, eval_X, eval_C, sub_self, MulZeroClass.zero_mul], + rw [← h, IsRoot.def, eval_mul, eval_sub, eval_X, eval_C, sub_self, zero_mul], fun h : p.eval a = 0 => by conv_rhs => rw [← modByMonic_add_div p (monic_X_sub_C a)] @@ -475,7 +475,7 @@ set_option linter.uppercaseLean3 false in theorem eval₂_modByMonic_eq_self_of_root [CommRing S] {f : R →+* S} {p q : R[X]} (hq : q.Monic) {x : S} (hx : q.eval₂ f x = 0) : (p %ₘ q).eval₂ f x = p.eval₂ f x := by - rw [modByMonic_eq_sub_mul_div p hq, eval₂_sub, eval₂_mul, hx, MulZeroClass.zero_mul, sub_zero] + rw [modByMonic_eq_sub_mul_div p hq, eval₂_sub, eval₂_mul, hx, zero_mul, sub_zero] #align polynomial.eval₂_mod_by_monic_eq_self_of_root Polynomial.eval₂_modByMonic_eq_self_of_root theorem sum_modByMonic_coeff (hq : q.Monic) {n : ℕ} (hn : q.degree ≤ n) : diff --git a/Mathlib/Data/Polynomial/Expand.lean b/Mathlib/Data/Polynomial/Expand.lean index 08adf8388ac92..904087810bcaa 100644 --- a/Mathlib/Data/Polynomial/Expand.lean +++ b/Mathlib/Data/Polynomial/Expand.lean @@ -150,9 +150,9 @@ set_option linter.uppercaseLean3 false in theorem natDegree_expand (p : ℕ) (f : R[X]) : (expand R p f).natDegree = f.natDegree * p := by cases' p.eq_zero_or_pos with hp hp - · rw [hp, coe_expand, pow_zero, MulZeroClass.mul_zero, ← C_1, eval₂_hom, natDegree_C] + · rw [hp, coe_expand, pow_zero, mul_zero, ← C_1, eval₂_hom, natDegree_C] by_cases hf : f = 0 - · rw [hf, AlgHom.map_zero, natDegree_zero, MulZeroClass.zero_mul] + · rw [hf, AlgHom.map_zero, natDegree_zero, zero_mul] have hf1 : expand R p f ≠ 0 := mt (expand_eq_zero hp).1 hf rw [← WithBot.coe_eq_coe] convert (degree_eq_natDegree hf1).symm -- Porting note: was `rw [degree_eq_natDegree hf1]` diff --git a/Mathlib/Data/Polynomial/FieldDivision.lean b/Mathlib/Data/Polynomial/FieldDivision.lean index 89a2eea4aa7a8..2a0e0e1a4a4a0 100644 --- a/Mathlib/Data/Polynomial/FieldDivision.lean +++ b/Mathlib/Data/Polynomial/FieldDivision.lean @@ -262,12 +262,12 @@ theorem mod_eq_self_iff (hq0 : q ≠ 0) : p % q = p ↔ degree p < degree q := theorem div_eq_zero_iff (hq0 : q ≠ 0) : p / q = 0 ↔ degree p < degree q := ⟨fun h => by have := EuclideanDomain.div_add_mod p q; - rwa [h, MulZeroClass.mul_zero, zero_add, mod_eq_self_iff hq0] at this, + rwa [h, mul_zero, zero_add, mod_eq_self_iff hq0] at this, fun h => by have hlt : degree p < degree (q * C (leadingCoeff q)⁻¹) := by rwa [degree_mul_leadingCoeff_inv q hq0] have hm : Monic (q * C (leadingCoeff q)⁻¹) := monic_mul_leadingCoeff_inv hq0 - rw [div_def, (divByMonic_eq_zero_iff hm).2 hlt, MulZeroClass.mul_zero]⟩ + rw [div_def, (divByMonic_eq_zero_iff hm).2 hlt, mul_zero]⟩ #align polynomial.div_eq_zero_iff Polynomial.div_eq_zero_iff theorem degree_add_div (hq0 : q ≠ 0) (hpq : degree q ≤ degree p) : @@ -329,7 +329,7 @@ theorem eval₂_gcd_eq_zero [CommSemiring k] [DecidableEq R] {ϕ : R →+* k} {f g : R[X]} {α : k} (hf : f.eval₂ ϕ α = 0) (hg : g.eval₂ ϕ α = 0) : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0 := by rw [EuclideanDomain.gcd_eq_gcd_ab f g, Polynomial.eval₂_add, Polynomial.eval₂_mul, - Polynomial.eval₂_mul, hf, hg, MulZeroClass.zero_mul, MulZeroClass.zero_mul, zero_add] + Polynomial.eval₂_mul, hf, hg, zero_mul, zero_mul, zero_add] #align polynomial.eval₂_gcd_eq_zero Polynomial.eval₂_gcd_eq_zero theorem eval_gcd_eq_zero [DecidableEq R] {f g : R[X]} {α : R} @@ -340,13 +340,13 @@ theorem eval_gcd_eq_zero [DecidableEq R] {f g : R[X]} {α : R} theorem root_left_of_root_gcd [CommSemiring k] [DecidableEq R] {ϕ : R →+* k} {f g : R[X]} {α : k} (hα : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0) : f.eval₂ ϕ α = 0 := by cases' EuclideanDomain.gcd_dvd_left f g with p hp - rw [hp, Polynomial.eval₂_mul, hα, MulZeroClass.zero_mul] + rw [hp, Polynomial.eval₂_mul, hα, zero_mul] #align polynomial.root_left_of_root_gcd Polynomial.root_left_of_root_gcd theorem root_right_of_root_gcd [CommSemiring k] [DecidableEq R] {ϕ : R →+* k} {f g : R[X]} {α : k} (hα : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0) : g.eval₂ ϕ α = 0 := by cases' EuclideanDomain.gcd_dvd_right f g with p hp - rw [hp, Polynomial.eval₂_mul, hα, MulZeroClass.zero_mul] + rw [hp, Polynomial.eval₂_mul, hα, zero_mul] #align polynomial.root_right_of_root_gcd Polynomial.root_right_of_root_gcd theorem root_gcd_iff_root_left_right [CommSemiring k] [DecidableEq R] diff --git a/Mathlib/Data/Polynomial/HasseDeriv.lean b/Mathlib/Data/Polynomial/HasseDeriv.lean index 59a575522d531..c5c359c5e52e6 100644 --- a/Mathlib/Data/Polynomial/HasseDeriv.lean +++ b/Mathlib/Data/Polynomial/HasseDeriv.lean @@ -73,13 +73,13 @@ theorem hasseDeriv_coeff (n : ℕ) : · intro i _hi hink rw [coeff_monomial] by_cases hik : i < k - · simp only [Nat.choose_eq_zero_of_lt hik, ite_self, Nat.cast_zero, MulZeroClass.zero_mul] + · simp only [Nat.choose_eq_zero_of_lt hik, ite_self, Nat.cast_zero, zero_mul] · push_neg at hik rw [if_neg] contrapose! hink exact (tsub_eq_iff_eq_add_of_le hik).mp hink · intro h - simp only [not_mem_support_iff.mp h, monomial_zero_right, MulZeroClass.mul_zero, coeff_zero] + simp only [not_mem_support_iff.mp h, monomial_zero_right, mul_zero, coeff_zero] #align polynomial.hasse_deriv_coeff Polynomial.hasseDeriv_coeff theorem hasseDeriv_zero' : hasseDeriv 0 f = f := by @@ -118,17 +118,17 @@ theorem hasseDeriv_monomial (n : ℕ) (r : R) : · rw [if_pos hnik, if_pos, ← hnik] apply tsub_eq_of_eq_add_rev rwa [add_comm] - · rw [if_neg hnik, MulZeroClass.mul_zero] + · rw [if_neg hnik, mul_zero] by_cases hkn : k ≤ n · rw [← tsub_eq_iff_eq_add_of_le hkn] at hnik rw [if_neg hnik] · push_neg at hkn - rw [Nat.choose_eq_zero_of_lt hkn, Nat.cast_zero, MulZeroClass.zero_mul, ite_self] + rw [Nat.choose_eq_zero_of_lt hkn, Nat.cast_zero, zero_mul, ite_self] #align polynomial.hasse_deriv_monomial Polynomial.hasseDeriv_monomial theorem hasseDeriv_C (r : R) (hk : 0 < k) : hasseDeriv k (C r) = 0 := by rw [← monomial_zero_left, hasseDeriv_monomial, Nat.choose_eq_zero_of_lt hk, Nat.cast_zero, - MulZeroClass.zero_mul, monomial_zero_right] + zero_mul, monomial_zero_right] set_option linter.uppercaseLean3 false in #align polynomial.hasse_deriv_C Polynomial.hasseDeriv_C @@ -138,7 +138,7 @@ theorem hasseDeriv_apply_one (hk : 0 < k) : hasseDeriv k (1 : R[X]) = 0 := by theorem hasseDeriv_X (hk : 1 < k) : hasseDeriv k (X : R[X]) = 0 := by rw [← monomial_one_one_eq_X, hasseDeriv_monomial, Nat.choose_eq_zero_of_lt hk, Nat.cast_zero, - MulZeroClass.zero_mul, monomial_zero_right] + zero_mul, monomial_zero_right] set_option linter.uppercaseLean3 false in #align polynomial.hasse_deriv_X Polynomial.hasseDeriv_X @@ -252,11 +252,11 @@ theorem hasseDeriv_mul (f g : R[X]) : rw [Finset.Nat.mem_antidiagonal] at hx subst hx by_cases hm : m < x.1 - · simp only [Nat.choose_eq_zero_of_lt hm, Nat.cast_zero, MulZeroClass.zero_mul, + · simp only [Nat.choose_eq_zero_of_lt hm, Nat.cast_zero, zero_mul, monomial_zero_right] by_cases hn : n < x.2 - · simp only [Nat.choose_eq_zero_of_lt hn, Nat.cast_zero, MulZeroClass.zero_mul, - MulZeroClass.mul_zero, monomial_zero_right] + · simp only [Nat.choose_eq_zero_of_lt hn, Nat.cast_zero, zero_mul, + mul_zero, monomial_zero_right] push_neg at hm hn rw [tsub_add_eq_add_tsub hm, ← add_tsub_assoc_of_le hn, ← tsub_add_eq_tsub_tsub, add_comm x.2 x.1, mul_assoc, ← mul_assoc r, ← (Nat.cast_commute _ r).eq, mul_assoc, mul_assoc] diff --git a/Mathlib/Data/Polynomial/Laurent.lean b/Mathlib/Data/Polynomial/Laurent.lean index 047282fb40cb5..4cf5d265e14a3 100644 --- a/Mathlib/Data/Polynomial/Laurent.lean +++ b/Mathlib/Data/Polynomial/Laurent.lean @@ -511,7 +511,7 @@ set_option linter.uppercaseLean3 false in theorem degree_C_mul_T_ite (n : ℤ) (a : R) : degree (C a * T n) = ite (a = 0) ⊥ ↑n := by split_ifs with h <;> - simp only [h, map_zero, MulZeroClass.zero_mul, degree_zero, degree_C_mul_T, Ne.def, + simp only [h, map_zero, zero_mul, degree_zero, degree_C_mul_T, Ne.def, not_false_iff] set_option linter.uppercaseLean3 false in #align laurent_polynomial.degree_C_mul_T_ite LaurentPolynomial.degree_C_mul_T_ite @@ -540,7 +540,7 @@ section DegreeBounds theorem degree_C_mul_T_le (n : ℤ) (a : R) : degree (C a * T n) ≤ n := by by_cases a0 : a = 0 - · simp only [a0, map_zero, MulZeroClass.zero_mul, degree_zero, bot_le] + · simp only [a0, map_zero, zero_mul, degree_zero, bot_le] · exact (degree_C_mul_T n a a0).le set_option linter.uppercaseLean3 false in #align laurent_polynomial.degree_C_mul_T_le LaurentPolynomial.degree_C_mul_T_le diff --git a/Mathlib/Data/Polynomial/Mirror.lean b/Mathlib/Data/Polynomial/Mirror.lean index 416d4ab61947e..48a479c62a96d 100644 --- a/Mathlib/Data/Polynomial/Mirror.lean +++ b/Mathlib/Data/Polynomial/Mirror.lean @@ -173,14 +173,14 @@ variable [NoZeroDivisors R] theorem natDegree_mul_mirror : (p * p.mirror).natDegree = 2 * p.natDegree := by by_cases hp : p = 0 - · rw [hp, MulZeroClass.zero_mul, natDegree_zero, MulZeroClass.mul_zero] + · rw [hp, zero_mul, natDegree_zero, mul_zero] rw [natDegree_mul hp (mt mirror_eq_zero.mp hp), mirror_natDegree, two_mul] #align polynomial.nat_degree_mul_mirror Polynomial.natDegree_mul_mirror theorem natTrailingDegree_mul_mirror : (p * p.mirror).natTrailingDegree = 2 * p.natTrailingDegree := by by_cases hp : p = 0 - · rw [hp, MulZeroClass.zero_mul, natTrailingDegree_zero, MulZeroClass.mul_zero] + · rw [hp, zero_mul, natTrailingDegree_zero, mul_zero] rw [natTrailingDegree_mul hp (mt mirror_eq_zero.mp hp), mirror_natTrailingDegree, two_mul] #align polynomial.nat_trailing_degree_mul_mirror Polynomial.natTrailingDegree_mul_mirror @@ -198,9 +198,9 @@ variable [NoZeroDivisors R] theorem mirror_mul_of_domain : (p * q).mirror = p.mirror * q.mirror := by by_cases hp : p = 0 - · rw [hp, MulZeroClass.zero_mul, mirror_zero, MulZeroClass.zero_mul] + · rw [hp, zero_mul, mirror_zero, zero_mul] by_cases hq : q = 0 - · rw [hq, MulZeroClass.mul_zero, mirror_zero, MulZeroClass.mul_zero] + · rw [hq, mul_zero, mirror_zero, mul_zero] rw [mirror, mirror, mirror, reverse_mul_of_domain, natTrailingDegree_mul hp hq, pow_add] rw [mul_assoc, ← mul_assoc q.reverse, ← X_pow_mul (p := reverse q)] repeat' rw [mul_assoc] diff --git a/Mathlib/Data/Polynomial/RingDivision.lean b/Mathlib/Data/Polynomial/RingDivision.lean index 24df84af506ae..26358e0f31a6c 100644 --- a/Mathlib/Data/Polynomial/RingDivision.lean +++ b/Mathlib/Data/Polynomial/RingDivision.lean @@ -114,7 +114,7 @@ variable [Ring S] theorem aeval_modByMonic_eq_self_of_root [Algebra R S] {p q : R[X]} (hq : q.Monic) {x : S} (hx : aeval x q = 0) : aeval x (p %ₘ q) = aeval x p := by --`eval₂_modByMonic_eq_self_of_root` doesn't work here as it needs commutativity - rw [modByMonic_eq_sub_mul_div p hq, _root_.map_sub, _root_.map_mul, hx, MulZeroClass.zero_mul, + rw [modByMonic_eq_sub_mul_div p hq, _root_.map_sub, _root_.map_mul, hx, zero_mul, sub_zero] #align polynomial.aeval_mod_by_monic_eq_self_of_root Polynomial.aeval_modByMonic_eq_self_of_root @@ -140,9 +140,9 @@ theorem natDegree_mul (hp : p ≠ 0) (hq : q ≠ 0) : (p*q).natDegree = p.natDeg theorem trailingDegree_mul : (p * q).trailingDegree = p.trailingDegree + q.trailingDegree := by by_cases hp : p = 0 - · rw [hp, MulZeroClass.zero_mul, trailingDegree_zero, top_add] + · rw [hp, zero_mul, trailingDegree_zero, top_add] by_cases hq : q = 0 - · rw [hq, MulZeroClass.mul_zero, trailingDegree_zero, add_top] + · rw [hq, mul_zero, trailingDegree_zero, add_top] · rw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq, trailingDegree_eq_natTrailingDegree (mul_ne_zero hp hq), natTrailingDegree_mul hp hq] apply WithTop.coe_add @@ -161,7 +161,7 @@ theorem natDegree_pow (p : R[X]) (n : ℕ) : natDegree (p ^ n) = n * natDegree p theorem degree_le_mul_left (p : R[X]) (hq : q ≠ 0) : degree p ≤ degree (p * q) := by classical - exact if hp : p = 0 then by simp only [hp, MulZeroClass.zero_mul, le_refl] + exact if hp : p = 0 then by simp only [hp, zero_mul, le_refl] else by rw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq]; exact WithBot.coe_le_coe.2 (Nat.le_add_right _ _) @@ -491,7 +491,7 @@ theorem exists_multiset_roots [DecidableEq R] : let ⟨x, hx⟩ := h have hpd : 0 < degree p := degree_pos_of_root hp hx have hd0 : p /ₘ (X - C x) ≠ 0 := fun h => by - rw [← mul_divByMonic_eq_iff_isRoot.2 hx, h, MulZeroClass.mul_zero] at hp; exact hp rfl + rw [← mul_divByMonic_eq_iff_isRoot.2 hx, h, mul_zero] at hp; exact hp rfl have wf : degree (p /ₘ (X - C x)) < degree p := degree_divByMonic_lt _ (monic_X_sub_C x) hp ((degree_X_sub_C x).symm ▸ by decide) let ⟨t, htd, htr⟩ := @exists_multiset_roots _ (p /ₘ (X - C x)) hd0 @@ -698,7 +698,7 @@ theorem roots_one : (1 : R[X]).roots = ∅ := theorem roots_C_mul (p : R[X]) (ha : a ≠ 0) : (C a * p).roots = p.roots := by by_cases hp : p = 0 <;> simp only [roots_mul, *, Ne.def, mul_eq_zero, C_eq_zero, or_self_iff, not_false_iff, roots_C, - zero_add, MulZeroClass.mul_zero] + zero_add, mul_zero] set_option linter.uppercaseLean3 false in #align polynomial.roots_C_mul Polynomial.roots_C_mul @@ -1143,7 +1143,7 @@ theorem exists_prod_multiset_X_sub_C_mul (p : R[X]) : obtain ⟨q, he⟩ := p.prod_multiset_X_sub_C_dvd use q, he.symm obtain rfl | hq := eq_or_ne q 0 - · rw [MulZeroClass.mul_zero] at he + · rw [mul_zero] at he subst he simp constructor diff --git a/Mathlib/Data/Polynomial/Splits.lean b/Mathlib/Data/Polynomial/Splits.lean index ea35ce01167dd..0e64863c5c39c 100644 --- a/Mathlib/Data/Polynomial/Splits.lean +++ b/Mathlib/Data/Polynomial/Splits.lean @@ -178,7 +178,7 @@ theorem exists_root_of_splits' {f : K[X]} (hs : Splits i f) (hf0 : degree (f.map (show ¬IsUnit (f.map i) from mt isUnit_iff_degree_eq_zero.1 hf0) hf0' let ⟨x, hx⟩ := exists_root_of_degree_eq_one (hs.resolve_left hf0' hg.1 hg.2) let ⟨i, hi⟩ := hg.2 - ⟨x, by rw [← eval_map, hi, eval_mul, show _ = _ from hx, MulZeroClass.zero_mul]⟩ + ⟨x, by rw [← eval_map, hi, eval_mul, show _ = _ from hx, zero_mul]⟩ #align polynomial.exists_root_of_splits' Polynomial.exists_root_of_splits' theorem roots_ne_zero_of_splits' {f : K[X]} (hs : Splits i f) (hf0 : natDegree (f.map i) ≠ 0) : @@ -208,7 +208,7 @@ theorem natDegree_eq_card_roots' {p : K[X]} {i : K →+* L} (hsplit : Splits i p obtain ⟨q, he, hd, hr⟩ := exists_prod_multiset_X_sub_C_mul (p.map i) rw [← splits_id_iff_splits, ← he] at hsplit rw [← he] at hp - have hq : q ≠ 0 := fun h => hp (by rw [h, MulZeroClass.mul_zero]) + have hq : q ≠ 0 := fun h => hp (by rw [h, mul_zero]) rw [← hd, add_right_eq_self] by_contra h have h' : (map (RingHom.id L) q).natDegree ≠ 0 := by simp [h] diff --git a/Mathlib/Data/Polynomial/Taylor.lean b/Mathlib/Data/Polynomial/Taylor.lean index b243449a917e1..d3c9512be9f6a 100644 --- a/Mathlib/Data/Polynomial/Taylor.lean +++ b/Mathlib/Data/Polynomial/Taylor.lean @@ -81,7 +81,7 @@ theorem taylor_coeff (n : ℕ) : (taylor r f).coeff n = (hasseDeriv n f).eval r simp only [lcoeff_apply, ← C_eq_nat_cast, mul_assoc, ← C_pow, ← C_mul, coeff_mul_C, (Nat.cast_commute _ _).eq, coeff_X_pow, boole_mul, Finset.sum_ite_eq, Finset.mem_range] split_ifs with h; · rfl - push_neg at h; rw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, MulZeroClass.mul_zero] + push_neg at h; rw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, mul_zero] #align polynomial.taylor_coeff Polynomial.taylor_coeff @[simp] diff --git a/Mathlib/Data/Polynomial/UnitTrinomial.lean b/Mathlib/Data/Polynomial/UnitTrinomial.lean index 5df1e4a7ae08b..f5a3dba04d03c 100644 --- a/Mathlib/Data/Polynomial/UnitTrinomial.lean +++ b/Mathlib/Data/Polynomial/UnitTrinomial.lean @@ -186,7 +186,7 @@ theorem isUnitTrinomial_iff : rw [if_neg hkm.ne, if_neg (hkm.trans hmn).ne] at hx rw [if_neg hkm.ne', if_neg hmn.ne] at hy rw [if_neg (hkm.trans hmn).ne', if_neg hmn.ne'] at hz - simp_rw [MulZeroClass.mul_zero, zero_add, add_zero] at hx hy hz + simp_rw [mul_zero, zero_add, add_zero] at hx hy hz exact ⟨k, m, n, hkm, hmn, hx.unit, hy.unit, hz.unit, rfl⟩ #align polynomial.is_unit_trinomial_iff Polynomial.isUnitTrinomial_iff diff --git a/Mathlib/Data/Real/Pi/Wallis.lean b/Mathlib/Data/Real/Pi/Wallis.lean index 89d98e9ad20b4..72c1ced1777b3 100644 --- a/Mathlib/Data/Real/Pi/Wallis.lean +++ b/Mathlib/Data/Real/Pi/Wallis.lean @@ -64,7 +64,7 @@ theorem W_pos (k : ℕ) : 0 < W k := by theorem W_eq_factorial_ratio (n : ℕ) : W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by induction' n with n IH - · simp only [W, prod_range_zero, Nat.factorial_zero, MulZeroClass.mul_zero, pow_zero, + · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero, algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def, one_ne_zero, not_false_iff] norm_num diff --git a/Mathlib/Data/ZMod/Basic.lean b/Mathlib/Data/ZMod/Basic.lean index 499a6bcc3235b..e8439286e7193 100644 --- a/Mathlib/Data/ZMod/Basic.lean +++ b/Mathlib/Data/ZMod/Basic.lean @@ -532,7 +532,7 @@ theorem nat_coe_zmod_eq_iff (p : ℕ) (n : ℕ) (z : ZMod p) [NeZero p] : refine' ⟨n / p, _⟩ rw [val_nat_cast, Nat.mod_add_div] · rintro ⟨k, rfl⟩ - rw [Nat.cast_add, nat_cast_zmod_val, Nat.cast_mul, nat_cast_self, MulZeroClass.zero_mul, + rw [Nat.cast_add, nat_cast_zmod_val, Nat.cast_mul, nat_cast_self, zero_mul, add_zero] #align zmod.nat_coe_zmod_eq_iff ZMod.nat_coe_zmod_eq_iff @@ -544,7 +544,7 @@ theorem int_coe_zmod_eq_iff (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p] : rw [val_int_cast, Int.emod_add_ediv] · rintro ⟨k, rfl⟩ rw [Int.cast_add, Int.cast_mul, Int.cast_ofNat, Int.cast_ofNat, nat_cast_val, - ZMod.nat_cast_self, MulZeroClass.zero_mul, add_zero, cast_id] + ZMod.nat_cast_self, zero_mul, add_zero, cast_id] #align zmod.int_coe_zmod_eq_iff ZMod.int_coe_zmod_eq_iff @[push_cast, simp] @@ -650,7 +650,7 @@ theorem mul_inv_eq_gcd {n : ℕ} (a : ZMod n) : a * a⁻¹ = Nat.gcd a.val n := _ = a.natAbs.gcd 0 := by rw [Nat.gcd_zero_right] · calc a * a⁻¹ = a * a⁻¹ + n.succ * Nat.gcdB (val a) n.succ := by - rw [nat_cast_self, MulZeroClass.zero_mul, add_zero] + rw [nat_cast_self, zero_mul, add_zero] _ = ↑(↑a.val * Nat.gcdA (val a) n.succ + n.succ * Nat.gcdB (val a) n.succ) := by push_cast rw [nat_cast_zmod_val] @@ -833,7 +833,7 @@ theorem neg_eq_self_iff {n : ℕ} (a : ZMod n) : -a = a ↔ a = 0 ∨ 2 * a.val constructor · rintro ⟨m, he⟩ cases' m with m - · erw [MulZeroClass.mul_zero, mul_eq_zero] at he + · erw [mul_zero, mul_eq_zero] at he rcases he with (⟨⟨⟩⟩ | he) exact Or.inl (a.val_eq_zero.1 he) cases m @@ -844,7 +844,7 @@ theorem neg_eq_self_iff {n : ℕ} (a : ZMod n) : -a = a ↔ a = 0 ∨ 2 * a.val apply Nat.mul_le_mul_left erw [Nat.succ_le_succ_iff, Nat.succ_le_succ_iff]; simp · rintro (rfl | h) - · rw [val_zero, MulZeroClass.mul_zero] + · rw [val_zero, mul_zero] apply dvd_zero · rw [h] #align zmod.neg_eq_self_iff ZMod.neg_eq_self_iff @@ -1072,7 +1072,7 @@ theorem natAbs_min_of_le_div_two (n : ℕ) (x y : ℤ) (he : (x : ZMod n) = y) ( rw [sub_eq_iff_eq_add] at he subst he obtain rfl | hm := eq_or_ne m 0 - · rw [MulZeroClass.mul_zero, zero_add] + · rw [mul_zero, zero_add] apply hl.trans rw [← add_le_add_iff_right x.natAbs] refine' le_trans (le_trans ((add_le_add_iff_left _).2 hl) _) (Int.natAbs_sub_le _ _) diff --git a/Mathlib/Dynamics/Ergodic/Conservative.lean b/Mathlib/Dynamics/Ergodic/Conservative.lean index 92c79b08c7e27..afbae1cda7709 100644 --- a/Mathlib/Dynamics/Ergodic/Conservative.lean +++ b/Mathlib/Dynamics/Ergodic/Conservative.lean @@ -198,7 +198,7 @@ protected theorem iterate (hf : Conservative f μ) (n : ℕ) : Conservative f^[n exact (Nat.modEq_iff_dvd' hkl.le).1 hn refine' ⟨f^[k] x, hk, m, _, _⟩ · intro hm - rw [hm, MulZeroClass.mul_zero, eq_comm, tsub_eq_zero_iff_le] at this + rw [hm, mul_zero, eq_comm, tsub_eq_zero_iff_le] at this exact this.not_lt hkl · rwa [← iterate_mul, this, ← iterate_add_apply, tsub_add_cancel_of_le] exact hkl.le diff --git a/Mathlib/FieldTheory/ChevalleyWarning.lean b/Mathlib/FieldTheory/ChevalleyWarning.lean index c4e0f0073eefe..85d1acce37ab7 100644 --- a/Mathlib/FieldTheory/ChevalleyWarning.lean +++ b/Mathlib/FieldTheory/ChevalleyWarning.lean @@ -78,7 +78,7 @@ theorem MvPolynomial.sum_eval_eq_zero (f : MvPolynomial σ K) ∑ a : K, ∏ j : σ, (e a : σ → K) j ^ d j := (e.sum_comp _).symm _ = ∑ a : K, (∏ j, x₀ j ^ d j) * a ^ d i := (Fintype.sum_congr _ _ ?_) _ = (∏ j, x₀ j ^ d j) * ∑ a : K, a ^ d i := by rw [mul_sum] - _ = 0 := by rw [sum_pow_lt_card_sub_one K _ hi, MulZeroClass.mul_zero] + _ = 0 := by rw [sum_pow_lt_card_sub_one K _ hi, mul_zero] intro a let e' : Sum { j // j = i } { j // j ≠ i } ≃ σ := Equiv.sumCompl _ letI : Unique { j // j = i } := diff --git a/Mathlib/FieldTheory/Finite/Basic.lean b/Mathlib/FieldTheory/Finite/Basic.lean index fc5d52e5b535d..8dc07b8bc36fd 100644 --- a/Mathlib/FieldTheory/Finite/Basic.lean +++ b/Mathlib/FieldTheory/Finite/Basic.lean @@ -272,7 +272,7 @@ theorem roots_X_pow_card_sub_X : roots (X ^ q - X : K[X]) = Finset.univ.val := b rw [separable_def] convert isCoprime_one_right.neg_right (R := K[X]) using 1 rw [derivative_sub, derivative_X, derivative_X_pow, CharP.cast_card_eq_zero K, C_0, - MulZeroClass.zero_mul, zero_sub] + zero_mul, zero_sub] set_option linter.uppercaseLean3 false in #align finite_field.roots_X_pow_card_sub_X FiniteField.roots_X_pow_card_sub_X diff --git a/Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean b/Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean index 8df13813c5fa8..d837f136c007b 100644 --- a/Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean +++ b/Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean @@ -92,7 +92,7 @@ theorem spanEval_ne_top : spanEval k ≠ ⊤ := by · exact zero_ne_one hv intro j hj rw [smul_eq_mul, AlgHom.map_mul, toSplittingField_evalXSelf (s := v.support) hj, - MulZeroClass.mul_zero] + mul_zero] #align algebraic_closure.span_eval_ne_top AlgebraicClosure.spanEval_ne_top /-- A random maximal ideal that contains `spanEval k` -/ diff --git a/Mathlib/FieldTheory/Minpoly/Basic.lean b/Mathlib/FieldTheory/Minpoly/Basic.lean index 8d80347b444a3..252a3ae8d64fb 100644 --- a/Mathlib/FieldTheory/Minpoly/Basic.lean +++ b/Mathlib/FieldTheory/Minpoly/Basic.lean @@ -148,7 +148,7 @@ theorem unique' {p : A[X]} (hm : p.Monic) (hp : Polynomial.aeval x p = 0) have : natDegree r ≤ 0 := by have hr0 : r ≠ 0 := by rintro rfl - exact ne_zero hx (MulZeroClass.mul_zero p ▸ hr) + exact ne_zero hx (mul_zero p ▸ hr) apply_fun natDegree at hr rw [hm.natDegree_mul' hr0] at hr apply Nat.le_of_add_le_add_left diff --git a/Mathlib/FieldTheory/Minpoly/Field.lean b/Mathlib/FieldTheory/Minpoly/Field.lean index 28a78bdff1d84..f51f4cd900735 100644 --- a/Mathlib/FieldTheory/Minpoly/Field.lean +++ b/Mathlib/FieldTheory/Minpoly/Field.lean @@ -122,7 +122,7 @@ theorem eq_of_irreducible [Nontrivial B] {p : A[X]} (hp1 : Irreducible p) apply eq_of_irreducible_of_monic · exact Associated.irreducible ⟨⟨C p.leadingCoeff⁻¹, C p.leadingCoeff, by rwa [← C_mul, inv_mul_cancel, C_1], by rwa [← C_mul, mul_inv_cancel, C_1]⟩, rfl⟩ hp1 - · rw [aeval_mul, hp2, MulZeroClass.zero_mul] + · rw [aeval_mul, hp2, zero_mul] · rwa [Polynomial.Monic, leadingCoeff_mul, leadingCoeff_C, mul_inv_cancel] #align minpoly.eq_of_irreducible minpoly.eq_of_irreducible diff --git a/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean b/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean index 86f441b592e1e..17c954a5b79d2 100644 --- a/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean +++ b/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean @@ -162,7 +162,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t rw [← hP, Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe, isIntegrallyClosed_dvd_iff hx] at hP₁ obtain ⟨Q, hQ⟩ := hP₁ - rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul] + rw [← hP, hQ, RingHom.map_mul, mk_self, zero_mul] #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective /-- The algebra isomorphism `AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R x` -/ diff --git a/Mathlib/FieldTheory/Normal.lean b/Mathlib/FieldTheory/Normal.lean index 88e9a773b51c5..975c3a1042f26 100644 --- a/Mathlib/FieldTheory/Normal.lean +++ b/Mathlib/FieldTheory/Normal.lean @@ -194,7 +194,7 @@ theorem Normal.of_isSplittingField (p : F[X]) [hFEp : IsSplittingField F E p] : -- Porting note: `heval` added since now Lean wants the proof explicitly in several places. have heval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0 := by rw [algebraMap_eq F E D, ← eval₂_map, hr, AdjoinRoot.algebraMap_eq, eval₂_mul, - AdjoinRoot.eval₂_root, MulZeroClass.zero_mul] + AdjoinRoot.eval₂_root, zero_mul] letI : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval) letI : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (minpoly.aeval F x)) diff --git a/Mathlib/FieldTheory/PolynomialGaloisGroup.lean b/Mathlib/FieldTheory/PolynomialGaloisGroup.lean index 221626e506cfc..a8020e5fb205a 100644 --- a/Mathlib/FieldTheory/PolynomialGaloisGroup.lean +++ b/Mathlib/FieldTheory/PolynomialGaloisGroup.lean @@ -356,12 +356,12 @@ theorem splits_in_splittingField_of_comp (hq : q.natDegree ≠ 0) : intro p₁ p₂ hp₁ hp₂ by_cases h₁ : p₁.comp q = 0 · cases' comp_eq_zero_iff.mp h₁ with h h - · rw [h, MulZeroClass.zero_mul] + · rw [h, zero_mul] exact splits_zero _ · exact False.elim (hq (by rw [h.2, natDegree_C])) by_cases h₂ : p₂.comp q = 0 · cases' comp_eq_zero_iff.mp h₂ with h h - · rw [h, MulZeroClass.mul_zero] + · rw [h, mul_zero] exact splits_zero _ · exact False.elim (hq (by rw [h.2, natDegree_C])) have key := mul_splits_in_splittingField_of_mul h₁ h₂ hp₁ hp₂ diff --git a/Mathlib/FieldTheory/RatFunc.lean b/Mathlib/FieldTheory/RatFunc.lean index 51d865ce742e3..eb19639a164d3 100644 --- a/Mathlib/FieldTheory/RatFunc.lean +++ b/Mathlib/FieldTheory/RatFunc.lean @@ -1374,7 +1374,7 @@ theorem num_mul_denom_add_denom_mul_num_ne_zero {x y : RatFunc K} (hxy : x + y x.num * y.denom + x.denom * y.num ≠ 0 := by intro h_zero have h := num_denom_add x y - rw [h_zero, MulZeroClass.zero_mul] at h + rw [h_zero, zero_mul] at h exact (mul_ne_zero (num_ne_zero hxy) (mul_ne_zero x.denom_ne_zero y.denom_ne_zero)) h #align ratfunc.num_mul_denom_add_denom_mul_num_ne_zero RatFunc.num_mul_denom_add_denom_mul_num_ne_zero diff --git a/Mathlib/FieldTheory/Separable.lean b/Mathlib/FieldTheory/Separable.lean index cf5acb23c37fc..def5f1a76b00d 100644 --- a/Mathlib/FieldTheory/Separable.lean +++ b/Mathlib/FieldTheory/Separable.lean @@ -345,7 +345,7 @@ theorem exists_separable_of_irreducible {f : F[X]} (hf : Irreducible f) (hp : p have hg1 : g.natDegree * p = N.succ := by rwa [← natDegree_expand, hgf] have hg2 : g.natDegree ≠ 0 := by intro this - rw [this, MulZeroClass.zero_mul] at hg1 + rw [this, zero_mul] at hg1 cases hg1 have hg3 : g.natDegree < N.succ := by rw [← mul_one g.natDegree, ← hg1] @@ -361,7 +361,7 @@ theorem isUnit_or_eq_zero_of_separable_expand {f : F[X]} (n : ℕ) (hp : 0 < p) rintro hn : n ≠ 0 have hf2 : derivative (expand F (p ^ n) f) = 0 := by rw [derivative_expand, Nat.cast_pow, CharP.cast_eq_zero, zero_pow hn.bot_lt, - MulZeroClass.zero_mul, MulZeroClass.mul_zero] + zero_mul, mul_zero] rw [separable_def, hf2, isCoprime_zero_right, isUnit_iff] at hf rcases hf with ⟨r, hr, hrf⟩ rw [eq_comm, expand_eq_C (pow_pos hp _)] at hrf @@ -410,7 +410,7 @@ theorem X_pow_sub_one_separable_iff {n : ℕ} : (X ^ n - 1 : F[X]).Separable ↔ rw [separable_def', derivative_sub, derivative_X_pow, derivative_one, sub_zero] -- Suppose `(n : F) = 0`, then the derivative is `0`, so `X ^ n - 1` is a unit, contradiction. rintro (h : IsCoprime _ _) hn' - rw [hn', C_0, MulZeroClass.zero_mul, isCoprime_zero_right] at h + rw [hn', C_0, zero_mul, isCoprime_zero_right] at h exact not_isUnit_X_pow_sub_one F n h set_option linter.uppercaseLean3 false in #align polynomial.X_pow_sub_one_separable_iff Polynomial.X_pow_sub_one_separable_iff diff --git a/Mathlib/FieldTheory/SeparableDegree.lean b/Mathlib/FieldTheory/SeparableDegree.lean index 88d3c6c31e7a5..d8a7da7c1dd44 100644 --- a/Mathlib/FieldTheory/SeparableDegree.lean +++ b/Mathlib/FieldTheory/SeparableDegree.lean @@ -123,7 +123,7 @@ theorem contraction_degree_eq_or_insep [hq : NeZero q] [CharP F q] (g g' : F[X]) rw [pow_add, expand_mul, expand_inj (pow_pos (NeZero.pos q) m)] at h_expand subst h_expand rcases isUnit_or_eq_zero_of_separable_expand q s (NeZero.pos q) hg with (h | rfl) - · rw [natDegree_expand, natDegree_eq_zero_of_isUnit h, MulZeroClass.zero_mul] + · rw [natDegree_expand, natDegree_eq_zero_of_isUnit h, zero_mul] · rw [natDegree_expand, pow_zero, mul_one] #align polynomial.contraction_degree_eq_or_insep Polynomial.contraction_degree_eq_or_insep diff --git a/Mathlib/FieldTheory/SplittingField/Construction.lean b/Mathlib/FieldTheory/SplittingField/Construction.lean index 0b27fabd8e7ff..7d8a0771e72c0 100644 --- a/Mathlib/FieldTheory/SplittingField/Construction.lean +++ b/Mathlib/FieldTheory/SplittingField/Construction.lean @@ -89,7 +89,7 @@ theorem X_sub_C_mul_removeFactor (f : K[X]) (hf : f.natDegree ≠ 0) : let ⟨g, hg⟩ := factor_dvd_of_natDegree_ne_zero hf apply (mul_divByMonic_eq_iff_isRoot (R := AdjoinRoot f.factor) (a := AdjoinRoot.root f.factor)).mpr - rw [IsRoot.def, eval_map, hg, eval₂_mul, ← hg, AdjoinRoot.eval₂_root, MulZeroClass.zero_mul] + rw [IsRoot.def, eval_map, hg, eval₂_mul, ← hg, AdjoinRoot.eval₂_root, zero_mul] set_option linter.uppercaseLean3 false in #align polynomial.X_sub_C_mul_remove_factor Polynomial.X_sub_C_mul_removeFactor diff --git a/Mathlib/FieldTheory/Tower.lean b/Mathlib/FieldTheory/Tower.lean index 69da80f6061ea..a57679cb2c8d6 100644 --- a/Mathlib/FieldTheory/Tower.lean +++ b/Mathlib/FieldTheory/Tower.lean @@ -126,7 +126,7 @@ theorem finrank_mul_finrank [FiniteDimensional F K] : finrank F K * finrank K A by_cases hA : FiniteDimensional K A · replace hA : FiniteDimensional K A := hA -- porting note: broken instance cache rw [finrank_mul_finrank'] - · rw [finrank_of_infinite_dimensional hA, MulZeroClass.mul_zero, finrank_of_infinite_dimensional] + · rw [finrank_of_infinite_dimensional hA, mul_zero, finrank_of_infinite_dimensional] exact mt (@right F K A _ _ _ _ _ _ _) hA #align finite_dimensional.finrank_mul_finrank FiniteDimensional.finrank_mul_finrank diff --git a/Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean b/Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean index 883ff9ea3671f..4a7c60b47d67c 100644 --- a/Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean +++ b/Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean @@ -882,7 +882,7 @@ theorem oangle_smul_add_right_eq_zero_or_eq_pi_iff {x y : V} (r : ℝ) : refine' ⟨h, not_and_or.1 fun h0 => _⟩ obtain ⟨h0, h1⟩ := h0 rw [h1] at h0 hm - rw [MulZeroClass.zero_mul, add_zero] at h0 + rw [zero_mul, add_zero] at h0 simp [h0] at hm · rcases h with ⟨m, h, hm⟩ change m 0 • x + m 1 • y = 0 at h @@ -892,7 +892,7 @@ theorem oangle_smul_add_right_eq_zero_or_eq_pi_iff {x y : V} (r : ℝ) : refine' ⟨h, not_and_or.1 fun h0 => _⟩ obtain ⟨h0, h1⟩ := h0 rw [h1] at h0 hm - rw [MulZeroClass.zero_mul, sub_zero] at h0 + rw [zero_mul, sub_zero] at h0 simp [h0] at hm #align orientation.oangle_smul_add_right_eq_zero_or_eq_pi_iff Orientation.oangle_smul_add_right_eq_zero_or_eq_pi_iff @@ -1054,7 +1054,7 @@ theorem oangle_sign_smul_add_smul_smul_add_smul (x y : V) (r₁ r₂ r₃ r₄ : (o.oangle (r₁ • x + r₂ • y) (r₃ • x + r₄ • y)).sign = SignType.sign (r₁ * r₄ - r₂ * r₃) * (o.oangle x y).sign := by by_cases hr₁ : r₁ = 0 - · rw [hr₁, zero_smul, MulZeroClass.zero_mul, zero_add, zero_sub, Left.sign_neg, + · rw [hr₁, zero_smul, zero_mul, zero_add, zero_sub, Left.sign_neg, oangle_sign_smul_left, add_comm, oangle_sign_smul_add_smul_right, oangle_rev, Real.Angle.sign_neg, sign_mul, mul_neg, mul_neg, neg_mul, mul_assoc] · rw [← o.oangle_sign_smul_add_right (r₁ • x + r₂ • y) (r₃ • x + r₄ • y) (-r₃ / r₁), smul_add, diff --git a/Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean b/Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean index ca802d1c60c1d..3bd4a85aa1a1f 100644 --- a/Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean +++ b/Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean @@ -439,7 +439,7 @@ zero. -/ @[simp] theorem inner_smul_rotation_pi_div_two_left (x : V) (r : ℝ) : ⟪r • o.rotation (π / 2 : ℝ) x, x⟫ = 0 := by - rw [inner_smul_left, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero] + rw [inner_smul_left, inner_rotation_pi_div_two_left, mul_zero] #align orientation.inner_smul_rotation_pi_div_two_left Orientation.inner_smul_rotation_pi_div_two_left /-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is @@ -455,7 +455,7 @@ zero. -/ @[simp] theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) : ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0 := by - rw [inner_smul_right, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero] + rw [inner_smul_right, inner_rotation_pi_div_two_left, mul_zero] #align orientation.inner_rotation_pi_div_two_left_smul Orientation.inner_rotation_pi_div_two_left_smul /-- The inner product between a multiple of a vector and a `π / 2` rotation of that vector is @@ -471,7 +471,7 @@ that vector is zero. -/ @[simp] theorem inner_smul_rotation_pi_div_two_smul_left (x : V) (r₁ r₂ : ℝ) : ⟪r₁ • o.rotation (π / 2 : ℝ) x, r₂ • x⟫ = 0 := by - rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, MulZeroClass.mul_zero] + rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, mul_zero] #align orientation.inner_smul_rotation_pi_div_two_smul_left Orientation.inner_smul_rotation_pi_div_two_smul_left /-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of diff --git a/Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean b/Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean index e99fe43e2bb58..1deaeb07d80f7 100644 --- a/Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean +++ b/Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean @@ -192,13 +192,13 @@ theorem sin_angle_mul_norm_mul_norm (x y : V) : Real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)), real_inner_self_eq_norm_mul_norm, real_inner_self_eq_norm_mul_norm] by_cases h : ‖x‖ * ‖y‖ = 0 - · rw [show ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) by ring, h, MulZeroClass.mul_zero, - MulZeroClass.mul_zero, zero_sub] + · rw [show ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) by ring, h, mul_zero, + mul_zero, zero_sub] cases' eq_zero_or_eq_zero_of_mul_eq_zero h with hx hy · rw [norm_eq_zero] at hx - rw [hx, inner_zero_left, MulZeroClass.zero_mul, neg_zero] + rw [hx, inner_zero_left, zero_mul, neg_zero] · rw [norm_eq_zero] at hy - rw [hy, inner_zero_right, MulZeroClass.zero_mul, neg_zero] + rw [hy, inner_zero_right, zero_mul, neg_zero] · field_simp [h] ring_nf #align inner_product_geometry.sin_angle_mul_norm_mul_norm InnerProductGeometry.sin_angle_mul_norm_mul_norm diff --git a/Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean b/Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean index b651409b794ca..2f81705007ce4 100644 --- a/Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean +++ b/Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean @@ -168,7 +168,7 @@ theorem cos_angle_add_mul_norm_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) : rw [cos_angle_add_of_inner_eq_zero h] by_cases hxy : ‖x + y‖ = 0 · have h' := norm_add_sq_eq_norm_sq_add_norm_sq_real h - rw [hxy, MulZeroClass.zero_mul, eq_comm, + rw [hxy, zero_mul, eq_comm, add_eq_zero_iff' (mul_self_nonneg ‖x‖) (mul_self_nonneg ‖y‖), mul_self_eq_zero] at h' simp [h'.1] · exact div_mul_cancel _ hxy diff --git a/Mathlib/Geometry/Euclidean/Basic.lean b/Mathlib/Geometry/Euclidean/Basic.lean index b8dd20ed88c7b..3710c71e5a57e 100644 --- a/Mathlib/Geometry/Euclidean/Basic.lean +++ b/Mathlib/Geometry/Euclidean/Basic.lean @@ -183,7 +183,7 @@ theorem eq_of_dist_eq_of_dist_eq_of_mem_of_finrank_eq_two {s : AffineSubspace rcases hv' with ⟨t₂, rfl⟩ exact ⟨t₁, t₂, hv⟩ rcases hv (p -ᵥ p₁) (vsub_mem_direction hps hp₁s) with ⟨t₁, t₂, hpt⟩ - simp only [hpt, inner_add_right, inner_smul_right, ho, MulZeroClass.mul_zero, add_zero, + simp only [hpt, inner_add_right, inner_smul_right, ho, mul_zero, add_zero, mul_eq_zero, inner_self_eq_zero, vsub_eq_zero_iff_eq, hc.symm, or_false_iff] at hop rw [hop, zero_smul, zero_add, ← eq_vadd_iff_vsub_eq] at hpt subst hpt diff --git a/Mathlib/Geometry/Euclidean/Inversion/Basic.lean b/Mathlib/Geometry/Euclidean/Inversion/Basic.lean index 7619718ec9faa..08ee55572da48 100644 --- a/Mathlib/Geometry/Euclidean/Inversion/Basic.lean +++ b/Mathlib/Geometry/Euclidean/Inversion/Basic.lean @@ -182,12 +182,12 @@ theorem mul_dist_le_mul_dist_add_mul_dist (a b c d : P) : dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d := by -- If one of the points `b`, `c`, `d` is equal to `a`, then the inequality is trivial. rcases eq_or_ne b a with (rfl | hb) - · rw [dist_self, MulZeroClass.zero_mul, zero_add] + · rw [dist_self, zero_mul, zero_add] rcases eq_or_ne c a with (rfl | hc) - · rw [dist_self, MulZeroClass.zero_mul] + · rw [dist_self, zero_mul] apply_rules [add_nonneg, mul_nonneg, dist_nonneg] rcases eq_or_ne d a with (rfl | hd) - · rw [dist_self, MulZeroClass.mul_zero, add_zero, dist_comm d, dist_comm d, mul_comm] + · rw [dist_self, mul_zero, add_zero, dist_comm d, dist_comm d, mul_comm] /- Otherwise, we apply the triangle inequality to `EuclideanGeometry.inversion a 1 b`, `EuclideanGeometry.inversion a 1 c`, and `EuclideanGeometry.inversion a 1 d`. -/ have H := dist_triangle (inversion a 1 b) (inversion a 1 c) (inversion a 1 d) diff --git a/Mathlib/Geometry/Euclidean/MongePoint.lean b/Mathlib/Geometry/Euclidean/MongePoint.lean index 21ff9658c40e9..cd7c0b7c0360d 100644 --- a/Mathlib/Geometry/Euclidean/MongePoint.lean +++ b/Mathlib/Geometry/Euclidean/MongePoint.lean @@ -283,7 +283,7 @@ theorem mongePoint_mem_mongePlane {n : ℕ} (s : Simplex ℝ P (n + 2)) {i₁ i refine' ⟨_, s.mongePoint_mem_affineSpan⟩ intro v hv rcases Submodule.mem_span_singleton.mp hv with ⟨r, rfl⟩ - rw [inner_smul_right, s.inner_mongePoint_vsub_face_centroid_vsub, MulZeroClass.mul_zero] + rw [inner_smul_right, s.inner_mongePoint_vsub_face_centroid_vsub, mul_zero] #align affine.simplex.monge_point_mem_monge_plane Affine.Simplex.mongePoint_mem_mongePlane /-- The direction of a Monge plane. -/ diff --git a/Mathlib/Geometry/Euclidean/Sphere/Power.lean b/Mathlib/Geometry/Euclidean/Sphere/Power.lean index c6afced6bebdb..7c311572f4ab6 100644 --- a/Mathlib/Geometry/Euclidean/Sphere/Power.lean +++ b/Mathlib/Geometry/Euclidean/Sphere/Power.lean @@ -52,7 +52,7 @@ theorem mul_norm_eq_abs_sub_sq_norm {x y z : V} (h₁ : ∃ k : ℝ, k ≠ 1 ∧ have hzy : ⟪z, y⟫ = 0 := by rwa [inner_eq_zero_iff_angle_eq_pi_div_two, ← norm_add_eq_norm_sub_iff_angle_eq_pi_div_two, eq_comm] - have hzx : ⟪z, x⟫ = 0 := by rw [hxy, inner_smul_right, hzy, MulZeroClass.mul_zero] + have hzx : ⟪z, x⟫ = 0 := by rw [hxy, inner_smul_right, hzy, mul_zero] calc ‖x - y‖ * ‖x + y‖ = ‖(r - 1) • y‖ * ‖(r + 1) • y‖ := by simp [sub_smul, add_smul, hxy] _ = ‖r - 1‖ * ‖y‖ * (‖r + 1‖ * ‖y‖) := by simp_rw [norm_smul] diff --git a/Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean b/Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean index 500721e53f3fb..2d38441f4eb15 100644 --- a/Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean +++ b/Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean @@ -75,7 +75,7 @@ theorem Sphere.secondInter_eq_self_iff {s : Sphere P} {p : P} {v : V} : rwa [Sphere.secondInter, eq_comm, eq_vadd_iff_vsub_eq, vsub_self, eq_comm, smul_eq_zero, or_iff_left hv, div_eq_zero_iff, inner_self_eq_zero, or_iff_left hv, mul_eq_zero, or_iff_right (by norm_num : (-2 : ℝ) ≠ 0)] at hp - · rw [Sphere.secondInter, hp, MulZeroClass.mul_zero, zero_div, zero_smul, zero_vadd] + · rw [Sphere.secondInter, hp, mul_zero, zero_div, zero_smul, zero_vadd] #align euclidean_geometry.sphere.second_inter_eq_self_iff EuclideanGeometry.Sphere.secondInter_eq_self_iff /-- A point on a line through a point on a sphere equals that point or `secondInter`. -/ diff --git a/Mathlib/Geometry/Euclidean/Triangle.lean b/Mathlib/Geometry/Euclidean/Triangle.lean index ff70e4862f0bf..c143651196079 100644 --- a/Mathlib/Geometry/Euclidean/Triangle.lean +++ b/Mathlib/Geometry/Euclidean/Triangle.lean @@ -94,10 +94,10 @@ theorem norm_eq_of_angle_sub_eq_angle_sub_rev_of_angle_ne_pi {x y : V} real_inner_self_eq_norm_mul_norm, mul_sub_right_distrib, mul_sub_right_distrib, mul_self_mul_inv, mul_self_mul_inv, sub_eq_sub_iff_sub_eq_sub, ← mul_sub_left_distrib] at h by_cases hx0 : x = 0 - · rw [hx0, norm_zero, inner_zero_left, MulZeroClass.zero_mul, zero_sub, neg_eq_zero] at h + · rw [hx0, norm_zero, inner_zero_left, zero_mul, zero_sub, neg_eq_zero] at h rw [hx0, norm_zero, h] · by_cases hy0 : y = 0 - · rw [hy0, norm_zero, inner_zero_right, MulZeroClass.zero_mul, sub_zero] at h + · rw [hy0, norm_zero, inner_zero_right, zero_mul, sub_zero] at h rw [hy0, norm_zero, h] · rw [inv_sub_inv (fun hz => hx0 (norm_eq_zero.1 hz)) fun hz => hy0 (norm_eq_zero.1 hz), ← neg_sub, ← mul_div_assoc, mul_comm, mul_div_assoc, ← mul_neg_one] at h @@ -365,7 +365,7 @@ theorem dist_mul_of_eq_angle_of_dist_mul (a b c a' b' c' : P) (r : ℝ) (h : ∠ _ = (r * dist a c) ^ 2 := by simp [pow_two, ← law_cos a b c, mul_pow]; ring by_cases hab₁ : a = b · have hab'₁ : a' = b' := by - rw [← dist_eq_zero, hab, dist_eq_zero.mpr hab₁, MulZeroClass.mul_zero r] + rw [← dist_eq_zero, hab, dist_eq_zero.mpr hab₁, mul_zero r] rw [hab₁, hab'₁, dist_comm b' c', dist_comm b c, hcb] · have h1 : 0 ≤ r * dist a b := by rw [← hab]; exact dist_nonneg have h2 : 0 ≤ r := nonneg_of_mul_nonneg_left h1 (dist_pos.mpr hab₁) diff --git a/Mathlib/Geometry/Manifold/Algebra/SmoothFunctions.lean b/Mathlib/Geometry/Manifold/Algebra/SmoothFunctions.lean index 554cc78e2bcc3..0f5616d6e61c5 100644 --- a/Mathlib/Geometry/Manifold/Algebra/SmoothFunctions.lean +++ b/Mathlib/Geometry/Manifold/Algebra/SmoothFunctions.lean @@ -204,8 +204,8 @@ instance semiring {R : Type*} [Semiring R] [TopologicalSpace R] [ChartedSpace H' SmoothMap.monoid with left_distrib := fun a b c => by ext; exact left_distrib _ _ _ right_distrib := fun a b c => by ext; exact right_distrib _ _ _ - zero_mul := fun a => by ext; exact MulZeroClass.zero_mul _ - mul_zero := fun a => by ext; exact MulZeroClass.mul_zero _ } + zero_mul := fun a => by ext; exact zero_mul _ + mul_zero := fun a => by ext; exact mul_zero _ } #align smooth_map.semiring SmoothMap.semiring instance ring {R : Type*} [Ring R] [TopologicalSpace R] [ChartedSpace H' R] [SmoothRing I' R] : diff --git a/Mathlib/GroupTheory/Schreier.lean b/Mathlib/GroupTheory/Schreier.lean index 1cbbaab628bac..c2e716d4f4507 100644 --- a/Mathlib/GroupTheory/Schreier.lean +++ b/Mathlib/GroupTheory/Schreier.lean @@ -152,7 +152,7 @@ theorem card_commutator_dvd_index_center_pow [Finite (commutatorSet G)] : (center G).index ^ ((center G).index * Nat.card (commutatorSet G) + 1) := by -- First handle the case when `Z(G)` has infinite index and `[G : Z(G)]` is defined to be `0` by_cases hG : (center G).index = 0 - · simp_rw [hG, MulZeroClass.zero_mul, zero_add, pow_one, dvd_zero] + · simp_rw [hG, zero_mul, zero_add, pow_one, dvd_zero] haveI : FiniteIndex (center G) := ⟨hG⟩ -- Rewrite as `|Z(G) ∩ G'| * [G' : Z(G) ∩ G'] ∣ [G : Z(G)] ^ ([G : Z(G)] * n) * [G : Z(G)]` rw [← ((center G).subgroupOf (_root_.commutator G)).card_mul_index, pow_succ'] diff --git a/Mathlib/GroupTheory/SpecificGroups/Cyclic.lean b/Mathlib/GroupTheory/SpecificGroups/Cyclic.lean index ac4ae85299c90..cb93a05c1b79c 100644 --- a/Mathlib/GroupTheory/SpecificGroups/Cyclic.lean +++ b/Mathlib/GroupTheory/SpecificGroups/Cyclic.lean @@ -263,7 +263,7 @@ theorem IsCyclic.card_pow_eq_one_le [DecidableEq α] [Fintype α] [IsCyclic α] let ⟨m, hm⟩ := Nat.gcd_dvd_right n (Fintype.card α) have hm0 : 0 < m := Nat.pos_of_ne_zero fun hm0 => by - rw [hm0, MulZeroClass.mul_zero, Fintype.card_eq_zero_iff] at hm + rw [hm0, mul_zero, Fintype.card_eq_zero_iff] at hm exact hm.elim' 1 simp only [Set.toFinset_card, SetLike.coe_sort_coe] rw [← orderOf_eq_card_zpowers, orderOf_pow g, orderOf_eq_card_of_forall_mem_zpowers hg] diff --git a/Mathlib/GroupTheory/SpecificGroups/Quaternion.lean b/Mathlib/GroupTheory/SpecificGroups/Quaternion.lean index b0b2045308776..e27a0b36abbae 100644 --- a/Mathlib/GroupTheory/SpecificGroups/Quaternion.lean +++ b/Mathlib/GroupTheory/SpecificGroups/Quaternion.lean @@ -236,7 +236,7 @@ theorem quaternionGroup_one_isCyclic : IsCyclic (QuaternionGroup 1) := by theorem orderOf_a_one : orderOf (a 1 : QuaternionGroup n) = 2 * n := by cases' eq_zero_or_neZero n with hn hn · subst hn - simp_rw [MulZeroClass.mul_zero, orderOf_eq_zero_iff'] + simp_rw [mul_zero, orderOf_eq_zero_iff'] intro n h rw [one_def, a_one_pow] apply mt a.inj @@ -265,7 +265,7 @@ theorem exponent : Monoid.exponent (QuaternionGroup n) = 2 * lcm n 2 := by norm_num cases' eq_zero_or_neZero n with hn hn · subst hn - simp only [lcm_zero_left, MulZeroClass.mul_zero] + simp only [lcm_zero_left, mul_zero] exact Monoid.exponent_eq_zero_of_order_zero orderOf_a_one apply Nat.dvd_antisymm · apply Monoid.exponent_dvd_of_forall_pow_eq_one diff --git a/Mathlib/LinearAlgebra/BilinearForm.lean b/Mathlib/LinearAlgebra/BilinearForm.lean index a2ece462fcc64..dd8b891d31108 100644 --- a/Mathlib/LinearAlgebra/BilinearForm.lean +++ b/Mathlib/LinearAlgebra/BilinearForm.lean @@ -109,12 +109,12 @@ theorem smul_right (a : R) (x y : M) : B x (a • y) = a * B x y := @[simp] theorem zero_left (x : M) : B 0 x = 0 := by - rw [← @zero_smul R _ _ _ _ (0 : M), smul_left, MulZeroClass.zero_mul] + rw [← @zero_smul R _ _ _ _ (0 : M), smul_left, zero_mul] #align bilin_form.zero_left BilinForm.zero_left @[simp] theorem zero_right (x : M) : B x 0 = 0 := by - rw [← @zero_smul R _ _ _ _ (0 : M), smul_right, MulZeroClass.zero_mul] + rw [← @zero_smul R _ _ _ _ (0 : M), smul_right, zero_mul] #align bilin_form.zero_right BilinForm.zero_right @[simp] @@ -165,9 +165,9 @@ instance : Zero (BilinForm R M) where zero := { bilin := fun _ _ => 0 bilin_add_left := fun _ _ _ => (add_zero 0).symm - bilin_smul_left := fun a _ _ => (MulZeroClass.mul_zero a).symm + bilin_smul_left := fun a _ _ => (mul_zero a).symm bilin_add_right := fun _ _ _ => (zero_add 0).symm - bilin_smul_right := fun a _ _ => (MulZeroClass.mul_zero a).symm } + bilin_smul_right := fun a _ _ => (mul_zero a).symm } @[simp] theorem coe_zero : ⇑(0 : BilinForm R M) = 0 := @@ -828,7 +828,7 @@ theorem linearIndependent_of_iIsOrtho {n : Type w} {B : BilinForm K V} {v : n have hsum : (s.sum fun j : n => w j * B (v j) (v i)) = w i * B (v i) (v i) := by apply Finset.sum_eq_single_of_mem i hi intro j _ hij - rw [iIsOrtho_def.1 hv₁ _ _ hij, MulZeroClass.mul_zero] + rw [iIsOrtho_def.1 hv₁ _ _ hij, mul_zero] simp_rw [sum_left, smul_left, hsum] at this exact eq_zero_of_ne_zero_of_mul_right_eq_zero (hv₂ i) this set_option linter.uppercaseLean3 false in @@ -1190,7 +1190,7 @@ def orthogonal (B : BilinForm R M) (N : Submodule R M) : Submodule R M where add_mem' {x y} hx hy n hn := by rw [IsOrtho, add_right, show B n x = 0 from hx n hn, show B n y = 0 from hy n hn, zero_add] smul_mem' c x hx n hn := by - rw [IsOrtho, smul_right, show B n x = 0 from hx n hn, MulZeroClass.mul_zero] + rw [IsOrtho, smul_right, show B n x = 0 from hx n hn, mul_zero] #align bilin_form.orthogonal BilinForm.orthogonal variable {N L : Submodule R M} @@ -1357,7 +1357,7 @@ theorem iIsOrtho.not_isOrtho_basis_self_of_nondegenerate {n : Type w} [Nontrivia apply Finset.sum_eq_zero rintro j - rw [smul_right] - convert MulZeroClass.mul_zero (vi j) using 2 + convert mul_zero (vi j) using 2 obtain rfl | hij := eq_or_ne i j · exact ho · exact h hij @@ -1379,10 +1379,10 @@ theorem iIsOrtho.nondegenerate_iff_not_isOrtho_basis_self {n : Type w} [Nontrivi rw [Finset.sum_eq_single i] at hB · exact eq_zero_of_ne_zero_of_mul_right_eq_zero (ho i) hB · intro j _ hij - convert MulZeroClass.mul_zero (vi j) using 2 + convert mul_zero (vi j) using 2 exact hO hij · intro hi - convert MulZeroClass.zero_mul (M₀ := R) _ using 2 + convert zero_mul (M₀ := R) _ using 2 exact Finsupp.not_mem_support_iff.mp hi set_option linter.uppercaseLean3 false in #align bilin_form.is_Ortho.nondegenerate_iff_not_is_ortho_basis_self BilinForm.iIsOrtho.nondegenerate_iff_not_isOrtho_basis_self diff --git a/Mathlib/LinearAlgebra/Charpoly/Basic.lean b/Mathlib/LinearAlgebra/Charpoly/Basic.lean index e98a02f680523..46ef163f46b22 100644 --- a/Mathlib/LinearAlgebra/Charpoly/Basic.lean +++ b/Mathlib/LinearAlgebra/Charpoly/Basic.lean @@ -102,7 +102,7 @@ theorem minpoly_coeff_zero_of_injective (hf : Function.Injective f) : have hdegP : P.degree < (minpoly R f).degree := by rw [hP, mul_comm] refine' degree_lt_degree_mul_X fun h => _ - rw [h, MulZeroClass.mul_zero] at hP + rw [h, mul_zero] at hP exact minpoly.ne_zero (isIntegral f) hP have hPmonic : P.Monic := by suffices (minpoly R f).Monic by diff --git a/Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean b/Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean index 5f7f6fee61e8f..cb6b37921e021 100644 --- a/Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean +++ b/Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean @@ -168,7 +168,7 @@ variable (Q) theorem contractLeft_ι (x : M) : d⌋ι Q x = algebraMap R _ (d x) := by -- Porting note: Lean cannot figure out anymore the third argument refine (foldr'_ι _ _ ?_ _ _).trans <| by - simp_rw [contractLeftAux_apply_apply, MulZeroClass.mul_zero, sub_zero, + simp_rw [contractLeftAux_apply_apply, mul_zero, sub_zero, Algebra.algebraMap_eq_smul_one] exact fun m x fx ↦ contractLeftAux_contractLeftAux Q d m x fx #align clifford_algebra.contract_left_ι CliffordAlgebra.contractLeft_ι @@ -208,7 +208,7 @@ theorem contractLeft_contractLeft (x : CliffordAlgebra Q) : d⌋(d⌋x) = 0 := b · simp_rw [contractLeft_algebraMap, map_zero] · rw [map_add, map_add, hx, hy, add_zero] · rw [contractLeft_ι_mul, map_sub, contractLeft_ι_mul, hx, LinearMap.map_smul, - MulZeroClass.mul_zero, sub_zero, sub_self] + mul_zero, sub_zero, sub_self] #align clifford_algebra.contract_left_contract_left CliffordAlgebra.contractLeft_contractLeft /-- This is [grinberg_clifford_2016][] Theorem 13 -/ diff --git a/Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean b/Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean index 0dccad0bd936d..b9f148c68103f 100644 --- a/Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean +++ b/Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean @@ -111,7 +111,7 @@ theorem involute_eq_id : protected def equiv : CliffordAlgebra (0 : QuadraticForm R Unit) ≃ₐ[R] R := AlgEquiv.ofAlgHom (CliffordAlgebra.lift (0 : QuadraticForm R Unit) <| - ⟨0, fun m : Unit => (MulZeroClass.zero_mul (0 : R)).trans (algebraMap R _).map_zero.symm⟩) + ⟨0, fun m : Unit => (zero_mul (0 : R)).trans (algebraMap R _).map_zero.symm⟩) (Algebra.ofId R _) (by ext x; exact AlgHom.commutes _ x) (by ext : 1; rw [ι_eq_zero, LinearMap.comp_zero, LinearMap.comp_zero]) #align clifford_algebra_ring.equiv CliffordAlgebraRing.equiv diff --git a/Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean b/Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean index d802935814a09..c5e55661dfcb6 100644 --- a/Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean +++ b/Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean @@ -192,7 +192,7 @@ private theorem fFold_fFold (m : M) (x : A × S f) : fFold f m (fFold f m x) = Q change f.bilin _ _ * (f.bilin _ _ * b) = Q m • (f.bilin _ _ * b) rw [← smul_mul_assoc, ← mul_assoc, f.contract_mid] · change f.bilin m₁ m * 0 = Q m • (0 : A) -- porting note: `•` now needs the type of `0` - rw [MulZeroClass.mul_zero, smul_zero] + rw [mul_zero, smul_zero] · rintro x hx y hy ihx ihy rw [LinearMap.add_apply, LinearMap.add_apply, mul_add, smul_add, ihx, ihy] · rintro x hx c ihx diff --git a/Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean b/Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean index 3622ecc7de522..f6eb1746ddd62 100644 --- a/Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean +++ b/Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean @@ -84,7 +84,7 @@ theorem v_sq_scalar (m : M) : v Q m * v Q m = algebraMap _ _ (Q m) := theorem neg_e0_mul_v (m : M) : -(e0 Q * v Q m) = v Q m * e0 Q := by refine' neg_eq_of_add_eq_zero_right ((ι_mul_ι_add_swap _ _).trans _) dsimp [QuadraticForm.polar] - simp only [add_zero, MulZeroClass.mul_zero, mul_one, zero_add, neg_zero, QuadraticForm.map_zero, + simp only [add_zero, mul_zero, mul_one, zero_add, neg_zero, QuadraticForm.map_zero, add_sub_cancel, sub_self, map_zero, zero_sub] #align clifford_algebra.equiv_even.neg_e0_mul_v CliffordAlgebra.EquivEven.neg_e0_mul_v diff --git a/Mathlib/LinearAlgebra/Determinant.lean b/Mathlib/LinearAlgebra/Determinant.lean index 2449349bbaea9..563c3690a5fe8 100644 --- a/Mathlib/LinearAlgebra/Determinant.lean +++ b/Mathlib/LinearAlgebra/Determinant.lean @@ -650,7 +650,7 @@ theorem Basis.det_smul_mk_coord_eq_det_update {v : ι → M} (hli : LinearIndepe MultilinearMap.toLinearMap_apply] · rw [Basis.mk_coord_apply_eq, mul_one, update_eq_self] congr - · rw [Basis.mk_coord_apply_ne hik, MulZeroClass.mul_zero, eq_comm] + · rw [Basis.mk_coord_apply_ne hik, mul_zero, eq_comm] exact e.det.map_eq_zero_of_eq _ (by simp [hik, Function.update_apply]) hik #align basis.det_smul_mk_coord_eq_det_update Basis.det_smul_mk_coord_eq_det_update diff --git a/Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean b/Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean index 6d4249712daf4..b54eec1b61224 100644 --- a/Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean +++ b/Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean @@ -81,7 +81,7 @@ theorem hasEigenvalue_of_isRoot (h : (minpoly K f).IsRoot μ) : f.HasEigenvalue have p_ne_0 : p ≠ 0 := by intro con apply minpoly.ne_zero f.isIntegral - rw [hp, con, MulZeroClass.mul_zero] + rw [hp, con, mul_zero] have : (aeval f) p = 0 := by have h_aeval := minpoly.aeval K f revert h_aeval diff --git a/Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean b/Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean index f1e6f8851bb06..51db4dcafbfdf 100644 --- a/Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean +++ b/Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean @@ -263,14 +263,14 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) : · exact i.elim0 · rw [List.ofFn_succ, List.prod_cons, ← mul_assoc] by_cases h : i = 0 - · rw [h, ι_sq_zero, MulZeroClass.zero_mul] + · rw [h, ι_sq_zero, zero_mul] · replace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h)) simp only at hn - rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn + rw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn - rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul] + rw [← add_mul, ι_add_mul_swap, zero_mul] #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list variable (R) @@ -297,7 +297,7 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) := rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm] exact ι_mul_prod_list (f ∘ Fin.succ) _ -- ignore the left-most term and induct on the remaining ones, decrementing indices - · convert MulZeroClass.mul_zero (ι R (f 0)) + · convert mul_zero (ι R (f 0)) refine' hn (fun i => f <| Fin.succ i) (x.pred hx) diff --git a/Mathlib/LinearAlgebra/Lagrange.lean b/Mathlib/LinearAlgebra/Lagrange.lean index 05553a88ddfa2..038a8247d13b2 100644 --- a/Mathlib/LinearAlgebra/Lagrange.lean +++ b/Mathlib/LinearAlgebra/Lagrange.lean @@ -127,7 +127,7 @@ def basisDivisor (x y : F) : F[X] := #align lagrange.basis_divisor Lagrange.basisDivisor theorem basisDivisor_self : basisDivisor x x = 0 := by - simp only [basisDivisor, sub_self, inv_zero, map_zero, MulZeroClass.zero_mul] + simp only [basisDivisor, sub_self, inv_zero, map_zero, zero_mul] #align lagrange.basis_divisor_self Lagrange.basisDivisor_self theorem basisDivisor_inj (hxy : basisDivisor x y = 0) : x = y := by @@ -165,7 +165,7 @@ theorem natDegree_basisDivisor_of_ne (hxy : x ≠ y) : (basisDivisor x y).natDeg @[simp] theorem eval_basisDivisor_right : eval y (basisDivisor x y) = 0 := by - simp only [basisDivisor, eval_mul, eval_C, eval_sub, eval_X, sub_self, MulZeroClass.mul_zero] + simp only [basisDivisor, eval_mul, eval_C, eval_sub, eval_X, sub_self, mul_zero] #align lagrange.eval_basis_divisor_right Lagrange.eval_basisDivisor_right theorem eval_basisDivisor_left_of_ne (hxy : x ≠ y) : eval x (basisDivisor x y) = 1 := by @@ -322,7 +322,7 @@ theorem eval_interpolate_at_node (hvs : Set.InjOn v s) (hi : i ∈ s) : rw [interpolate_apply, eval_finset_sum, ← add_sum_erase _ _ hi] simp_rw [eval_mul, eval_C, eval_basis_self hvs hi, mul_one, add_right_eq_self] refine' sum_eq_zero fun j H => _ - rw [eval_basis_of_ne (mem_erase.mp H).1 hi, MulZeroClass.mul_zero] + rw [eval_basis_of_ne (mem_erase.mp H).1 hi, mul_zero] #align lagrange.eval_interpolate_at_node Lagrange.eval_interpolate_at_node theorem degree_interpolate_le (hvs : Set.InjOn v s) : @@ -440,7 +440,7 @@ theorem interpolate_eq_sum_interpolate_insert_sdiff (hvt : Set.InjOn v t) (hs : mul_one, add_right_eq_self] refine' sum_eq_zero fun j hj => _ rcases mem_erase.mp hj with ⟨hij, _⟩ - rw [eval_basis_of_ne hij hi', MulZeroClass.mul_zero] + rw [eval_basis_of_ne hij hi', mul_zero] · have H : (∑ j in s, eval (v i) (Lagrange.basis s v j)) = 1 := by rw [← eval_finset_sum, sum_basis (hvt.mono hst) hs, eval_one] rw [← mul_one (r i), ← H, mul_sum] diff --git a/Mathlib/LinearAlgebra/Matrix/Adjugate.lean b/Mathlib/LinearAlgebra/Matrix/Adjugate.lean index 5b20049eb960e..d9832c2b84c03 100644 --- a/Mathlib/LinearAlgebra/Matrix/Adjugate.lean +++ b/Mathlib/LinearAlgebra/Matrix/Adjugate.lean @@ -404,11 +404,11 @@ theorem adjugate_fin_two (A : Matrix (Fin 2) (Fin 2) α) : ext i j rw [adjugate_apply, det_fin_two] fin_cases i <;> fin_cases j <;> - simp [one_mul, Fin.one_eq_zero_iff, Pi.single_eq_same, MulZeroClass.mul_zero, sub_zero, + simp [one_mul, Fin.one_eq_zero_iff, Pi.single_eq_same, mul_zero, sub_zero, Pi.single_eq_of_ne, Ne.def, not_false_iff, updateRow_self, updateRow_ne, cons_val_zero, of_apply, Nat.succ_succ_ne_one, Pi.single_eq_of_ne, updateRow_self, Pi.single_eq_of_ne, Ne.def, Fin.zero_eq_one_iff, Nat.succ_succ_ne_one, not_false_iff, updateRow_ne, - Fin.one_eq_zero_iff, MulZeroClass.zero_mul, Pi.single_eq_same, one_mul, zero_sub, of_apply, + Fin.one_eq_zero_iff, zero_mul, Pi.single_eq_same, one_mul, zero_sub, of_apply, cons_val', cons_val_fin_one, cons_val_one, head_fin_const, neg_inj, eq_self_iff_true, cons_val_zero, head_cons, mul_one] #align matrix.adjugate_fin_two Matrix.adjugate_fin_two @@ -422,7 +422,7 @@ theorem adjugate_fin_succ_eq_det_submatrix {n : ℕ} (A : Matrix (Fin n.succ) (F adjugate A i j = (-1) ^ (j + i : ℕ) * det (A.submatrix j.succAbove i.succAbove) := by simp_rw [adjugate_apply, det_succ_row _ j, updateRow_self, submatrix_updateRow_succAbove] rw [Fintype.sum_eq_single i fun h hjk => ?_, Pi.single_eq_same, mul_one] - rw [Pi.single_eq_of_ne hjk, MulZeroClass.mul_zero, MulZeroClass.zero_mul] + rw [Pi.single_eq_of_ne hjk, mul_zero, zero_mul] #align matrix.adjugate_fin_succ_eq_det_submatrix Matrix.adjugate_fin_succ_eq_det_submatrix theorem det_eq_sum_mul_adjugate_row (A : Matrix n n α) (i : n) : diff --git a/Mathlib/LinearAlgebra/Matrix/Block.lean b/Mathlib/LinearAlgebra/Matrix/Block.lean index 96a8b570952dc..44ac814790126 100644 --- a/Mathlib/LinearAlgebra/Matrix/Block.lean +++ b/Mathlib/LinearAlgebra/Matrix/Block.lean @@ -132,8 +132,8 @@ theorem BlockTriangular.mul [Fintype m] {M N : Matrix m m R} (hM : BlockTriangul apply Finset.sum_eq_zero intro k _ by_cases hki : b k < b i - · simp_rw [hM hki, MulZeroClass.zero_mul] - · simp_rw [hN (lt_of_lt_of_le hij (le_of_not_lt hki)), MulZeroClass.mul_zero] + · simp_rw [hM hki, zero_mul] + · simp_rw [hN (lt_of_lt_of_le hij (le_of_not_lt hki)), mul_zero] #align matrix.block_triangular.mul Matrix.BlockTriangular.mul end LinearOrder diff --git a/Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean b/Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean index b351bcc5cfb0b..9814f207dbbda 100644 --- a/Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean +++ b/Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean @@ -175,7 +175,7 @@ theorem matPolyEquiv_eval (M : Matrix n n R[X]) (r : R) (i j : n) : apply (Finset.sum_subset (support_subset_support_matPolyEquiv _ _ _) _).symm intro n _hn h'n rw [not_mem_support_iff] at h'n - simp only [h'n, MulZeroClass.zero_mul] + simp only [h'n, zero_mul] simp only [mul_zero] -- porting note: added #align matrix.mat_poly_equiv_eval Matrix.matPolyEquiv_eval diff --git a/Mathlib/LinearAlgebra/Matrix/Determinant.lean b/Mathlib/LinearAlgebra/Matrix/Determinant.lean index b59e7f5b2b764..bf9a53e2f2b70 100644 --- a/Mathlib/LinearAlgebra/Matrix/Determinant.lean +++ b/Mathlib/LinearAlgebra/Matrix/Determinant.lean @@ -81,7 +81,7 @@ theorem det_diagonal {d : n → R} : det (diagonal d) = ∏ i, d i := by refine' (Finset.sum_eq_single 1 _ _).trans _ · rintro σ - h2 cases' not_forall.1 (mt Equiv.ext h2) with x h3 - convert MulZeroClass.mul_zero (ε σ) + convert mul_zero (ε σ) apply Finset.prod_eq_zero (mem_univ x) exact if_neg h3 · simp @@ -481,7 +481,7 @@ theorem det_eq_of_forall_row_eq_smul_add_const_aux {A B : Matrix n n R} {s : Fin simp [hs] congr ext i j - rw [A_eq, this, MulZeroClass.zero_mul, add_zero] + rw [A_eq, this, zero_mul, add_zero] | @insert i s _hi ih => intro c hs k hk A_eq have hAi : A i = B i + c i • B k := funext (A_eq i) @@ -521,7 +521,7 @@ theorem det_eq_of_forall_row_eq_smul_add_pred_aux {n : ℕ} (k : Fin (n + 1)) : · congr ext i j refine' Fin.cases (h0 j) (fun i => _) i - rw [hsucc, hc i (Fin.succ_pos _), MulZeroClass.zero_mul, add_zero] + rw [hsucc, hc i (Fin.succ_pos _), zero_mul, add_zero] set M' := updateRow M k.succ (N k.succ) with hM' have hM : M = updateRow M' k.succ (M' k.succ + c k • M (Fin.castSucc k)) := by ext i j @@ -541,7 +541,7 @@ theorem det_eq_of_forall_row_eq_smul_add_pred_aux {n : ℕ} (k : Fin (n + 1)) : intro i j rw [Function.update_apply] split_ifs with hik - · rw [MulZeroClass.zero_mul, add_zero, hM', hik, updateRow_self] + · rw [zero_mul, add_zero, hM', hik, updateRow_self] rw [hM', updateRow_ne ((Fin.succ_injective _).ne hik), hsucc] by_cases hik2 : k < i · simp [hc i (Fin.succ_lt_succ_iff.mpr hik2)] @@ -637,7 +637,7 @@ theorem det_blockDiagonal {o : Type*} [Fintype o] [DecidableEq o] (M : o → Mat · intro σ _ hσ rw [mem_preserving_snd] at hσ obtain ⟨⟨k, x⟩, hkx⟩ := not_forall.mp hσ - rw [Finset.prod_eq_zero (Finset.mem_univ (k, x)), MulZeroClass.mul_zero] + rw [Finset.prod_eq_zero (Finset.mem_univ (k, x)), mul_zero] rw [← @Prod.mk.eta _ _ (σ (k, x)), blockDiagonal_apply_ne] exact hkx #align matrix.det_block_diagonal Matrix.det_blockDiagonal @@ -695,7 +695,7 @@ theorem det_fromBlocks_zero₂₁ (A : Matrix m m R) (B : Matrix m n R) (D : Mat cases' hx : σ (Sum.inl a) with a2 b · have hn := (not_exists.mp ha) a2 exact absurd hx.symm hn - · rw [Finset.prod_eq_zero (Finset.mem_univ (Sum.inl a)), MulZeroClass.mul_zero] + · rw [Finset.prod_eq_zero (Finset.mem_univ (Sum.inl a)), mul_zero] rw [hx, fromBlocks_apply₂₁, zero_apply] #align matrix.det_from_blocks_zero₂₁ Matrix.det_fromBlocks_zero₂₁ diff --git a/Mathlib/LinearAlgebra/Matrix/DotProduct.lean b/Mathlib/LinearAlgebra/Matrix/DotProduct.lean index 987627dcc6e65..fb0449374e67e 100644 --- a/Mathlib/LinearAlgebra/Matrix/DotProduct.lean +++ b/Mathlib/LinearAlgebra/Matrix/DotProduct.lean @@ -41,7 +41,7 @@ variable [Semiring R] [Fintype n] theorem dotProduct_stdBasis_eq_mul [DecidableEq n] (v : n → R) (c : R) (i : n) : dotProduct v (LinearMap.stdBasis R (fun _ => R) i c) = v i * c := by rw [dotProduct, Finset.sum_eq_single i, LinearMap.stdBasis_same] - exact fun _ _ hb => by rw [LinearMap.stdBasis_ne _ _ _ _ hb, MulZeroClass.mul_zero] + exact fun _ _ hb => by rw [LinearMap.stdBasis_ne _ _ _ _ hb, mul_zero] exact fun hi => False.elim (hi <| Finset.mem_univ _) #align matrix.dot_product_std_basis_eq_mul Matrix.dotProduct_stdBasis_eq_mul diff --git a/Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean b/Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean index f75a2f09cbb34..34342057fc809 100644 --- a/Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean +++ b/Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean @@ -314,7 +314,7 @@ theorem fin_two_exists_eq_mk_of_apply_zero_one_eq_zero {R : Type*} [Field R] (g ∃ (a b : R) (h : a ≠ 0), g = (⟨!![a, b; 0, a⁻¹], by simp [h]⟩ : SL(2, R)) := by induction' g using Matrix.SpecialLinearGroup.fin_two_induction with a b c d h_det replace hg : c = 0 := by simpa using hg - have had : a * d = 1 := by rwa [hg, MulZeroClass.mul_zero, sub_zero] at h_det + have had : a * d = 1 := by rwa [hg, mul_zero, sub_zero] at h_det refine' ⟨a, b, left_ne_zero_of_mul_eq_one had, _⟩ simp_rw [eq_inv_of_mul_eq_one_right had, hg] #align matrix.special_linear_group.fin_two_exists_eq_mk_of_apply_zero_one_eq_zero Matrix.SpecialLinearGroup.fin_two_exists_eq_mk_of_apply_zero_one_eq_zero diff --git a/Mathlib/LinearAlgebra/Matrix/ToLin.lean b/Mathlib/LinearAlgebra/Matrix/ToLin.lean index 70c8c0f8723f9..2fd72bd95e0a6 100644 --- a/Mathlib/LinearAlgebra/Matrix/ToLin.lean +++ b/Mathlib/LinearAlgebra/Matrix/ToLin.lean @@ -605,7 +605,7 @@ theorem Matrix.toLin_self (M : Matrix m n R) (i : n) : rw [Basis.repr_self, Matrix.mulVec, dotProduct, Finset.sum_eq_single i, Finsupp.single_eq_same, mul_one] · intro i' _ i'_ne - rw [Finsupp.single_eq_of_ne i'_ne.symm, MulZeroClass.mul_zero] + rw [Finsupp.single_eq_of_ne i'_ne.symm, mul_zero] · intros have := Finset.mem_univ i contradiction diff --git a/Mathlib/LinearAlgebra/Matrix/Transvection.lean b/Mathlib/LinearAlgebra/Matrix/Transvection.lean index a9607bbaaa1a1..48ba5b08e9e15 100644 --- a/Mathlib/LinearAlgebra/Matrix/Transvection.lean +++ b/Mathlib/LinearAlgebra/Matrix/Transvection.lean @@ -103,10 +103,10 @@ theorem updateRow_eq_transvection [Finite n] (c : R) : one_apply_eq, Pi.smul_apply, mul_one, Algebra.id.smul_eq_mul, add_apply] · simp only [updateRow_self, transvection, ha, hb, StdBasisMatrix.apply_of_ne, Pi.add_apply, Ne.def, not_false_iff, Pi.smul_apply, and_false_iff, one_apply_ne, Algebra.id.smul_eq_mul, - MulZeroClass.mul_zero, add_apply] + mul_zero, add_apply] · simp only [updateRow_ne, transvection, ha, Ne.symm ha, StdBasisMatrix.apply_of_ne, add_zero, Algebra.id.smul_eq_mul, Ne.def, not_false_iff, DMatrix.add_apply, Pi.smul_apply, - MulZeroClass.mul_zero, false_and_iff, add_apply] + mul_zero, false_and_iff, add_apply] #align matrix.update_row_eq_transvection Matrix.updateRow_eq_transvection variable [Fintype n] diff --git a/Mathlib/LinearAlgebra/Matrix/ZPow.lean b/Mathlib/LinearAlgebra/Matrix/ZPow.lean index 6b5901e5a201c..f20e44f3d74d1 100644 --- a/Mathlib/LinearAlgebra/Matrix/ZPow.lean +++ b/Mathlib/LinearAlgebra/Matrix/ZPow.lean @@ -252,7 +252,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h) · apply zpow_add_one (isUnit_det_of_left_inverse h) · show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A - simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul] + simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', zero_mul] #align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one set_option linter.deprecated false in diff --git a/Mathlib/LinearAlgebra/QuadraticForm/Complex.lean b/Mathlib/LinearAlgebra/QuadraticForm/Complex.lean index 764ed6a96a01b..3265ea654a706 100644 --- a/Mathlib/LinearAlgebra/QuadraticForm/Complex.lean +++ b/Mathlib/LinearAlgebra/QuadraticForm/Complex.lean @@ -47,12 +47,12 @@ noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) : intro i _ hij rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply, Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul, - MulZeroClass.mul_zero, MulZeroClass.mul_zero] + mul_zero, mul_zero] intro hj'; exact False.elim (hj' hj) simp_rw [Basis.unitsSMul_apply] erw [hsum, smul_eq_mul] split_ifs with h - · simp only [h, zero_smul, MulZeroClass.zero_mul] + · simp only [h, zero_smul, zero_mul] have hww' : w' j = w j := by simp only [dif_neg h, Units.val_mk0] simp only [one_mul, Units.val_mk0, smul_eq_mul] rw [hww'] diff --git a/Mathlib/LinearAlgebra/QuadraticForm/Real.lean b/Mathlib/LinearAlgebra/QuadraticForm/Real.lean index c7f117c516ab4..c61d0a4c2ebb0 100644 --- a/Mathlib/LinearAlgebra/QuadraticForm/Real.lean +++ b/Mathlib/LinearAlgebra/QuadraticForm/Real.lean @@ -53,13 +53,13 @@ noncomputable def isometryEquivSignWeightedSumSquares [DecidableEq ι] (w : ι intro i _ hij rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply, Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul, - MulZeroClass.mul_zero, MulZeroClass.mul_zero] + mul_zero, mul_zero] intro hj'; exact False.elim (hj' hj) simp_rw [Basis.unitsSMul_apply] erw [hsum] simp only [Function.comp, smul_eq_mul] split_ifs with h - · simp only [h, zero_smul, MulZeroClass.zero_mul, Real.sign_zero] + · simp only [h, zero_smul, zero_mul, Real.sign_zero] have hwu : w j = u j := by simp only [dif_neg h, Units.val_mk0] simp only [Units.val_mk0] rw [hwu] diff --git a/Mathlib/LinearAlgebra/Vandermonde.lean b/Mathlib/LinearAlgebra/Vandermonde.lean index cf551c17c8bf3..49a4992177aa4 100644 --- a/Mathlib/LinearAlgebra/Vandermonde.lean +++ b/Mathlib/LinearAlgebra/Vandermonde.lean @@ -91,7 +91,7 @@ theorem det_vandermonde {n : ℕ} (v : Fin n → R) : (Fin.succAbove 0 i)) := by simp_rw [det_succ_column_zero, Fin.sum_univ_succ, of_apply, Matrix.cons_val_zero, submatrix, of_apply, Matrix.cons_val_succ, Fin.val_zero, pow_zero, one_mul, sub_self, - MulZeroClass.mul_zero, MulZeroClass.zero_mul, Finset.sum_const_zero, add_zero] + mul_zero, zero_mul, Finset.sum_const_zero, add_zero] _ = det (of fun i j : Fin n => diff --git a/Mathlib/MeasureTheory/Constructions/Polish.lean b/Mathlib/MeasureTheory/Constructions/Polish.lean index d7f970819069f..36445ca6cf962 100644 --- a/Mathlib/MeasureTheory/Constructions/Polish.lean +++ b/Mathlib/MeasureTheory/Constructions/Polish.lean @@ -664,7 +664,7 @@ theorem measurableSet_range_of_continuous_injective {β : Type*} [TopologicalSpa -- the points `y n` are nearby, and therefore they form a Cauchy sequence. have cauchy_y : CauchySeq y := by have : Tendsto (fun n => 2 * u n) atTop (𝓝 0) := by - simpa only [MulZeroClass.mul_zero] using u_lim.const_mul 2 + simpa only [mul_zero] using u_lim.const_mul 2 refine cauchySeq_of_le_tendsto_0' (fun n => 2 * u n) (fun m n hmn => ?_) this rcases I m n with ⟨z, zsm, zsn⟩ calc diff --git a/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean b/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean index ffbd125ee5d92..ec42012f3ef56 100644 --- a/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean +++ b/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean @@ -464,12 +464,12 @@ noncomputable def FiniteSpanningSetsIn.prod {ν : Measure β} {C : Set (Set α)} theorem quasiMeasurePreserving_fst : QuasiMeasurePreserving Prod.fst (μ.prod ν) μ := by refine' ⟨measurable_fst, AbsolutelyContinuous.mk fun s hs h2s => _⟩ - rw [map_apply measurable_fst hs, ← prod_univ, prod_prod, h2s, MulZeroClass.zero_mul] + rw [map_apply measurable_fst hs, ← prod_univ, prod_prod, h2s, zero_mul] #align measure_theory.measure.quasi_measure_preserving_fst MeasureTheory.Measure.quasiMeasurePreserving_fst theorem quasiMeasurePreserving_snd : QuasiMeasurePreserving Prod.snd (μ.prod ν) ν := by refine' ⟨measurable_snd, AbsolutelyContinuous.mk fun s hs h2s => _⟩ - rw [map_apply measurable_snd hs, ← univ_prod, prod_prod, h2s, MulZeroClass.mul_zero] + rw [map_apply measurable_snd hs, ← univ_prod, prod_prod, h2s, mul_zero] #align measure_theory.measure.quasi_measure_preserving_snd MeasureTheory.Measure.quasiMeasurePreserving_snd variable [SigmaFinite μ] diff --git a/Mathlib/MeasureTheory/Covering/Besicovitch.lean b/Mathlib/MeasureTheory/Covering/Besicovitch.lean index f38c027d372a4..69c4088316c80 100644 --- a/Mathlib/MeasureTheory/Covering/Besicovitch.lean +++ b/Mathlib/MeasureTheory/Covering/Besicovitch.lean @@ -555,7 +555,7 @@ theorem exist_finset_disjoint_balls_large_measure (μ : Measure α) [IsFiniteMea · have : μ s = 0 := le_bot_iff.1 hμs refine' ⟨∅, by simp only [Finset.coe_empty, empty_subset], _, _⟩ · simp only [this, Finset.not_mem_empty, diff_empty, iUnion_false, iUnion_empty, - nonpos_iff_eq_zero, MulZeroClass.mul_zero] + nonpos_iff_eq_zero, mul_zero] · simp only [Finset.coe_empty, pairwiseDisjoint_empty] cases isEmpty_or_nonempty α · simp only [eq_empty_of_isEmpty s, measure_empty] at hμs @@ -810,7 +810,7 @@ theorem exists_disjoint_closedBall_covering_ae_of_finiteMeasure_aux (μ : Measur exact ENNReal.add_lt_add_left (ENNReal.nat_ne_top N) zero_lt_one · simp only [true_or_iff, add_eq_zero_iff, Ne.def, not_false_iff, one_ne_zero, and_false_iff] · simp only [ENNReal.nat_ne_top, Ne.def, not_false_iff, or_true_iff] - rw [MulZeroClass.zero_mul] at C + rw [zero_mul] at C apply le_bot_iff.1 exact le_of_tendsto_of_tendsto' tendsto_const_nhds C fun n => (A n).trans (B n) · refine' (pairwiseDisjoint_iUnion _).2 fun n => (Pu n).1 diff --git a/Mathlib/MeasureTheory/Covering/Differentiation.lean b/Mathlib/MeasureTheory/Covering/Differentiation.lean index a14a2a41e3c87..8cc0b0d6f3e14 100644 --- a/Mathlib/MeasureTheory/Covering/Differentiation.lean +++ b/Mathlib/MeasureTheory/Covering/Differentiation.lean @@ -187,7 +187,7 @@ theorem ae_eventually_measure_zero_of_singular (hρ : ρ ⟂ₘ μ) : simp only [mem_inter_iff, not_lt, not_eventually, mem_setOf_eq] at hx exact hx.1 _ ≤ (ε : ℝ≥0∞)⁻¹ * ρ o := (mul_le_mul_left' (measure_mono (inter_subset_right _ _)) _) - _ = 0 := by rw [ρo, MulZeroClass.mul_zero] + _ = 0 := by rw [ρo, mul_zero] obtain ⟨u, _, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ≥0, StrictAnti u ∧ (∀ n : ℕ, 0 < u n) ∧ Tendsto u atTop (𝓝 0) := exists_seq_strictAnti_tendsto (0 : ℝ≥0) @@ -480,7 +480,7 @@ theorem mul_measure_le_of_subset_lt_limRatioMeas {q : ℝ≥0} {s : Set α} rw [coe_nnreal_smul_apply] exact mul_le_mul_left' (measure_mono (inter_subset_right _ _)) _ _ ≤ ρ s := by - rw [A, MulZeroClass.mul_zero, add_zero]; exact measure_mono (inter_subset_left _ _) + rw [A, mul_zero, add_zero]; exact measure_mono (inter_subset_left _ _) refine' v.measure_le_of_frequently_le _ (AbsolutelyContinuous.rfl.smul _) _ _ intro x hx have I : ∀ᶠ a in v.filterAt x, (q : ℝ≥0∞) < ρ a / μ a := (tendsto_order.1 hx.2).1 _ (h hx.1) @@ -509,7 +509,7 @@ theorem measure_limRatioMeas_top : μ {x | v.limRatioMeas hρ x = ∞} = 0 := by have B : Tendsto (fun q : ℝ≥0 => (q : ℝ≥0∞)⁻¹ * ρ s) atTop (𝓝 (∞⁻¹ * ρ s)) := by apply ENNReal.Tendsto.mul_const _ (Or.inr ρs) exact ENNReal.tendsto_inv_iff.2 (ENNReal.tendsto_coe_nhds_top.2 tendsto_id) - simp only [MulZeroClass.zero_mul, ENNReal.inv_top] at B + simp only [zero_mul, ENNReal.inv_top] at B apply ge_of_tendsto B exact eventually_atTop.2 ⟨1, A⟩ #align vitali_family.measure_lim_ratio_meas_top VitaliFamily.measure_limRatioMeas_top @@ -532,7 +532,7 @@ theorem measure_limRatioMeas_zero : ρ {x | v.limRatioMeas hρ x = 0} = 0 := by apply ENNReal.Tendsto.mul_const _ (Or.inr μs) rw [ENNReal.tendsto_coe] exact nhdsWithin_le_nhds - simp only [MulZeroClass.zero_mul, ENNReal.coe_zero] at B + simp only [zero_mul, ENNReal.coe_zero] at B apply ge_of_tendsto B filter_upwards [self_mem_nhdsWithin] using A #align vitali_family.measure_lim_ratio_meas_zero VitaliFamily.measure_limRatioMeas_zero diff --git a/Mathlib/MeasureTheory/Covering/LiminfLimsup.lean b/Mathlib/MeasureTheory/Covering/LiminfLimsup.lean index 1f762bfab8710..1b31646146c92 100644 --- a/Mathlib/MeasureTheory/Covering/LiminfLimsup.lean +++ b/Mathlib/MeasureTheory/Covering/LiminfLimsup.lean @@ -165,7 +165,7 @@ theorem blimsup_cthickening_ae_le_of_eventually_mul_le (p : ℕ → Prop) {s : have hRp : 0 ≤ R₁ := fun i => le_max_left 0 (r₁ i) replace hMr : ∀ᶠ i in atTop, M * R₁ i ≤ R₂ i · refine' hMr.mono fun i hi => _ - rw [mul_max_of_nonneg _ _ hM.le, MulZeroClass.mul_zero] + rw [mul_max_of_nonneg _ _ hM.le, mul_zero] exact max_le_max (le_refl 0) hi simp_rw [← cthickening_max_zero (r₁ _), ← cthickening_max_zero (r₂ _)] cases' le_or_lt 1 M with hM' hM' @@ -200,7 +200,7 @@ theorem blimsup_cthickening_mul_ae_eq (p : ℕ → Prop) (s : ℕ → Set α) {M (blimsup (fun i => cthickening (r i) (s i)) atTop p : Set α) := by clear p hr r; intro p r hr have hr' : Tendsto (fun i => M * r i) atTop (𝓝[>] 0) := by - convert TendstoNhdsWithinIoi.const_mul hM hr <;> simp only [MulZeroClass.mul_zero] + convert TendstoNhdsWithinIoi.const_mul hM hr <;> simp only [mul_zero] refine' eventuallyLE_antisymm_iff.mpr ⟨_, _⟩ · exact blimsup_cthickening_ae_le_of_eventually_mul_le μ p (inv_pos.mpr hM) hr' (eventually_of_forall fun i => by rw [inv_mul_cancel_left₀ hM.ne' (r i)]) diff --git a/Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean b/Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean index a9407d075ef04..e54493b34629c 100644 --- a/Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean +++ b/Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean @@ -131,7 +131,7 @@ theorem hahn_decomposition [IsFiniteMeasure μ] [IsFiniteMeasure ν] : have γ_le_d_s : γ ≤ d s := by have hγ : Tendsto (fun m : ℕ => γ - 2 * (1 / 2) ^ m) atTop (𝓝 γ) := by suffices Tendsto (fun m : ℕ => γ - 2 * (1 / 2) ^ m) atTop (𝓝 (γ - 2 * 0)) by - simpa only [MulZeroClass.mul_zero, tsub_zero] + simpa only [mul_zero, tsub_zero] exact tendsto_const_nhds.sub <| tendsto_const_nhds.mul <| diff --git a/Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean b/Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean index 86b04e89c9df1..15c02ffe7a7fb 100644 --- a/Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean +++ b/Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean @@ -98,7 +98,7 @@ theorem integral_abs_condexp_le (f : α → ℝ) : ∫ x, |(μ[f|m]) x| ∂μ by_cases hfint : Integrable f μ swap · simp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul, - MulZeroClass.mul_zero] + mul_zero] exact integral_nonneg fun x => abs_nonneg _ rw [integral_eq_lintegral_of_nonneg_ae, integral_eq_lintegral_of_nonneg_ae] · rw [ENNReal.toReal_le_toReal] <;> simp_rw [← Real.norm_eq_abs, ofReal_norm_eq_coe_nnnorm] @@ -123,7 +123,7 @@ theorem set_integral_abs_condexp_le {s : Set α} (hs : MeasurableSet[m] s) (f : by_cases hfint : Integrable f μ swap · simp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul, - MulZeroClass.mul_zero] + mul_zero] exact integral_nonneg fun x => abs_nonneg _ have : ∫ x in s, |(μ[f|m]) x| ∂μ = ∫ x, |(μ[s.indicator f|m]) x| ∂μ := by rw [← integral_indicator] @@ -235,7 +235,7 @@ theorem condexp_stronglyMeasurable_simpleFunc_mul (hm : m ≤ m0) (f : @SimpleFu ext1 x by_cases hx : x ∈ s · simp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul]; rfl - · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, MulZeroClass.zero_mul] + · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul] apply @SimpleFunc.induction _ _ m _ (fun f => _) (fun c s hs => ?_) (fun g₁ g₂ _ h_eq₁ h_eq₂ => ?_) f · -- Porting note: if not classical, `DecidablePred fun x ↦ x ∈ s` cannot be synthesised @@ -319,9 +319,9 @@ theorem condexp_stronglyMeasurable_mul_of_bound₀ (hm : m ≤ m0) [IsFiniteMeas /-- Pull-out property of the conditional expectation. -/ theorem condexp_stronglyMeasurable_mul {f g : α → ℝ} (hf : StronglyMeasurable[m] f) (hfg : Integrable (f * g) μ) (hg : Integrable g μ) : μ[f * g|m] =ᵐ[μ] f * μ[g|m] := by - by_cases hm : m ≤ m0; swap; · simp_rw [condexp_of_not_le hm]; rw [MulZeroClass.mul_zero] + by_cases hm : m ≤ m0; swap; · simp_rw [condexp_of_not_le hm]; rw [mul_zero] by_cases hμm : SigmaFinite (μ.trim hm) - swap; · simp_rw [condexp_of_not_sigmaFinite hm hμm]; rw [MulZeroClass.mul_zero] + swap; · simp_rw [condexp_of_not_sigmaFinite hm hμm]; rw [mul_zero] haveI : SigmaFinite (μ.trim hm) := hμm obtain ⟨sets, sets_prop, h_univ⟩ := hf.exists_spanning_measurableSet_norm_le hm μ simp_rw [forall_and] at sets_prop diff --git a/Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean b/Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean index 5c7e7c4bac0f0..1e5ad511d0229 100644 --- a/Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean +++ b/Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean @@ -286,7 +286,7 @@ theorem tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable (hp_ne_zero : p intro ε hε replace hfg := ENNReal.Tendsto.const_mul (Tendsto.ennrpow_const p.toReal hfg) (Or.inr <| @ENNReal.ofReal_ne_top (1 / ε ^ p.toReal)) - simp only [MulZeroClass.mul_zero, + simp only [mul_zero, ENNReal.zero_rpow_of_pos (ENNReal.toReal_pos hp_ne_zero hp_ne_top)] at hfg rw [ENNReal.tendsto_nhds_zero] at hfg ⊢ intro δ hδ diff --git a/Mathlib/MeasureTheory/Function/Jacobian.lean b/Mathlib/MeasureTheory/Function/Jacobian.lean index c7332fb6893a6..df69e1e6f76d7 100644 --- a/Mathlib/MeasureTheory/Function/Jacobian.lean +++ b/Mathlib/MeasureTheory/Function/Jacobian.lean @@ -400,7 +400,7 @@ theorem mul_le_addHaar_image_of_lt_det (A : E →L[ℝ] E) {m : ℝ≥0} -- exclude first the trivial case where `m = 0`. rcases eq_or_lt_of_le (zero_le m) with (rfl | mpos) · apply eventually_of_forall - simp only [forall_const, MulZeroClass.zero_mul, imp_true_iff, zero_le, ENNReal.coe_zero] + simp only [forall_const, zero_mul, imp_true_iff, zero_le, ENNReal.coe_zero] have hA : A.det ≠ 0 := by intro h; simp only [h, ENNReal.not_lt_zero, ENNReal.ofReal_zero, abs_zero] at hm -- let `B` be the continuous linear equiv version of `A`. @@ -436,11 +436,11 @@ theorem mul_le_addHaar_image_of_lt_det (A : E →L[ℝ] E) {m : ℝ≥0} Tendsto (fun δ => ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0) (𝓝 (‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - 0)⁻¹ * 0)) := by rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H) - · simpa only [H, MulZeroClass.zero_mul] using tendsto_const_nhds + · simpa only [H, zero_mul] using tendsto_const_nhds refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _ simpa only [tsub_zero, inv_eq_zero, Ne.def] using H - simp only [MulZeroClass.mul_zero] at this + simp only [mul_zero] at this exact (tendsto_order.1 this).2 δ₀ δ₀pos -- let `δ` be small enough, and `f` approximated by `B` up to `δ`. filter_upwards [L1, L2] @@ -482,7 +482,7 @@ theorem _root_.ApproximatesLinearOn.norm_fderiv_sub_le {A : E →L[ℝ] E} {δ : Tendsto (fun ε : ℝ => ((δ : ℝ) + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[>] 0) (𝓝 ((δ + 0) * (‖z‖ + 0) + ‖f' x - A‖ * 0)) := Tendsto.mono_left (Continuous.tendsto (by continuity) 0) nhdsWithin_le_nhds - simp only [add_zero, MulZeroClass.mul_zero] at this + simp only [add_zero, mul_zero] at this apply le_of_tendsto_of_tendsto tendsto_const_nhds this filter_upwards [self_mem_nhdsWithin] exact H @@ -597,7 +597,7 @@ theorem addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero (hf : Diffe _ ≤ ∑' n, ((Real.toNNReal |(A n).det| + 1 : ℝ≥0) : ℝ≥0∞) * 0 := by refine' ENNReal.tsum_le_tsum fun n => mul_le_mul_left' _ _ exact le_trans (measure_mono (inter_subset_left _ _)) (le_of_eq hs) - _ = 0 := by simp only [tsum_zero, MulZeroClass.mul_zero] + _ = 0 := by simp only [tsum_zero, mul_zero] #align measure_theory.add_haar_image_eq_zero_of_differentiable_on_of_add_haar_eq_zero MeasureTheory.addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero /-- A version of Sard lemma in fixed dimension: given a differentiable function from `E` to `E` and @@ -678,7 +678,7 @@ theorem addHaar_image_eq_zero_of_det_fderivWithin_eq_zero (𝓝 (((0 : ℝ≥0) : ℝ≥0∞) * μ (closedBall 0 R))) := ENNReal.Tendsto.mul_const (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr measure_closedBall_lt_top.ne) - simp only [MulZeroClass.zero_mul, ENNReal.coe_zero] at this + simp only [zero_mul, ENNReal.coe_zero] at this exact Tendsto.mono_left this nhdsWithin_le_nhds apply le_antisymm _ (zero_le _) apply ge_of_tendsto B @@ -893,7 +893,7 @@ theorem addHaar_image_le_lintegral_abs_det_fderiv_aux2 (hs : MeasurableSet s) (h refine' tendsto_const_nhds.add _ refine' ENNReal.Tendsto.mul_const _ (Or.inr h's) exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top) - simp only [add_zero, MulZeroClass.zero_mul, MulZeroClass.mul_zero, ENNReal.coe_zero] at this + simp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this apply ge_of_tendsto this filter_upwards [self_mem_nhdsWithin] rintro ε (εpos : 0 < ε) @@ -956,7 +956,7 @@ theorem lintegral_abs_det_fderiv_le_addHaar_image_aux1 (hs : MeasurableSet s) exact hB.trans_lt (half_lt_self δ'pos) rcases eq_or_ne A.det 0 with (hA | hA) · refine' ⟨δ'', half_pos δ'pos, I'', _⟩ - simp only [hA, forall_const, MulZeroClass.zero_mul, ENNReal.ofReal_zero, imp_true_iff, + simp only [hA, forall_const, zero_mul, ENNReal.ofReal_zero, imp_true_iff, zero_le, abs_zero] let m : ℝ≥0 := Real.toNNReal |A.det| - ε have I : (m : ℝ≥0∞) < ENNReal.ofReal |A.det| := by @@ -1047,7 +1047,7 @@ theorem lintegral_abs_det_fderiv_le_addHaar_image_aux2 (hs : MeasurableSet s) (h refine' tendsto_const_nhds.add _ refine' ENNReal.Tendsto.mul_const _ (Or.inr h's) exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top) - simp only [add_zero, MulZeroClass.zero_mul, MulZeroClass.mul_zero, ENNReal.coe_zero] at this + simp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this apply ge_of_tendsto this filter_upwards [self_mem_nhdsWithin] rintro ε (εpos : 0 < ε) diff --git a/Mathlib/MeasureTheory/Function/LpSeminorm.lean b/Mathlib/MeasureTheory/Function/LpSeminorm.lean index 10de9c2c545a5..1794dbffa2a8a 100644 --- a/Mathlib/MeasureTheory/Function/LpSeminorm.lean +++ b/Mathlib/MeasureTheory/Function/LpSeminorm.lean @@ -812,7 +812,7 @@ theorem LpAddConst_lt_top (p : ℝ≥0∞) : LpAddConst p < ∞ := by theorem snorm_add_le' {f g : α → E} (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) (p : ℝ≥0∞) : snorm (f + g) p μ ≤ LpAddConst p * (snorm f p μ + snorm g p μ) := by rcases eq_or_ne p 0 with (rfl | hp) - · simp only [snorm_exponent_zero, add_zero, MulZeroClass.mul_zero, le_zero_iff] + · simp only [snorm_exponent_zero, add_zero, mul_zero, le_zero_iff] rcases lt_or_le p 1 with (h'p | h'p) · simp only [snorm_eq_snorm' hp (h'p.trans ENNReal.one_lt_top).ne] convert snorm'_add_le_of_le_one hf ENNReal.toReal_nonneg _ @@ -839,7 +839,7 @@ theorem exists_Lp_half (p : ℝ≥0∞) {δ : ℝ≥0∞} (hδ : δ ≠ 0) : (ENNReal.Tendsto.const_mul (tendsto_id.add tendsto_id) (Or.inr (LpAddConst_lt_top p).ne)).mono_left nhdsWithin_le_nhds - simp only [add_zero, MulZeroClass.mul_zero] at this + simp only [add_zero, mul_zero] at this rcases (((tendsto_order.1 this).2 δ hδ.bot_lt).and self_mem_nhdsWithin).exists with ⟨η, hη, ηpos⟩ refine' ⟨η, ηpos, fun f g hf hg Hf Hg => _⟩ calc @@ -1308,7 +1308,7 @@ private theorem le_mul_iff_eq_zero_of_nonneg_of_neg_of_nonneg {α} [LinearOrdere ⟨(h.trans (mul_nonpos_of_nonpos_of_nonneg hb.le hc)).antisymm ha, (nonpos_of_mul_nonneg_right (ha.trans h) hb).antisymm hc⟩ · rintro ⟨rfl, rfl⟩ - rw [MulZeroClass.mul_zero] + rw [mul_zero] /-- When `c` is negative, `‖f x‖ ≤ c * ‖g x‖` is nonsense and forces both `f` and `g` to have an `snorm` of `0`. -/ @@ -1368,7 +1368,7 @@ theorem snorm_le_snorm_top_mul_snorm (p : ℝ≥0∞) (f : α → E) {g : α → simp_rw [Pi.mul_apply, ← ENNReal.coe_mul, ENNReal.coe_le_coe] exact ha by_cases hp_zero : p = 0 - · simp only [hp_zero, snorm_exponent_zero, MulZeroClass.mul_zero, le_zero_iff] + · simp only [hp_zero, snorm_exponent_zero, mul_zero, le_zero_iff] simp_rw [snorm_eq_lintegral_rpow_nnnorm hp_zero hp_top, snorm_exponent_top, snormEssSup] calc (∫⁻ x, (‖b (f x) (g x)‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) ^ (1 / p.toReal) ≤ diff --git a/Mathlib/MeasureTheory/Function/SimpleFunc.lean b/Mathlib/MeasureTheory/Function/SimpleFunc.lean index d8a40fed001ee..79baf5c95a324 100644 --- a/Mathlib/MeasureTheory/Function/SimpleFunc.lean +++ b/Mathlib/MeasureTheory/Function/SimpleFunc.lean @@ -1070,7 +1070,7 @@ theorem restrict_lintegral (f : α →ₛ ℝ≥0∞) {s : Set α} (hs : Measura _ = ∑ r in f.range, r * μ (f ⁻¹' {r} ∩ s) := Finset.sum_congr rfl <| forall_range_iff.2 fun b => - if hb : f b = 0 then by simp only [hb, MulZeroClass.zero_mul] + if hb : f b = 0 then by simp only [hb, zero_mul] else by rw [restrict_preimage_singleton _ hs hb, inter_comm] #align measure_theory.simple_func.restrict_lintegral MeasureTheory.SimpleFunc.restrict_lintegral @@ -1239,7 +1239,7 @@ protected theorem add {β} [AddMonoid β] {f g : α →ₛ β} (hf : f.FinMeasSu protected theorem mul {β} [MonoidWithZero β] {f g : α →ₛ β} (hf : f.FinMeasSupp μ) (hg : g.FinMeasSupp μ) : (f * g).FinMeasSupp μ := by rw [mul_eq_map₂] - exact hf.map₂ hg (MulZeroClass.zero_mul 0) + exact hf.map₂ hg (zero_mul 0) #align measure_theory.simple_func.fin_meas_supp.mul MeasureTheory.SimpleFunc.FinMeasSupp.mul theorem lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hm : f.FinMeasSupp μ) (hf : ∀ᵐ a ∂μ, f a ≠ ∞) : @@ -1250,7 +1250,7 @@ theorem lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hm : f.FinMeasSupp μ) (hf simp [Set.preimage, hf] · by_cases ha0 : a = 0 · subst a - rwa [MulZeroClass.zero_mul] + rwa [zero_mul] · exact mul_ne_top ha (finMeasSupp_iff.1 hm _ ha0).ne #align measure_theory.simple_func.fin_meas_supp.lintegral_lt_top MeasureTheory.SimpleFunc.FinMeasSupp.lintegral_lt_top diff --git a/Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean b/Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean index 80e42dbc1d3cd..dcfcc59114fa8 100644 --- a/Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean +++ b/Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean @@ -257,7 +257,7 @@ theorem norm_approxBounded_le {β} {f : α → β} [SeminormedAddCommGroup β] [ simp only [StronglyMeasurable.approxBounded, SimpleFunc.coe_map, Function.comp_apply] refine' (norm_smul_le _ _).trans _ by_cases h0 : ‖hf.approx n x‖ = 0 - · simp only [h0, _root_.div_zero, min_eq_right, zero_le_one, norm_zero, MulZeroClass.mul_zero] + · simp only [h0, _root_.div_zero, min_eq_right, zero_le_one, norm_zero, mul_zero] exact hc cases' le_total ‖hf.approx n x‖ c with h h · rw [min_eq_left _] diff --git a/Mathlib/MeasureTheory/Function/UniformIntegrable.lean b/Mathlib/MeasureTheory/Function/UniformIntegrable.lean index be095ec854260..0a20fe34047ff 100644 --- a/Mathlib/MeasureTheory/Function/UniformIntegrable.lean +++ b/Mathlib/MeasureTheory/Function/UniformIntegrable.lean @@ -936,7 +936,7 @@ theorem uniformIntegrable_average (hp : 1 ≤ p) {f : ℕ → α → ℝ} (hf : · rfl simp_rw [this, snorm_const_smul, ← Finset.mul_sum, nnnorm_inv, Real.nnnorm_coe_nat] by_cases hn : (↑(↑n : ℝ≥0)⁻¹ : ℝ≥0∞) = 0 - · simp only [hn, MulZeroClass.zero_mul, zero_le] + · simp only [hn, zero_mul, zero_le] refine' le_trans _ (_ : ↑(↑n : ℝ≥0)⁻¹ * n • ENNReal.ofReal ε ≤ ENNReal.ofReal ε) · refine' (ENNReal.mul_le_mul_left hn ENNReal.coe_ne_top).2 _ conv_rhs => rw [← Finset.card_range n] @@ -954,7 +954,7 @@ theorem uniformIntegrable_average (hp : 1 ≤ p) {f : ℕ → α → ℝ} (hf : simp only [mul_comm, Pi.smul_apply, Algebra.id.smul_eq_mul] simp_rw [this, snorm_const_smul, ← Finset.mul_sum, nnnorm_inv, Real.nnnorm_coe_nat] by_cases hn : (↑(↑n : ℝ≥0)⁻¹ : ℝ≥0∞) = 0 - · simp only [hn, MulZeroClass.zero_mul, zero_le] + · simp only [hn, zero_mul, zero_le] refine' le_trans _ (_ : ↑(↑n : ℝ≥0)⁻¹ * (n • C : ℝ≥0∞) ≤ C) · refine' (ENNReal.mul_le_mul_left hn ENNReal.coe_ne_top).2 _ conv_rhs => rw [← Finset.card_range n] diff --git a/Mathlib/MeasureTheory/Integral/Average.lean b/Mathlib/MeasureTheory/Integral/Average.lean index d7f54c0b37c44..9699ea9a85679 100644 --- a/Mathlib/MeasureTheory/Integral/Average.lean +++ b/Mathlib/MeasureTheory/Integral/Average.lean @@ -100,7 +100,7 @@ theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by cases' eq_or_ne μ 0 with hμ hμ - · rw [hμ, lintegral_zero_measure, laverage_zero_measure, MulZeroClass.mul_zero] + · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage diff --git a/Mathlib/MeasureTheory/Integral/Bochner.lean b/Mathlib/MeasureTheory/Integral/Bochner.lean index f3be4813c50b3..9e6e595c7df74 100644 --- a/Mathlib/MeasureTheory/Integral/Bochner.lean +++ b/Mathlib/MeasureTheory/Integral/Bochner.lean @@ -387,7 +387,7 @@ theorem integral_eq_lintegral' {f : α →ₛ E} {g : E → ℝ≥0∞} (hf : In rw [smul_eq_mul, toReal_mul, mul_comm, Function.comp_apply] · rintro a - by_cases a0 : a = 0 - · rw [a0, hg0, MulZeroClass.zero_mul]; exact WithTop.zero_ne_top + · rw [a0, hg0, zero_mul]; exact WithTop.zero_ne_top · apply mul_ne_top (ht a) (hf'.meas_preimage_singleton_ne_zero a0).ne · simp [hg0] #align measure_theory.simple_func.integral_eq_lintegral' MeasureTheory.SimpleFunc.integral_eq_lintegral' @@ -1887,7 +1887,7 @@ theorem snorm_one_le_of_le {r : ℝ≥0} {f : α → ℝ} (hfint : Integrable f (hf : ∀ᵐ ω ∂μ, f ω ≤ r) : snorm f 1 μ ≤ 2 * μ Set.univ * r := by by_cases hr : r = 0 · suffices f =ᵐ[μ] 0 by - rw [snorm_congr_ae this, snorm_zero, hr, ENNReal.coe_zero, MulZeroClass.mul_zero] + rw [snorm_congr_ae this, snorm_zero, hr, ENNReal.coe_zero, mul_zero] rw [hr] at hf norm_cast at hf -- Porting note: two lines above were diff --git a/Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean b/Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean index 280ce7b50b0cd..bcdc9d08376c7 100644 --- a/Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean +++ b/Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean @@ -944,7 +944,7 @@ theorem integrableOn_Ioi_comp_mul_left_iff (f : ℝ → E) (c : ℝ) {a : ℝ} ( theorem integrableOn_Ioi_comp_mul_right_iff (f : ℝ → E) (c : ℝ) {a : ℝ} (ha : 0 < a) : IntegrableOn (fun x => f (x * a)) (Ioi c) ↔ IntegrableOn f (Ioi <| c * a) := by - simpa only [mul_comm, MulZeroClass.mul_zero] using integrableOn_Ioi_comp_mul_left_iff f c ha + simpa only [mul_comm, mul_zero] using integrableOn_Ioi_comp_mul_left_iff f c ha #align measure_theory.integrable_on_Ioi_comp_mul_right_iff MeasureTheory.integrableOn_Ioi_comp_mul_right_iff end IoiIntegrability diff --git a/Mathlib/MeasureTheory/Integral/Layercake.lean b/Mathlib/MeasureTheory/Integral/Layercake.lean index ad4c072e6d8de..c9aeb10ce211d 100644 --- a/Mathlib/MeasureTheory/Integral/Layercake.lean +++ b/Mathlib/MeasureTheory/Integral/Layercake.lean @@ -114,10 +114,10 @@ theorem lintegral_comp_eq_lintegral_meas_le_mul_of_measurable (μ : Measure α) simp only [mem_Ioc, not_and, not_le] at h by_cases h' : 0 < s · simp only [h_copy, h h', indicator_of_not_mem, not_false_iff, mem_Ici, not_le, - MulZeroClass.mul_zero] + mul_zero] · have : s ∉ Ioi (0 : ℝ) := h' - simp only [this, h', indicator_of_not_mem, not_false_iff, MulZeroClass.mul_zero, - MulZeroClass.zero_mul, mem_Ioc, false_and_iff] + simp only [this, h', indicator_of_not_mem, not_false_iff, mul_zero, + zero_mul, mem_Ioc, false_and_iff] simp_rw [aux₁] rw [lintegral_const_mul'] swap; diff --git a/Mathlib/MeasureTheory/Integral/Lebesgue.lean b/Mathlib/MeasureTheory/Integral/Lebesgue.lean index 4a0276fa22569..7c21d14059d94 100644 --- a/Mathlib/MeasureTheory/Integral/Lebesgue.lean +++ b/Mathlib/MeasureTheory/Integral/Lebesgue.lean @@ -350,7 +350,7 @@ theorem lintegral_iSup {f : ℕ → α → ℝ≥0∞} (hf : ∀ n, Measurable ( have : s x ≠ 0 := by refine' mt _ this intro h - rw [h, MulZeroClass.mul_zero] + rw [h, mul_zero] have : (rs.map c) x < ⨆ n : ℕ, f n x := by refine' lt_of_lt_of_le (ENNReal.coe_lt_coe.2 _) (hsf x) suffices : r * s x < 1 * s x @@ -1804,7 +1804,7 @@ theorem lintegral_withDensity_eq_lintegral_mul₀' {μ : Measure α} {f : α → filter_upwards [ae_restrict_mem M] intro x hx simp only [Classical.not_not, mem_setOf_eq, mem_compl_iff] at hx - simp only [hx, MulZeroClass.zero_mul, Pi.mul_apply] + simp only [hx, zero_mul, Pi.mul_apply] _ = ∫⁻ a : α, (f * g) a ∂μ := by apply lintegral_congr_ae filter_upwards [hf.ae_eq_mk] @@ -1846,7 +1846,7 @@ theorem lintegral_withDensity_eq_lintegral_mul_non_measurable (μ : Measure α) intro x h'x rcases eq_or_ne (f x) 0 with (hx | hx) · have := hi x - simp only [hx, MulZeroClass.zero_mul, Pi.mul_apply, nonpos_iff_eq_zero] at this + simp only [hx, zero_mul, Pi.mul_apply, nonpos_iff_eq_zero] at this simp [this] · apply le_of_eq _ dsimp @@ -2033,7 +2033,7 @@ theorem SimpleFunc.exists_lt_lintegral_simpleFunc_of_lt_lintegral {m : Measurabl ENNReal.coe_indicator, Function.const_apply] at hL have c_ne_zero : c ≠ 0 := by intro hc - simp only [hc, ENNReal.coe_zero, MulZeroClass.zero_mul, not_lt_zero] at hL + simp only [hc, ENNReal.coe_zero, zero_mul, not_lt_zero] at hL have : L / c < μ s := by rwa [ENNReal.div_lt_iff, mul_comm] · simp only [c_ne_zero, Ne.def, coe_eq_zero, not_false_iff, true_or_iff] diff --git a/Mathlib/MeasureTheory/Integral/MeanInequalities.lean b/Mathlib/MeasureTheory/Integral/MeanInequalities.lean index 204f185c91bc6..c018b986246e2 100644 --- a/Mathlib/MeasureTheory/Integral/MeanInequalities.lean +++ b/Mathlib/MeasureTheory/Integral/MeanInequalities.lean @@ -139,7 +139,7 @@ theorem lintegral_mul_eq_zero_of_lintegral_rpow_eq_zero {p : ℝ} (hp0 : 0 ≤ p rw [← @lintegral_zero_fun α _ μ] refine' lintegral_congr_ae _ suffices h_mul_zero : f * g =ᵐ[μ] 0 * g - · rwa [MulZeroClass.zero_mul] at h_mul_zero + · rwa [zero_mul] at h_mul_zero have hf_eq_zero : f =ᵐ[μ] 0 := ae_eq_zero_of_lintegral_rpow_eq_zero hp0 hf hf_zero exact hf_eq_zero.mul (ae_eq_refl g) #align ennreal.lintegral_mul_eq_zero_of_lintegral_rpow_eq_zero ENNReal.lintegral_mul_eq_zero_of_lintegral_rpow_eq_zero @@ -258,7 +258,7 @@ theorem lintegral_mul_rpow_le_lintegral_rpow_mul_lintegral_rpow {p q : ℝ} (∫⁻ a, f a ^ p ∂μ) ^ (1 / p) * (∫⁻ a, g a ^ p ∂μ) ^ (1 / q) := by refine' le_trans (ENNReal.lintegral_mul_le_Lp_mul_Lq μ hpq hf (hg.pow_const _)) _ by_cases hf_zero_rpow : (∫⁻ a : α, f a ^ p ∂μ) ^ (1 / p) = 0 - · rw [hf_zero_rpow, MulZeroClass.zero_mul] + · rw [hf_zero_rpow, zero_mul] exact zero_le _ have hf_top_rpow : (∫⁻ a : α, f a ^ p ∂μ) ^ (1 / p) ≠ ⊤ := by by_contra h diff --git a/Mathlib/MeasureTheory/Integral/PeakFunction.lean b/Mathlib/MeasureTheory/Integral/PeakFunction.lean index bb904992d464e..8f268aa102add 100644 --- a/Mathlib/MeasureTheory/Integral/PeakFunction.lean +++ b/Mathlib/MeasureTheory/Integral/PeakFunction.lean @@ -95,7 +95,7 @@ theorem tendsto_set_integral_peak_smul_of_integrableOn_of_continuousWithinAt_aux (𝓝 ((0 * ∫ x in s, ‖g x‖ ∂μ) + 0)) := by apply Tendsto.mono_left _ nhdsWithin_le_nhds exact (tendsto_id.mul tendsto_const_nhds).add tendsto_id - rw [MulZeroClass.zero_mul, zero_add] at A + rw [zero_mul, zero_add] at A exact (((tendsto_order.1 A).2 ε εpos).and self_mem_nhdsWithin).exists suffices ∀ᶠ i in l, ‖∫ x in s, φ i x • g x ∂μ‖ ≤ (δ * ∫ x in s, ‖g x‖ ∂μ) + δ by filter_upwards [this] with i hi @@ -270,7 +270,7 @@ theorem tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_measure_ apply Tendsto.mul tendsto_const_nhds _ apply tendsto_pow_atTop_nhds_0_of_lt_1 (div_nonneg t_pos t'_pos.le) exact (div_lt_one t'_pos).2 tt' - rw [MulZeroClass.mul_zero] at N + rw [mul_zero] at N refine' tendstoUniformlyOn_iff.2 fun ε εpos => _ filter_upwards [(tendsto_order.1 N).2 ε εpos] with n hn x hx simp only [Pi.zero_apply, dist_zero_left, Real.norm_of_nonneg (hnφ n x hx.1)] diff --git a/Mathlib/MeasureTheory/Integral/SetIntegral.lean b/Mathlib/MeasureTheory/Integral/SetIntegral.lean index 3dfa32ca06126..e93145a449b40 100644 --- a/Mathlib/MeasureTheory/Integral/SetIntegral.lean +++ b/Mathlib/MeasureTheory/Integral/SetIntegral.lean @@ -1336,7 +1336,7 @@ theorem Integrable.simpleFunc_mul (g : SimpleFunc β ℝ) (hf : Integrable f μ) by_cases hx : x ∈ s · simp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul, ← Function.const_def] - · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, MulZeroClass.zero_mul] + · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul] rw [this, integrable_indicator_iff hs] exact (hf.smul c).integrableOn #align measure_theory.integrable.simple_func_mul MeasureTheory.Integrable.simpleFunc_mul diff --git a/Mathlib/MeasureTheory/Integral/SetToL1.lean b/Mathlib/MeasureTheory/Integral/SetToL1.lean index 014c8b3cfc41f..1b7c05bdb9d0e 100644 --- a/Mathlib/MeasureTheory/Integral/SetToL1.lean +++ b/Mathlib/MeasureTheory/Integral/SetToL1.lean @@ -205,7 +205,7 @@ theorem eq_zero_of_measure_zero {β : Type*} [NormedAddCommGroup β] {T : Set α T s = 0 := by refine' norm_eq_zero.mp _ refine' ((hT.2 s hs (by simp [hs_zero])).trans (le_of_eq _)).antisymm (norm_nonneg _) - rw [hs_zero, ENNReal.zero_toReal, MulZeroClass.mul_zero] + rw [hs_zero, ENNReal.zero_toReal, mul_zero] #align measure_theory.dominated_fin_meas_additive.eq_zero_of_measure_zero MeasureTheory.DominatedFinMeasAdditive.eq_zero_of_measure_zero theorem eq_zero {β : Type*} [NormedAddCommGroup β] {T : Set α → β} {C : ℝ} {m : MeasurableSpace α} @@ -1671,7 +1671,7 @@ theorem setToFun_top_smul_measure (hT : DominatedFinMeasAdditive (∞ • μ) T rw [lt_top_iff_ne_top] at hμs simp only [true_and_iff, Measure.smul_apply, ENNReal.mul_eq_top, eq_self_iff_true, top_ne_zero, Ne.def, not_false_iff, not_or, Classical.not_not, smul_eq_mul] at hμs - simp only [hμs.right, Measure.smul_apply, MulZeroClass.mul_zero, smul_eq_mul] + simp only [hμs.right, Measure.smul_apply, mul_zero, smul_eq_mul] #align measure_theory.set_to_fun_top_smul_measure MeasureTheory.setToFun_top_smul_measure theorem setToFun_congr_smul_measure (c : ℝ≥0∞) (hc_ne_top : c ≠ ∞) diff --git a/Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean b/Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean index 351e8b3ca8688..d80913873fa0b 100644 --- a/Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean +++ b/Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean @@ -110,7 +110,7 @@ theorem SimpleFunc.exists_le_lowerSemicontinuous_lintegral_ge (f : α →ₛ ℝ simp only [hc, Set.indicator_zero', Pi.zero_apply, SimpleFunc.const_zero, imp_true_iff, eq_self_iff_true, SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise, le_zero_iff] - · simp only [lintegral_const, MulZeroClass.zero_mul, zero_le, ENNReal.coe_zero] + · simp only [lintegral_const, zero_mul, zero_le, ENNReal.coe_zero] have : μ s < μ s + ε / c := by have : (0 : ℝ≥0∞) < ε / c := ENNReal.div_pos_iff.2 ⟨ε0, ENNReal.coe_ne_top⟩ simpa using ENNReal.add_lt_add_left ?aux this @@ -257,7 +257,7 @@ theorem exists_lt_lowerSemicontinuous_lintegral_ge_of_aemeasurable [SigmaFinite exact lintegral_congr_ae (fmeas.ae_eq_mk.fun_comp _) · convert g1_int simp only [smeas, μs, lintegral_const, Set.univ_inter, MeasurableSet.univ, - lintegral_indicator, MulZeroClass.mul_zero, restrict_apply] + lintegral_indicator, mul_zero, restrict_apply] _ = (∫⁻ x, f x ∂μ) + ε := by simp only [add_assoc, ENNReal.add_halves, zero_add] #align measure_theory.exists_lt_lower_semicontinuous_lintegral_ge_of_ae_measurable MeasureTheory.exists_lt_lowerSemicontinuous_lintegral_ge_of_aemeasurable @@ -333,7 +333,7 @@ theorem SimpleFunc.exists_upperSemicontinuous_le_lintegral_le (f : α →ₛ ℝ eq_self_iff_true, SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise, le_zero_iff] · classical - simp only [hc, Set.indicator_zero', lintegral_const, MulZeroClass.zero_mul, Pi.zero_apply, + simp only [hc, Set.indicator_zero', lintegral_const, zero_mul, Pi.zero_apply, SimpleFunc.const_zero, zero_add, zero_le', SimpleFunc.coe_zero, Set.piecewise_eq_indicator, ENNReal.coe_zero, SimpleFunc.coe_piecewise, zero_le] have μs_lt_top : μ s < ∞ := by diff --git a/Mathlib/MeasureTheory/Measure/Doubling.lean b/Mathlib/MeasureTheory/Measure/Doubling.lean index 5fe164ceea34c..949f144d9c04a 100644 --- a/Mathlib/MeasureTheory/Measure/Doubling.lean +++ b/Mathlib/MeasureTheory/Measure/Doubling.lean @@ -125,7 +125,7 @@ theorem eventually_measure_mul_le_scalingConstantOf_mul (K : ℝ) : rcases lt_trichotomy r 0 with (rneg | rfl | rpos) · have : t * r < 0 := mul_neg_of_pos_of_neg ht.1 rneg simp only [closedBall_eq_empty.2 this, measure_empty, zero_le'] - · simp only [MulZeroClass.mul_zero, closedBall_zero] + · simp only [mul_zero, closedBall_zero] refine' le_mul_of_one_le_of_le _ le_rfl apply ENNReal.one_le_coe_iff.2 (le_max_right _ _) · apply (hR ⟨rpos, hr⟩ x t ht.2).trans _ diff --git a/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean b/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean index 2f16bf93cfc00..23c1982bb6204 100644 --- a/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean +++ b/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean @@ -349,7 +349,7 @@ theorem testAgainstNN_mono (μ : FiniteMeasure Ω) {f g : Ω →ᵇ ℝ≥0} (f_ @[simp] theorem testAgainstNN_zero (μ : FiniteMeasure Ω) : μ.testAgainstNN 0 = 0 := by - simpa only [MulZeroClass.zero_mul] using μ.testAgainstNN_const 0 + simpa only [zero_mul] using μ.testAgainstNN_const 0 #align measure_theory.finite_measure.test_against_nn_zero MeasureTheory.FiniteMeasure.testAgainstNN_zero @[simp] @@ -524,7 +524,7 @@ theorem tendsto_zero_testAgainstNN_of_tendsto_zero_mass {γ : Type*} {F : Filter refine' (Prod.tendsto_iff _ _).mpr ⟨tendsto_const_nhds, _⟩ exact (NNReal.continuous_coe.tendsto 0).comp mass_lim have key := tendsto_mul.comp lim_pair - rwa [MulZeroClass.mul_zero] at key + rwa [mul_zero] at key #align measure_theory.finite_measure.tendsto_zero_test_against_nn_of_tendsto_zero_mass MeasureTheory.FiniteMeasure.tendsto_zero_testAgainstNN_of_tendsto_zero_mass /-- If the total masses of finite measures tend to zero, then the measures tend to zero. -/ diff --git a/Mathlib/MeasureTheory/Measure/GiryMonad.lean b/Mathlib/MeasureTheory/Measure/GiryMonad.lean index df8e1a9013169..62247dfad725e 100644 --- a/Mathlib/MeasureTheory/Measure/GiryMonad.lean +++ b/Mathlib/MeasureTheory/Measure/GiryMonad.lean @@ -98,7 +98,7 @@ theorem measurable_lintegral {f : α → ℝ≥0∞} (hf : Measurable f) : functions. -/ def join (m : Measure (Measure α)) : Measure α := Measure.ofMeasurable (fun s _ => ∫⁻ μ, μ s ∂m) - (by simp only [measure_empty, lintegral_const, MulZeroClass.zero_mul]) + (by simp only [measure_empty, lintegral_const, zero_mul]) (by intro f hf h simp_rw [measure_iUnion h hf] @@ -162,7 +162,7 @@ theorem bind_zero_right (m : Measure α) : bind m (0 : α → Measure β) = 0 := ext1 s hs simp only [bind, hs, join_apply, coe_zero, Pi.zero_apply] rw [lintegral_map (measurable_coe hs) measurable_zero] - simp only [Pi.zero_apply, coe_zero, lintegral_const, MulZeroClass.zero_mul] + simp only [Pi.zero_apply, coe_zero, lintegral_const, zero_mul] #align measure_theory.measure.bind_zero_right MeasureTheory.Measure.bind_zero_right @[simp] diff --git a/Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean b/Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean index 149253193975e..f5e6a29642dd7 100644 --- a/Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean +++ b/Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean @@ -163,7 +163,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) : simp only [smul_eq_mul, Pi.mul_apply] cases' eq_or_ne (a i) 0 with hai hai · rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h - rw [hai, ← h, zero_div, MulZeroClass.zero_mul] + rw [hai, ← h, zero_div, zero_mul] · rw [div_mul_cancel _ hai] #align parallelepiped_single parallelepiped_single diff --git a/Mathlib/MeasureTheory/Measure/Hausdorff.lean b/Mathlib/MeasureTheory/Measure/Hausdorff.lean index a531ee32f81ed..68e1819bc363c 100644 --- a/Mathlib/MeasureTheory/Measure/Hausdorff.lean +++ b/Mathlib/MeasureTheory/Measure/Hausdorff.lean @@ -735,13 +735,13 @@ theorem hausdorffMeasure_image_le (h : HolderOnWith C r f s) (hr : 0 < r) {d : -- We start with the trivial case `C = 0` rcases (zero_le C).eq_or_lt with (rfl | hC0) · rcases eq_empty_or_nonempty s with (rfl | ⟨x, hx⟩) - · simp only [measure_empty, nonpos_iff_eq_zero, MulZeroClass.mul_zero, image_empty] + · simp only [measure_empty, nonpos_iff_eq_zero, mul_zero, image_empty] have : f '' s = {f x} := haveI : (f '' s).Subsingleton := by simpa [diam_eq_zero_iff] using h.ediam_image_le (subsingleton_iff_singleton (mem_image_of_mem f hx)).1 this rw [this] rcases eq_or_lt_of_le hd with (rfl | h'd) - · simp only [ENNReal.rpow_zero, one_mul, MulZeroClass.mul_zero] + · simp only [ENNReal.rpow_zero, one_mul, mul_zero] rw [hausdorffMeasure_zero_singleton] exact one_le_hausdorffMeasure_zero_of_nonempty ⟨x, hx⟩ · haveI := noAtoms_hausdorff Y h'd @@ -837,7 +837,7 @@ theorem hausdorffMeasure_preimage_le (hf : AntilipschitzWith K f) (hd : 0 ≤ d) exact (subsingleton_iff_singleton hx).1 this rw [this] rcases eq_or_lt_of_le hd with (rfl | h'd) - · simp only [ENNReal.rpow_zero, one_mul, MulZeroClass.mul_zero] + · simp only [ENNReal.rpow_zero, one_mul, mul_zero] rw [hausdorffMeasure_zero_singleton] exact one_le_hausdorffMeasure_zero_of_nonempty ⟨f x, hx⟩ · haveI := noAtoms_hausdorff X h'd diff --git a/Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean b/Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean index f0edb01987792..c2a3dbf4238ab 100644 --- a/Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean +++ b/Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean @@ -393,7 +393,7 @@ theorem volume_preserving_transvectionStruct [DecidableEq ι] (t : TransvectionS simp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul, dotProduct, stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply, - MulZeroClass.zero_mul, LinearMap.smul_apply, Function.comp_apply, + zero_mul, LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply, Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply, Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one] @@ -401,7 +401,7 @@ theorem volume_preserving_transvectionStruct [DecidableEq ι] (t : TransvectionS · simp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul, add_comm] · simp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, - MulZeroClass.mul_zero] + mul_zero] rw [this] have A : MeasurePreserving e := by convert volume_preserving_piEquivPiSubtypeProd (fun _ : ι => ℝ) p diff --git a/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean b/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean index 18f50fca57d19..68a544de96df5 100644 --- a/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean +++ b/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean @@ -332,7 +332,7 @@ def normalize : ProbabilityMeasure Ω := @[simp] theorem self_eq_mass_mul_normalize (s : Set Ω) : μ s = μ.mass * μ.normalize s := by obtain rfl | h := eq_or_ne μ 0 - · simp only [zero_mass, coeFn_zero, Pi.zero_apply, MulZeroClass.zero_mul] + · simp only [zero_mass, coeFn_zero, Pi.zero_apply, zero_mul] rfl have mass_nonzero : μ.mass ≠ 0 := by rwa [μ.mass_nonzero_iff] simp only [normalize, dif_neg mass_nonzero] diff --git a/Mathlib/NumberTheory/ArithmeticFunction.lean b/Mathlib/NumberTheory/ArithmeticFunction.lean index ce80477c055f8..299e1ba4f134a 100644 --- a/Mathlib/NumberTheory/ArithmeticFunction.lean +++ b/Mathlib/NumberTheory/ArithmeticFunction.lean @@ -392,10 +392,10 @@ instance instSemiring : Semiring (ArithmeticFunction R) := ArithmeticFunction.instAddCommMonoid with zero_mul := fun f => by ext - simp only [mul_apply, MulZeroClass.zero_mul, sum_const_zero, zero_apply] + simp only [mul_apply, zero_mul, sum_const_zero, zero_apply] mul_zero := fun f => by ext - simp only [mul_apply, sum_const_zero, MulZeroClass.mul_zero, zero_apply] + simp only [mul_apply, sum_const_zero, mul_zero, zero_apply] left_distrib := fun a b c => by ext simp only [← sum_add_distrib, mul_add, mul_apply, add_apply] @@ -830,7 +830,7 @@ theorem isMultiplicative_one [MonoidWithZero R] : IsMultiplicative (1 : Arithmet intro m n hm _hn hmn rcases eq_or_ne m 1 with (rfl | hm') · simp - rw [one_apply_ne, one_apply_ne hm', MulZeroClass.zero_mul] + rw [one_apply_ne, one_apply_ne hm', zero_mul] rw [Ne.def, mul_eq_one, not_and_or] exact Or.inl hm'⟩ #align nat.arithmetic_function.is_multiplicative_one Nat.ArithmeticFunction.isMultiplicative_one diff --git a/Mathlib/NumberTheory/Bernoulli.lean b/Mathlib/NumberTheory/Bernoulli.lean index 2d3ff7c91a9e5..27b0fa2052252 100644 --- a/Mathlib/NumberTheory/Bernoulli.lean +++ b/Mathlib/NumberTheory/Bernoulli.lean @@ -282,7 +282,7 @@ theorem bernoulliPowerSeries_mul_exp_sub_one : bernoulliPowerSeries A * (exp A - simp only [bernoulliPowerSeries, coeff_mul, coeff_X, sum_antidiagonal_succ', one_div, coeff_mk, coeff_one, coeff_exp, LinearMap.map_sub, factorial, if_pos, cast_succ, cast_one, cast_mul, sub_zero, RingHom.map_one, add_eq_zero_iff, if_false, _root_.inv_one, zero_add, one_ne_zero, - MulZeroClass.mul_zero, and_false_iff, sub_self, ← RingHom.map_mul, ← map_sum] + mul_zero, and_false_iff, sub_self, ← RingHom.map_mul, ← map_sum] cases' n with n · simp rw [if_neg n.succ_succ_ne_one] diff --git a/Mathlib/NumberTheory/BernoulliPolynomials.lean b/Mathlib/NumberTheory/BernoulliPolynomials.lean index e97faa12fa179..f11ed0f87e39e 100644 --- a/Mathlib/NumberTheory/BernoulliPolynomials.lean +++ b/Mathlib/NumberTheory/BernoulliPolynomials.lean @@ -102,7 +102,7 @@ theorem derivative_bernoulli_add_one (k : ℕ) : Polynomial.derivative (bernoulli (k + 1)) = (k + 1) * bernoulli k := by simp_rw [bernoulli, derivative_sum, derivative_monomial, Nat.sub_sub, Nat.add_sub_add_right] -- LHS sum has an extra term, but the coefficient is zero: - rw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, MulZeroClass.mul_zero, + rw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, mul_zero, map_zero, zero_add, mul_sum] -- the rest of the sum is termwise equal: refine' sum_congr (by rfl) fun m _ => _ @@ -115,7 +115,7 @@ theorem derivative_bernoulli_add_one (k : ℕ) : theorem derivative_bernoulli (k : ℕ) : Polynomial.derivative (bernoulli k) = k * bernoulli (k - 1) := by cases k with - | zero => rw [Nat.cast_zero, MulZeroClass.zero_mul, bernoulli_zero, derivative_one] + | zero => rw [Nat.cast_zero, zero_mul, bernoulli_zero, derivative_one] | succ k => exact_mod_cast derivative_bernoulli_add_one k #align polynomial.derivative_bernoulli Polynomial.derivative_bernoulli @@ -237,7 +237,7 @@ theorem bernoulli_generating_function (t : A) : Nat.sum_antidiagonal_eq_sum_range_succ_mk, sum_range_succ] -- last term is zero so kill with `add_zero` simp only [RingHom.map_sub, tsub_self, constantCoeff_one, constantCoeff_exp, - coeff_zero_eq_constantCoeff, MulZeroClass.mul_zero, sub_self, add_zero] + coeff_zero_eq_constantCoeff, mul_zero, sub_self, add_zero] -- Let's multiply both sides by (n+1)! (OK because it's a unit) have hnp1 : IsUnit ((n + 1)! : ℚ) := IsUnit.mk0 _ (by exact_mod_cast factorial_ne_zero (n + 1)) rw [← (hnp1.map (algebraMap ℚ A)).mul_right_inj] diff --git a/Mathlib/NumberTheory/Cyclotomic/Discriminant.lean b/Mathlib/NumberTheory/Cyclotomic/Discriminant.lean index 160499bd284aa..83c3817c8cbaf 100644 --- a/Mathlib/NumberTheory/Cyclotomic/Discriminant.lean +++ b/Mathlib/NumberTheory/Cyclotomic/Discriminant.lean @@ -101,7 +101,7 @@ theorem discr_prime_pow_ne_two [IsCyclotomicExtension {p ^ (k + 1)} K L] [hp : F derivative_sub, derivative_one, sub_zero, derivative_X_pow, C_eq_nat_cast, ← PNat.pow_coe, hζ.minpoly_eq_cyclotomic_of_irreducible hirr] at H replace H := congr_arg (fun P => aeval ζ P) H - simp only [aeval_add, aeval_mul, minpoly.aeval, MulZeroClass.zero_mul, add_zero, aeval_nat_cast, + simp only [aeval_add, aeval_mul, minpoly.aeval, zero_mul, add_zero, aeval_nat_cast, _root_.map_sub, aeval_one, aeval_X_pow] at H replace H := congr_arg (Algebra.norm K) H have hnorm : (norm K) (ζ ^ (p : ℕ) ^ k - 1) = (p : K) ^ (p : ℕ) ^ k := by diff --git a/Mathlib/NumberTheory/DiophantineApproximation.lean b/Mathlib/NumberTheory/DiophantineApproximation.lean index fbeb693d1aaef..03c5cb575f7ef 100644 --- a/Mathlib/NumberTheory/DiophantineApproximation.lean +++ b/Mathlib/NumberTheory/DiophantineApproximation.lean @@ -105,8 +105,8 @@ theorem exists_int_int_abs_mul_sub_le (ξ : ℝ) {n : ℕ} (n_pos : 0 < n) : have hm₀ : 0 < m := by have hf₀ : f 0 = 0 := by -- Porting note: was - -- simp only [floor_eq_zero_iff, algebraMap.coe_zero, MulZeroClass.mul_zero, fract_zero, - -- MulZeroClass.zero_mul, Set.left_mem_Ico, zero_lt_one] + -- simp only [floor_eq_zero_iff, algebraMap.coe_zero, mul_zero, fract_zero, + -- zero_mul, Set.left_mem_Ico, zero_lt_one] simp only [cast_zero, mul_zero, fract_zero, zero_mul, floor_zero] refine' Ne.lt_of_le (fun h => n_pos.ne _) (mem_Icc.mp hm).1 exact_mod_cast hf₀.symm.trans (h.symm ▸ hf : f 0 = n) @@ -541,7 +541,7 @@ theorem exists_rat_eq_convergent' {v : ℕ} (h' : ContfracLegendre.Ass ξ u v) : induction v using Nat.strong_induction_on generalizing ξ u with | h v ih => ?_ rcases lt_trichotomy v 1 with (ht | rfl | ht) · replace h := h.2.2 - simp only [Nat.lt_one_iff.mp ht, Nat.cast_zero, div_zero, tsub_zero, MulZeroClass.zero_mul, + simp only [Nat.lt_one_iff.mp ht, Nat.cast_zero, div_zero, tsub_zero, zero_mul, cast_zero, inv_zero] at h exact False.elim (lt_irrefl _ <| (abs_nonneg ξ).trans_lt h) · rw [Nat.cast_one, div_one] diff --git a/Mathlib/NumberTheory/FunctionField.lean b/Mathlib/NumberTheory/FunctionField.lean index af0c09488c135..59cc6a91c85cb 100644 --- a/Mathlib/NumberTheory/FunctionField.lean +++ b/Mathlib/NumberTheory/FunctionField.lean @@ -169,9 +169,9 @@ theorem InftyValuation.map_mul' (x y : RatFunc Fq) : inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by rw [inftyValuationDef, inftyValuationDef, inftyValuationDef] by_cases hx : x = 0 - · rw [hx, MulZeroClass.zero_mul, if_pos (Eq.refl _), MulZeroClass.zero_mul] + · rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul] · by_cases hy : y = 0 - · rw [hy, MulZeroClass.mul_zero, if_pos (Eq.refl _), MulZeroClass.mul_zero] + · rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero] · rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithZero.coe_mul, WithZero.coe_inj, ← ofAdd_add, RatFunc.intDegree_mul hx hy] #align function_field.infty_valuation.map_mul' FunctionField.InftyValuation.map_mul' diff --git a/Mathlib/NumberTheory/KummerDedekind.lean b/Mathlib/NumberTheory/KummerDedekind.lean index 2f68e3c2d65a9..7b4a5a2bc1692 100644 --- a/Mathlib/NumberTheory/KummerDedekind.lean +++ b/Mathlib/NumberTheory/KummerDedekind.lean @@ -63,7 +63,7 @@ local notation:max R "<" x:max ">" => adjoin R ({x} : Set S) biggest ideal of `S` contained in `R`. -/ def conductor (x : S) : Ideal S where carrier := {a | ∀ b : S, a * b ∈ R} - zero_mem' b := by simpa only [MulZeroClass.zero_mul] using Subalgebra.zero_mem _ + zero_mem' b := by simpa only [zero_mul] using Subalgebra.zero_mem _ add_mem' ha hb c := by simpa only [add_mul] using Subalgebra.add_mem _ (ha c) (hb c) smul_mem' c a ha b := by simpa only [smul_eq_mul, mul_left_comm, mul_assoc] using ha (c * b) #align conductor conductor diff --git a/Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean b/Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean index 93f36c90ef207..d807b175c16a3 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean @@ -449,7 +449,7 @@ theorem sum_mulShift [DecidableEq R] [IsDomain R'] {ψ : AddChar R R'} (b : R) (hψ : IsPrimitive ψ) : ∑ x : R, ψ (x * b) = if b = 0 then Fintype.card R else 0 := by split_ifs with h · -- case `b = 0` - simp only [h, MulZeroClass.mul_zero, map_zero_one, Finset.sum_const, Nat.smul_one_eq_coe] + simp only [h, mul_zero, map_zero_one, Finset.sum_const, Nat.smul_one_eq_coe] rfl · -- case `b ≠ 0` simp_rw [mul_comm] diff --git a/Mathlib/NumberTheory/LegendreSymbol/Basic.lean b/Mathlib/NumberTheory/LegendreSymbol/Basic.lean index 71b1c30b338e0..a1a64044be2df 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/Basic.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/Basic.lean @@ -230,7 +230,7 @@ of the equation `x^2 - a*y^2 = 0` with `y ≠ 0`. -/ theorem eq_one_of_sq_sub_mul_sq_eq_zero {p : ℕ} [Fact p.Prime] {a : ℤ} (ha : (a : ZMod p) ≠ 0) {x y : ZMod p} (hy : y ≠ 0) (hxy : x ^ 2 - a * y ^ 2 = 0) : legendreSym p a = 1 := by apply_fun (· * y⁻¹ ^ 2) at hxy - simp only [MulZeroClass.zero_mul] at hxy + simp only [zero_mul] at hxy rw [(by ring : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = (x * y⁻¹) ^ 2 - a * (y * y⁻¹) ^ 2), mul_inv_cancel hy, one_pow, mul_one, sub_eq_zero, pow_two] at hxy exact (eq_one_iff p ha).mpr ⟨x * y⁻¹, hxy.symm⟩ @@ -242,7 +242,7 @@ theorem eq_one_of_sq_sub_mul_sq_eq_zero' {p : ℕ} [Fact p.Prime] {a : ℤ} (ha {x y : ZMod p} (hx : x ≠ 0) (hxy : x ^ 2 - a * y ^ 2 = 0) : legendreSym p a = 1 := by haveI hy : y ≠ 0 := by rintro rfl - rw [zero_pow' 2 (by norm_num), MulZeroClass.mul_zero, sub_zero, pow_eq_zero_iff + rw [zero_pow' 2 (by norm_num), mul_zero, sub_zero, pow_eq_zero_iff (by norm_num : 0 < 2)] at hxy exact hx hxy exact eq_one_of_sq_sub_mul_sq_eq_zero ha hy hxy diff --git a/Mathlib/NumberTheory/LegendreSymbol/GaussSum.lean b/Mathlib/NumberTheory/LegendreSymbol/GaussSum.lean index 8d1791d57daf5..9f4d86b1ec421 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/GaussSum.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/GaussSum.lean @@ -98,7 +98,7 @@ private theorem gaussSum_mul_aux {χ : MulChar R R'} (hχ : IsNontrivial χ) (ψ (b : R) : ∑ a, χ (a * b⁻¹) * ψ (a - b) = ∑ c, χ c * ψ (b * (c - 1)) := by cases' eq_or_ne b 0 with hb hb · -- case `b = 0` - simp only [hb, inv_zero, MulZeroClass.mul_zero, MulChar.map_zero, MulZeroClass.zero_mul, + simp only [hb, inv_zero, mul_zero, MulChar.map_zero, zero_mul, Finset.sum_const_zero, map_zero_one, mul_one] exact (hχ.sum_eq_zero).symm · -- case `b ≠ 0` @@ -327,7 +327,7 @@ theorem FiniteField.two_pow_card {F : Type*} [Fintype F] [Field F] (hF : ringCha (↑(χ₈ 0) * τ ^ 0 + ↑(χ₈ 1) * τ ^ 1 + ↑(χ₈ 2) * τ ^ 2 + ↑(χ₈ 3) * τ ^ 3 + ↑(χ₈ 4) * τ ^ 4 + ↑(χ₈ 5) * τ ^ 5 + ↑(χ₈ 6) * τ ^ 6 + ↑(χ₈ 7) * τ ^ 7) ^ 2 = 8 := by -- Porting note: original proof - -- simp [← h₄, χ₈_apply, Matrix.cons_val_zero, algebraMap.coe_zero, MulZeroClass.zero_mul, + -- simp [← h₄, χ₈_apply, Matrix.cons_val_zero, algebraMap.coe_zero, zero_mul, -- Matrix.cons_val_one, Matrix.head_cons, algebraMap.coe_one, Matrix.cons_vec_bit0_eq_alt0, -- Matrix.cons_vecAppend, Matrix.cons_vecAlt0, Matrix.cons_vec_bit1_eq_alt1, -- Matrix.cons_vecAlt1, Int.cast_neg] diff --git a/Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean b/Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean index b5caf0254fa6c..29e832b2e7e19 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean @@ -467,7 +467,7 @@ theorem quadratic_reciprocity_three_mod_four {a b : ℕ} (ha : a % 4 = 3) (hb : /-- The Jacobi symbol `J(a | b)` depends only on `b` mod `4*a` (version for `a : ℕ`). -/ theorem mod_right' (a : ℕ) {b : ℕ} (hb : Odd b) : J(a | b) = J(a | b % (4 * a)) := by rcases eq_or_ne a 0 with (rfl | ha₀) - · rw [MulZeroClass.mul_zero, mod_zero] + · rw [mul_zero, mod_zero] have hb' : Odd (b % (4 * a)) := hb.mod_even (Even.mul_right (by norm_num) _) rcases exists_eq_pow_mul_and_not_dvd ha₀ 2 (by norm_num) with ⟨e, a', ha₁', ha₂⟩ have ha₁ := odd_iff.mpr (two_dvd_ne_zero.mp ha₁') diff --git a/Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean b/Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean index 323126441c5a7..862a036657a21 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean @@ -193,8 +193,8 @@ noncomputable def ofUnitHom (f : Rˣ →* R'ˣ) : MulChar R R' where have hm : (IsUnit.mul_iff.mpr ⟨hx, hy⟩).unit = hx.unit * hy.unit := Units.eq_iff.mp rfl rw [hm, map_mul] norm_cast - · simp only [hy, not_false_iff, dif_neg, MulZeroClass.mul_zero] - · simp only [hx, IsUnit.mul_iff, false_and_iff, not_false_iff, dif_neg, MulZeroClass.zero_mul] + · simp only [hy, not_false_iff, dif_neg, mul_zero] + · simp only [hx, IsUnit.mul_iff, false_and_iff, not_false_iff, dif_neg, zero_mul] map_nonunit' := by intro a ha simp only [ha, not_false_iff, dif_neg] diff --git a/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean b/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean index 31b2bb56077df..4a608d0f1874e 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean @@ -100,10 +100,10 @@ theorem quadraticCharFun_eq_pow_of_char_ne_two (hF : ringChar F ≠ 2) {a : F} ( theorem quadraticCharFun_mul (a b : F) : quadraticCharFun F (a * b) = quadraticCharFun F a * quadraticCharFun F b := by by_cases ha : a = 0 - · rw [ha, MulZeroClass.zero_mul, quadraticCharFun_zero, MulZeroClass.zero_mul] + · rw [ha, zero_mul, quadraticCharFun_zero, zero_mul] -- now `a ≠ 0` by_cases hb : b = 0 - · rw [hb, MulZeroClass.mul_zero, quadraticCharFun_zero, MulZeroClass.mul_zero] + · rw [hb, mul_zero, quadraticCharFun_zero, mul_zero] -- now `a ≠ 0` and `b ≠ 0` have hab := mul_ne_zero ha hb by_cases hF : ringChar F = 2 diff --git a/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean b/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean index fb2cdb90a19e4..f7d3bddc79562 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean @@ -137,7 +137,7 @@ theorem FiniteField.isSquare_odd_prime_iff (hF : ringChar F ≠ 2) {p : ℕ} [Fa obtain ⟨n, _, hc⟩ := FiniteField.card F (ringChar F) have hchar : ringChar F = ringChar (ZMod p) := by rw [hFp]; exact (ringChar_zmod_n p).symm conv => enter [1, 1, 2]; rw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar] - simp only [zero_pow n.pos, MulZeroClass.mul_zero, zero_eq_neg, one_ne_zero, not_false_iff] + simp only [zero_pow n.pos, mul_zero, zero_eq_neg, one_ne_zero, not_false_iff] · rw [← Iff.not_left (@quadraticChar_neg_one_iff_not_isSquare F _ _ _ _), quadraticChar_odd_prime hF hp] exact hFp diff --git a/Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean b/Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean index cc80bfdd4ed59..52d412108318c 100644 --- a/Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean +++ b/Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean @@ -139,7 +139,7 @@ theorem quadratic_reciprocity' (hp : p ≠ 2) (hq : q ≠ 2) : legendreSym q p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p q := by cases' eq_or_ne p q with h h · subst p - rw [(eq_zero_iff q q).mpr (by exact_mod_cast nat_cast_self q), MulZeroClass.mul_zero] + rw [(eq_zero_iff q q).mpr (by exact_mod_cast nat_cast_self q), mul_zero] · have qr := congr_arg (· * legendreSym p q) (quadratic_reciprocity hp hq h) have : ((q : ℤ) : ZMod p) ≠ 0 := by exact_mod_cast prime_ne_zero p q h simpa only [mul_assoc, ← pow_two, sq_one p this, mul_one] using qr diff --git a/Mathlib/NumberTheory/Modular.lean b/Mathlib/NumberTheory/Modular.lean index 5e861e4892e18..aa860952e1a3c 100644 --- a/Mathlib/NumberTheory/Modular.lean +++ b/Mathlib/NumberTheory/Modular.lean @@ -152,7 +152,7 @@ theorem tendsto_normSq_coprime_pair : · show (z : ℂ).im⁻¹ * ((z : ℂ) * conj (f c)).im = c 1 rw [f_def, RingHom.map_add, RingHom.map_mul, mul_add, mul_left_comm, mul_conj, conj_ofReal, conj_ofReal, ← ofReal_mul, add_im, ofReal_im, zero_add, inv_mul_eq_iff_eq_mul₀ hz] - simp only [ofReal_im, ofReal_re, mul_im, zero_add, MulZeroClass.mul_zero] + simp only [ofReal_im, ofReal_re, mul_im, zero_add, mul_zero] have hf' : ClosedEmbedding f := by have := @LinearEquiv.closedEmbedding_of_injective ℝ _ (Fin 2 → ℝ) _ _ ℂ _ _ _ f exact this hf diff --git a/Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean b/Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean index 3f931f6937b94..b7f05dc25e2f4 100644 --- a/Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean +++ b/Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean @@ -156,7 +156,7 @@ theorem Gamma1_to_Gamma0_mem (N : ℕ) (A : Gamma0 N) : A ∈ Gamma1' N ↔ simp only [Gamma0Map, coe_matrix_coe, Int.coe_castRingHom, map_apply, Gamma1_mem', MonoidHom.coe_mk, OneHom.coe_mk, Int.cast_sub, Int.cast_mul] at * rw [hA, ha] at adet - simp only [mul_one, MulZeroClass.mul_zero, sub_zero] at adet + simp only [mul_one, mul_zero, sub_zero] at adet simp only [adet, hA, ha, eq_self_iff_true, and_self_iff] · intro ha simp only [Gamma1_mem', Gamma0Map, MonoidHom.coe_mk, coe_matrix_coe, diff --git a/Mathlib/NumberTheory/ModularForms/JacobiTheta/Basic.lean b/Mathlib/NumberTheory/ModularForms/JacobiTheta/Basic.lean index f232393f5eee9..ae9c1567289b5 100644 --- a/Mathlib/NumberTheory/ModularForms/JacobiTheta/Basic.lean +++ b/Mathlib/NumberTheory/ModularForms/JacobiTheta/Basic.lean @@ -90,7 +90,7 @@ theorem jacobiTheta_S_smul (τ : ℍ) : unfold jacobiTheta rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk] have ha : 0 < (-I * τ).re := by - rw [neg_mul, neg_re, mul_re, I_re, I_im, MulZeroClass.zero_mul, one_mul, zero_sub, neg_neg] + rw [neg_mul, neg_re, mul_re, I_re, I_im, zero_mul, one_mul, zero_sub, neg_neg] exact τ.im_pos have ha' : (-I * τ) ^ (1 / 2 : ℂ) ≠ 0 := by rw [Ne.def, cpow_eq_zero_iff] @@ -118,7 +118,7 @@ theorem hasSum_nat_jacobiTheta {z : ℂ} (hz : 0 < im z) : have := (summable_exp_mul_sq hz).hasSum.sum_nat_of_sum_int rw [← @hasSum_nat_add_iff' ℂ _ _ _ _ 1] at this simp_rw [Finset.sum_range_one, Int.cast_neg, Int.cast_ofNat, Nat.cast_zero, neg_zero, - Int.cast_zero, sq (0 : ℂ), MulZeroClass.mul_zero, MulZeroClass.zero_mul, neg_sq, ← mul_two, + Int.cast_zero, sq (0 : ℂ), mul_zero, zero_mul, neg_sq, ← mul_two, Complex.exp_zero, add_sub_assoc, (by norm_num : (1 : ℂ) - 1 * 2 = -1), ← sub_eq_add_neg, Nat.cast_add, Nat.cast_one] at this convert this.div_const 2 using 1 diff --git a/Mathlib/NumberTheory/ModularForms/SlashActions.lean b/Mathlib/NumberTheory/ModularForms/SlashActions.lean index cc579aadcdd0e..635448d0b51fa 100644 --- a/Mathlib/NumberTheory/ModularForms/SlashActions.lean +++ b/Mathlib/NumberTheory/ModularForms/SlashActions.lean @@ -138,7 +138,7 @@ private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := - funext fun _ => by simp only [slash, Pi.zero_apply, MulZeroClass.zero_mul] + funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash diff --git a/Mathlib/NumberTheory/Multiplicity.lean b/Mathlib/NumberTheory/Multiplicity.lean index 005b2a52c3816..e157f1c4438e8 100644 --- a/Mathlib/NumberTheory/Multiplicity.lean +++ b/Mathlib/NumberTheory/Multiplicity.lean @@ -127,7 +127,7 @@ theorem odd_sq_dvd_geom_sum₂_sub (hp : Odd p) : simp only [Finset.mul_sum, ← mul_assoc, ← pow_add] rw [Finset.sum_congr rfl] rintro (⟨⟩ | ⟨x⟩) hx - · rw [Nat.cast_zero, MulZeroClass.mul_zero, MulZeroClass.mul_zero] + · rw [Nat.cast_zero, mul_zero, mul_zero] · have : x.succ - 1 + (p - 1 - x.succ) = p - 2 := by rw [← Nat.add_sub_assoc (Nat.le_pred_of_lt (Finset.mem_range.mp hx))] exact congr_arg Nat.pred (Nat.add_sub_cancel_left _ _) diff --git a/Mathlib/NumberTheory/NumberField/Embeddings.lean b/Mathlib/NumberTheory/NumberField/Embeddings.lean index 2f9ad15b3b305..83380bf8ef22d 100644 --- a/Mathlib/NumberTheory/NumberField/Embeddings.lean +++ b/Mathlib/NumberTheory/NumberField/Embeddings.lean @@ -192,7 +192,7 @@ def IsReal.embedding {φ : K →+* ℂ} (hφ : IsReal φ) : K →+* ℝ where map_one' := by simp only [map_one, one_re] map_mul' := by simp only [Complex.conj_eq_iff_im.mp (RingHom.congr_fun hφ _), map_mul, mul_re, - MulZeroClass.mul_zero, tsub_zero, eq_self_iff_true, forall_const] + mul_zero, tsub_zero, eq_self_iff_true, forall_const] map_zero' := by simp only [map_zero, zero_re] map_add' := by simp only [map_add, add_re, eq_self_iff_true, forall_const] #align number_field.complex_embedding.is_real.embedding NumberField.ComplexEmbedding.IsReal.embedding diff --git a/Mathlib/NumberTheory/Padics/Hensel.lean b/Mathlib/NumberTheory/Padics/Hensel.lean index 00f96447d5430..93100e44f9fba 100644 --- a/Mathlib/NumberTheory/Padics/Hensel.lean +++ b/Mathlib/NumberTheory/Padics/Hensel.lean @@ -344,7 +344,7 @@ private theorem newton_seq_dist_to_a : newton_seq_dist_to_a (k + 1) (succ_pos _) private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0) := by - rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖] + rw [← mul_zero ‖F.derivative.eval a‖] exact tendsto_const_nhds.mul (Tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm)) @@ -361,7 +361,7 @@ private theorem bound : private theorem bound'_sq : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) atTop (𝓝 0) := by - rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖, sq] + rw [← mul_zero ‖F.derivative.eval a‖, sq] simp only [mul_assoc] apply Tendsto.mul · apply tendsto_const_nhds diff --git a/Mathlib/NumberTheory/Padics/PadicIntegers.lean b/Mathlib/NumberTheory/Padics/PadicIntegers.lean index 8bcf6a7768dab..ba8e87ace530f 100644 --- a/Mathlib/NumberTheory/Padics/PadicIntegers.lean +++ b/Mathlib/NumberTheory/Padics/PadicIntegers.lean @@ -533,7 +533,7 @@ theorem mem_span_pow_iff_le_valuation (x : ℤ_[p]) (hx : x ≠ 0) (n : ℕ) : rw [valuation_p_pow_mul _ _ this, le_add_iff_nonneg_right] apply valuation_nonneg contrapose! hx - rw [hx, MulZeroClass.mul_zero] + rw [hx, mul_zero] · nth_rewrite 2 [unitCoeff_spec hx] lift x.valuation to ℕ using x.valuation_nonneg with k simp only [Int.natAbs_ofNat, Units.isUnit, IsUnit.dvd_mul_left, Int.ofNat_le] diff --git a/Mathlib/NumberTheory/Padics/PadicNumbers.lean b/Mathlib/NumberTheory/Padics/PadicNumbers.lean index fed547ec9e979..1a2edd0f1164c 100644 --- a/Mathlib/NumberTheory/Padics/PadicNumbers.lean +++ b/Mathlib/NumberTheory/Padics/PadicNumbers.lean @@ -281,11 +281,11 @@ variable {p : ℕ} [hp : Fact p.Prime] theorem norm_mul (f g : PadicSeq p) : (f * g).norm = f.norm * g.norm := if hf : f ≈ 0 then by have hg : f * g ≈ 0 := mul_equiv_zero' _ hf - simp only [hf, hg, norm, dif_pos, MulZeroClass.zero_mul] + simp only [hf, hg, norm, dif_pos, zero_mul] else if hg : g ≈ 0 then by have hf : f * g ≈ 0 := mul_equiv_zero _ hg - simp only [hf, hg, norm, dif_pos, MulZeroClass.mul_zero] + simp only [hf, hg, norm, dif_pos, mul_zero] else by unfold norm split_ifs with hfg @@ -1119,9 +1119,9 @@ theorem AddValuation.map_mul (x y : ℚ_[p]) : addValuationDef (x * y : ℚ_[p]) = addValuationDef x + addValuationDef y := by simp only [addValuationDef] by_cases hx : x = 0 - · rw [hx, if_pos (Eq.refl _), MulZeroClass.zero_mul, if_pos (Eq.refl _), WithTop.top_add] + · rw [hx, if_pos (Eq.refl _), zero_mul, if_pos (Eq.refl _), WithTop.top_add] · by_cases hy : y = 0 - · rw [hy, if_pos (Eq.refl _), MulZeroClass.mul_zero, if_pos (Eq.refl _), WithTop.add_top] + · rw [hy, if_pos (Eq.refl _), mul_zero, if_pos (Eq.refl _), WithTop.add_top] · rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithTop.coe_add, WithTop.coe_eq_coe, valuation_map_mul hx hy] #align padic.add_valuation.map_mul Padic.AddValuation.map_mul diff --git a/Mathlib/NumberTheory/Padics/RingHoms.lean b/Mathlib/NumberTheory/Padics/RingHoms.lean index d8b7fb8b8e902..1e8c5bffb7d64 100644 --- a/Mathlib/NumberTheory/Padics/RingHoms.lean +++ b/Mathlib/NumberTheory/Padics/RingHoms.lean @@ -362,7 +362,7 @@ theorem appr_spec (n : ℕ) : ∀ x : ℤ_[p], x - appr x n ∈ Ideal.span {(p : simp only [map_natCast, ZMod.nat_cast_self, RingHom.map_pow, RingHom.map_mul, ZMod.nat_cast_val] have hc' : c ≠ 0 := by rintro rfl - simp only [MulZeroClass.mul_zero] at hc + simp only [mul_zero] at hc contradiction conv_rhs => congr @@ -383,7 +383,7 @@ theorem appr_spec (n : ℕ) : ∀ x : ℤ_[p], x - appr x n ∈ Ideal.span {(p : rw [DiscreteValuationRing.unit_mul_pow_congr_unit _ _ _ _ _ hc] exact irreducible_p · rw [zero_pow hc0] - simp only [sub_zero, ZMod.cast_zero, MulZeroClass.mul_zero] + simp only [sub_zero, ZMod.cast_zero, mul_zero] rw [unitCoeff_spec hc'] exact (dvd_pow_self (p : ℤ_[p]) hc0.ne').mul_left _ #align padic_int.appr_spec PadicInt.appr_spec diff --git a/Mathlib/NumberTheory/Pell.lean b/Mathlib/NumberTheory/Pell.lean index a7adcba7a55d0..a68df8142d5d3 100644 --- a/Mathlib/NumberTheory/Pell.lean +++ b/Mathlib/NumberTheory/Pell.lean @@ -220,7 +220,7 @@ theorem eq_zero_of_d_neg (h₀ : d < 0) (a : Solution₁ d) : a.x = 0 ∨ a.y = theorem x_ne_zero (h₀ : 0 ≤ d) (a : Solution₁ d) : a.x ≠ 0 := by intro hx have h : 0 ≤ d * a.y ^ 2 := mul_nonneg h₀ (sq_nonneg _) - rw [a.prop_y, hx, sq, MulZeroClass.zero_mul, zero_sub] at h + rw [a.prop_y, hx, sq, zero_mul, zero_sub] at h exact not_le.mpr (neg_one_lt_zero : (-1 : ℤ) < 0) h #align pell.solution₁.x_ne_zero Pell.Solution₁.x_ne_zero @@ -228,7 +228,7 @@ theorem x_ne_zero (h₀ : 0 ≤ d) (a : Solution₁ d) : a.x ≠ 0 := by theorem y_ne_zero_of_one_lt_x {a : Solution₁ d} (ha : 1 < a.x) : a.y ≠ 0 := by intro hy have prop := a.prop - rw [hy, sq (0 : ℤ), MulZeroClass.zero_mul, MulZeroClass.mul_zero, sub_zero] at prop + rw [hy, sq (0 : ℤ), zero_mul, mul_zero, sub_zero] at prop exact lt_irrefl _ (((one_lt_sq_iff <| zero_le_one.trans ha.le).mpr ha).trans_eq prop) #align pell.solution₁.y_ne_zero_of_one_lt_x Pell.Solution₁.y_ne_zero_of_one_lt_x @@ -258,7 +258,7 @@ theorem eq_one_of_x_eq_one (h₀ : d ≠ 0) {a : Solution₁ d} (ha : a.x = 1) : theorem eq_one_or_neg_one_iff_y_eq_zero {a : Solution₁ d} : a = 1 ∨ a = -1 ↔ a.y = 0 := by refine' ⟨fun H => H.elim (fun h => by simp [h]) fun h => by simp [h], fun H => _⟩ have prop := a.prop - rw [H, sq (0 : ℤ), MulZeroClass.mul_zero, MulZeroClass.mul_zero, sub_zero, sq_eq_one_iff] at prop + rw [H, sq (0 : ℤ), mul_zero, mul_zero, sub_zero, sq_eq_one_iff] at prop exact prop.imp (fun h => ext h H) fun h => ext h H #align pell.solution₁.eq_one_or_neg_one_iff_y_eq_zero Pell.Solution₁.eq_one_or_neg_one_iff_y_eq_zero @@ -273,7 +273,7 @@ theorem x_mul_pos {a b : Solution₁ d} (ha : 0 < a.x) (hb : 0 < b.x) : 0 < (a * · positivity · rw [(eq_zero_of_d_neg h a).resolve_left ha.ne', (eq_zero_of_d_neg h b).resolve_left hb.ne'] -- Porting note: was - -- rw [zero_pow two_pos, zero_add, MulZeroClass.zero_mul, zero_add] + -- rw [zero_pow two_pos, zero_add, zero_mul, zero_add] -- exact one_pos -- but this relied on the exact output of `ring_nf` simp @@ -672,7 +672,7 @@ theorem eq_pow_of_nonneg {a₁ : Solution₁ d} (h : IsFundamental a₁) {a : So simp only [pow_zero] ext <;> simp only [x_one, y_one] · have prop := a.prop - rw [← hy, sq (0 : ℤ), MulZeroClass.zero_mul, MulZeroClass.mul_zero, sub_zero, + rw [← hy, sq (0 : ℤ), zero_mul, mul_zero, sub_zero, sq_eq_one_iff] at prop refine' prop.resolve_right fun hf => _ have := (hax.trans_eq hax').le.trans_eq hf diff --git a/Mathlib/NumberTheory/PythagoreanTriples.lean b/Mathlib/NumberTheory/PythagoreanTriples.lean index 4b78ec480ae81..63ce0d11ca79d 100644 --- a/Mathlib/NumberTheory/PythagoreanTriples.lean +++ b/Mathlib/NumberTheory/PythagoreanTriples.lean @@ -56,7 +56,7 @@ theorem pythagoreanTriple_comm {x y z : ℤ} : PythagoreanTriple x y z ↔ Pytha /-- The zeroth Pythagorean triple is all zeros. -/ theorem PythagoreanTriple.zero : PythagoreanTriple 0 0 0 := by - simp only [PythagoreanTriple, MulZeroClass.zero_mul, zero_add] + simp only [PythagoreanTriple, zero_mul, zero_add] #align pythagorean_triple.zero PythagoreanTriple.zero namespace PythagoreanTriple @@ -167,7 +167,7 @@ theorem gcd_dvd : (Int.gcd x y : ℤ) ∣ z := by apply Int.natAbs_eq_zero.mp apply Nat.eq_zero_of_gcd_eq_zero_right h0 have hz : z = 0 := by - simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, MulZeroClass.mul_zero, + simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h simp only [hz, dvd_zero] obtain ⟨k, x0, y0, _, h2, rfl, rfl⟩ : @@ -188,7 +188,7 @@ theorem normalize : PythagoreanTriple (x / Int.gcd x y) (y / Int.gcd x y) (z / I apply Int.natAbs_eq_zero.mp apply Nat.eq_zero_of_gcd_eq_zero_right h0 have hz : z = 0 := by - simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, MulZeroClass.mul_zero, + simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h simp only [hx, hy, hz, Int.zero_div] exact zero @@ -550,7 +550,7 @@ theorem isPrimitiveClassified_of_coprime_of_odd_of_pos (hc : Int.gcd x y = 1) (h rw [Int.ediv_mul_cancel h1.1, Int.ediv_mul_cancel h1.2.1, hw2] norm_cast · apply (mul_lt_mul_right (by norm_num : 0 < (2 : ℤ))).mp - rw [Int.ediv_mul_cancel h1.1, MulZeroClass.zero_mul] + rw [Int.ediv_mul_cancel h1.1, zero_mul] exact hm2n2 rw [h2.1, h1.2.2.1] at hyo revert hyo diff --git a/Mathlib/NumberTheory/RamificationInertia.lean b/Mathlib/NumberTheory/RamificationInertia.lean index d7884ed302586..418ceefcf4d98 100644 --- a/Mathlib/NumberTheory/RamificationInertia.lean +++ b/Mathlib/NumberTheory/RamificationInertia.lean @@ -679,7 +679,7 @@ theorem finrank_prime_pow_ramificationIdx [IsDomain S] [IsDedekindDomain S] (hP0 rw [finrank_eq_rank', Nat.cast_mul, finrank_eq_rank', hdim, nsmul_eq_mul] have hPe := mt (finiteDimensional_iff_of_rank_eq_nsmul he hdim).mp hP simp only [finrank_of_infinite_dimensional hP, finrank_of_infinite_dimensional hPe, - MulZeroClass.mul_zero] + mul_zero] #align ideal.finrank_prime_pow_ramification_idx Ideal.finrank_prime_pow_ramificationIdx end FactLeComap diff --git a/Mathlib/NumberTheory/ZetaFunction.lean b/Mathlib/NumberTheory/ZetaFunction.lean index c0fb1e72eb4da..840977beb5e3e 100644 --- a/Mathlib/NumberTheory/ZetaFunction.lean +++ b/Mathlib/NumberTheory/ZetaFunction.lean @@ -377,12 +377,12 @@ theorem differentiableAt_riemannZeta {s : ℂ} (hs' : s ≠ 1) : DifferentiableA · refine Tendsto.mono_left ?_ nhdsWithin_le_nhds have : ContinuousAt riemannCompletedZeta₀ 0 := differentiable_completed_zeta₀.continuous.continuousAt - simpa only [id.def, MulZeroClass.mul_zero] using Tendsto.mul this tendsto_id + simpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id · refine tendsto_const_nhds.congr' (eventuallyEq_of_mem self_mem_nhdsWithin fun t ht => ?_) simp_rw [one_div_mul_cancel ht] · refine Tendsto.mono_left ?_ nhdsWithin_le_nhds suffices ContinuousAt (fun z : ℂ => 1 / (z - 1)) 0 by - simpa only [id.def, MulZeroClass.mul_zero] using Tendsto.mul this tendsto_id + simpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id refine continuousAt_const.div (continuousAt_id.sub continuousAt_const) ?_ simpa only [zero_sub] using neg_ne_zero.mpr one_ne_zero -- Now the main proof. @@ -397,7 +397,7 @@ theorem differentiableAt_riemannZeta {s : ℂ} (hs' : s ≠ 1) : DifferentiableA have S_nhds : {(1 : ℂ)}ᶜ ∈ 𝓝 (0 : ℂ) := isOpen_compl_singleton.mem_nhds hs' refine ((Complex.differentiableOn_update_limUnder_of_isLittleO S_nhds (fun t ht => (c1 t ht.2 ht.1).differentiableWithinAt) ?_) 0 hs').differentiableAt S_nhds - simp only [zero_div, div_zero, Complex.Gamma_zero, MulZeroClass.mul_zero, cpow_zero, sub_zero] + simp only [zero_div, div_zero, Complex.Gamma_zero, mul_zero, cpow_zero, sub_zero] -- Remains to show completed zeta is `o (s ^ (-1))` near 0. refine (isBigO_const_of_tendsto c2 <| one_ne_zero' ℂ).trans_isLittleO ?_ rw [isLittleO_iff_tendsto'] @@ -689,7 +689,7 @@ theorem riemannZeta_one_sub {s : ℂ} (hs : ∀ n : ℕ, s ≠ -n) (hs' : s ≠ have h_Ga_ne3 : Gamma ((s + 1) / 2) ≠ 0 := by have h_Ga_aux : Gamma s ≠ 0 := Complex.Gamma_ne_zero hs contrapose! h_Ga_aux - rw [h_Ga_eq, h_Ga_aux, MulZeroClass.mul_zero, MulZeroClass.zero_mul, zero_div] + rw [h_Ga_eq, h_Ga_aux, mul_zero, zero_mul, zero_div] rw [riemannZeta, Function.update_noteq (by rwa [sub_ne_zero, ne_comm] : 1 - s ≠ 0), Function.update_noteq hs_ne, riemannCompletedZeta_one_sub, mul_div, eq_div_iff h_Ga_ne1, mul_comm, ← mul_div_assoc] @@ -702,7 +702,7 @@ theorem riemannZeta_one_sub {s : ℂ} (hs : ∀ n : ℕ, s ≠ -n) (hs' : s ≠ rw [← sub_sub, sub_self, zero_sub, neg_div, mul_div_cancel_left _ (two_ne_zero' ℂ)] rw [this, Complex.Gamma_neg_nat_eq_zero, div_zero] have : (π : ℂ) * (1 - (1 + 2 * ↑n)) / 2 = ↑(-n : ℤ) * π := by push_cast; field_simp; ring - rw [this, Complex.sin_int_mul_pi, MulZeroClass.mul_zero, MulZeroClass.zero_mul] + rw [this, Complex.sin_int_mul_pi, mul_zero, zero_mul] have h_Ga_ne4 : Gamma ((1 - s) / 2) ≠ 0 := by rw [Ne.def, Complex.Gamma_eq_zero_iff] contrapose! hs_pos_odd @@ -738,7 +738,7 @@ theorem riemannZeta_neg_nat_eq_bernoulli (k : ℕ) : rw [Nat.cast_mul, ← neg_mul, Nat.cast_two, Nat.cast_succ, riemannZeta_neg_two_mul_nat_add_one, bernoulli_eq_bernoulli'_of_ne_one] swap; · apply ne_of_gt; norm_num - rw [bernoulli'_odd_eq_zero ⟨m + 1, rfl⟩ (by norm_num), Rat.cast_zero, MulZeroClass.mul_zero, + rw [bernoulli'_odd_eq_zero ⟨m + 1, rfl⟩ (by norm_num), Rat.cast_zero, mul_zero, zero_div] · -- k = 2 * m + 1 : the interesting case rw [Odd.neg_one_pow ⟨m, rfl⟩] diff --git a/Mathlib/NumberTheory/ZetaValues.lean b/Mathlib/NumberTheory/ZetaValues.lean index 95a8b51258a57..9cce54cd55bc6 100644 --- a/Mathlib/NumberTheory/ZetaValues.lean +++ b/Mathlib/NumberTheory/ZetaValues.lean @@ -137,7 +137,7 @@ theorem bernoulliFourierCoeff_zero {k : ℕ} (hk : k ≠ 0) : bernoulliFourierCo theorem bernoulliFourierCoeff_eq {k : ℕ} (hk : k ≠ 0) (n : ℤ) : bernoulliFourierCoeff k n = -k ! / (2 * π * I * n) ^ k := by rcases eq_or_ne n 0 with (rfl | hn) - · rw [bernoulliFourierCoeff_zero hk, Int.cast_zero, MulZeroClass.mul_zero, zero_pow' _ hk, + · rw [bernoulliFourierCoeff_zero hk, Int.cast_zero, mul_zero, zero_pow' _ hk, div_zero] refine' Nat.le_induction _ (fun k hk h'k => _) k (Nat.one_le_iff_ne_zero.mpr hk) · rw [bernoulliFourierCoeff_recurrence 1 hn] @@ -252,7 +252,7 @@ theorem hasSum_one_div_nat_pow_mul_fourier {k : ℕ} (hk : 2 ≤ k) {x : ℝ} (h congr 1 rw [eq_div_iff, ← mul_pow, ← neg_eq_neg_one_mul, neg_neg, one_pow] apply pow_ne_zero; rw [neg_ne_zero]; exact one_ne_zero - · rw [Int.cast_zero, zero_pow (by linarith : 0 < k), div_zero, MulZeroClass.zero_mul, add_zero] + · rw [Int.cast_zero, zero_pow (by linarith : 0 < k), div_zero, zero_mul, add_zero] #align has_sum_one_div_nat_pow_mul_fourier hasSum_one_div_nat_pow_mul_fourier theorem hasSum_one_div_nat_pow_mul_cos {k : ℕ} (hk : k ≠ 0) {x : ℝ} (hx : x ∈ Icc (0 : ℝ) 1) : @@ -341,7 +341,7 @@ theorem hasSum_zeta_nat {k : ℕ} (hk : k ≠ 0) : ((-1 : ℝ) ^ (k + 1) * (2 : ℝ) ^ (2 * k - 1) * π ^ (2 * k) * bernoulli (2 * k) / (2 * k)!) := by convert hasSum_one_div_nat_pow_mul_cos hk (left_mem_Icc.mpr zero_le_one) using 1 - · ext1 n; rw [MulZeroClass.mul_zero, Real.cos_zero, mul_one] + · ext1 n; rw [mul_zero, Real.cos_zero, mul_one] rw [Polynomial.eval_zero_map, Polynomial.bernoulli_eval_zero, eq_ratCast] have : (2 : ℝ) ^ (2 * k - 1) = (2 : ℝ) ^ (2 * k) / 2 := by rw [eq_div_iff (two_ne_zero' ℝ)] diff --git a/Mathlib/NumberTheory/Zsqrtd/Basic.lean b/Mathlib/NumberTheory/Zsqrtd/Basic.lean index 40ad9c9d01d7d..725d07b13ea0d 100644 --- a/Mathlib/NumberTheory/Zsqrtd/Basic.lean +++ b/Mathlib/NumberTheory/Zsqrtd/Basic.lean @@ -357,7 +357,7 @@ protected theorem coe_int_inj {m n : ℤ} (h : (↑m : ℤ√d) = ↑n) : m = n theorem coe_int_dvd_iff (z : ℤ) (a : ℤ√d) : ↑z ∣ a ↔ z ∣ a.re ∧ z ∣ a.im := by constructor · rintro ⟨x, rfl⟩ - simp only [add_zero, coe_int_re, MulZeroClass.zero_mul, mul_im, dvd_mul_right, and_self_iff, + simp only [add_zero, coe_int_re, zero_mul, mul_im, dvd_mul_right, and_self_iff, mul_re, mul_zero, coe_int_im] · rintro ⟨⟨r, hr⟩, ⟨i, hi⟩⟩ use ⟨r, i⟩ @@ -1071,9 +1071,9 @@ theorem lift_injective [CharZero R] {d : ℤ} (r : { r : R // r * r = ↑d }) have h_inj : Function.Injective ((↑) : ℤ → R) := Int.cast_injective suffices lift r a.norm = 0 by simp only [coe_int_re, add_zero, lift_apply_apply, coe_int_im, Int.cast_zero, - MulZeroClass.zero_mul] at this + zero_mul] at this rwa [← Int.cast_zero, h_inj.eq_iff, norm_eq_zero hd] at this - rw [norm_eq_mul_conj, RingHom.map_mul, ha, MulZeroClass.zero_mul] + rw [norm_eq_mul_conj, RingHom.map_mul, ha, zero_mul] #align zsqrtd.lift_injective Zsqrtd.lift_injective /-- An element of `ℤ√d` has norm equal to `1` if and only if it is contained in the submonoid diff --git a/Mathlib/Probability/CondCount.lean b/Mathlib/Probability/CondCount.lean index ae06e9daaf8c0..344c1d5f48e71 100644 --- a/Mathlib/Probability/CondCount.lean +++ b/Mathlib/Probability/CondCount.lean @@ -138,7 +138,7 @@ theorem condCount_of_univ (hs : s.Finite) (hs' : s.Nonempty) : condCount s Set.u theorem condCount_inter (hs : s.Finite) : condCount s (t ∩ u) = condCount (s ∩ t) u * condCount s t := by by_cases hst : s ∩ t = ∅ - · rw [hst, condCount_empty_meas, Measure.coe_zero, Pi.zero_apply, MulZeroClass.zero_mul, + · rw [hst, condCount_empty_meas, Measure.coe_zero, Pi.zero_apply, zero_mul, condCount_eq_zero_iff hs, ← Set.inter_assoc, hst, Set.empty_inter] rw [condCount, condCount, cond_apply _ hs.measurableSet, cond_apply _ hs.measurableSet, cond_apply _ (hs.inter_of_left _).measurableSet, mul_comm _ (Measure.count (s ∩ t)), diff --git a/Mathlib/Probability/Independence/Kernel.lean b/Mathlib/Probability/Independence/Kernel.lean index 71540e3642323..bb720a5629710 100644 --- a/Mathlib/Probability/Independence/Kernel.lean +++ b/Mathlib/Probability/Independence/Kernel.lean @@ -139,7 +139,7 @@ theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω} rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht refine Filter.eventually_of_forall (fun a ↦ ?_) cases' ht with ht ht - · rw [ht, Set.inter_empty, measure_empty, MulZeroClass.mul_zero] + · rw [ht, Set.inter_empty, measure_empty, mul_zero] · rw [ht, Set.inter_univ, measure_univ, mul_one] theorem indep_bot_left (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω} diff --git a/Mathlib/Probability/Integration.lean b/Mathlib/Probability/Integration.lean index 5055df3a33bdd..10faa875ee53e 100644 --- a/Mathlib/Probability/Integration.lean +++ b/Mathlib/Probability/Integration.lean @@ -274,13 +274,13 @@ theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable filter_upwards [h'X] with ω hω simp [hω] simp only [integral_congr_ae h'X, integral_congr_ae h', Pi.zero_apply, integral_const, - Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul] + Algebra.id.smul_eq_mul, mul_zero, zero_mul] by_cases h'Y : Y =ᵐ[μ] 0 · have h' : X * Y =ᵐ[μ] 0 := by filter_upwards [h'Y] with ω hω simp [hω] simp only [integral_congr_ae h'Y, integral_congr_ae h', Pi.zero_apply, integral_const, - Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul] + Algebra.id.smul_eq_mul, mul_zero, zero_mul] by_cases h : Integrable (X * Y) μ · have HX : Integrable X μ := hXY.integrable_left_of_integrable_mul h hX hY h'Y have HY : Integrable Y μ := hXY.integrable_right_of_integrable_mul h hX hY h'X diff --git a/Mathlib/Probability/Kernel/Composition.lean b/Mathlib/Probability/Kernel/Composition.lean index 17507ca5f18de..d4ed952dc3f15 100644 --- a/Mathlib/Probability/Kernel/Composition.lean +++ b/Mathlib/Probability/Kernel/Composition.lean @@ -93,7 +93,7 @@ noncomputable def compProdFun (κ : kernel α β) (η : kernel (α × β) γ) (a theorem compProdFun_empty (κ : kernel α β) (η : kernel (α × β) γ) (a : α) : compProdFun κ η a ∅ = 0 := by simp only [compProdFun, Set.mem_empty_iff_false, Set.setOf_false, measure_empty, - MeasureTheory.lintegral_const, MulZeroClass.zero_mul] + MeasureTheory.lintegral_const, zero_mul] #align probability_theory.kernel.comp_prod_fun_empty ProbabilityTheory.kernel.compProdFun_empty theorem compProdFun_iUnion (κ : kernel α β) (η : kernel (α × β) γ) [IsSFiniteKernel η] (a : α) diff --git a/Mathlib/Probability/Kernel/Disintegration.lean b/Mathlib/Probability/Kernel/Disintegration.lean index b238348a2ca49..fcf65f53557e4 100644 --- a/Mathlib/Probability/Kernel/Disintegration.lean +++ b/Mathlib/Probability/Kernel/Disintegration.lean @@ -100,7 +100,7 @@ theorem set_lintegral_condKernelReal_prod {s : Set α} (hs : MeasurableSet s) {t -- π-system that generates the Borel σ-algebra, hence we can get the same equality for any -- measurable set `t`. apply MeasurableSpace.induction_on_inter (borel_eq_generateFrom_Iic ℝ) isPiSystem_Iic _ _ _ _ ht - · simp only [measure_empty, lintegral_const, MulZeroClass.zero_mul, prod_empty] + · simp only [measure_empty, lintegral_const, zero_mul, prod_empty] · rintro t ⟨q, rfl⟩ exact set_lintegral_condKernelReal_Iic ρ q hs · intro t ht ht_lintegral @@ -139,7 +139,7 @@ theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s -- for any measurable set `s`. apply MeasurableSpace.induction_on_inter generateFrom_prod.symm isPiSystem_prod _ _ _ _ hs · simp only [mem_empty_iff_false, setOf_false, measure_empty, lintegral_const, - MulZeroClass.zero_mul] + zero_mul] · intro t ht rw [mem_image2] at ht obtain ⟨t₁, t₂, ht₁, ht₂, rfl⟩ := ht @@ -148,7 +148,7 @@ theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s simp only [ha, prod_mk_mem_set_prod_eq, true_and_iff, setOf_mem_eq] cases' eq_empty_or_nonempty t₂ with h h · simp only [h, prod_empty, mem_empty_iff_false, setOf_false, measure_empty, lintegral_const, - MulZeroClass.zero_mul] + zero_mul] rw [← lintegral_add_compl _ ht₁] have h_eq1 : ∫⁻ a in t₁, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = ∫⁻ a in t₁, condKernelReal ρ a t₂ ∂ρ.fst := by @@ -157,7 +157,7 @@ theorem lintegral_condKernelReal_mem {s : Set (α × ℝ)} (hs : MeasurableSet s have h_eq2 : ∫⁻ a in t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} ∂ρ.fst = 0 := by suffices h_eq_zero : ∀ a ∈ t₁ᶜ, condKernelReal ρ a {x : ℝ | (a, x) ∈ t₁ ×ˢ t₂} = 0 · rw [set_lintegral_congr_fun ht₁.compl (eventually_of_forall h_eq_zero)] - simp only [lintegral_const, MulZeroClass.zero_mul] + simp only [lintegral_const, zero_mul] intro a hat₁ rw [mem_compl_iff] at hat₁ simp only [hat₁, prod_mk_mem_set_prod_eq, false_and_iff, setOf_false, measure_empty] diff --git a/Mathlib/Probability/Martingale/Upcrossing.lean b/Mathlib/Probability/Martingale/Upcrossing.lean index e5b54cb72b405..9b3b3b33a3e46 100644 --- a/Mathlib/Probability/Martingale/Upcrossing.lean +++ b/Mathlib/Probability/Martingale/Upcrossing.lean @@ -793,7 +793,7 @@ theorem upcrossingsBefore_eq_sum (hab : a < b) : upcrossingsBefore a b f N ω = simp only [Set.mem_setOf_eq, not_lt] exact (upperCrossingTime_eq_of_upcrossingsBefore_lt hab hk.1).symm.le rw [Finset.sum_congr rfl h₁, Finset.sum_congr rfl h₂, Finset.sum_const, Finset.sum_const, - smul_eq_mul, mul_one, smul_eq_mul, MulZeroClass.mul_zero, Nat.card_Ico, Nat.add_succ_sub_one, + smul_eq_mul, mul_one, smul_eq_mul, mul_zero, Nat.card_Ico, Nat.add_succ_sub_one, add_zero, add_zero] #align measure_theory.upcrossings_before_eq_sum MeasureTheory.upcrossingsBefore_eq_sum @@ -876,7 +876,7 @@ theorem Submartingale.mul_lintegral_upcrossings_le_lintegral_pos_part [IsFiniteM rw [Nat.cast_le] exact upcrossingsBefore_mono hab hNM ω · rw [not_lt, ← sub_nonpos] at hab - rw [ENNReal.ofReal_of_nonpos hab, MulZeroClass.zero_mul] + rw [ENNReal.ofReal_of_nonpos hab, zero_mul] exact zero_le _ #align measure_theory.submartingale.mul_lintegral_upcrossings_le_lintegral_pos_part MeasureTheory.Submartingale.mul_lintegral_upcrossings_le_lintegral_pos_part diff --git a/Mathlib/Probability/ProbabilityMassFunction/Constructions.lean b/Mathlib/Probability/ProbabilityMassFunction/Constructions.lean index ab56753b71e00..3ae5aa49914a9 100644 --- a/Mathlib/Probability/ProbabilityMassFunction/Constructions.lean +++ b/Mathlib/Probability/ProbabilityMassFunction/Constructions.lean @@ -123,7 +123,7 @@ theorem monad_seq_eq_seq {α β : Type _} (q : Pmf (α → β)) (p : Pmf α) : q theorem seq_apply : (seq q p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0 := by simp only [seq, mul_boole, bind_apply, pure_apply] refine' tsum_congr fun f => ENNReal.tsum_mul_left.symm.trans (tsum_congr fun a => _) - simpa only [MulZeroClass.mul_zero] using mul_ite (b = f a) (q f) (p a) 0 + simpa only [mul_zero] using mul_ite (b = f a) (q f) (p a) 0 #align pmf.seq_apply Pmf.seq_apply @[simp] @@ -275,7 +275,7 @@ theorem filter_apply (a : α) : #align pmf.filter_apply Pmf.filter_apply theorem filter_apply_eq_zero_of_not_mem {a : α} (ha : a ∉ s) : (p.filter s h) a = 0 := by - rw [filter_apply, Set.indicator_apply_eq_zero.mpr fun ha' => absurd ha' ha, MulZeroClass.zero_mul] + rw [filter_apply, Set.indicator_apply_eq_zero.mpr fun ha' => absurd ha' ha, zero_mul] #align pmf.filter_apply_eq_zero_of_not_mem Pmf.filter_apply_eq_zero_of_not_mem theorem mem_support_filter_iff {a : α} : a ∈ (p.filter s h).support ↔ a ∈ s ∧ a ∈ p.support := diff --git a/Mathlib/Probability/ProbabilityMassFunction/Monad.lean b/Mathlib/Probability/ProbabilityMassFunction/Monad.lean index 3ce902b445afb..8ea68df07c669 100644 --- a/Mathlib/Probability/ProbabilityMassFunction/Monad.lean +++ b/Mathlib/Probability/ProbabilityMassFunction/Monad.lean @@ -138,7 +138,7 @@ theorem pure_bind (a : α) (f : α → Pmf β) : (pure a).bind f = f a := by @[simp] theorem bind_pure : p.bind pure = p := Pmf.ext fun x => (bind_apply _ _ _).trans (_root_.trans - (tsum_eq_single x fun y hy => by rw [pure_apply_of_ne _ _ hy.symm, MulZeroClass.mul_zero]) <| + (tsum_eq_single x fun y hy => by rw [pure_apply_of_ne _ _ hy.symm, mul_zero]) <| by rw [pure_apply_self, mul_one]) #align pmf.bind_pure Pmf.bind_pure @@ -209,7 +209,7 @@ def bindOnSupport (p : Pmf α) (f : ∀ a ∈ p.support, Pmf β) : Pmf β := refine' ENNReal.tsum_comm.trans (_root_.trans (tsum_congr fun a => _) p.tsum_coe) simp_rw [ENNReal.tsum_mul_left] split_ifs with h - · simp only [h, MulZeroClass.zero_mul] + · simp only [h, zero_mul] · rw [(f a h).tsum_coe, mul_one])⟩ #align pmf.bind_on_support Pmf.bindOnSupport @@ -246,9 +246,9 @@ theorem bindOnSupport_eq_bind (p : Pmf α) (f : α → Pmf β) : (p.bindOnSupport fun a _ => f a) = p.bind f := by ext b have : ∀ a, ite (p a = 0) 0 (p a * f a b) = p a * f a b := - fun a => ite_eq_right_iff.2 fun h => h.symm ▸ symm (MulZeroClass.zero_mul <| f a b) + fun a => ite_eq_right_iff.2 fun h => h.symm ▸ symm (zero_mul <| f a b) simp only [bindOnSupport_apply fun a _ => f a, p.bind_apply f, dite_eq_ite, mul_ite, - MulZeroClass.mul_zero, this] + mul_zero, this] #align pmf.bind_on_support_eq_bind Pmf.bindOnSupport_eq_bind theorem bindOnSupport_eq_zero_iff (b : β) : @@ -317,7 +317,7 @@ theorem toOuterMeasure_bindOnSupport_apply : _ = ∑' (a) (b), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 := ENNReal.tsum_comm _ = ∑' a, p a * ∑' b, ite (b ∈ s) (dite (p a = 0) (fun h => 0) fun h => f a h b) 0 := - (tsum_congr fun a => by simp only [← ENNReal.tsum_mul_left, mul_ite, MulZeroClass.mul_zero]) + (tsum_congr fun a => by simp only [← ENNReal.tsum_mul_left, mul_ite, mul_zero]) _ = ∑' a, p a * dite (p a = 0) (fun h => 0) fun h => ∑' b, ite (b ∈ s) (f a h b) 0 := tsum_congr fun a => by split_ifs with ha <;> simp only [ite_self, tsum_zero, eq_self_iff_true] #align pmf.to_outer_measure_bind_on_support_apply Pmf.toOuterMeasure_bindOnSupport_apply diff --git a/Mathlib/Probability/StrongLaw.lean b/Mathlib/Probability/StrongLaw.lean index 3658e77fec4f2..0ddcf1107b049 100644 --- a/Mathlib/Probability/StrongLaw.lean +++ b/Mathlib/Probability/StrongLaw.lean @@ -470,7 +470,7 @@ theorem strong_law_aux1 {c : ℝ} (c_one : 1 < c) {ε : ℝ} (εpos : 0 < ε) : apply sum_le_sum fun j hj => ?_ rcases @eq_zero_or_pos _ _ j with (rfl | hj) · simp only [Nat.cast_zero, zero_pow', Ne.def, bit0_eq_zero, Nat.one_ne_zero, - not_false_iff, div_zero, MulZeroClass.zero_mul] + not_false_iff, div_zero, zero_mul] simp only [Nat.cast_zero, truncation_zero, variance_zero, mul_zero, le_rfl] apply mul_le_mul_of_nonneg_right _ (variance_nonneg _ _) convert sum_div_nat_floor_pow_sq_le_div_sq N (Nat.cast_pos.2 hj) c_one using 2 diff --git a/Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean b/Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean index 73e9daaab4a9f..373d20302dca7 100644 --- a/Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean +++ b/Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean @@ -226,7 +226,7 @@ theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) : · intro a b x ha hb hx simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add, diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b, - MulZeroClass.zero_mul, single_zero] -/ + zero_mul, single_zero] -/ · rw [TensorProduct.tmul_zero, map_zero, map_zero] · intro _ _ _ _ _ hx rw [TensorProduct.tmul_add, map_add, map_add, hx] @@ -243,7 +243,7 @@ theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) : · simp only [TensorProduct.zero_tmul, map_zero] · intro a b x ha hb hx simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single, - TensorProduct.add_tmul, Finsupp.sum_single_index, MulZeroClass.zero_mul, single_zero] -/ + TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/ · rw [TensorProduct.zero_tmul, map_zero, map_zero] · intro _ _ _ _ _ hx rw [TensorProduct.add_tmul, map_add, map_add, hx] diff --git a/Mathlib/RingTheory/AdjoinRoot.lean b/Mathlib/RingTheory/AdjoinRoot.lean index 4494c15f3ccc7..30ac02ac2ad92 100644 --- a/Mathlib/RingTheory/AdjoinRoot.lean +++ b/Mathlib/RingTheory/AdjoinRoot.lean @@ -273,7 +273,7 @@ def lift (i : R →+* S) (x : S) (h : f.eval₂ i x = 0) : AdjoinRoot f →+* S apply Ideal.Quotient.lift _ (eval₂RingHom i x) intro g H rcases mem_span_singleton.1 H with ⟨y, hy⟩ - rw [hy, RingHom.map_mul, coe_eval₂RingHom, h, MulZeroClass.zero_mul] + rw [hy, RingHom.map_mul, coe_eval₂RingHom, h, zero_mul] #align adjoin_root.lift AdjoinRoot.lift variable {i : R →+* S} {a : S} (h : f.eval₂ i a = 0) @@ -544,7 +544,7 @@ theorem isIntegral_root (hf : f ≠ 0) : IsIntegral K (root f) := theorem minpoly_root (hf : f ≠ 0) : minpoly K (root f) = f * C f.leadingCoeff⁻¹ := by have f'_monic : Monic _ := monic_mul_leadingCoeff_inv hf refine' (minpoly.unique K _ f'_monic _ _).symm - · rw [AlgHom.map_mul, aeval_eq, mk_self, MulZeroClass.zero_mul] + · rw [AlgHom.map_mul, aeval_eq, mk_self, zero_mul] intro q q_monic q_aeval have commutes : (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval).comp (mk q) = mk f := by ext diff --git a/Mathlib/RingTheory/Algebraic.lean b/Mathlib/RingTheory/Algebraic.lean index 48e6290069cc3..018a122326783 100644 --- a/Mathlib/RingTheory/Algebraic.lean +++ b/Mathlib/RingTheory/Algebraic.lean @@ -189,7 +189,7 @@ theorem isAlgebraic_iff_isIntegral {x : A} : IsAlgebraic K x ↔ IsIntegral K x refine' ⟨_, IsIntegral.isAlgebraic K⟩ rintro ⟨p, hp, hpx⟩ refine' ⟨_, monic_mul_leadingCoeff_inv hp, _⟩ - rw [← aeval_def, AlgHom.map_mul, hpx, MulZeroClass.zero_mul] + rw [← aeval_def, AlgHom.map_mul, hpx, zero_mul] #align is_algebraic_iff_is_integral isAlgebraic_iff_isIntegral protected theorem Algebra.isAlgebraic_iff_isIntegral : @@ -383,7 +383,7 @@ theorem inv_eq_of_root_of_coeff_zero_ne_zero {x : L} {p : K[X]} (aeval_eq : aeva rw [RingHom.map_zero] convert aeval_eq conv_rhs => rw [← divX_mul_X_add p] - rw [AlgHom.map_add, AlgHom.map_mul, h, MulZeroClass.zero_mul, zero_add, aeval_C] + rw [AlgHom.map_add, AlgHom.map_mul, h, zero_mul, zero_add, aeval_C] #align inv_eq_of_root_of_coeff_zero_ne_zero inv_eq_of_root_of_coeff_zero_ne_zero theorem Subalgebra.inv_mem_of_root_of_coeff_zero_ne_zero {x : A} {p : K[X]} diff --git a/Mathlib/RingTheory/ClassGroup.lean b/Mathlib/RingTheory/ClassGroup.lean index 68e93f100d8dd..7b31e1b20d6be 100644 --- a/Mathlib/RingTheory/ClassGroup.lean +++ b/Mathlib/RingTheory/ClassGroup.lean @@ -310,7 +310,7 @@ theorem ClassGroup.mk0_eq_mk0_iff [IsDedekindDomain R] {I J : (Ideal R)⁰} : have hy' : y ∈ R⁰ := mem_nonZeroDivisors_iff_ne_zero.mpr hy refine ⟨IsLocalization.mk' _ x ⟨y, hy'⟩, ?_, ?_⟩ · contrapose! hx - rwa [mk'_eq_iff_eq_mul, MulZeroClass.zero_mul, ← (algebraMap R (FractionRing R)).map_zero, + rwa [mk'_eq_iff_eq_mul, zero_mul, ← (algebraMap R (FractionRing R)).map_zero, (IsFractionRing.injective R (FractionRing R)).eq_iff] at hx · exact (FractionalIdeal.mk'_mul_coeIdeal_eq_coeIdeal _ hy').mpr h #align class_group.mk0_eq_mk0_iff ClassGroup.mk0_eq_mk0_iff diff --git a/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean b/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean index 8f2fb5f8bcfeb..074c3feec6c9b 100644 --- a/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean +++ b/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean @@ -165,9 +165,9 @@ theorem IntValuation.map_mul' (x y : R) : v.intValuationDef (x * y) = v.intValuationDef x * v.intValuationDef y := by simp only [intValuationDef] by_cases hx : x = 0 - · rw [hx, MulZeroClass.zero_mul, if_pos (Eq.refl _), MulZeroClass.zero_mul] + · rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul] · by_cases hy : y = 0 - · rw [hy, MulZeroClass.mul_zero, if_pos (Eq.refl _), MulZeroClass.mul_zero] + · rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero] · rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithZero.coe_mul, WithZero.coe_inj, ← ofAdd_add, ← Ideal.span_singleton_mul_span_singleton, ← Associates.mk_mul_mk, ← neg_add, Associates.count_mul (by apply Associates.mk_ne_zero'.mpr hx) diff --git a/Mathlib/RingTheory/DedekindDomain/Ideal.lean b/Mathlib/RingTheory/DedekindDomain/Ideal.lean index b3ed151c29711..2b46d6084883d 100644 --- a/Mathlib/RingTheory/DedekindDomain/Ideal.lean +++ b/Mathlib/RingTheory/DedekindDomain/Ideal.lean @@ -575,7 +575,7 @@ theorem mul_left_strictMono [IsDedekindDomain A] {I : FractionalIdeal A⁰ K} (h protected theorem div_eq_mul_inv [IsDedekindDomain A] (I J : FractionalIdeal A⁰ K) : I / J = I * J⁻¹ := by by_cases hJ : J = 0 - · rw [hJ, div_zero, inv_zero', MulZeroClass.mul_zero] + · rw [hJ, div_zero, inv_zero', mul_zero] refine' le_antisymm ((mul_right_le_iff hJ).mp _) ((le_div_iff_mul_le hJ).mpr _) · rw [mul_assoc, mul_comm J⁻¹, FractionalIdeal.mul_inv_cancel hJ, mul_one, mul_le] intro x hx y hy @@ -804,7 +804,7 @@ theorem Ideal.exist_integer_multiples_not_mem {J : Ideal A} (hJ : J ≠ ⊤) {ι -- then `a` is actually an element of `J / I`, contradiction. refine' (mem_div_iff_of_nonzero hI0).mpr fun y hy => Submodule.span_induction hy _ _ _ _ · rintro _ ⟨i, hi, rfl⟩; exact hpI i hi - · rw [MulZeroClass.mul_zero]; exact Submodule.zero_mem _ + · rw [mul_zero]; exact Submodule.zero_mem _ · intro x y hx hy; rw [mul_add]; exact Submodule.add_mem _ hx hy · intro b x hx; rw [mul_smul_comm]; exact Submodule.smul_mem _ b hx -- To show the inclusion of `J / I` into `I⁻¹ = 1 / I`, note that `J < I`. @@ -1237,7 +1237,7 @@ theorem Ideal.le_mul_of_no_prime_factors {I J K : Ideal R} (coprime : ∀ P, J ≤ P → K ≤ P → ¬IsPrime P) (hJ : I ≤ J) (hK : I ≤ K) : I ≤ J * K := by simp only [← Ideal.dvd_iff_le] at coprime hJ hK ⊢ by_cases hJ0 : J = 0 - · simpa only [hJ0, MulZeroClass.zero_mul] using hJ + · simpa only [hJ0, zero_mul] using hJ obtain ⟨I', rfl⟩ := hK rw [mul_comm] refine mul_dvd_mul_left K diff --git a/Mathlib/RingTheory/Discriminant.lean b/Mathlib/RingTheory/Discriminant.lean index 24d5306856969..af4a8c40634ac 100644 --- a/Mathlib/RingTheory/Discriminant.lean +++ b/Mathlib/RingTheory/Discriminant.lean @@ -98,7 +98,7 @@ theorem discr_zero_of_not_linearIndependent [IsDomain A] {b : ι → B} intro j; simp [mul_comm] simp only [mulVec, dotProduct, traceMatrix_apply, Pi.zero_apply, traceForm_apply, fun j => - this j, ← LinearMap.map_sum, ← sum_mul, hg, MulZeroClass.zero_mul, LinearMap.map_zero] + this j, ← LinearMap.map_sum, ← sum_mul, hg, zero_mul, LinearMap.map_zero] by_contra h rw [discr_def] at h simp [Matrix.eq_zero_of_mulVec_eq_zero h this] at hi diff --git a/Mathlib/RingTheory/EisensteinCriterion.lean b/Mathlib/RingTheory/EisensteinCriterion.lean index 673ba1841f75f..53367534c7a24 100644 --- a/Mathlib/RingTheory/EisensteinCriterion.lean +++ b/Mathlib/RingTheory/EisensteinCriterion.lean @@ -37,7 +37,7 @@ theorem map_eq_C_mul_X_pow_of_forall_coeff_mem {f : R[X]} {P : Ideal R} · simp [hf0] rcases lt_trichotomy (n : WithBot ℕ) (degree f) with (h | h | h) · erw [coeff_map, eq_zero_iff_mem.2 (hfP n h), coeff_C_mul, coeff_X_pow, if_neg, - MulZeroClass.mul_zero] + mul_zero] rintro rfl exact not_lt_of_ge degree_le_natDegree h · have : natDegree f = n := natDegree_eq_of_degree_eq_some h.symm @@ -67,7 +67,7 @@ theorem eval_zero_mem_ideal_of_eq_mul_X_pow {n : ℕ} {P : Ideal R} {q : R[X]} rw [← coeff_zero_eq_eval_zero, ← eq_zero_iff_mem, ← coeff_map, hq, --Porting note: why is this lemma required twice? coeff_zero_eq_eval_zero, coeff_zero_eq_eval_zero, - eval_mul, eval_pow, eval_X, zero_pow hn0, MulZeroClass.mul_zero] + eval_mul, eval_pow, eval_X, zero_pow hn0, mul_zero] set_option linter.uppercaseLean3 false in #align polynomial.eisenstein_criterion_aux.eval_zero_mem_ideal_of_eq_mul_X_pow Polynomial.EisensteinCriterionAux.eval_zero_mem_ideal_of_eq_mul_X_pow @@ -112,9 +112,9 @@ theorem irreducible_of_eisenstein_criterion {f : R[X]} {P : Ideal R} (hP : P.IsP (eval_zero_mem_ideal_of_eq_mul_X_pow hq hn0) have hpql0 : (mk P) (p * q).leadingCoeff ≠ 0 := by rwa [Ne.def, eq_zero_iff_mem] have hp0 : p ≠ 0 := fun h => by - simp_all only [MulZeroClass.zero_mul, eq_self_iff_true, not_true, Ne.def] + simp_all only [zero_mul, eq_self_iff_true, not_true, Ne.def] have hq0 : q ≠ 0 := fun h => by - simp_all only [eq_self_iff_true, not_true, Ne.def, MulZeroClass.mul_zero] + simp_all only [eq_self_iff_true, not_true, Ne.def, mul_zero] have hbc0 : degree b = 0 ∧ degree c = 0 := by apply_fun degree at hbc rwa [degree_C hpql0, degree_mul, eq_comm, Nat.WithBot.add_eq_zero_iff] at hbc diff --git a/Mathlib/RingTheory/FractionalIdeal.lean b/Mathlib/RingTheory/FractionalIdeal.lean index 3c6da54d1ccd7..cef26cdc017c8 100644 --- a/Mathlib/RingTheory/FractionalIdeal.lean +++ b/Mathlib/RingTheory/FractionalIdeal.lean @@ -1118,7 +1118,7 @@ theorem mem_div_iff_of_nonzero {I J : FractionalIdeal R₁⁰ K} (h : J ≠ 0) { theorem mul_one_div_le_one {I : FractionalIdeal R₁⁰ K} : I * (1 / I) ≤ 1 := by by_cases hI : I = 0 - · rw [hI, div_zero, MulZeroClass.mul_zero] + · rw [hI, div_zero, mul_zero] exact zero_le 1 · rw [← coe_le_coe, coe_mul, coe_div hI, coe_one] apply Submodule.mul_one_div_le_one @@ -1127,7 +1127,7 @@ theorem mul_one_div_le_one {I : FractionalIdeal R₁⁰ K} : I * (1 / I) ≤ 1 : theorem le_self_mul_one_div {I : FractionalIdeal R₁⁰ K} (hI : I ≤ (1 : FractionalIdeal R₁⁰ K)) : I ≤ I * (1 / I) := by by_cases hI_nz : I = 0 - · rw [hI_nz, div_zero, MulZeroClass.mul_zero] + · rw [hI_nz, div_zero, mul_zero] · rw [← coe_le_coe, coe_mul, coe_div hI_nz, coe_one] rw [← coe_le_coe, coe_one] at hI exact Submodule.le_self_mul_one_div hI @@ -1469,7 +1469,7 @@ theorem div_spanSingleton (J : FractionalIdeal R₁⁰ K) (d : K) : J / spanSingleton R₁⁰ d = spanSingleton R₁⁰ d⁻¹ * J := by rw [← one_div_spanSingleton] by_cases hd : d = 0 - · simp only [hd, spanSingleton_zero, div_zero, MulZeroClass.zero_mul] + · simp only [hd, spanSingleton_zero, div_zero, zero_mul] have h_spand : spanSingleton R₁⁰ d ≠ 0 := mt spanSingleton_eq_zero_iff.mp hd apply le_antisymm · intro x hx @@ -1574,7 +1574,7 @@ theorem isNoetherian_spanSingleton_inv_to_map_mul (x : R₁) {I : FractionalIdea (hI : IsNoetherian R₁ I) : IsNoetherian R₁ (spanSingleton R₁⁰ (algebraMap R₁ K x)⁻¹ * I : FractionalIdeal R₁⁰ K) := by by_cases hx : x = 0 - · rw [hx, RingHom.map_zero, inv_zero, spanSingleton_zero, MulZeroClass.zero_mul] + · rw [hx, RingHom.map_zero, inv_zero, spanSingleton_zero, zero_mul] exact isNoetherian_zero have h_gx : algebraMap R₁ K x ≠ 0 := mt ((injective_iff_map_eq_zero (algebraMap R₁ K)).mp (IsFractionRing.injective _ _) x) hx diff --git a/Mathlib/RingTheory/FreeCommRing.lean b/Mathlib/RingTheory/FreeCommRing.lean index 1157bea749446..340451f07ed29 100644 --- a/Mathlib/RingTheory/FreeCommRing.lean +++ b/Mathlib/RingTheory/FreeCommRing.lean @@ -247,7 +247,7 @@ theorem isSupported_of {p} {s : Set α} : IsSupported (of p) s ↔ p ∈ s := rw [RingHom.map_neg, RingHom.map_one, Int.cast_neg, Int.cast_one] · rintro _ ⟨z, hzs, rfl⟩ _ _ use 0 - rw [RingHom.map_mul, lift_of, if_pos hzs, MulZeroClass.zero_mul] + rw [RingHom.map_mul, lift_of, if_pos hzs, zero_mul] norm_cast · rintro x y ⟨q, hq⟩ ⟨r, hr⟩ refine' ⟨q + r, _⟩ diff --git a/Mathlib/RingTheory/GradedAlgebra/Basic.lean b/Mathlib/RingTheory/GradedAlgebra/Basic.lean index 616cc484b72e0..24cc4f3b31072 100644 --- a/Mathlib/RingTheory/GradedAlgebra/Basic.lean +++ b/Mathlib/RingTheory/GradedAlgebra/Basic.lean @@ -268,10 +268,10 @@ def GradedRing.projZeroRingHom : A →+* A where rfl map_mul' := by refine' DirectSum.Decomposition.inductionOn 𝒜 (fun x => _) _ _ - · simp only [MulZeroClass.zero_mul, decompose_zero, zero_apply, ZeroMemClass.coe_zero] + · simp only [zero_mul, decompose_zero, zero_apply, ZeroMemClass.coe_zero] · rintro i ⟨c, hc⟩ refine' DirectSum.Decomposition.inductionOn 𝒜 _ _ _ - · simp only [MulZeroClass.mul_zero, decompose_zero, zero_apply, ZeroMemClass.coe_zero] + · simp only [mul_zero, decompose_zero, zero_apply, ZeroMemClass.coe_zero] · rintro j ⟨c', hc'⟩ · simp only [Subtype.coe_mk] by_cases h : i + j = 0 @@ -281,8 +281,8 @@ def GradedRing.projZeroRingHom : A →+* A where decompose_of_mem_same 𝒜 (show c' ∈ 𝒜 0 from (add_eq_zero_iff.mp h).2 ▸ hc')] · rw [decompose_of_mem_ne 𝒜 (SetLike.GradedMul.mul_mem hc hc') h] cases' show i ≠ 0 ∨ j ≠ 0 by rwa [add_eq_zero_iff, not_and_or] at h with h' h' - · simp only [decompose_of_mem_ne 𝒜 hc h', MulZeroClass.zero_mul] - · simp only [decompose_of_mem_ne 𝒜 hc' h', MulZeroClass.mul_zero] + · simp only [decompose_of_mem_ne 𝒜 hc h', zero_mul] + · simp only [decompose_of_mem_ne 𝒜 hc' h', mul_zero] · intro _ _ hd he simp only at hd he -- Porting note: added simp only [mul_add, decompose_add, add_apply, AddMemClass.coe_add, hd, he] diff --git a/Mathlib/RingTheory/HahnSeries.lean b/Mathlib/RingTheory/HahnSeries.lean index e16ebc58245dd..72590f46d23f2 100644 --- a/Mathlib/RingTheory/HahnSeries.lean +++ b/Mathlib/RingTheory/HahnSeries.lean @@ -644,7 +644,7 @@ theorem mul_coeff_right' [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} { apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_right hys) _ fun _ _ => rfl intro b hb simp only [not_and, mem_sdiff, mem_addAntidiagonal, mem_support, not_imp_not] at hb - rw [hb.2 hb.1.1 hb.1.2.2, MulZeroClass.mul_zero] + rw [hb.2 hb.1.1 hb.1.2.2, mul_zero] #align hahn_series.mul_coeff_right' HahnSeries.mul_coeff_right' theorem mul_coeff_left' [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} {a : Γ} {s : Set Γ} @@ -655,7 +655,7 @@ theorem mul_coeff_left' [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} {a apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_left hxs) _ fun _ _ => rfl intro b hb simp only [not_and', mem_sdiff, mem_addAntidiagonal, mem_support, not_ne_iff] at hb - rw [hb.2 ⟨hb.1.2.1, hb.1.2.2⟩, MulZeroClass.zero_mul] + rw [hb.2 ⟨hb.1.2.1, hb.1.2.2⟩, zero_mul] #align hahn_series.mul_coeff_left' HahnSeries.mul_coeff_left' instance [NonUnitalNonAssocSemiring R] : Distrib (HahnSeries Γ R) := @@ -690,7 +690,7 @@ theorem single_mul_coeff_add [NonUnitalNonAssocSemiring R] {r : R} {x : HahnSeri · simp [hr, mul_coeff] simp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne.def, not_false_iff, smul_eq_mul] by_cases hx : x.coeff a = 0 - · simp only [hx, MulZeroClass.mul_zero] + · simp only [hx, mul_zero] rw [sum_congr _ fun _ _ => rfl, sum_empty] ext ⟨a1, a2⟩ simp only [not_mem_empty, not_and, Set.mem_singleton_iff, Classical.not_not, @@ -719,7 +719,7 @@ theorem mul_single_coeff_add [NonUnitalNonAssocSemiring R] {r : R} {x : HahnSeri · simp [hr, mul_coeff] simp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne.def, not_false_iff, smul_eq_mul] by_cases hx : x.coeff a = 0 - · simp only [hx, MulZeroClass.zero_mul] + · simp only [hx, zero_mul] rw [sum_congr _ fun _ _ => rfl, sum_empty] ext ⟨a1, a2⟩ simp only [not_mem_empty, not_and, Set.mem_singleton_iff, Classical.not_not, @@ -1595,8 +1595,8 @@ theorem smul_apply {x : HahnSeries Γ R} {s : SummableFamily Γ R α} {a : α} : instance : Module (HahnSeries Γ R) (SummableFamily Γ R α) where smul := (· • ·) - smul_zero _ := ext fun _ => MulZeroClass.mul_zero _ - zero_smul _ := ext fun _ => MulZeroClass.zero_mul _ + smul_zero _ := ext fun _ => mul_zero _ + zero_smul _ := ext fun _ => zero_mul _ one_smul _ := ext fun _ => one_mul _ add_smul _ _ _ := ext fun _ => add_mul _ _ _ smul_add _ _ _ := ext fun _ => mul_add _ _ _ @@ -1615,12 +1615,12 @@ theorem hsum_smul {x : HahnSeries Γ R} {s : SummableFamily Γ R α} : (x • s) (Set.subset_iUnion (fun j => support (toFun s j)) a)) _ rintro ⟨i, j⟩ hU ha rw [mem_addAntidiagonal] at * - rw [Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, MulZeroClass.mul_zero] + rw [Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, mul_zero] · rintro ⟨i, j⟩ _ refine' (s.finite_co_support j).subset _ simp_rw [Function.support_subset_iff', Function.mem_support, Classical.not_not] intro a ha - rw [ha, MulZeroClass.mul_zero] + rw [ha, mul_zero] · refine' (sum_congr rfl _).trans (sum_subset (addAntidiagonal_mono_right _) _).symm · rintro ⟨i, j⟩ _ rw [mul_finsum] @@ -1632,7 +1632,7 @@ theorem hsum_smul {x : HahnSeries Γ R} {s : SummableFamily Γ R α} : (x • s) · rintro ⟨i, j⟩ hU ha rw [mem_addAntidiagonal] at * rw [← hsum_coeff, Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, - MulZeroClass.mul_zero] + mul_zero] #align hahn_series.summable_family.hsum_smul HahnSeries.SummableFamily.hsum_smul /-- The summation of a `summable_family` as a `LinearMap`. -/ diff --git a/Mathlib/RingTheory/Henselian.lean b/Mathlib/RingTheory/Henselian.lean index d80ec73d5b80a..3c9697135ee6d 100644 --- a/Mathlib/RingTheory/Henselian.lean +++ b/Mathlib/RingTheory/Henselian.lean @@ -216,7 +216,7 @@ instance (priority := 100) IsAdicComplete.henselianRing (R : Type*) [CommRing R] Finset.sum_range_add_sum_Ico _ (Nat.le_add_left _ _)] swap · intro i - rw [MulZeroClass.zero_mul] + rw [zero_mul] refine' Ideal.add_mem _ _ _ · erw [Finset.sum_range_succ] rw [Finset.range_one, Finset.sum_singleton, diff --git a/Mathlib/RingTheory/Ideal/Norm.lean b/Mathlib/RingTheory/Ideal/Norm.lean index 0f4bf66adfe11..74c99b49893a1 100644 --- a/Mathlib/RingTheory/Ideal/Norm.lean +++ b/Mathlib/RingTheory/Ideal/Norm.lean @@ -116,9 +116,9 @@ theorem cardQuot_mul_of_coprime [IsDedekindDomain S] [Module.Free ℤ S] [Module exact not_nontrivial_iff_subsingleton.mpr ‹Subsingleton S› ‹Nontrivial S› haveI : Infinite S := Infinite.of_surjective _ b.repr.toEquiv.surjective by_cases hI : I = ⊥ - · rw [hI, Submodule.bot_mul, cardQuot_bot, MulZeroClass.zero_mul] + · rw [hI, Submodule.bot_mul, cardQuot_bot, zero_mul] by_cases hJ : J = ⊥ - · rw [hJ, Submodule.mul_bot, cardQuot_bot, MulZeroClass.mul_zero] + · rw [hJ, Submodule.mul_bot, cardQuot_bot, mul_zero] have hIJ : I * J ≠ ⊥ := mt Ideal.mul_eq_bot.mp (not_or_of_not hI hJ) letI := Classical.decEq (Module.Free.ChooseBasisIndex ℤ S) letI := I.fintypeQuotientOfFreeOfNeBot hI diff --git a/Mathlib/RingTheory/IntegralClosure.lean b/Mathlib/RingTheory/IntegralClosure.lean index c753472be5724..42ac5a6e21b26 100644 --- a/Mathlib/RingTheory/IntegralClosure.lean +++ b/Mathlib/RingTheory/IntegralClosure.lean @@ -230,7 +230,7 @@ theorem FG_adjoin_singleton_of_integral (x : A) (hx : IsIntegral R x) : rcases(aeval x).mem_range.mp hr with ⟨p, rfl⟩ rw [← modByMonic_add_div p hfm] rw [← aeval_def] at hfx - rw [AlgHom.map_add, AlgHom.map_mul, hfx, MulZeroClass.zero_mul, add_zero] + rw [AlgHom.map_add, AlgHom.map_mul, hfx, zero_mul, add_zero] have : degree (p %ₘ f) ≤ degree f := degree_modByMonic_le p hfm generalize p %ₘ f = q at this ⊢ rw [← sum_C_mul_X_pow_eq q, aeval_def, eval₂_sum, sum_def] @@ -707,7 +707,7 @@ theorem IsIntegral.tmul (x : A) {y : B} (h : IsIntegral R y) : IsIntegral A (x Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul] · simp only [Algebra.TensorProduct.includeLeftRingHom_apply, Algebra.TensorProduct.tmul_pow, one_pow] - convert (MulZeroClass.mul_zero (M₀ := A ⊗[R] B) _).symm + convert (mul_zero (M₀ := A ⊗[R] B) _).symm erw [Polynomial.eval₂_map, Algebra.TensorProduct.includeLeftRingHom_comp_algebraMap, ← Polynomial.eval₂_map] convert Polynomial.eval₂_at_apply @@ -729,7 +729,7 @@ theorem normalizeScaleRoots_coeff_mul_leadingCoeff_pow (i : ℕ) (hp : 1 ≤ nat (normalizeScaleRoots p).coeff i * p.leadingCoeff ^ i = p.coeff i * p.leadingCoeff ^ (p.natDegree - 1) := by simp only [normalizeScaleRoots, finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq', one_mul, - MulZeroClass.zero_mul, mem_support_iff, ite_mul, Ne.def, ite_not] + zero_mul, mem_support_iff, ite_mul, Ne.def, ite_not] split_ifs with h₁ h₂ · simp [h₁] · rw [h₂, leadingCoeff, ← pow_succ, tsub_add_cancel_of_le hp] @@ -801,11 +801,11 @@ theorem RingHom.isIntegralElem_leadingCoeff_mul (h : p.eval₂ f x = 0) : rw [h'', natDegree_zero] at h' exact Nat.not_succ_le_zero 0 h' use normalizeScaleRoots_monic p this - rw [normalizeScaleRoots_eval₂_leadingCoeff_mul p h' f x, h, MulZeroClass.mul_zero] + rw [normalizeScaleRoots_eval₂_leadingCoeff_mul p h' f x, h, mul_zero] · by_cases hp : p.map f = 0 · apply_fun fun q => coeff q p.natDegree at hp rw [coeff_map, coeff_zero, coeff_natDegree] at hp - rw [hp, MulZeroClass.zero_mul] + rw [hp, zero_mul] exact f.is_integral_zero · rw [Nat.one_le_iff_ne_zero, Classical.not_not] at h' rw [eq_C_of_natDegree_eq_zero h', eval₂_C] at h diff --git a/Mathlib/RingTheory/IntegralDomain.lean b/Mathlib/RingTheory/IntegralDomain.lean index 7db824375d11b..dab793a51b446 100644 --- a/Mathlib/RingTheory/IntegralDomain.lean +++ b/Mathlib/RingTheory/IntegralDomain.lean @@ -270,7 +270,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 by dsimp at hn ⊢; rw [← pow_eq_mod_orderOf, hn]⟩) _ = 0 := ?_ - rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul] + rw [← mul_left_inj' hx1, zero_mul, geom_sum_mul] norm_cast simp [pow_orderOf_eq_one] #align sum_hom_units_eq_zero sum_hom_units_eq_zero diff --git a/Mathlib/RingTheory/IsAdjoinRoot.lean b/Mathlib/RingTheory/IsAdjoinRoot.lean index 788e2d3860310..305e2c8b02a92 100644 --- a/Mathlib/RingTheory/IsAdjoinRoot.lean +++ b/Mathlib/RingTheory/IsAdjoinRoot.lean @@ -204,7 +204,7 @@ theorem eval₂_repr_eq_eval₂_of_map_eq (h : IsAdjoinRoot S f) (z : S) (w : R[ (hzw : h.map w = z) : (h.repr z).eval₂ i x = w.eval₂ i x := by rw [eq_comm, ← sub_eq_zero, ← h.map_repr z, ← map_sub, h.map_eq_zero_iff] at hzw obtain ⟨y, hy⟩ := hzw - rw [← sub_eq_zero, ← eval₂_sub, hy, eval₂_mul, hx, MulZeroClass.zero_mul] + rw [← sub_eq_zero, ← eval₂_sub, hy, eval₂_mul, hx, zero_mul] #align is_adjoin_root.eval₂_repr_eq_eval₂_of_map_eq IsAdjoinRoot.eval₂_repr_eq_eval₂_of_map_eq variable (i x) diff --git a/Mathlib/RingTheory/IsTensorProduct.lean b/Mathlib/RingTheory/IsTensorProduct.lean index 55f6b89281c4f..30ecca9441779 100644 --- a/Mathlib/RingTheory/IsTensorProduct.lean +++ b/Mathlib/RingTheory/IsTensorProduct.lean @@ -445,7 +445,7 @@ noncomputable def Algebra.pushoutDesc [H : Algebra.IsPushout R S R' S'] {A : Typ rw [← (algebraMap R' S').map_one, this, g.map_one] · intro x y refine H.out.inductionOn x ?_ ?_ ?_ ?_ - · rw [MulZeroClass.zero_mul, map_zero, MulZeroClass.zero_mul] + · rw [zero_mul, map_zero, zero_mul] rotate_left · intro s s' e dsimp only [LinearMap.restrictScalars_apply] at e ⊢ @@ -457,7 +457,7 @@ noncomputable def Algebra.pushoutDesc [H : Algebra.IsPushout R S R' S'] {A : Typ dsimp rw [this] refine H.out.inductionOn y ?_ ?_ ?_ ?_ - · rw [MulZeroClass.mul_zero, map_zero, MulZeroClass.mul_zero] + · rw [mul_zero, map_zero, mul_zero] · intro y dsimp rw [← _root_.map_mul, this, this, _root_.map_mul] diff --git a/Mathlib/RingTheory/Kaehler.lean b/Mathlib/RingTheory/Kaehler.lean index 836e882591c7e..3a05652a6c7cd 100644 --- a/Mathlib/RingTheory/Kaehler.lean +++ b/Mathlib/RingTheory/Kaehler.lean @@ -72,13 +72,13 @@ theorem Derivation.tensorProductTo_mul (D : Derivation R S M) (x y : S ⊗[R] S) TensorProduct.lmul' (S := S) R x • D.tensorProductTo y + TensorProduct.lmul' (S := S) R y • D.tensorProductTo x := by refine TensorProduct.induction_on x ?_ ?_ ?_ - · rw [MulZeroClass.zero_mul, map_zero, map_zero, zero_smul, smul_zero, add_zero] + · rw [zero_mul, map_zero, map_zero, zero_smul, smul_zero, add_zero] swap · intro x₁ y₁ h₁ h₂ rw [add_mul, map_add, map_add, map_add, add_smul, smul_add, h₁, h₂, add_add_add_comm] intro x₁ x₂ refine TensorProduct.induction_on y ?_ ?_ ?_ - · rw [MulZeroClass.mul_zero, map_zero, map_zero, zero_smul, smul_zero, add_zero] + · rw [mul_zero, map_zero, map_zero, zero_smul, smul_zero, add_zero] swap · intro x₁ y₁ h₁ h₂ rw [mul_add, map_add, map_add, map_add, add_smul, smul_add, h₁, h₂, add_add_add_comm] diff --git a/Mathlib/RingTheory/LocalProperties.lean b/Mathlib/RingTheory/LocalProperties.lean index 13232fcc566f2..35b8347cfffef 100644 --- a/Mathlib/RingTheory/LocalProperties.lean +++ b/Mathlib/RingTheory/LocalProperties.lean @@ -301,14 +301,14 @@ theorem localization_isReduced : LocalizationPreserves fun R hR => IsReduced R : obtain ⟨⟨y, m⟩, hx⟩ := IsLocalization.surj M x dsimp only at hx let hx' := congr_arg (· ^ n.succ) hx - simp only [mul_pow, e, MulZeroClass.zero_mul, ← RingHom.map_pow] at hx' + simp only [mul_pow, e, zero_mul, ← RingHom.map_pow] at hx' rw [← (algebraMap R S).map_zero] at hx' obtain ⟨m', hm'⟩ := (IsLocalization.eq_iff_exists M S).mp hx' apply_fun (· * (m' : R) ^ n) at hm' - simp only [mul_assoc, MulZeroClass.zero_mul, MulZeroClass.mul_zero] at hm' + simp only [mul_assoc, zero_mul, mul_zero] at hm' rw [← mul_left_comm, ← pow_succ, ← mul_pow] at hm' replace hm' := IsNilpotent.eq_zero ⟨_, hm'.symm⟩ - rw [← (IsLocalization.map_units S m).mul_left_inj, hx, MulZeroClass.zero_mul, + rw [← (IsLocalization.map_units S m).mul_left_inj, hx, zero_mul, IsLocalization.map_eq_zero_iff M] exact ⟨m', by rw [← hm', mul_comm]⟩ #align localization_is_reduced localization_isReduced diff --git a/Mathlib/RingTheory/Localization/Integral.lean b/Mathlib/RingTheory/Localization/Integral.lean index f481311537b8c..df1e8870497e6 100644 --- a/Mathlib/RingTheory/Localization/Integral.lean +++ b/Mathlib/RingTheory/Localization/Integral.lean @@ -109,7 +109,7 @@ theorem integerNormalization_eval₂_eq_zero (g : S →+* R') (p : S[X]) {x : R' (hx : eval₂ g x p = 0) : eval₂ (g.comp (algebraMap R S)) x (integerNormalization M p) = 0 := let ⟨b, hb⟩ := integerNormalization_map_to_map M p _root_.trans (eval₂_map (algebraMap R S) g x).symm - (by rw [hb, ← IsScalarTower.algebraMap_smul S (b : R) p, eval₂_smul, hx, MulZeroClass.mul_zero]) + (by rw [hb, ← IsScalarTower.algebraMap_smul S (b : R) p, eval₂_smul, hx, mul_zero]) #align is_localization.integer_normalization_eval₂_eq_zero IsLocalization.integerNormalization_eval₂_eq_zero theorem integerNormalization_aeval_eq_zero [Algebra R R'] [Algebra S R'] [IsScalarTower R S R'] @@ -200,7 +200,7 @@ theorem RingHom.isIntegralElem_localization_at_leadingCoeff {R S : Type*} [CommR · refine' monic_mul_C_of_leadingCoeff_mul_eq_one _ rwa [leadingCoeff_map_of_leadingCoeff_ne_zero (algebraMap R Rₘ)] refine' fun hfp => zero_ne_one - (_root_.trans (MulZeroClass.zero_mul b).symm (hfp ▸ hb) : (0 : Rₘ) = 1) + (_root_.trans (zero_mul b).symm (hfp ▸ hb) : (0 : Rₘ) = 1) · refine' eval₂_mul_eq_zero_of_left _ _ _ _ erw [eval₂_map, IsLocalization.map_comp, ← hom_eval₂ _ f (algebraMap S Sₘ) x] exact _root_.trans (congr_arg (algebraMap S Sₘ) hf) (RingHom.map_zero _) @@ -279,7 +279,7 @@ theorem IsLocalization.scaleRoots_commonDenom_mem_lifts (p : Rₘ[X]) · rw [← Algebra.smul_def] exact ⟨_, IsLocalization.map_integerMultiple M p.support p.coeff ⟨n, h₁⟩⟩ · rw [Polynomial.not_mem_support_iff] at h₁ - rw [h₁, MulZeroClass.zero_mul] + rw [h₁, zero_mul] exact zero_mem (algebraMap R Rₘ).range #align is_localization.scale_roots_common_denom_mem_lifts IsLocalization.scaleRoots_commonDenom_mem_lifts diff --git a/Mathlib/RingTheory/Localization/LocalizationLocalization.lean b/Mathlib/RingTheory/Localization/LocalizationLocalization.lean index 3dbdffc6c38c6..f097062c5520d 100644 --- a/Mathlib/RingTheory/Localization/LocalizationLocalization.lean +++ b/Mathlib/RingTheory/Localization/LocalizationLocalization.lean @@ -287,7 +287,7 @@ theorem isFractionRing_of_isLocalization (S T : Type*) [CommRing S] [CommRing T] rw [map_zero] apply hx rw [← (map_units S s).mul_left_inj, mul_assoc, e, ← map_mul, hz, map_zero, - MulZeroClass.zero_mul] + zero_mul] #align is_fraction_ring.is_fraction_ring_of_is_localization IsFractionRing.isFractionRing_of_isLocalization theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S] diff --git a/Mathlib/RingTheory/Localization/NumDen.lean b/Mathlib/RingTheory/Localization/NumDen.lean index d240e03cc3c76..391157d3daafb 100644 --- a/Mathlib/RingTheory/Localization/NumDen.lean +++ b/Mathlib/RingTheory/Localization/NumDen.lean @@ -93,7 +93,7 @@ theorem num_mul_den_eq_num_mul_den_iff_eq {x y : K} : #align is_fraction_ring.num_mul_denom_eq_num_mul_denom_iff_eq IsFractionRing.num_mul_den_eq_num_mul_den_iff_eq theorem eq_zero_of_num_eq_zero {x : K} (h : num A x = 0) : x = 0 := - num_mul_den_eq_num_iff_eq'.mp (by rw [MulZeroClass.zero_mul, h, RingHom.map_zero]) + num_mul_den_eq_num_iff_eq'.mp (by rw [zero_mul, h, RingHom.map_zero]) #align is_fraction_ring.eq_zero_of_num_eq_zero IsFractionRing.eq_zero_of_num_eq_zero theorem isInteger_of_isUnit_den {x : K} (h : IsUnit (den A x : A)) : IsInteger A x := by diff --git a/Mathlib/RingTheory/MvPolynomial/Homogeneous.lean b/Mathlib/RingTheory/MvPolynomial/Homogeneous.lean index d73343ae5581f..75de3d7aef968 100644 --- a/Mathlib/RingTheory/MvPolynomial/Homogeneous.lean +++ b/Mathlib/RingTheory/MvPolynomial/Homogeneous.lean @@ -95,7 +95,7 @@ theorem homogeneousSubmodule_mul [CommSemiring R] (m n : ℕ) : have aux : coeff d φ ≠ 0 ∧ coeff e ψ ≠ 0 := by contrapose! H by_cases h : coeff d φ = 0 <;> - simp_all only [Ne.def, not_false_iff, MulZeroClass.zero_mul, MulZeroClass.mul_zero] + simp_all only [Ne.def, not_false_iff, zero_mul, mul_zero] specialize hφ aux.1 specialize hψ aux.2 rw [Finsupp.mem_antidiagonal] at hde diff --git a/Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean b/Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean index f303ac9b322f7..c7058f553d4e5 100644 --- a/Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean +++ b/Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean @@ -184,7 +184,7 @@ theorem weightedHomogeneousSubmodule_mul (w : σ → M) (m n : M) : have aux : coeff d φ ≠ 0 ∧ coeff e ψ ≠ 0 := by contrapose! H by_cases h : coeff d φ = 0 <;> - simp_all only [Ne.def, not_false_iff, MulZeroClass.zero_mul, MulZeroClass.mul_zero] + simp_all only [Ne.def, not_false_iff, zero_mul, mul_zero] rw [← Finsupp.mem_antidiagonal.mp hde, ← hφ aux.1, ← hψ aux.2, map_add] #align mv_polynomial.weighted_homogeneous_submodule_mul MvPolynomial.weightedHomogeneousSubmodule_mul diff --git a/Mathlib/RingTheory/Nilpotent.lean b/Mathlib/RingTheory/Nilpotent.lean index 2ab298f10d667..c45a675986564 100644 --- a/Mathlib/RingTheory/Nilpotent.lean +++ b/Mathlib/RingTheory/Nilpotent.lean @@ -51,7 +51,7 @@ theorem IsNilpotent.mk [Zero R] [Pow R ℕ] (x : R) (n : ℕ) (e : x ^ n = 0) : theorem IsNilpotent.neg [Ring R] (h : IsNilpotent x) : IsNilpotent (-x) := by obtain ⟨n, hn⟩ := h use n - rw [neg_pow, hn, MulZeroClass.mul_zero] + rw [neg_pow, hn, mul_zero] #align is_nilpotent.neg IsNilpotent.neg @[simp] @@ -167,10 +167,10 @@ theorem isNilpotent_add (hx : IsNilpotent x) (hy : IsNilpotent y) : IsNilpotent rw [h_comm.add_pow'] apply Finset.sum_eq_zero rintro ⟨i, j⟩ hij - suffices x ^ i * y ^ j = 0 by simp only [this, nsmul_eq_mul, MulZeroClass.mul_zero] + suffices x ^ i * y ^ j = 0 by simp only [this, nsmul_eq_mul, mul_zero] cases' Nat.le_or_le_of_add_eq_add_pred (Finset.Nat.mem_antidiagonal.mp hij) with hi hj - · rw [pow_eq_zero_of_le hi hn, MulZeroClass.zero_mul] - · rw [pow_eq_zero_of_le hj hm, MulZeroClass.mul_zero] + · rw [pow_eq_zero_of_le hi hn, zero_mul] + · rw [pow_eq_zero_of_le hj hm, mul_zero] #align commute.is_nilpotent_add Commute.isNilpotent_add protected lemma isNilpotent_sum {ι : Type _} {s : Finset ι} {f : ι → R} @@ -188,7 +188,7 @@ protected lemma isNilpotent_sum {ι : Type _} {s : Finset ι} {f : ι → R} theorem isNilpotent_mul_left (h : IsNilpotent x) : IsNilpotent (x * y) := by obtain ⟨n, hn⟩ := h use n - rw [h_comm.mul_pow, hn, MulZeroClass.zero_mul] + rw [h_comm.mul_pow, hn, zero_mul] #align commute.is_nilpotent_mul_left Commute.isNilpotent_mul_left protected lemma isNilpotent_mul_left_iff (hy : y ∈ nonZeroDivisorsLeft R) : diff --git a/Mathlib/RingTheory/NonUnitalSubring/Basic.lean b/Mathlib/RingTheory/NonUnitalSubring/Basic.lean index e8d48a659c7be..78ea3c05a5929 100644 --- a/Mathlib/RingTheory/NonUnitalSubring/Basic.lean +++ b/Mathlib/RingTheory/NonUnitalSubring/Basic.lean @@ -719,12 +719,12 @@ theorem mem_closure_iff {s : Set R} {x} : (fun q hq => AddSubgroup.closure_induction hx (fun p hp => AddSubgroup.subset_closure ((Subsemigroup.closure s).mul_mem hp hq)) - (by rw [MulZeroClass.zero_mul q]; apply AddSubgroup.zero_mem _) + (by rw [zero_mul q]; apply AddSubgroup.zero_mem _) (fun p₁ p₂ ihp₁ ihp₂ => by rw [add_mul p₁ p₂ q]; apply AddSubgroup.add_mem _ ihp₁ ihp₂) fun x hx => by have f : -x * q = -(x * q) := by simp rw [f]; apply AddSubgroup.neg_mem _ hx) - (by rw [MulZeroClass.mul_zero x]; apply AddSubgroup.zero_mem _) + (by rw [mul_zero x]; apply AddSubgroup.zero_mem _) (fun q₁ q₂ ihq₁ ihq₂ => by rw [mul_add x q₁ q₂]; apply AddSubgroup.add_mem _ ihq₁ ihq₂) fun z hz => by have f : x * -z = -(x * z) := by simp @@ -745,8 +745,8 @@ def closureNonUnitalCommRingOfComm {R : Type u} [NonUnitalRing R] {s : Set R} simp only [NonUnitalSubring.val_mul] refine' closure_induction₂ x.prop y.prop hcomm - (fun x => by simp only [MulZeroClass.mul_zero, MulZeroClass.zero_mul]) - (fun x => by simp only [MulZeroClass.mul_zero, MulZeroClass.zero_mul]) + (fun x => by simp only [mul_zero, zero_mul]) + (fun x => by simp only [mul_zero, zero_mul]) (fun x y hxy => by simp only [mul_neg, neg_mul, hxy]) (fun x y hxy => by simp only [mul_neg, neg_mul, hxy]) (fun x₁ x₂ y h₁ h₂ => by simp only [add_mul, mul_add, h₁, h₂]) diff --git a/Mathlib/RingTheory/Nullstellensatz.lean b/Mathlib/RingTheory/Nullstellensatz.lean index f40a29de81986..bbee39eba3c09 100644 --- a/Mathlib/RingTheory/Nullstellensatz.lean +++ b/Mathlib/RingTheory/Nullstellensatz.lean @@ -66,7 +66,7 @@ def vanishingIdeal (V : Set (σ → k)) : Ideal (MvPolynomial σ k) where zero_mem' x _ := RingHom.map_zero _ add_mem' {p q} hp hq x hx := by simp only [hq x hx, hp x hx, add_zero, RingHom.map_add] smul_mem' p q hq x hx := by - simp only [hq x hx, Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, RingHom.map_mul] + simp only [hq x hx, Algebra.id.smul_eq_mul, mul_zero, RingHom.map_mul] #align mv_polynomial.vanishing_ideal MvPolynomial.vanishingIdeal @[simp] diff --git a/Mathlib/RingTheory/Perfection.lean b/Mathlib/RingTheory/Perfection.lean index e6c72908c7ac5..89683c38081e1 100644 --- a/Mathlib/RingTheory/Perfection.lean +++ b/Mathlib/RingTheory/Perfection.lean @@ -424,8 +424,8 @@ theorem preVal_zero : preVal K v O hv p 0 = 0 := theorem preVal_mul {x y : ModP K v O hv p} (hxy0 : x * y ≠ 0) : preVal K v O hv p (x * y) = preVal K v O hv p x * preVal K v O hv p y := by - have hx0 : x ≠ 0 := mt (by rintro rfl; rw [MulZeroClass.zero_mul]) hxy0 - have hy0 : y ≠ 0 := mt (by rintro rfl; rw [MulZeroClass.mul_zero]) hxy0 + have hx0 : x ≠ 0 := mt (by rintro rfl; rw [zero_mul]) hxy0 + have hy0 : y ≠ 0 := mt (by rintro rfl; rw [mul_zero]) hxy0 obtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective y rw [← RingHom.map_mul] at hxy0 ⊢ @@ -566,9 +566,9 @@ theorem valAux_one : valAux K v O hv p 1 = 1 := theorem valAux_mul (f g : PreTilt K v O hv p) : valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g := by by_cases hf : f = 0 - · rw [hf, MulZeroClass.zero_mul, valAux_zero, MulZeroClass.zero_mul] + · rw [hf, zero_mul, valAux_zero, zero_mul] by_cases hg : g = 0 - · rw [hg, MulZeroClass.mul_zero, valAux_zero, MulZeroClass.mul_zero] + · rw [hg, mul_zero, valAux_zero, mul_zero] obtain ⟨m, hm⟩ : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 fun h => hf <| Perfection.ext h obtain ⟨n, hn⟩ : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 fun h => hg <| Perfection.ext h replace hm := coeff_ne_zero_of_le hm (le_max_left m n) diff --git a/Mathlib/RingTheory/Polynomial/Basic.lean b/Mathlib/RingTheory/Polynomial/Basic.lean index 198a85d6a076f..8442ab91bebf2 100644 --- a/Mathlib/RingTheory/Polynomial/Basic.lean +++ b/Mathlib/RingTheory/Polynomial/Basic.lean @@ -178,7 +178,7 @@ theorem degreeLTEquiv_eq_zero_iff_eq_zero {n : ℕ} {p : R[X]} (hp : p ∈ degre theorem eval_eq_sum_degreeLTEquiv {n : ℕ} {p : R[X]} (hp : p ∈ degreeLT R n) (x : R) : p.eval x = ∑ i, degreeLTEquiv _ _ ⟨p, hp⟩ i * x ^ (i : ℕ) := by simp_rw [eval_eq_sum] - exact (sum_fin _ (by simp_rw [MulZeroClass.zero_mul, forall_const]) (mem_degreeLT.mp hp)).symm + exact (sum_fin _ (by simp_rw [zero_mul, forall_const]) (mem_degreeLT.mp hp)).symm #align polynomial.eval_eq_sum_degree_lt_equiv Polynomial.eval_eq_sum_degreeLTEquiv /-- The finset of nonzero coefficients of a polynomial. -/ @@ -919,7 +919,7 @@ protected theorem Polynomial.isNoetherianRing [inst : IsNoetherianRing R] : IsNo apply hp0 ext i refine' (mul_one _).symm.trans _ - rw [← h, MulZeroClass.mul_zero] + rw [← h, mul_zero] rfl haveI : Nontrivial R := ⟨⟨0, 1, this⟩⟩ have : p.leadingCoeff ∈ I.leadingCoeffNth N := by diff --git a/Mathlib/RingTheory/Polynomial/Bernstein.lean b/Mathlib/RingTheory/Polynomial/Bernstein.lean index 64aae19aa8c5f..202336a0aaf9e 100644 --- a/Mathlib/RingTheory/Polynomial/Bernstein.lean +++ b/Mathlib/RingTheory/Polynomial/Bernstein.lean @@ -111,7 +111,7 @@ theorem derivative_succ_aux (n ν : ℕ) : (↑(n + 1) : R[X]) * ((n.choose ν : R[X]) * X ^ ν * (1 - X) ^ (n - ν) - (n.choose (ν + 1) : R[X]) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1))) by simpa [Polynomial.derivative_pow, ← sub_eq_add_neg, Nat.succ_sub_succ_eq_sub, - Polynomial.derivative_mul, Polynomial.derivative_nat_cast, MulZeroClass.zero_mul, + Polynomial.derivative_mul, Polynomial.derivative_nat_cast, zero_mul, Nat.cast_add, algebraMap.coe_one, Polynomial.derivative_X, mul_one, zero_add, Polynomial.derivative_sub, Polynomial.derivative_one, zero_sub, mul_neg, Nat.sub_zero, bernsteinPolynomial, map_add, map_natCast, Nat.cast_one] @@ -330,7 +330,7 @@ theorem sum_smul (n : ℕ) : -- Step inside the sum: refine' Finset.sum_congr rfl fun k _ => (w k).trans _ simp only [pderiv_true_x, pderiv_true_y, Algebra.id.smul_eq_mul, nsmul_eq_mul, Bool.cond_true, - Bool.cond_false, add_zero, mul_one, MulZeroClass.mul_zero, smul_zero, MvPolynomial.aeval_X, + Bool.cond_false, add_zero, mul_one, mul_zero, smul_zero, MvPolynomial.aeval_X, MvPolynomial.pderiv_mul, Derivation.leibniz_pow, Derivation.map_coe_nat, map_natCast, map_pow, map_mul] · rw [(pderiv true).leibniz_pow, (pderiv true).map_add, pderiv_true_x, pderiv_true_y] @@ -370,7 +370,7 @@ theorem sum_mul_smul (n : ℕ) : -- Step inside the sum: refine' Finset.sum_congr rfl fun k _ => (w k).trans _ simp only [pderiv_true_x, pderiv_true_y, Algebra.id.smul_eq_mul, nsmul_eq_mul, Bool.cond_true, - Bool.cond_false, add_zero, zero_add, MulZeroClass.mul_zero, smul_zero, mul_one, + Bool.cond_false, add_zero, zero_add, mul_zero, smul_zero, mul_one, MvPolynomial.aeval_X, MvPolynomial.pderiv_X_self, MvPolynomial.pderiv_X_of_ne, Derivation.leibniz_pow, Derivation.leibniz, Derivation.map_coe_nat, map_natCast, map_pow, map_mul, map_add] diff --git a/Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean b/Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean index 5384cacc42eb3..d85c79681ce75 100644 --- a/Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean +++ b/Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean @@ -645,7 +645,7 @@ theorem orderOf_root_cyclotomic_dvd {n : ℕ} (hpos : 0 < n) {p : ℕ} [Fact p.P simp only [sub_eq_zero.mp hpow, ZMod.coe_unitOfCoprime, Units.val_pow_eq_pow_val] rw [IsRoot.def] at hroot rw [← prod_cyclotomic_eq_X_pow_sub_one hpos (ZMod p), ← Nat.cons_self_properDivisors hpos.ne', - Finset.prod_cons, eval_mul, hroot, MulZeroClass.zero_mul] + Finset.prod_cons, eval_mul, hroot, zero_mul] #align polynomial.order_of_root_cyclotomic_dvd Polynomial.orderOf_root_cyclotomic_dvd end Order diff --git a/Mathlib/RingTheory/Polynomial/Dickson.lean b/Mathlib/RingTheory/Polynomial/Dickson.lean index 3b96ee673f461..34bff047db3c3 100644 --- a/Mathlib/RingTheory/Polynomial/Dickson.lean +++ b/Mathlib/RingTheory/Polynomial/Dickson.lean @@ -108,7 +108,7 @@ theorem dickson_two_zero : ∀ n : ℕ, dickson 2 (0 : R) n = X ^ n norm_num | 1 => by simp only [dickson_one, pow_one] | n + 2 => by - simp only [dickson_add_two, C_0, MulZeroClass.zero_mul, sub_zero] + simp only [dickson_add_two, C_0, zero_mul, sub_zero] rw [dickson_two_zero (n + 1), pow_add X (n + 1) 1, mul_comm, pow_one] #align polynomial.dickson_two_zero Polynomial.dickson_two_zero @@ -241,7 +241,7 @@ theorem dickson_one_one_zmod_p (p : ℕ) [Fact p.Prime] : dickson 1 (1 : ZMod p) intro H have : φ.eval 0 = 0 := by rw [H, eval_zero] simpa [eval_X, eval_one, eval_pow, eval_sub, sub_zero, eval_add, eval_mul, - MulZeroClass.mul_zero, sq, zero_add, one_ne_zero] + mul_zero, sq, zero_add, one_ne_zero] classical convert(φ.roots ∪ {0}).toFinset.finite_toSet using 1 ext1 y diff --git a/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean b/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean index 153e1ebef4573..a9439a14dd0c0 100644 --- a/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean +++ b/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean @@ -96,14 +96,14 @@ theorem coeff_hermite_of_lt {n k : ℕ} (hnk : n < k) : coeff (hermite n) k = 0 · apply coeff_C · have : n + k + 1 + 2 = n + (k + 2) + 1 := by ring rw [Nat.succ_eq_add_one, coeff_hermite_succ_succ, add_right_comm, this, ih k, ih (k + 2), - MulZeroClass.mul_zero, sub_zero] + mul_zero, sub_zero] #align polynomial.coeff_hermite_of_lt Polynomial.coeff_hermite_of_lt @[simp] theorem coeff_hermite_self (n : ℕ) : coeff (hermite n) n = 1 := by induction' n with n ih · apply coeff_C - · rw [coeff_hermite_succ_succ, ih, coeff_hermite_of_lt, MulZeroClass.mul_zero, sub_zero] + · rw [coeff_hermite_succ_succ, ih, coeff_hermite_of_lt, mul_zero, sub_zero] simp #align polynomial.coeff_hermite_self Polynomial.coeff_hermite_self @@ -137,7 +137,7 @@ theorem coeff_hermite_of_odd_add {n k : ℕ} (hnk : Odd (n + k)) : coeff (hermit · cases' k with k · rw [Nat.succ_add_eq_succ_add] at hnk rw [coeff_hermite_succ_zero, ih hnk, neg_zero] - · rw [coeff_hermite_succ_succ, ih, ih, MulZeroClass.mul_zero, sub_zero] + · rw [coeff_hermite_succ_succ, ih, ih, mul_zero, sub_zero] · rwa [Nat.succ_add_eq_succ_add] at hnk · rw [(by rw [Nat.succ_add, Nat.add_succ] : n.succ + k.succ = n + k + 2)] at hnk exact (Nat.odd_add.mp hnk).mpr even_two diff --git a/Mathlib/RingTheory/Polynomial/RationalRoot.lean b/Mathlib/RingTheory/Polynomial/RationalRoot.lean index 299ec0ccaccba..01575b7f271f5 100644 --- a/Mathlib/RingTheory/Polynomial/RationalRoot.lean +++ b/Mathlib/RingTheory/Polynomial/RationalRoot.lean @@ -111,7 +111,7 @@ theorem den_dvd_of_is_root {p : A[X]} {r : K} (hr : aeval r p = 0) : simpa using h rw [← natDegree_scaleRoots p (den A r)] at * rw [coeff_eq_zero_of_natDegree_lt (lt_of_le_of_ne (le_of_not_gt h) hj.symm), - MulZeroClass.zero_mul] + zero_mul] exact dvd_zero _ #align denom_dvd_of_is_root den_dvd_of_is_root diff --git a/Mathlib/RingTheory/PolynomialAlgebra.lean b/Mathlib/RingTheory/PolynomialAlgebra.lean index 1bbd6c243c0a2..5c8d584c856a7 100644 --- a/Mathlib/RingTheory/PolynomialAlgebra.lean +++ b/Mathlib/RingTheory/PolynomialAlgebra.lean @@ -102,7 +102,7 @@ theorem toFunLinear_mul_tmul_mul (a₁ a₂ : A) (p₁ p₂ : R[X]) : simp_rw [coeff_sum, coeff_monomial, sum_def, Finset.sum_ite_eq', mem_support_iff, Ne.def] conv_rhs => rw [coeff_mul] simp_rw [finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq', mem_support_iff, Ne.def, mul_ite, - MulZeroClass.mul_zero, ite_mul, MulZeroClass.zero_mul] + mul_zero, ite_mul, zero_mul] simp_rw [ite_mul_zero_left (¬coeff p₁ _ = 0) (a₁ * (algebraMap R A) (coeff p₁ _))] simp_rw [ite_mul_zero_right (¬coeff p₂ _ = 0) _ (_ * _)] simp_rw [toFunLinear_mul_tmul_mul_aux_1, toFunLinear_mul_tmul_mul_aux_2] diff --git a/Mathlib/RingTheory/PowerBasis.lean b/Mathlib/RingTheory/PowerBasis.lean index e39f6abc0327b..3ce20ada3f3ed 100644 --- a/Mathlib/RingTheory/PowerBasis.lean +++ b/Mathlib/RingTheory/PowerBasis.lean @@ -448,7 +448,7 @@ theorem IsIntegral.mem_span_pow [Nontrivial R] {x y : S} (hx : IsIntegral R x) have := minpoly.monic hx refine' ⟨f %ₘ minpoly R x, (degree_modByMonic_lt _ this).trans_le degree_le_natDegree, _⟩ conv_lhs => rw [← modByMonic_add_div f this] - simp only [add_zero, MulZeroClass.zero_mul, minpoly.aeval, aeval_add, AlgHom.map_mul] + simp only [add_zero, zero_mul, minpoly.aeval, aeval_add, AlgHom.map_mul] #align is_integral.mem_span_pow IsIntegral.mem_span_pow namespace PowerBasis diff --git a/Mathlib/RingTheory/PowerSeries/Basic.lean b/Mathlib/RingTheory/PowerSeries/Basic.lean index c30dc35d0c7bf..1a6666eebcbad 100644 --- a/Mathlib/RingTheory/PowerSeries/Basic.lean +++ b/Mathlib/RingTheory/PowerSeries/Basic.lean @@ -348,7 +348,7 @@ theorem monomial_mul_monomial (m n : σ →₀ ℕ) (a b : R) : exact (h₃ rfl).elim · rw [h₃, add_tsub_cancel_right] at h₂ exact (h₂ rfl).elim - · exact MulZeroClass.zero_mul b + · exact zero_mul b · rw [h₂] at h₁ exact (h₁ <| le_add_left le_rfl).elim #align mv_power_series.monomial_mul_monomial MvPowerSeries.monomial_mul_monomial @@ -741,7 +741,7 @@ theorem X_pow_dvd_iff {s : σ} {n : ℕ} {φ : MvPowerSeries σ R} : · rintro ⟨φ, rfl⟩ m h rw [coeff_mul, Finset.sum_eq_zero] rintro ⟨i, j⟩ hij - rw [coeff_X_pow, if_neg, MulZeroClass.zero_mul] + rw [coeff_X_pow, if_neg, zero_mul] contrapose! h subst i rw [Finsupp.mem_antidiagonal] at hij @@ -764,7 +764,7 @@ theorem X_pow_dvd_iff {s : σ} {n : ℕ} {φ : MvPowerSeries σ R} : refine' ⟨rfl, _⟩ ext t simp only [add_tsub_cancel_left, Finsupp.add_apply, Finsupp.tsub_apply] - · exact MulZeroClass.zero_mul _ + · exact zero_mul _ · intro hni exfalso apply hni @@ -779,7 +779,7 @@ theorem X_pow_dvd_iff {s : σ} {n : ℕ} {φ : MvPowerSeries σ R} : rw [← hij, hi] ext rw [coe_add, coe_add, Pi.add_apply, Pi.add_apply, add_tsub_cancel_left, add_comm] - · exact MulZeroClass.zero_mul _ + · exact zero_mul _ · contrapose! H ext t by_cases hst : s = t @@ -1572,7 +1572,7 @@ theorem coeff_mul_X_pow (p : PowerSeries R) (n d : ℕ) : coeff R (d + n) (p * X ^ n) = coeff R d p := by rw [coeff_mul, Finset.sum_eq_single (d, n), coeff_X_pow, if_pos rfl, mul_one] · rintro ⟨i, j⟩ h1 h2 - rw [coeff_X_pow, if_neg, MulZeroClass.mul_zero] + rw [coeff_X_pow, if_neg, mul_zero] rintro rfl apply h2 rw [Finset.Nat.mem_antidiagonal, add_right_cancel_iff] at h1 @@ -1587,7 +1587,7 @@ theorem coeff_X_pow_mul (p : PowerSeries R) (n d : ℕ) : coeff R (d + n) (X ^ n * p) = coeff R d p := by rw [coeff_mul, Finset.sum_eq_single (n, d), coeff_X_pow, if_pos rfl, one_mul] · rintro ⟨i, j⟩ h1 h2 - rw [coeff_X_pow, if_neg, MulZeroClass.zero_mul] + rw [coeff_X_pow, if_neg, zero_mul] rintro rfl apply h2 rw [Finset.Nat.mem_antidiagonal, add_comm, add_right_cancel_iff] at h1 @@ -1603,7 +1603,7 @@ theorem coeff_mul_X_pow' (p : PowerSeries R) (n d : ℕ) : split_ifs with h · rw [← tsub_add_cancel_of_le h, coeff_mul_X_pow, add_tsub_cancel_right] · refine' (coeff_mul _ _ _).trans (Finset.sum_eq_zero fun x hx => _) - rw [coeff_X_pow, if_neg, MulZeroClass.mul_zero] + rw [coeff_X_pow, if_neg, mul_zero] exact ((le_of_add_le_right (Finset.Nat.mem_antidiagonal.mp hx).le).trans_lt <| not_le.mp h).ne set_option linter.uppercaseLean3 false in #align power_series.coeff_mul_X_pow' PowerSeries.coeff_mul_X_pow' @@ -1614,7 +1614,7 @@ theorem coeff_X_pow_mul' (p : PowerSeries R) (n d : ℕ) : · rw [← tsub_add_cancel_of_le h, coeff_X_pow_mul] simp · refine' (coeff_mul _ _ _).trans (Finset.sum_eq_zero fun x hx => _) - rw [coeff_X_pow, if_neg, MulZeroClass.zero_mul] + rw [coeff_X_pow, if_neg, zero_mul] have := Finset.Nat.mem_antidiagonal.mp hx rw [add_comm] at this exact ((le_of_add_le_right this.le).trans_lt <| not_le.mp h).ne @@ -1724,7 +1724,7 @@ noncomputable def rescale (a : R) : PowerSeries R →+* PowerSeries R where toFun f := PowerSeries.mk fun n => a ^ n * PowerSeries.coeff R n f map_zero' := by ext - simp only [LinearMap.map_zero, PowerSeries.coeff_mk, MulZeroClass.mul_zero] + simp only [LinearMap.map_zero, PowerSeries.coeff_mk, mul_zero] map_one' := by ext1 simp only [mul_boole, PowerSeries.coeff_mk, PowerSeries.coeff_one] @@ -1988,11 +1988,11 @@ theorem eq_zero_or_eq_zero_of_mul_eq_zero [NoZeroDivisors R] (φ ψ : PowerSerie exact h hm₁ · rintro ⟨i, j⟩ hij hne by_cases hj : j < n - · rw [ih j hj, MulZeroClass.mul_zero] + · rw [ih j hj, mul_zero] by_cases hi : i < m · specialize hm₂ _ hi push_neg at hm₂ - rw [hm₂, MulZeroClass.zero_mul] + rw [hm₂, zero_mul] rw [Finset.Nat.mem_antidiagonal] at hij push_neg at hi hj suffices m < i by @@ -2364,9 +2364,9 @@ theorem order_mul_ge (φ ψ : PowerSeries R) : order φ + order ψ ≤ order (φ intro n hn; rw [coeff_mul, Finset.sum_eq_zero] rintro ⟨i, j⟩ hij by_cases hi : ↑i < order φ - · rw [coeff_of_lt_order i hi, MulZeroClass.zero_mul] + · rw [coeff_of_lt_order i hi, zero_mul] by_cases hj : ↑j < order ψ - · rw [coeff_of_lt_order j hj, MulZeroClass.mul_zero] + · rw [coeff_of_lt_order j hj, mul_zero] rw [not_lt] at hi hj; rw [Finset.Nat.mem_antidiagonal] at hij exfalso apply ne_of_lt (lt_of_lt_of_le hn <| add_le_add hi hj) diff --git a/Mathlib/RingTheory/PrincipalIdealDomain.lean b/Mathlib/RingTheory/PrincipalIdealDomain.lean index d37467a70930c..f053ec7c39d5d 100644 --- a/Mathlib/RingTheory/PrincipalIdealDomain.lean +++ b/Mathlib/RingTheory/PrincipalIdealDomain.lean @@ -362,9 +362,9 @@ theorem span_gcd (x y : R) : span ({gcd x y} : Set R) = span ({x, y} : Set R) := · rw [dvd_gcd_iff] constructor <;> rw [← Ideal.mem_span_singleton, ← hd, Ideal.mem_span_pair] · use 1, 0 - rw [one_mul, MulZeroClass.zero_mul, add_zero] + rw [one_mul, zero_mul, add_zero] · use 0, 1 - rw [one_mul, MulZeroClass.zero_mul, zero_add] + rw [one_mul, zero_mul, zero_add] · obtain ⟨r, s, rfl⟩ : ∃ r s, r * x + s * y = d := by rw [← Ideal.mem_span_pair, hd, Ideal.mem_span_singleton] apply dvd_add <;> apply dvd_mul_of_dvd_right diff --git a/Mathlib/RingTheory/RootsOfUnity/Basic.lean b/Mathlib/RingTheory/RootsOfUnity/Basic.lean index 8d4fa82891d77..b0490c2d1e86e 100644 --- a/Mathlib/RingTheory/RootsOfUnity/Basic.lean +++ b/Mathlib/RingTheory/RootsOfUnity/Basic.lean @@ -492,7 +492,7 @@ theorem pow {n : ℕ} {a b : ℕ} (hn : 0 < n) (h : IsPrimitiveRoot ζ n) (hprod subst n simp only [iff_def, ← pow_mul, h.pow_eq_one, eq_self_iff_true, true_and_iff] intro l hl - -- Porting note: was `by rintro rfl; simpa only [Nat.not_lt_zero, MulZeroClass.zero_mul] using hn` + -- Porting note: was `by rintro rfl; simpa only [Nat.not_lt_zero, zero_mul] using hn` have ha0 : a ≠ 0 := left_ne_zero_of_mul hn.ne' rw [← mul_dvd_mul_iff_left ha0] exact h.dvd_of_pow_eq_one _ hl @@ -907,7 +907,7 @@ theorem nthRoots_one_eq_biUnion_primitiveRoots' {ζ : R} {n : ℕ+} (h : IsPrimi rintro ⟨a, ⟨d, hd⟩, ha⟩ have hazero : 0 < a := by contrapose! hd with ha0 - simp_all only [nonpos_iff_eq_zero, MulZeroClass.zero_mul] + simp_all only [nonpos_iff_eq_zero, zero_mul] exact n.ne_zero rw [mem_primitiveRoots hazero] at ha rw [hd, pow_mul, ha.pow_eq_one, one_pow] diff --git a/Mathlib/RingTheory/RootsOfUnity/Complex.lean b/Mathlib/RingTheory/RootsOfUnity/Complex.lean index b5701d8386736..1c45dfe9713a8 100644 --- a/Mathlib/RingTheory/RootsOfUnity/Complex.lean +++ b/Mathlib/RingTheory/RootsOfUnity/Complex.lean @@ -148,7 +148,7 @@ theorem IsPrimitiveRoot.arg {n : ℕ} {ζ : ℂ} (h : IsPrimitiveRoot ζ n) (hn rw [this] apply tsub_lt_self hn.bot_lt contrapose! h₂ - rw [Nat.eq_zero_of_le_zero h₂, MulZeroClass.zero_mul] + rw [Nat.eq_zero_of_le_zero h₂, zero_mul] exact zero_le _ rw [← Int.natAbs_neg, neg_sub, Int.natAbs_eq_iff] exact Or.inl (Int.ofNat_sub h.le).symm diff --git a/Mathlib/RingTheory/TensorProduct.lean b/Mathlib/RingTheory/TensorProduct.lean index 7868c6aaf49af..ec57b0a0b2341 100644 --- a/Mathlib/RingTheory/TensorProduct.lean +++ b/Mathlib/RingTheory/TensorProduct.lean @@ -512,10 +512,10 @@ def algHomOfLinearMapTensorProduct (f : A ⊗[R] B →ₗ[S] C) simp only rw [LinearMap.toFun_eq_coe] refine TensorProduct.induction_on x ?_ ?_ ?_ - · rw [MulZeroClass.zero_mul, map_zero, MulZeroClass.zero_mul] + · rw [zero_mul, map_zero, zero_mul] · intro a₁ b₁ refine TensorProduct.induction_on y ?_ ?_ ?_ - · rw [MulZeroClass.mul_zero, map_zero, MulZeroClass.mul_zero] + · rw [mul_zero, map_zero, mul_zero] · intro a₂ b₂ rw [tmul_mul_tmul, w₁] · intro x₁ x₂ h₁ h₂ @@ -1015,13 +1015,13 @@ protected def module : Module (A ⊗[R] B) M where simp only [moduleAux_apply, one_smul] mul_smul x y m := by refine TensorProduct.induction_on x ?_ ?_ ?_ <;> refine TensorProduct.induction_on y ?_ ?_ ?_ - · simp only [(· • ·), MulZeroClass.mul_zero, map_zero, LinearMap.zero_apply] + · simp only [(· • ·), mul_zero, map_zero, LinearMap.zero_apply] · intro a b - simp only [(· • ·), MulZeroClass.zero_mul, map_zero, LinearMap.zero_apply] + simp only [(· • ·), zero_mul, map_zero, LinearMap.zero_apply] · intro z w _ _ - simp only [(· • ·), MulZeroClass.zero_mul, map_zero, LinearMap.zero_apply] + simp only [(· • ·), zero_mul, map_zero, LinearMap.zero_apply] · intro a b - simp only [(· • ·), MulZeroClass.mul_zero, map_zero, LinearMap.zero_apply] + simp only [(· • ·), mul_zero, map_zero, LinearMap.zero_apply] · intro a₁ b₁ a₂ b₂ -- porting note; was one `simp only` not two and a `rw` in mathlib3 simp only [(· • ·), Algebra.TensorProduct.tmul_mul_tmul] @@ -1034,7 +1034,7 @@ protected def module : Module (A ⊗[R] B) M where rw [mul_add] -- simp only doesn't work simp only [LinearMap.map_add, LinearMap.add_apply, moduleAux_apply, hz, hw, smul_add] · intro z w _ _ - simp only [(· • ·), MulZeroClass.mul_zero, map_zero, LinearMap.zero_apply] + simp only [(· • ·), mul_zero, map_zero, LinearMap.zero_apply] · intro a b z w hz hw simp only [(· • ·)] at hz hw simp only [(· • ·), LinearMap.map_add, add_mul, LinearMap.add_apply, hz, hw] diff --git a/Mathlib/RingTheory/UniqueFactorizationDomain.lean b/Mathlib/RingTheory/UniqueFactorizationDomain.lean index ab3b2d39b1509..35c291d382c6d 100644 --- a/Mathlib/RingTheory/UniqueFactorizationDomain.lean +++ b/Mathlib/RingTheory/UniqueFactorizationDomain.lean @@ -300,7 +300,7 @@ theorem WfDvdMonoid.of_exists_prime_factors : WfDvdMonoid α := erw [WithTop.coe_lt_coe] have cne0 : c ≠ 0 := by refine' mt (fun con => _) h - rw [b_eq, con, MulZeroClass.mul_zero] + rw [b_eq, con, mul_zero] calc Multiset.card (Classical.choose (pf a ane0)) < _ + Multiset.card (Classical.choose (pf c cne0)) := @@ -866,7 +866,7 @@ theorem dvd_of_dvd_mul_left_of_no_prime_factors {a b c : R} (ha : a ≠ 0) : (∀ {d}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b := by refine' induction_on_prime c _ _ _ · intro no_factors - simp only [dvd_zero, MulZeroClass.mul_zero, forall_prop_of_true] + simp only [dvd_zero, mul_zero, forall_prop_of_true] haveI := Classical.propDecidable exact isUnit_iff_forall_dvd.mp @@ -1135,14 +1135,14 @@ theorem multiplicative_of_coprime (f : α → β) (a b : α) (h0 : f 0 = 0) f (a * b) = f a * f b := by letI := Classical.decEq α by_cases ha0 : a = 0 - · rw [ha0, MulZeroClass.zero_mul, h0, MulZeroClass.zero_mul] + · rw [ha0, zero_mul, h0, zero_mul] by_cases hb0 : b = 0 - · rw [hb0, MulZeroClass.mul_zero, h0, MulZeroClass.mul_zero] + · rw [hb0, mul_zero, h0, mul_zero] by_cases hf1 : f 1 = 0 · calc f (a * b) = f (a * b * 1) := by rw [mul_one] - _ = 0 := by simp only [h1 isUnit_one, hf1, MulZeroClass.mul_zero] - _ = f a * f (b * 1) := by simp only [h1 isUnit_one, hf1, MulZeroClass.mul_zero] + _ = 0 := by simp only [h1 isUnit_one, hf1, mul_zero] + _ = f a * f (b * 1) := by simp only [h1 isUnit_one, hf1, mul_zero] _ = f a * f b := by rw [mul_one] haveI : Nontrivial α := ⟨⟨_, _, ha0⟩⟩ letI : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid @@ -1379,7 +1379,7 @@ theorem prod_le_prod_iff_le [Nontrivial α] {p q : Multiset (Associates α)} congr refine' associated_iff_eq.mp (factors_prod fun hc => _).symm refine' not_irreducible_zero (hq _ _) - rw [← prod_eq_zero_iff, eqc, hc, MulZeroClass.mul_zero]) + rw [← prod_eq_zero_iff, eqc, hc, mul_zero]) prod_le_prod #align associates.prod_le_prod_iff_le Associates.prod_le_prod_iff_le @@ -1836,12 +1836,12 @@ theorem eq_pow_count_factors_of_dvd_pow {p a : Associates α} (hp : Irreducible Nat.eq_zero_of_le_zero <| by convert count_le_count_of_le hph hq h symm - rw [count_pow hp.ne_zero hq, count_eq_zero_of_ne hq hp h', MulZeroClass.mul_zero] + rw [count_pow hp.ne_zero hq, count_eq_zero_of_ne hq hp h', mul_zero] intro q hq rw [count_pow hp.ne_zero hq] by_cases h : q = p · rw [h, count_self hp, mul_one] - · rw [count_eq_zero_of_ne hq hp h, MulZeroClass.mul_zero, eq_zero_of_ne q hq h] + · rw [count_eq_zero_of_ne hq hp h, mul_zero, eq_zero_of_ne q hq h] #align associates.eq_pow_count_factors_of_dvd_pow Associates.eq_pow_count_factors_of_dvd_pow theorem count_factors_eq_find_of_dvd_pow {a p : Associates α} (hp : Irreducible p) diff --git a/Mathlib/RingTheory/Valuation/Basic.lean b/Mathlib/RingTheory/Valuation/Basic.lean index 6795fe0b67523..426380d048576 100644 --- a/Mathlib/RingTheory/Valuation/Basic.lean +++ b/Mathlib/RingTheory/Valuation/Basic.lean @@ -550,7 +550,7 @@ def supp : Ideal R where calc v (c * x) = v c * v x := map_mul v c x _ = v c * 0 := (congr_arg _ hx) - _ = 0 := MulZeroClass.mul_zero _ + _ = 0 := mul_zero _ #align valuation.supp Valuation.supp @[simp] diff --git a/Mathlib/RingTheory/Valuation/ValuationRing.lean b/Mathlib/RingTheory/Valuation/ValuationRing.lean index e5505115652a2..478f82233b49b 100644 --- a/Mathlib/RingTheory/Valuation/ValuationRing.lean +++ b/Mathlib/RingTheory/Valuation/ValuationRing.lean @@ -154,8 +154,8 @@ noncomputable instance linearOrderedCommGroupWithZero : mul_le_mul_left := by rintro ⟨a⟩ ⟨b⟩ ⟨c, rfl⟩ ⟨d⟩ use c; simp only [Algebra.smul_def]; ring - zero_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [MulZeroClass.zero_mul]; apply Setoid.refl' - mul_zero := by rintro ⟨a⟩; apply Quotient.sound'; rw [MulZeroClass.mul_zero]; apply Setoid.refl' + zero_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [zero_mul]; apply Setoid.refl' + mul_zero := by rintro ⟨a⟩; apply Quotient.sound'; rw [mul_zero]; apply Setoid.refl' zero_le_one := ⟨0, by rw [zero_smul]⟩ exists_pair_ne := by use 0, 1 @@ -325,8 +325,8 @@ theorem iff_isInteger_or_isInteger : · intro H constructor intro a b - by_cases ha : a = 0; · subst ha; exact ⟨0, Or.inr <| MulZeroClass.mul_zero b⟩ - by_cases hb : b = 0; · subst hb; exact ⟨0, Or.inl <| MulZeroClass.mul_zero a⟩ + by_cases ha : a = 0; · subst ha; exact ⟨0, Or.inr <| mul_zero b⟩ + by_cases hb : b = 0; · subst hb; exact ⟨0, Or.inl <| mul_zero a⟩ replace ha := (map_ne_zero_iff _ (IsFractionRing.injective R K)).mpr ha replace hb := (map_ne_zero_iff _ (IsFractionRing.injective R K)).mpr hb obtain ⟨c, e⟩ | ⟨c, e⟩ := H (algebraMap R K a / algebraMap R K b) diff --git a/Mathlib/RingTheory/WittVector/Defs.lean b/Mathlib/RingTheory/WittVector/Defs.lean index 39de60a816a7b..d4a5429e212ad 100644 --- a/Mathlib/RingTheory/WittVector/Defs.lean +++ b/Mathlib/RingTheory/WittVector/Defs.lean @@ -255,7 +255,7 @@ theorem wittOne_pos_eq_zero (n : ℕ) (hn : 0 < n) : wittOne p n = 0 := by simp only [one_pow, one_mul, xInTermsOfW_zero, sub_self, bind₁_X_right] · intro i hin hi0 rw [Finset.mem_range] at hin - rw [IH _ hin (Nat.pos_of_ne_zero hi0), zero_pow (pow_pos hp.1.pos _), MulZeroClass.mul_zero] + rw [IH _ hin (Nat.pos_of_ne_zero hi0), zero_pow (pow_pos hp.1.pos _), mul_zero] · rw [Finset.mem_range]; intro; contradiction #align witt_vector.witt_one_pos_eq_zero WittVector.wittOne_pos_eq_zero @@ -302,7 +302,7 @@ theorem constantCoeff_wittSub (n : ℕ) : constantCoeff (wittSub p n) = 0 := by @[simp] theorem constantCoeff_wittMul (n : ℕ) : constantCoeff (wittMul p n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n - simp only [MulZeroClass.mul_zero, RingHom.map_mul, constantCoeff_X] + simp only [mul_zero, RingHom.map_mul, constantCoeff_X] #align witt_vector.constant_coeff_witt_mul WittVector.constantCoeff_wittMul @[simp] diff --git a/Mathlib/RingTheory/WittVector/Frobenius.lean b/Mathlib/RingTheory/WittVector/Frobenius.lean index f597374ccc257..567d68719bde0 100644 --- a/Mathlib/RingTheory/WittVector/Frobenius.lean +++ b/Mathlib/RingTheory/WittVector/Frobenius.lean @@ -199,7 +199,7 @@ theorem map_frobeniusPoly (n : ℕ) : theorem frobeniusPoly_zmod (n : ℕ) : MvPolynomial.map (Int.castRingHom (ZMod p)) (frobeniusPoly p n) = X n ^ p := by rw [frobeniusPoly, RingHom.map_add, RingHom.map_pow, RingHom.map_mul, map_X, map_C] - simp only [Int.cast_ofNat, add_zero, eq_intCast, ZMod.nat_cast_self, MulZeroClass.zero_mul, C_0] + simp only [Int.cast_ofNat, add_zero, eq_intCast, ZMod.nat_cast_self, zero_mul, C_0] #align witt_vector.frobenius_poly_zmod WittVector.frobeniusPoly_zmod @[simp] diff --git a/Mathlib/RingTheory/WittVector/IsPoly.lean b/Mathlib/RingTheory/WittVector/IsPoly.lean index e999e4b363f9a..3acc052bd2dcf 100644 --- a/Mathlib/RingTheory/WittVector/IsPoly.lean +++ b/Mathlib/RingTheory/WittVector/IsPoly.lean @@ -324,7 +324,7 @@ theorem bind₁_onePoly_wittPolynomial [hp : Fact p.Prime] (n : ℕ) : · simp only [onePoly, one_pow, one_mul, AlgHom.map_pow, C_1, pow_zero, bind₁_X_right, if_true, eq_self_iff_true] · intro i _hi hi0 - simp only [onePoly, if_neg hi0, zero_pow (pow_pos hp.1.pos _), MulZeroClass.mul_zero, + simp only [onePoly, if_neg hi0, zero_pow (pow_pos hp.1.pos _), mul_zero, AlgHom.map_pow, bind₁_X_right, AlgHom.map_mul] · rw [Finset.mem_range] -- porting note: was `decide` @@ -449,7 +449,7 @@ end IsPoly₂ attribute [ghost_simps] AlgHom.map_zero AlgHom.map_one AlgHom.map_add AlgHom.map_mul AlgHom.map_sub AlgHom.map_neg AlgHom.id_apply map_natCast RingHom.map_zero RingHom.map_one RingHom.map_mul RingHom.map_add RingHom.map_sub RingHom.map_neg RingHom.id_apply mul_add add_mul add_zero zero_add - mul_one one_mul MulZeroClass.mul_zero MulZeroClass.zero_mul Nat.succ_ne_zero add_tsub_cancel_right + mul_one one_mul mul_zero zero_mul Nat.succ_ne_zero add_tsub_cancel_right Nat.succ_eq_add_one if_true eq_self_iff_true if_false forall_true_iff forall₂_true_iff forall₃_true_iff diff --git a/Mathlib/RingTheory/WittVector/MulP.lean b/Mathlib/RingTheory/WittVector/MulP.lean index 76bcf3ee5fa1d..f8ef7d29d5433 100644 --- a/Mathlib/RingTheory/WittVector/MulP.lean +++ b/Mathlib/RingTheory/WittVector/MulP.lean @@ -50,7 +50,7 @@ variable {p} theorem mulN_coeff (n : ℕ) (x : 𝕎 R) (k : ℕ) : (x * n).coeff k = aeval x.coeff (wittMulN p n k) := by induction' n with n ih generalizing k - · simp only [Nat.zero_eq, Nat.cast_zero, MulZeroClass.mul_zero, zero_coeff, wittMulN, + · simp only [Nat.zero_eq, Nat.cast_zero, mul_zero, zero_coeff, wittMulN, AlgHom.map_zero, Pi.zero_apply] · rw [wittMulN, Nat.succ_eq_add_one, Nat.cast_add, Nat.cast_one, mul_add, mul_one, aeval_bind₁, add_coeff] @@ -73,7 +73,7 @@ theorem mulN_isPoly (n : ℕ) : IsPoly p fun R _Rcr x => x * n := theorem bind₁_wittMulN_wittPolynomial (n k : ℕ) : bind₁ (wittMulN p n) (wittPolynomial p ℤ k) = n * wittPolynomial p ℤ k := by induction' n with n ih - · simp [wittMulN, Nat.cast_zero, MulZeroClass.zero_mul, bind₁_zero_wittPolynomial] + · simp [wittMulN, Nat.cast_zero, zero_mul, bind₁_zero_wittPolynomial] · rw [wittMulN, ← bind₁_bind₁, wittAdd, wittStructureInt_prop] simp only [AlgHom.map_add, Nat.cast_succ, bind₁_X_right] rw [add_mul, one_mul, bind₁_rename, bind₁_rename] diff --git a/Mathlib/RingTheory/WittVector/Verschiebung.lean b/Mathlib/RingTheory/WittVector/Verschiebung.lean index ae245fe777af9..506471a39a55c 100644 --- a/Mathlib/RingTheory/WittVector/Verschiebung.lean +++ b/Mathlib/RingTheory/WittVector/Verschiebung.lean @@ -66,7 +66,7 @@ theorem ghostComponent_verschiebungFun (x : 𝕎 R) (n : ℕ) : ghostComponent (n + 1) (verschiebungFun x) = p * ghostComponent n x := by simp only [ghostComponent_apply, aeval_wittPolynomial] rw [Finset.sum_range_succ', verschiebungFun_coeff, if_pos rfl, zero_pow (pow_pos hp.1.pos _), - MulZeroClass.mul_zero, add_zero, Finset.mul_sum, Finset.sum_congr rfl] + mul_zero, add_zero, Finset.mul_sum, Finset.sum_congr rfl] rintro i - simp only [pow_succ, mul_assoc, verschiebungFun_coeff, if_neg (Nat.succ_ne_zero i), Nat.succ_sub_succ, tsub_zero] diff --git a/Mathlib/RingTheory/WittVector/WittPolynomial.lean b/Mathlib/RingTheory/WittVector/WittPolynomial.lean index a70f39400838d..bc2e12d00e106 100644 --- a/Mathlib/RingTheory/WittVector/WittPolynomial.lean +++ b/Mathlib/RingTheory/WittVector/WittPolynomial.lean @@ -159,7 +159,7 @@ theorem wittPolynomial_zmod_self (n : ℕ) : W_ (ZMod (p ^ (n + 1))) (n + 1) = expand p (W_ (ZMod (p ^ (n + 1))) n) := by simp only [wittPolynomial_eq_sum_C_mul_X_pow] rw [sum_range_succ, ← Nat.cast_pow, CharP.cast_eq_zero (ZMod (p ^ (n + 1))) (p ^ (n + 1)), C_0, - MulZeroClass.zero_mul, add_zero, AlgHom.map_sum, sum_congr rfl] + zero_mul, add_zero, AlgHom.map_sum, sum_congr rfl] intro k hk rw [AlgHom.map_mul, AlgHom.map_pow, expand_X, algHom_C, ← pow_mul, ← pow_succ] congr diff --git a/Mathlib/Topology/Algebra/Module/CharacterSpace.lean b/Mathlib/Topology/Algebra/Module/CharacterSpace.lean index 2827e9dafd9b8..5657965d5b749 100644 --- a/Mathlib/Topology/Algebra/Module/CharacterSpace.lean +++ b/Mathlib/Topology/Algebra/Module/CharacterSpace.lean @@ -143,7 +143,7 @@ instance instAlgHomClass : AlgHomClass (characterSpace 𝕜 A) 𝕜 A 𝕜 := haveI map_one' : ∀ φ : characterSpace 𝕜 A, φ 1 = 1 := fun φ => by have h₁ : φ 1 * (1 - φ 1) = 0 := by rw [mul_sub, sub_eq_zero, mul_one, ← map_mul φ, one_mul] rcases mul_eq_zero.mp h₁ with (h₂ | h₂) - · have : ∀ a, φ (a * 1) = 0 := fun a => by simp only [map_mul φ, h₂, MulZeroClass.mul_zero] + · have : ∀ a, φ (a * 1) = 0 := fun a => by simp only [map_mul φ, h₂, mul_zero] exact False.elim (φ.prop.1 <| ContinuousLinearMap.ext <| by simpa only [mul_one] using this) · exact (sub_eq_zero.mp h₂).symm { CharacterSpace.instNonUnitalAlgHomClass with diff --git a/Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean b/Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean index 3bcb27a6584d3..4bf66d5d6cc6f 100644 --- a/Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean +++ b/Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean @@ -146,7 +146,7 @@ theorem mul_subset (U : OpenAddSubgroup R) : ∃ V : OpenAddSubgroup R, (V : Set prod_self_subset (IsOpen.mem_nhds (IsOpen.preimage continuous_mul U.isOpen) (by simpa only [Set.mem_preimage, SetLike.mem_coe, Prod.snd_zero, - MulZeroClass.mul_zero] using U.zero_mem)) + mul_zero] using U.zero_mem)) use V rintro v ⟨a, b, ha, hb, hv⟩ have hy := H (Set.mk_mem_prod ha hb) diff --git a/Mathlib/Topology/Algebra/Valuation.lean b/Mathlib/Topology/Algebra/Valuation.lean index 2c9a7b18b6255..eeebc7f57053c 100644 --- a/Mathlib/Topology/Algebra/Valuation.lean +++ b/Mathlib/Topology/Algebra/Valuation.lean @@ -54,7 +54,7 @@ theorem subgroups_basis : RingSubgroupsBasis fun γ : Γ₀ˣ => (v.ltAddSubgrou · use (1 : Γ₀ˣ) rintro y _ change v (x * y) < _ - rw [Valuation.map_mul, Hx, MulZeroClass.zero_mul] + rw [Valuation.map_mul, Hx, zero_mul] exact Units.zero_lt γ · use γx⁻¹ * γ rintro y (vy_lt : v y < ↑(γx⁻¹ * γ)) @@ -68,7 +68,7 @@ theorem subgroups_basis : RingSubgroupsBasis fun γ : Γ₀ˣ => (v.ltAddSubgrou · use 1 rintro y _ change v (y * x) < _ - rw [Valuation.map_mul, Hx, MulZeroClass.mul_zero] + rw [Valuation.map_mul, Hx, mul_zero] exact Units.zero_lt γ · use γx⁻¹ * γ rintro y (vy_lt : v y < ↑(γx⁻¹ * γ)) diff --git a/Mathlib/Topology/ContinuousFunction/Ideals.lean b/Mathlib/Topology/ContinuousFunction/Ideals.lean index 431f1ed34d0ac..46f7fd440c87c 100644 --- a/Mathlib/Topology/ContinuousFunction/Ideals.lean +++ b/Mathlib/Topology/ContinuousFunction/Ideals.lean @@ -90,7 +90,7 @@ def idealOfSet (s : Set X) : Ideal C(X, R) where carrier := {f : C(X, R) | ∀ x ∈ sᶜ, f x = 0} add_mem' {f g} hf hg x hx := by simp [hf x hx, hg x hx, coe_add, Pi.add_apply, add_zero] zero_mem' _ _ := rfl - smul_mem' c f hf x hx := MulZeroClass.mul_zero (c x) ▸ congr_arg (fun y => c x * y) (hf x hx) + smul_mem' c f hf x hx := mul_zero (c x) ▸ congr_arg (fun y => c x * y) (hf x hx) #align continuous_map.ideal_of_set ContinuousMap.idealOfSet theorem idealOfSet_closed [T2Space R] (s : Set X) : diff --git a/Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean b/Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean index 38d75cbf5dc07..0868213798a1c 100644 --- a/Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean +++ b/Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean @@ -188,7 +188,7 @@ theorem zero_apply [Zero β] : (0 : C₀(α, β)) x = 0 := instance instMul [MulZeroClass β] [ContinuousMul β] : Mul C₀(α, β) := ⟨fun f g => - ⟨f * g, by simpa only [MulZeroClass.mul_zero] using (zero_at_infty f).mul (zero_at_infty g)⟩⟩ + ⟨f * g, by simpa only [mul_zero] using (zero_at_infty f).mul (zero_at_infty g)⟩⟩ @[simp] theorem coe_mul [MulZeroClass β] [ContinuousMul β] (f g : C₀(α, β)) : ⇑(f * g) = f * g := diff --git a/Mathlib/Topology/MetricSpace/Closeds.lean b/Mathlib/Topology/MetricSpace/Closeds.lean index 97f912d7c71b2..0e0483fa8a8a4 100644 --- a/Mathlib/Topology/MetricSpace/Closeds.lean +++ b/Mathlib/Topology/MetricSpace/Closeds.lean @@ -185,7 +185,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) : have : Tendsto (fun n => 2 * B n) atTop (𝓝 (2 * 0)) := ENNReal.Tendsto.const_mul (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp) - rw [MulZeroClass.mul_zero] at this + rw [mul_zero] at this obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b := ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩ diff --git a/Mathlib/Topology/MetricSpace/Dilation.lean b/Mathlib/Topology/MetricSpace/Dilation.lean index 74af1745e0303..410d0b9a1cac1 100644 --- a/Mathlib/Topology/MetricSpace/Dilation.lean +++ b/Mathlib/Topology/MetricSpace/Dilation.lean @@ -169,7 +169,7 @@ theorem edist_eq [DilationClass F α β] (f : F) (x y : α) : · rcases DilationClass.edist_eq' f with ⟨r, hne, hr⟩ replace hr := hr x y cases' key x y with h h - · simp only [hr, h, MulZeroClass.mul_zero] + · simp only [hr, h, mul_zero] · simp [hr, h, hne] exact (DilationClass.edist_eq' f).choose_spec.2 x y #align dilation.edist_eq Dilation.edist_eq diff --git a/Mathlib/Topology/MetricSpace/PiNat.lean b/Mathlib/Topology/MetricSpace/PiNat.lean index f721c334b301e..ca3bd8d91265a 100644 --- a/Mathlib/Topology/MetricSpace/PiNat.lean +++ b/Mathlib/Topology/MetricSpace/PiNat.lean @@ -782,7 +782,7 @@ theorem exists_nat_nat_continuous_surjective_of_completeSpace (α : Type*) [Metr have L : Tendsto (fun n : ℕ => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0) := by have : Tendsto (fun n : ℕ => (2 : ℝ) * (1 / 2) ^ n) atTop (𝓝 (2 * 0)) := (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).const_mul _ - rw [MulZeroClass.mul_zero] at this + rw [mul_zero] at this exact squeeze_zero (fun n => diam_nonneg) (fun n => diam_closedBall (pow_nonneg I0.le _)) this refine nonempty_iInter_of_nonempty_biInter (fun n => isClosed_ball) diff --git a/Mathlib/Topology/PartitionOfUnity.lean b/Mathlib/Topology/PartitionOfUnity.lean index 1c5486a22e8c6..d6e5fd80f4604 100644 --- a/Mathlib/Topology/PartitionOfUnity.lean +++ b/Mathlib/Topology/PartitionOfUnity.lean @@ -377,7 +377,7 @@ def toPOUFun (i : ι) (x : X) : ℝ := #align bump_covering.to_pou_fun BumpCovering.toPOUFun theorem toPOUFun_zero_of_zero {i : ι} {x : X} (h : f i x = 0) : f.toPOUFun i x = 0 := by - rw [toPOUFun, h, MulZeroClass.zero_mul] + rw [toPOUFun, h, zero_mul] #align bump_covering.to_pou_fun_zero_of_zero BumpCovering.toPOUFun_zero_of_zero theorem support_toPOUFun_subset (i : ι) : support (f.toPOUFun i) ⊆ support (f i) := diff --git a/Mathlib/Topology/TietzeExtension.lean b/Mathlib/Topology/TietzeExtension.lean index 31bb01c380f54..0e499fdf1fdd4 100644 --- a/Mathlib/Topology/TietzeExtension.lean +++ b/Mathlib/Topology/TietzeExtension.lean @@ -133,7 +133,7 @@ theorem exists_extension_norm_eq_of_closedEmbedding' (f : X →ᵇ ℝ) (e : C(X have hge : (limUnder atTop g).compContinuous e = f := by refine' tendsto_nhds_unique this (tendsto_iff_dist_tendsto_zero.2 _) refine' squeeze_zero (fun _ => dist_nonneg) hgf _ - rw [← MulZeroClass.zero_mul ‖f‖] + rw [← zero_mul ‖f‖] refine' (tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds <;> norm_num1 refine' ⟨limUnder atTop g, le_antisymm _ _, hge⟩ · rw [← dist_zero_left, ← g0]