Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Oct 20, 2024
2 parents 11bb174 + 1b6c758 commit 5b9fbb5
Show file tree
Hide file tree
Showing 629 changed files with 9,877 additions and 4,577 deletions.
2 changes: 1 addition & 1 deletion Archive/Imo/Imo1986Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ theorem isGood_iff {f : ℝ≥0 → ℝ≥0} : IsGood f ↔ f = fun x ↦ 2 / (2
refine ⟨fun hf ↦ funext hf.map_eq, ?_⟩
rintro rfl
constructor
case map_two => simp
case map_two => simp [tsub_self]
case map_ne_zero => intro x hx; simpa [tsub_eq_zero_iff_le]
case map_add_rev =>
intro x y
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo1998Q2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Oliver Nash
-/
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Order.Field.Rat
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.Tactic.NoncommRing
import Mathlib.Tactic.Ring
Expand Down
7 changes: 3 additions & 4 deletions Archive/Imo/Imo2013Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ Copyright (c) 2021 David Renshaw. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Renshaw
-/
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.PNat.Basic
import Mathlib.Tactic.Ring
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Field.Rat
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Positivity.Basic
import Mathlib.Tactic.Ring

/-!
# IMO 2013 Q1
Expand Down
2 changes: 0 additions & 2 deletions Archive/MiuLanguage/DecisionNec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Authors: Gihan Marasingha
-/
import Archive.MiuLanguage.Basic
import Mathlib.Data.List.Basic
import Mathlib.Data.List.Count
import Mathlib.Data.Nat.ModEq
import Mathlib.Tactic.Ring

/-!
# Decision procedure: necessary condition
Expand Down
34 changes: 30 additions & 4 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.GroupWithZero.Opposite
import Mathlib.Algebra.GroupWithZero.Pi
import Mathlib.Algebra.GroupWithZero.Pointwise.Set.Basic
import Mathlib.Algebra.GroupWithZero.Pointwise.Set.Card
import Mathlib.Algebra.GroupWithZero.Prod
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Algebra.GroupWithZero.ULift
Expand Down Expand Up @@ -543,6 +544,10 @@ import Mathlib.Algebra.MvPolynomial.Rename
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.NoZeroSMulDivisors.Basic
import Mathlib.Algebra.NoZeroSMulDivisors.Defs
import Mathlib.Algebra.NoZeroSMulDivisors.Pi
import Mathlib.Algebra.NoZeroSMulDivisors.Prod
import Mathlib.Algebra.Notation
import Mathlib.Algebra.Opposites
import Mathlib.Algebra.Order.AbsoluteValue
Expand Down Expand Up @@ -653,6 +658,7 @@ import Mathlib.Algebra.Order.Monoid.Unbundled.ExistsOfLE
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
import Mathlib.Algebra.Order.Monoid.Unbundled.OrderDual
import Mathlib.Algebra.Order.Monoid.Unbundled.Pow
import Mathlib.Algebra.Order.Monoid.Unbundled.TypeTags
import Mathlib.Algebra.Order.Monoid.Unbundled.WithTop
import Mathlib.Algebra.Order.Monoid.Units
import Mathlib.Algebra.Order.Monoid.WithTop
Expand Down Expand Up @@ -744,6 +750,7 @@ import Mathlib.Algebra.Polynomial.Roots
import Mathlib.Algebra.Polynomial.Smeval
import Mathlib.Algebra.Polynomial.SpecificDegree
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.Algebra.Polynomial.SumIteratedDerivative
import Mathlib.Algebra.Polynomial.Taylor
import Mathlib.Algebra.Polynomial.UnitTrinomial
import Mathlib.Algebra.QuadraticDiscriminant
Expand Down Expand Up @@ -866,6 +873,7 @@ import Mathlib.AlgebraicGeometry.Morphisms.FiniteType
import Mathlib.AlgebraicGeometry.Morphisms.IsIso
import Mathlib.AlgebraicGeometry.Morphisms.OpenImmersion
import Mathlib.AlgebraicGeometry.Morphisms.Preimmersion
import Mathlib.AlgebraicGeometry.Morphisms.Proper
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
import Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated
import Mathlib.AlgebraicGeometry.Morphisms.RingHomProperties
Expand Down Expand Up @@ -1001,6 +1009,7 @@ import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries
import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.Analysis.Calculus.ContDiff.WithLp
import Mathlib.Analysis.Calculus.Darboux
import Mathlib.Analysis.Calculus.Deriv.Abs
import Mathlib.Analysis.Calculus.Deriv.Add
Expand Down Expand Up @@ -1038,6 +1047,7 @@ import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
import Mathlib.Analysis.Calculus.FDeriv.Star
import Mathlib.Analysis.Calculus.FDeriv.Symmetric
import Mathlib.Analysis.Calculus.FDeriv.WithLp
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.Calculus.Gradient.Basic
import Mathlib.Analysis.Calculus.Implicit
Expand Down Expand Up @@ -1089,6 +1099,7 @@ import Mathlib.Analysis.Complex.OperatorNorm
import Mathlib.Analysis.Complex.PhragmenLindelof
import Mathlib.Analysis.Complex.Polynomial.Basic
import Mathlib.Analysis.Complex.Polynomial.UnitTrinomial
import Mathlib.Analysis.Complex.Positivity
import Mathlib.Analysis.Complex.ReImTopology
import Mathlib.Analysis.Complex.RealDeriv
import Mathlib.Analysis.Complex.RemovableSingularity
Expand Down Expand Up @@ -1228,6 +1239,7 @@ import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.Analysis.Normed.Field.InfiniteSum
import Mathlib.Analysis.Normed.Field.Lemmas
import Mathlib.Analysis.Normed.Field.ProperSpace
import Mathlib.Analysis.Normed.Field.Ultra
import Mathlib.Analysis.Normed.Field.UnitBall
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Analysis.Normed.Group.AddTorsor
Expand Down Expand Up @@ -1452,6 +1464,7 @@ import Mathlib.CategoryTheory.Bicategory.Functor.Oplax
import Mathlib.CategoryTheory.Bicategory.Functor.Prelax
import Mathlib.CategoryTheory.Bicategory.Functor.Pseudofunctor
import Mathlib.CategoryTheory.Bicategory.FunctorBicategory
import Mathlib.CategoryTheory.Bicategory.Grothendieck
import Mathlib.CategoryTheory.Bicategory.Kan.Adjunction
import Mathlib.CategoryTheory.Bicategory.Kan.HasKan
import Mathlib.CategoryTheory.Bicategory.Kan.IsKan
Expand Down Expand Up @@ -1536,6 +1549,7 @@ import Mathlib.CategoryTheory.Extensive
import Mathlib.CategoryTheory.FiberedCategory.BasedCategory
import Mathlib.CategoryTheory.FiberedCategory.Cartesian
import Mathlib.CategoryTheory.FiberedCategory.Cocartesian
import Mathlib.CategoryTheory.FiberedCategory.Fiber
import Mathlib.CategoryTheory.FiberedCategory.Fibered
import Mathlib.CategoryTheory.FiberedCategory.HomLift
import Mathlib.CategoryTheory.Filtered.Basic
Expand Down Expand Up @@ -1669,6 +1683,7 @@ import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Square
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Terminal
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero
import Mathlib.CategoryTheory.Limits.Preserves.Ulift
import Mathlib.CategoryTheory.Limits.Preserves.Yoneda
import Mathlib.CategoryTheory.Limits.Presheaf
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
Expand Down Expand Up @@ -1858,6 +1873,7 @@ import Mathlib.CategoryTheory.Shift.Pullback
import Mathlib.CategoryTheory.Shift.Quotient
import Mathlib.CategoryTheory.Shift.ShiftSequence
import Mathlib.CategoryTheory.Shift.ShiftedHom
import Mathlib.CategoryTheory.Shift.ShiftedHomOpposite
import Mathlib.CategoryTheory.Shift.SingleFunctors
import Mathlib.CategoryTheory.Sigma.Basic
import Mathlib.CategoryTheory.Simple
Expand Down Expand Up @@ -2141,7 +2157,6 @@ import Mathlib.Data.Bool.Count
import Mathlib.Data.Bool.Set
import Mathlib.Data.Bracket
import Mathlib.Data.Bundle
import Mathlib.Data.ByteArray
import Mathlib.Data.Char
import Mathlib.Data.Complex.Abs
import Mathlib.Data.Complex.Basic
Expand Down Expand Up @@ -2422,6 +2437,7 @@ import Mathlib.Data.NNRat.Lemmas
import Mathlib.Data.NNRat.Order
import Mathlib.Data.NNReal.Basic
import Mathlib.Data.NNReal.Star
import Mathlib.Data.Nat.BinaryRec
import Mathlib.Data.Nat.BitIndices
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Bitwise
Expand Down Expand Up @@ -2666,6 +2682,7 @@ import Mathlib.Data.ZMod.Quotient
import Mathlib.Data.ZMod.Units
import Mathlib.Deprecated.AlgebraClasses
import Mathlib.Deprecated.Aliases
import Mathlib.Deprecated.ByteArray
import Mathlib.Deprecated.Combinator
import Mathlib.Deprecated.Equiv
import Mathlib.Deprecated.Group
Expand Down Expand Up @@ -2717,6 +2734,8 @@ import Mathlib.FieldTheory.Finite.Trace
import Mathlib.FieldTheory.Finiteness
import Mathlib.FieldTheory.Fixed
import Mathlib.FieldTheory.Galois.Basic
import Mathlib.FieldTheory.Galois.GaloisClosure
import Mathlib.FieldTheory.Galois.Profinite
import Mathlib.FieldTheory.IntermediateField.Algebraic
import Mathlib.FieldTheory.IntermediateField.Basic
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
Expand Down Expand Up @@ -3607,6 +3626,7 @@ import Mathlib.Order.Bounded
import Mathlib.Order.BoundedOrder
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.Bounds.Defs
import Mathlib.Order.Bounds.Image
import Mathlib.Order.Bounds.OrderIso
import Mathlib.Order.Category.BddDistLat
import Mathlib.Order.Category.BddLat
Expand Down Expand Up @@ -3783,6 +3803,7 @@ import Mathlib.Order.SuccPred.IntervalSucc
import Mathlib.Order.SuccPred.Limit
import Mathlib.Order.SuccPred.LinearLocallyFinite
import Mathlib.Order.SuccPred.Relation
import Mathlib.Order.SuccPred.Tree
import Mathlib.Order.SupClosed
import Mathlib.Order.SupIndep
import Mathlib.Order.SymmDiff
Expand Down Expand Up @@ -4133,6 +4154,7 @@ import Mathlib.RingTheory.SimpleRing.Basic
import Mathlib.RingTheory.SimpleRing.Defs
import Mathlib.RingTheory.Smooth.Basic
import Mathlib.RingTheory.Smooth.Kaehler
import Mathlib.RingTheory.Smooth.Pi
import Mathlib.RingTheory.Smooth.StandardSmooth
import Mathlib.RingTheory.Support
import Mathlib.RingTheory.SurjectiveOnStalks
Expand Down Expand Up @@ -4293,6 +4315,7 @@ import Mathlib.Tactic.Contrapose
import Mathlib.Tactic.Conv
import Mathlib.Tactic.Convert
import Mathlib.Tactic.Core
import Mathlib.Tactic.DeclarationNames
import Mathlib.Tactic.DefEqTransformations
import Mathlib.Tactic.DeprecateMe
import Mathlib.Tactic.DeriveFintype
Expand Down Expand Up @@ -4433,7 +4456,6 @@ import Mathlib.Tactic.ReduceModChar
import Mathlib.Tactic.ReduceModChar.Ext
import Mathlib.Tactic.Relation.Rfl
import Mathlib.Tactic.Relation.Symm
import Mathlib.Tactic.Relation.Trans
import Mathlib.Tactic.Rename
import Mathlib.Tactic.RenameBVar
import Mathlib.Tactic.Replace
Expand Down Expand Up @@ -4536,6 +4558,7 @@ import Mathlib.Topology.Algebra.Module.Determinant
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.Module.LinearPMap
import Mathlib.Topology.Algebra.Module.LocallyConvex
import Mathlib.Topology.Algebra.Module.ModuleTopology
import Mathlib.Topology.Algebra.Module.Multilinear.Basic
import Mathlib.Topology.Algebra.Module.Multilinear.Bounded
import Mathlib.Topology.Algebra.Module.Multilinear.Topology
Expand All @@ -4552,14 +4575,13 @@ import Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology
import Mathlib.Topology.Algebra.Nonarchimedean.Bases
import Mathlib.Topology.Algebra.Nonarchimedean.Basic
import Mathlib.Topology.Algebra.Nonarchimedean.Completion
import Mathlib.Topology.Algebra.Nonarchimedean.TotallyDisconnected
import Mathlib.Topology.Algebra.OpenSubgroup
import Mathlib.Topology.Algebra.Order.Archimedean
import Mathlib.Topology.Algebra.Order.Compact
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Algebra.Order.Floor
import Mathlib.Topology.Algebra.Order.Group
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.Algebra.Order.Rolle
import Mathlib.Topology.Algebra.Order.UpperLower
import Mathlib.Topology.Algebra.Polynomial
import Mathlib.Topology.Algebra.PontryaginDual
Expand Down Expand Up @@ -4711,6 +4733,8 @@ import Mathlib.Topology.Filter
import Mathlib.Topology.GDelta
import Mathlib.Topology.Germ
import Mathlib.Topology.Gluing
import Mathlib.Topology.Hom.ContinuousEval
import Mathlib.Topology.Hom.ContinuousEvalConst
import Mathlib.Topology.Hom.Open
import Mathlib.Topology.Homeomorph
import Mathlib.Topology.Homotopy.Basic
Expand Down Expand Up @@ -4816,6 +4840,7 @@ import Mathlib.Topology.Order.Bornology
import Mathlib.Topology.Order.Bounded
import Mathlib.Topology.Order.Category.AlexDisc
import Mathlib.Topology.Order.Category.FrameAdjunction
import Mathlib.Topology.Order.Compact
import Mathlib.Topology.Order.DenselyOrdered
import Mathlib.Topology.Order.ExtendFrom
import Mathlib.Topology.Order.ExtrClosure
Expand All @@ -4839,6 +4864,7 @@ import Mathlib.Topology.Order.OrderClosed
import Mathlib.Topology.Order.PartialSups
import Mathlib.Topology.Order.Priestley
import Mathlib.Topology.Order.ProjIcc
import Mathlib.Topology.Order.Rolle
import Mathlib.Topology.Order.ScottTopology
import Mathlib.Topology.Order.T5
import Mathlib.Topology.Order.UpperLowerSetTopology
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Algebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Mathlib.Algebra.Module.Equiv.Basic
import Mathlib.Algebra.Module.Submodule.Ker
import Mathlib.Algebra.Module.Submodule.RestrictScalars
import Mathlib.Algebra.Module.ULift
import Mathlib.Algebra.NoZeroSMulDivisors.Basic
import Mathlib.Algebra.Ring.Subring.Basic
import Mathlib.Data.Nat.Cast.Order.Basic
import Mathlib.Data.Int.CharZero
Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Algebra/Algebra/Hom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ section Semiring
variable [CommSemiring R] [Semiring A] [Semiring B] [Semiring C] [Semiring D]
variable [Algebra R A] [Algebra R B] [Algebra R C] [Algebra R D]

-- Porting note: we don't port specialized `CoeFun` instances if there is `DFunLike` instead

instance funLike : FunLike (A →ₐ[R] B) A B where
coe f := f.toFun
coe_injective' f g h := by
Expand Down
5 changes: 0 additions & 5 deletions Mathlib/Algebra/Algebra/NonUnitalHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ variable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]
variable [NonUnitalNonAssocSemiring B] [DistribMulAction S B]
variable [NonUnitalNonAssocSemiring C] [DistribMulAction T C]

-- Porting note: Replaced with DFunLike instance
-- /-- see Note [function coercion] -/
-- instance : CoeFun (A →ₙₐ[R] B) fun _ => A → B :=
-- ⟨toFun⟩

instance : DFunLike (A →ₛₙₐ[φ] B) A fun _ => B where
coe f := f.toFun
coe_injective' := by rintro ⟨⟨⟨f, _⟩, _⟩, _⟩ ⟨⟨⟨g, _⟩, _⟩, _⟩ h; congr
Expand Down
9 changes: 9 additions & 0 deletions Mathlib/Algebra/Algebra/Pi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ theorem algebraMap_apply {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀
-- when each `A i` is an `R i`-algebra, although I'm not sure that it's useful.
variable {I} (R)

/-- A family of algebra homomorphisms `g i : A →ₐ[R] f i` defines a ring homomorphism
`Pi.algHom g : A →ₐ[R] Π i, f i` given by `Pi.algHom g x i = f i x`. -/
@[simps!]
def algHom [CommSemiring R] [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]
{A : Type*} [Semiring A] [Algebra R A] (g : ∀ i, A →ₐ[R] f i) :
A →ₐ[R] ∀ i, f i where
__ := Pi.ringHom fun i ↦ (g i).toRingHom
commutes' r := by ext; simp

/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,
etc. -/
@[simps]
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Algebra/Algebra/Quasispectrum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ lemma quasispectrum.not_isUnit_mem (a : A) {r : R} (hr : ¬ IsUnit r) : r ∈ qu
lemma quasispectrum.zero_mem [Nontrivial R] (a : A) : 0 ∈ quasispectrum R a :=
quasispectrum.not_isUnit_mem a <| by simp

theorem quasispectrum.nonempty [Nontrivial R] (a : A) : (quasispectrum R a).Nonempty :=
Set.nonempty_of_mem <| quasispectrum.zero_mem R a

instance quasispectrum.instZero [Nontrivial R] (a : A) : Zero (quasispectrum R a) where
zero := ⟨0, quasispectrum.zero_mem R a⟩

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Associated/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ theorem Irreducible.dvd_comm [Monoid M] {p q : M} (hp : Irreducible p) (hq : Irr
⟨hp.dvd_symm hq, hq.dvd_symm hp⟩

theorem Irreducible.of_map {F : Type*} [Monoid M] [Monoid N] [FunLike F M N] [MonoidHomClass F M N]
{f : F} [IsLocalRingHom f] {x} (hfx : Irreducible (f x)) : Irreducible x :=
{f : F} [IsLocalHom f] {x} (hfx : Irreducible (f x)) : Irreducible x :=
fun hu ↦ hfx.not_unit <| hu.map f,
by rintro p q rfl
exact (hfx.isUnit_or_isUnit <| map_mul f p q).imp (.of_map f _) (.of_map f _)⟩
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Algebra/BigOperators/Finprod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Authors: Kexing Ying, Kevin Buzzard, Yury Kudryashov
-/
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset
import Mathlib.Algebra.Group.FiniteSupport
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.NoZeroSMulDivisors.Basic
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Data.Set.Subsingleton

/-!
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Algebra/BigOperators/Group/Finset.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1611,14 +1611,14 @@ theorem dvd_prod_of_mem (f : α → β) {a : α} {s : Finset α} (ha : a ∈ s)
/-- A product can be partitioned into a product of products, each equivalent under a setoid. -/
@[to_additive "A sum can be partitioned into a sum of sums, each equivalent under a setoid."]
theorem prod_partition (R : Setoid α) [DecidableRel R.r] :
∏ x ∈ s, f x = ∏ xbar ∈ s.image Quotient.mk'', ∏ y ∈ s.filter (⟦·⟧ = xbar), f y := by
∏ x ∈ s, f x = ∏ xbar ∈ s.image (Quotient.mk _), ∏ y ∈ s.filter (⟦·⟧ = xbar), f y := by
refine (Finset.prod_image' f fun x _hx => ?_).symm
rfl

/-- If we can partition a product into subsets that cancel out, then the whole product cancels. -/
@[to_additive "If we can partition a sum into subsets that cancel out, then the whole sum cancels."]
theorem prod_cancels_of_partition_cancels (R : Setoid α) [DecidableRel R.r]
(h : ∀ x ∈ s, ∏ a ∈ s.filter fun y => y ≈ x, f a = 1) : ∏ x ∈ s, f x = 1 := by
theorem prod_cancels_of_partition_cancels (R : Setoid α) [DecidableRel R]
(h : ∀ x ∈ s, ∏ a ∈ s.filter fun y => R y x, f a = 1) : ∏ x ∈ s, f x = 1 := by
rw [prod_partition R, ← Finset.prod_eq_one]
intro xbar xbar_in_s
obtain ⟨x, x_in_s, rfl⟩ := mem_image.mp xbar_in_s
Expand Down
1 change: 0 additions & 1 deletion Mathlib/Algebra/BigOperators/Group/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ namespace MonoidHom
protected theorem map_list_prod (f : M →* N) (l : List M) : f l.prod = (l.map f).prod :=
map_list_prod f l

attribute [deprecated map_list_prod (since := "2023-01-10")] MonoidHom.map_list_prod
attribute [deprecated map_list_sum (since := "2024-05-02")] AddMonoidHom.map_list_sum

end MonoidHom
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/AlgebraCat/Monoidal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R
(forget₂ (AlgebraCat R) (ModuleCat R))
{ μIso := fun _ _ => Iso.refl _
εIso := Iso.refl _
associator_eq := fun _ _ _ => TensorProduct.ext₃ (fun _ _ _ => rfl)
associator_eq := fun _ _ _ => TensorProduct.ext_threefold (fun _ _ _ => rfl)
leftUnitor_eq := fun _ => TensorProduct.ext' (fun _ _ => rfl)
rightUnitor_eq := fun _ => TensorProduct.ext' (fun _ _ => rfl) }

Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Algebra/Category/Grp/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ instance hasForgetToMonCat : HasForget₂ Grp MonCat :=
@[to_additive]
instance : Coe Grp.{u} MonCat.{u} where coe := (forget₂ Grp MonCat).obj

-- porting note (#10670): this instance was not necessary in mathlib
@[to_additive]
instance (G H : Grp) : One (G ⟶ H) := (inferInstance : One (MonoidHom G H))

Expand Down Expand Up @@ -257,7 +256,6 @@ instance hasForgetToCommMonCat : HasForget₂ CommGrp CommMonCat :=
@[to_additive]
instance : Coe CommGrp.{u} CommMonCat.{u} where coe := (forget₂ CommGrp CommMonCat).obj

-- porting note (#10670): this instance was not necessary in mathlib
@[to_additive]
instance (G H : CommGrp) : One (G ⟶ H) := (inferInstance : One (MonoidHom G H))

Expand Down
Loading

0 comments on commit 5b9fbb5

Please sign in to comment.