Skip to content

Commit

Permalink
Trigger CI for leanprover/lean4#3012
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Dec 4, 2023
2 parents f546144 + 7360a51 commit 3cd8f02
Show file tree
Hide file tree
Showing 641 changed files with 4,337 additions and 2,483 deletions.
6 changes: 3 additions & 3 deletions Archive/Imo/Imo1972Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ from `hneg` directly), finally raising a contradiction with `k' < k'`.
theorem imo1972_q5 (f g : ℝ → ℝ) (hf1 : ∀ x, ∀ y, f (x + y) + f (x - y) = 2 * f x * g y)
(hf2 : ∀ y, ‖f y‖ ≤ 1) (hf3 : ∃ x, f x ≠ 0) (y : ℝ) : ‖g y‖ ≤ 1 := by
-- Suppose the conclusion does not hold.
by_contra' hneg
by_contra! hneg
set S := Set.range fun x => ‖f x‖
-- Introduce `k`, the supremum of `f`.
let k : ℝ := sSup S
Expand Down Expand Up @@ -82,8 +82,8 @@ This is a more concise version of the proof proposed by Ruben Van de Velde.
-/
theorem imo1972_q5' (f g : ℝ → ℝ) (hf1 : ∀ x, ∀ y, f (x + y) + f (x - y) = 2 * f x * g y)
(hf2 : BddAbove (Set.range fun x => ‖f x‖)) (hf3 : ∃ x, f x ≠ 0) (y : ℝ) : ‖g y‖ ≤ 1 := by
-- porting note: moved `by_contra'` up to avoid a bug
by_contra' H
-- porting note: moved `by_contra!` up to avoid a bug
by_contra! H
obtain ⟨x, hx⟩ := hf3
set k := ⨆ x, ‖f x‖
have h : ∀ x, ‖f x‖ ≤ k := le_ciSup hf2
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo1994Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ theorem imo1994_q1 (n : ℕ) (m : ℕ) (A : Finset ℕ) (hm : A.card = m + 1)
_ = (m + 1) * (n + 1) := by rw [sum_const, card_fin, Nat.nsmul_eq_mul]
-- It remains to prove the key inequality, by contradiction
rintro k -
by_contra' h : a k + a (rev k) < n + 1
by_contra! h : a k + a (rev k) < n + 1
-- We exhibit `k+1` elements of `A` greater than `a (rev k)`
set f : Fin (m + 1) ↪ ℕ :=
fun i => a i + a (rev k), by
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo2008Q4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ theorem imo2008_q4 (f : ℝ → ℝ) (H₁ : ∀ x > 0, f x > 0) :
field_simp at H₂ ⊢
linear_combination 1 / 2 * H₂
have h₃ : ∀ x > 0, f x = x ∨ f x = 1 / x := by simpa [sub_eq_zero] using h₂
by_contra' h
by_contra! h
rcases h with ⟨⟨b, hb, hfb₁⟩, ⟨a, ha, hfa₁⟩⟩
obtain hfa₂ := Or.resolve_right (h₃ a ha) hfa₁
-- f(a) ≠ 1/a, f(a) = a
Expand Down
6 changes: 3 additions & 3 deletions Archive/Imo/Imo2013Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Imo2013Q5

theorem le_of_all_pow_lt_succ {x y : ℝ} (hx : 1 < x) (hy : 1 < y)
(h : ∀ n : ℕ, 0 < n → x ^ n - 1 < y ^ n) : x ≤ y := by
by_contra' hxy
by_contra! hxy
have hxmy : 0 < x - y := sub_pos.mpr hxy
have hn : ∀ n : ℕ, 0 < n → (x - y) * (n : ℝ) ≤ x ^ n - y ^ n := by
intro n _
Expand Down Expand Up @@ -68,7 +68,7 @@ theorem le_of_all_pow_lt_succ {x y : ℝ} (hx : 1 < x) (hy : 1 < y)
theorem le_of_all_pow_lt_succ' {x y : ℝ} (hx : 1 < x) (hy : 0 < y)
(h : ∀ n : ℕ, 0 < n → x ^ n - 1 < y ^ n) : x ≤ y := by
refine' le_of_all_pow_lt_succ hx _ h
by_contra' hy'' : y ≤ 1
by_contra! hy'' : y ≤ 1
-- Then there exists y' such that 0 < y ≤ 1 < y' < x.
let y' := (x + 1) / 2
have h_y'_lt_x : y' < x :=
Expand Down Expand Up @@ -163,7 +163,7 @@ theorem fixed_point_of_gt_1 {f : ℚ → ℝ} {x : ℚ} (hx : 1 < x)
(x : ℝ) + (a ^ N - x : ℚ) ≤ f x + (a ^ N - x : ℚ) := by gcongr; exact H5 x hx
_ ≤ f x + f (a ^ N - x) := by gcongr; exact H5 _ h_big_enough
have hxp : 0 < x := by positivity
have hNp : 0 < N := by by_contra' H; rw [le_zero_iff.mp H] at hN; linarith
have hNp : 0 < N := by by_contra! H; rw [le_zero_iff.mp H] at hN; linarith
have h2 :=
calc
f x + f (a ^ N - x) ≤ f (x + (a ^ N - x)) := H2 x (a ^ N - x) hxp (by positivity)
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo2021Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ theorem imo2021_q1 :
have hBsub : B ⊆ Finset.Icc n (2 * n) := by
intro c hcB; simpa only [Finset.mem_Icc] using h₂ c hcB
have hB' : 2 * 1 < (B ∩ (Finset.Icc n (2 * n) \ A) ∪ B ∩ A).card := by
rw [←inter_distrib_left, sdiff_union_self_eq_union, union_eq_left.2 hA,
rw [← inter_distrib_left, sdiff_union_self_eq_union, union_eq_left.2 hA,
inter_eq_left.2 hBsub]
exact Nat.succ_le_iff.mp hB
-- Since B has cardinality greater or equal to 3, there must exist a subset C ⊆ B such that
Expand Down
3 changes: 1 addition & 2 deletions Archive/Wiedijk100Theorems/AscendingDescendingSequences.lean
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ theorem erdos_szekeres {r s n : ℕ} {f : Fin n → α} (hn : r * s < n) (hf : I
-- Finished both goals!
-- Now that we have uniqueness of each label, it remains to do some counting to finish off.
-- Suppose all the labels are small.
by_contra q
push_neg at q
by_contra! q
-- Then the labels `(a_i, b_i)` all fit in the following set: `{ (x,y) | 1 ≤ x ≤ r, 1 ≤ y ≤ s }`
let ran : Finset (ℕ × ℕ) := (range r).image Nat.succ ×ˢ (range s).image Nat.succ
-- which we prove here.
Expand Down
2 changes: 1 addition & 1 deletion Cache/Hashing.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def getRootHash : IO UInt64 := do
pure ((← mathlibDepPath) / ·)
let hashs ← rootFiles.mapM fun path =>
hashFileContents <$> IO.FS.readFile (qualifyPath path)
return hash ((hash Lean.versionString) :: hashs)
return hash (hash Lean.githash :: hashs)

/--
Computes the hash of a file, which mixes:
Expand Down
1 change: 1 addition & 0 deletions Counterexamples/CharPZeroNeCharZero.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa, Eric Wieser
-/
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.PUnitInstances

#align_import char_p_zero_ne_char_zero from "leanprover-community/mathlib"@"328375597f2c0dd00522d9c2e5a33b6a6128feeb"

Expand Down
2 changes: 1 addition & 1 deletion Counterexamples/Phillips.lean
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ theorem exists_discrete_support_nonpos (f : BoundedAdditiveMeasure α) :
In this proof, we use explicit coercions `↑s` for `s : A` as otherwise the system tries to find
a `CoeFun` instance on `↥A`, which is too costly.
-/
by_contra' h
by_contra! h
-- We will formulate things in terms of the type of countable subsets of `α`, as this is more
-- convenient to formalize the inductive construction.
let A : Set (Set α) := {t | t.Countable}
Expand Down
14 changes: 10 additions & 4 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import Mathlib.Algebra.CharP.LocalRing
import Mathlib.Algebra.CharP.MixedCharZero
import Mathlib.Algebra.CharP.Pi
import Mathlib.Algebra.CharP.Quotient
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Algebra.CharP.Subring
import Mathlib.Algebra.CharP.Two
import Mathlib.Algebra.CharZero.Defs
Expand Down Expand Up @@ -233,6 +234,7 @@ import Mathlib.Algebra.Homology.Functor
import Mathlib.Algebra.Homology.HomologicalComplex
import Mathlib.Algebra.Homology.HomologicalComplexLimits
import Mathlib.Algebra.Homology.Homology
import Mathlib.Algebra.Homology.HomologySequence
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.Algebra.Homology.HomotopyCategory
import Mathlib.Algebra.Homology.HomotopyCategory.HomComplex
Expand Down Expand Up @@ -805,8 +807,8 @@ import Mathlib.Analysis.NormedSpace.LpEquiv
import Mathlib.Analysis.NormedSpace.MStructure
import Mathlib.Analysis.NormedSpace.MatrixExponential
import Mathlib.Analysis.NormedSpace.MazurUlam
import Mathlib.Analysis.NormedSpace.Multilinear
import Mathlib.Analysis.NormedSpace.MultilinearCurrying
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.Analysis.NormedSpace.Multilinear.Curry
import Mathlib.Analysis.NormedSpace.OperatorNorm
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.Analysis.NormedSpace.Pointwise
Expand Down Expand Up @@ -1010,6 +1012,7 @@ import Mathlib.CategoryTheory.Generator
import Mathlib.CategoryTheory.GlueData
import Mathlib.CategoryTheory.GradedObject
import Mathlib.CategoryTheory.GradedObject.Bifunctor
import Mathlib.CategoryTheory.GradedObject.Trifunctor
import Mathlib.CategoryTheory.Grothendieck
import Mathlib.CategoryTheory.Groupoid
import Mathlib.CategoryTheory.Groupoid.Basic
Expand Down Expand Up @@ -2614,6 +2617,7 @@ import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
import Mathlib.MeasureTheory.Measure.Haar.OfBasis
import Mathlib.MeasureTheory.Measure.Haar.Quotient
import Mathlib.MeasureTheory.Measure.Haar.Unique
import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed
import Mathlib.MeasureTheory.Measure.Hausdorff
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Complex
Expand Down Expand Up @@ -3119,6 +3123,7 @@ import Mathlib.RingTheory.Valuation.Basic
import Mathlib.RingTheory.Valuation.ExtendToLocalization
import Mathlib.RingTheory.Valuation.Integers
import Mathlib.RingTheory.Valuation.Integral
import Mathlib.RingTheory.Valuation.PrimeMultiplicity
import Mathlib.RingTheory.Valuation.Quotient
import Mathlib.RingTheory.Valuation.RamificationGroup
import Mathlib.RingTheory.Valuation.ValuationRing
Expand Down Expand Up @@ -3384,15 +3389,15 @@ import Mathlib.Topology.Algebra.InfiniteSum.Order
import Mathlib.Topology.Algebra.InfiniteSum.Real
import Mathlib.Topology.Algebra.InfiniteSum.Ring
import Mathlib.Topology.Algebra.Localization
import Mathlib.Topology.Algebra.Module.Alternating
import Mathlib.Topology.Algebra.Module.Alternating.Basic
import Mathlib.Topology.Algebra.Module.Basic
import Mathlib.Topology.Algebra.Module.Cardinality
import Mathlib.Topology.Algebra.Module.CharacterSpace
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.Multilinear
import Mathlib.Topology.Algebra.Module.Multilinear.Basic
import Mathlib.Topology.Algebra.Module.Simple
import Mathlib.Topology.Algebra.Module.Star
import Mathlib.Topology.Algebra.Module.StrongTopology
Expand Down Expand Up @@ -3605,6 +3610,7 @@ import Mathlib.Topology.Order.Hom.Esakia
import Mathlib.Topology.Order.Lattice
import Mathlib.Topology.Order.LowerUpperTopology
import Mathlib.Topology.Order.NhdsSet
import Mathlib.Topology.Order.PartialSups
import Mathlib.Topology.Order.Priestley
import Mathlib.Topology.Order.UpperLowerSetTopology
import Mathlib.Topology.Partial
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ theorem symm_symm (e : A₁ ≃ₐ[R] A₂) : e.symm.symm = e := by
#align alg_equiv.symm_symm AlgEquiv.symm_symm

theorem symm_bijective : Function.Bijective (symm : (A₁ ≃ₐ[R] A₂) → A₂ ≃ₐ[R] A₁) :=
Equiv.bijective ⟨symm, symm, symm_symm, symm_symm⟩
Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
#align alg_equiv.symm_bijective AlgEquiv.symm_bijective

@[simp]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,11 @@ theorem to_subring_eq_top {R A : Type*} [CommRing R] [Ring A] [Algebra R A]
NonUnitalSubalgebra.toNonUnitalSubring_injective.eq_iff' top_toSubring

theorem mem_sup_left {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ S → x ∈ S ⊔ T := by
rw [←SetLike.le_def]
rw [← SetLike.le_def]
exact le_sup_left

theorem mem_sup_right {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T := by
rw [←SetLike.le_def]
rw [← SetLike.le_def]
exact le_sup_right

theorem mul_mem_sup {S T : NonUnitalSubalgebra R A} {x y : A} (hx : x ∈ S) (hy : y ∈ T) :
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ instance moduleSet : Module (SetSemiring A) (Submodule R A) where
mul_smul s t P := by
simp_rw [HSMul.hSMul, SetSemiring.down_mul, ← mul_assoc, span_mul_span]
one_smul P := by
simp_rw [HSMul.hSMul, SetSemiring.down_one, ←one_eq_span_one_set, one_mul]
simp_rw [HSMul.hSMul, SetSemiring.down_one, ← one_eq_span_one_set, one_mul]
zero_smul P := by
simp_rw [HSMul.hSMul, SetSemiring.down_zero, span_empty, bot_mul, bot_eq_zero]
smul_zero _ := mul_bot _
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ theorem _root_.AlgHomClass.unitization_injective' {F R S A : Type*} [CommRing R]
(hf : ∀ x : s, f x = x) : Function.Injective f := by
refine' (injective_iff_map_eq_zero _).mpr fun x hx => _
induction' x using Unitization.ind with r a
simp_rw [map_add, hf, ←Unitization.algebraMap_eq_inl, AlgHomClass.commutes] at hx
simp_rw [map_add, hf, ← Unitization.algebraMap_eq_inl, AlgHomClass.commutes] at hx
rw [add_eq_zero_iff_eq_neg] at hx ⊢
by_cases hr : r = 0
· ext <;> simp [hr] at hx ⊢
Expand Down
11 changes: 8 additions & 3 deletions Mathlib/Algebra/Associated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,11 @@ theorem quot_mk_eq_mk [Monoid α] (a : α) : Quot.mk Setoid.r a = Associates.mk
rfl
#align associates.quot_mk_eq_mk Associates.quot_mk_eq_mk

@[simp]
theorem quot_out [Monoid α] (a : Associates α) : Associates.mk (Quot.out a) = a := by
rw [← quot_mk_eq_mk, Quot.out_eq]
#align associates.quot_out Associates.quot_outₓ

theorem forall_associated [Monoid α] {p : Associates α → Prop} :
(∀ a, p a) ↔ ∀ a, p (Associates.mk a) :=
Iff.intro (fun h _ => h _) fun h a => Quotient.inductionOn a h
Expand Down Expand Up @@ -1158,9 +1163,9 @@ theorem one_or_eq_of_le_of_prime : ∀ p m : Associates α, Prime p → m ≤ p
#align associates.one_or_eq_of_le_of_prime Associates.one_or_eq_of_le_of_prime

instance : CanonicallyOrderedCommMonoid (Associates α) where
exists_mul_of_le := fun h => h
le_self_mul := fun _ b => ⟨b, rfl⟩
bot_le := fun _ => one_le
exists_mul_of_le := fun h => h
le_self_mul := fun _ b => ⟨b, rfl⟩
bot_le := fun _ => one_le

theorem dvdNotUnit_iff_lt {a b : Associates α} : DvdNotUnit a b ↔ a < b :=
dvd_and_not_dvd_iff.symm
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Algebra/BigOperators/Associated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ theorem finset_prod_mk {p : Finset β} {f : β → α} :
-- Porting note: added
have : (fun i => Associates.mk (f i)) = Associates.mk ∘ f :=
funext <| fun x => Function.comp_apply
rw [Finset.prod_eq_multiset_prod, this, ←Multiset.map_map, prod_mk, ←Finset.prod_eq_multiset_prod]
rw [Finset.prod_eq_multiset_prod, this, ← Multiset.map_map, prod_mk,
← Finset.prod_eq_multiset_prod]
#align associates.finset_prod_mk Associates.finset_prod_mk

theorem rel_associated_iff_map_eq_map {p q : Multiset α} :
Expand Down
15 changes: 5 additions & 10 deletions Mathlib/Algebra/BigOperators/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,8 @@ theorem map_prod [CommMonoid β] [CommMonoid γ] {G : Type*} [MonoidHomClass G

section Deprecated

/-- Deprecated: use `_root_.map_prod` instead. -/
@[to_additive (attr := deprecated) "Deprecated: use `_root_.map_sum` instead."]
protected theorem MonoidHom.map_prod [CommMonoid β] [CommMonoid γ] (g : β →* γ) (f : α → β)
(s : Finset α) : g (∏ x in s, f x) = ∏ x in s, g (f x) :=
map_prod g f s
#align monoid_hom.map_prod MonoidHom.map_prod
#align add_monoid_hom.map_sum AddMonoidHom.map_sum
#align monoid_hom.map_prod map_prodₓ
#align add_monoid_hom.map_sum map_sumₓ

/-- Deprecated: use `_root_.map_prod` instead. -/
@[to_additive (attr := deprecated) "Deprecated: use `_root_.map_sum` instead."]
Expand Down Expand Up @@ -280,7 +275,7 @@ end Deprecated
@[to_additive]
theorem MonoidHom.coe_finset_prod [MulOneClass β] [CommMonoid γ] (f : α → β →* γ) (s : Finset α) :
⇑(∏ x in s, f x) = ∏ x in s, ⇑(f x) :=
(MonoidHom.coeFn β γ).map_prod _ _
map_prod (MonoidHom.coeFn β γ) _ _
#align monoid_hom.coe_finset_prod MonoidHom.coe_finset_prod
#align add_monoid_hom.coe_finset_sum AddMonoidHom.coe_finset_sum

Expand All @@ -291,7 +286,7 @@ theorem MonoidHom.coe_finset_prod [MulOneClass β] [CommMonoid γ] (f : α →
`f : α → β → γ`"]
theorem MonoidHom.finset_prod_apply [MulOneClass β] [CommMonoid γ] (f : α → β →* γ) (s : Finset α)
(b : β) : (∏ x in s, f x) b = ∏ x in s, f x b :=
(MonoidHom.eval b).map_prod _ _
map_prod (MonoidHom.eval b) _ _
#align monoid_hom.finset_prod_apply MonoidHom.finset_prod_apply
#align add_monoid_hom.finset_sum_apply AddMonoidHom.finset_sum_apply

Expand Down Expand Up @@ -2300,7 +2295,7 @@ end Int
@[simp, norm_cast]
theorem Units.coe_prod {M : Type*} [CommMonoid M] (f : α → Mˣ) (s : Finset α) :
(↑(∏ i in s, f i) : M) = ∏ i in s, (f i : M) :=
(Units.coeHom M).map_prod _ _
map_prod (Units.coeHom M) _ _
#align units.coe_prod Units.coe_prod

theorem Units.mk0_prod [CommGroupWithZero β] (s : Finset α) (f : α → β) (h) :
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/BigOperators/Finprod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ theorem one_le_finprod' {M : Type*} [OrderedCommMonoid M] {f : α → M} (hf :
theorem MonoidHom.map_finprod_plift (f : M →* N) (g : α → M)
(h : (mulSupport <| g ∘ PLift.down).Finite) : f (∏ᶠ x, g x) = ∏ᶠ x, f (g x) := by
rw [finprod_eq_prod_plift_of_mulSupport_subset h.coe_toFinset.ge,
finprod_eq_prod_plift_of_mulSupport_subset, f.map_prod]
finprod_eq_prod_plift_of_mulSupport_subset, map_prod]
rw [h.coe_toFinset]
exact mulSupport_comp_subset f.map_one (g ∘ PLift.down)
#align monoid_hom.map_finprod_plift MonoidHom.map_finprod_plift
Expand Down Expand Up @@ -668,7 +668,7 @@ theorem finprod_mem_of_eqOn_one (hf : s.EqOn f 1) : ∏ᶠ i ∈ s, f i = 1 := b
"If the product of `f i` over `i ∈ s` is not equal to `0`, then there is some `x ∈ s`
such that `f x ≠ 0`."]
theorem exists_ne_one_of_finprod_mem_ne_one (h : ∏ᶠ i ∈ s, f i ≠ 1) : ∃ x ∈ s, f x ≠ 1 := by
by_contra' h'
by_contra! h'
exact h (finprod_mem_of_eqOn_one h')
#align exists_ne_one_of_finprod_mem_ne_one exists_ne_one_of_finprod_mem_ne_one
#align exists_ne_zero_of_finsum_mem_ne_zero exists_ne_zero_of_finsum_mem_ne_zero
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Algebra/BigOperators/Finsupp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ namespace Finsupp

theorem finset_sum_apply [AddCommMonoid N] (S : Finset ι) (f : ι → α →₀ N) (a : α) :
(∑ i in S, f i) a = ∑ i in S, f i a :=
(applyAddHom a : (α →₀ N) →+ _).map_sum _ _
map_sum (applyAddHom a) _ _
#align finsupp.finset_sum_apply Finsupp.finset_sum_apply

@[simp]
Expand All @@ -326,7 +326,7 @@ theorem sum_apply [Zero M] [AddCommMonoid N] {f : α →₀ M} {g : α → M →
-- Porting note: inserted ⇑ on the rhs
theorem coe_finset_sum [AddCommMonoid N] (S : Finset ι) (f : ι → α →₀ N) :
⇑(∑ i in S, f i) = ∑ i in S, ⇑(f i) :=
(coeFnAddHom : (α →₀ N) →+ _).map_sum _ _
map_sum (coeFnAddHom : (α →₀ N) →+ _) _ _
#align finsupp.coe_finset_sum Finsupp.coe_finset_sum

-- Porting note: inserted ⇑ on the rhs
Expand Down Expand Up @@ -502,7 +502,7 @@ theorem univ_sum_single_apply' [AddCommMonoid M] [Fintype α] (i : α) (m : M) :

theorem equivFunOnFinite_symm_eq_sum [Fintype α] [AddCommMonoid M] (f : α → M) :
equivFunOnFinite.symm f = ∑ a, Finsupp.single a (f a) := by
rw [←univ_sum_single (equivFunOnFinite.symm f)]
rw [← univ_sum_single (equivFunOnFinite.symm f)]
ext
simp

Expand Down Expand Up @@ -587,12 +587,12 @@ theorem support_sum_eq_biUnion {α : Type*} {ι : Type*} {M : Type*} [DecidableE

theorem multiset_map_sum [Zero M] {f : α →₀ M} {m : β → γ} {h : α → M → Multiset β} :
Multiset.map m (f.sum h) = f.sum fun a b => (h a b).map m :=
(Multiset.mapAddMonoidHom m).map_sum _ f.support
map_sum (Multiset.mapAddMonoidHom m) _ f.support
#align finsupp.multiset_map_sum Finsupp.multiset_map_sum

theorem multiset_sum_sum [Zero M] [AddCommMonoid N] {f : α →₀ M} {h : α → M → Multiset N} :
Multiset.sum (f.sum h) = f.sum fun a b => Multiset.sum (h a b) :=
(Multiset.sumAddMonoidHom : Multiset N →+ N).map_sum _ f.support
map_sum Multiset.sumAddMonoidHom _ f.support
#align finsupp.multiset_sum_sum Finsupp.multiset_sum_sum

/-- For disjoint `f1` and `f2`, and function `g`, the product of the products of `g`
Expand Down Expand Up @@ -669,7 +669,7 @@ lemma sum_cons' [AddCommMonoid M] [AddCommMonoid N] (n : ℕ) (σ : Fin n →₀
end Finsupp

theorem Finset.sum_apply' : (∑ k in s, f k) i = ∑ k in s, f k i :=
(Finsupp.applyAddHom i : (ι →₀ A) →+ A).map_sum f s
map_sum (Finsupp.applyAddHom i) f s
#align finset.sum_apply' Finset.sum_apply'

theorem Finsupp.sum_apply' : g.sum k x = g.sum fun i b => k i b x :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/BigOperators/Intervals.lean
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ theorem sum_Ico_by_parts (hmn : m < n) :
f (n - 1) • (range n).sum g - f m • (range (m + 1)).sum g +
Finset.sum (Ico m (n - 1)) (fun i => f i • (range (i + 1)).sum g -
f (i + 1) • (range (i + 1)).sum g) := by
rw [← add_sub, add_comm, ←add_sub, ← sum_sub_distrib]
rw [← add_sub, add_comm, ← add_sub, ← sum_sub_distrib]
rw [h₄]
have : ∀ i, f i • G (i + 1) - f (i + 1) • G (i + 1) = -((f (i + 1) - f i) • G (i + 1)) := by
intro i
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/BigOperators/Multiset/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ theorem prod_map_inv' (m : Multiset α) : (m.map Inv.inv).prod = m.prod⁻¹ :=
@[to_additive (attr := simp)]
theorem prod_map_inv : (m.map fun i => (f i)⁻¹).prod = (m.map f).prod⁻¹ := by
-- Porting note: used `convert`
simp_rw [←(m.map f).prod_map_inv', map_map, Function.comp_apply]
simp_rw [← (m.map f).prod_map_inv', map_map, Function.comp_apply]
#align multiset.prod_map_inv Multiset.prod_map_inv
#align multiset.sum_map_neg Multiset.sum_map_neg

Expand Down
Loading

0 comments on commit 3cd8f02

Please sign in to comment.