Skip to content

Commit 08bbfd6

Browse files
committed
feat(Topology/ENNReal): add finset_sum_iSup (#14738)
Moves: - finset_sum_iSup_nat -> finsetSum_iSup_of_monotone
1 parent ce90d35 commit 08bbfd6

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

Mathlib/MeasureTheory/Integral/Lebesgue.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ theorem lintegral_iSup {f : ℕ → α → ℝ≥0∞} (hf : ∀ n, Measurable (
427427
(Finset.sum_congr rfl fun x _ => by
428428
rw [measure_iUnion_eq_iSup (mono x).directed_le, ENNReal.mul_iSup])
429429
_ = ⨆ n, ∑ r ∈ (rs.map c).range, r * μ (rs.map c ⁻¹' {r} ∩ { a | r ≤ f n a }) := by
430-
refine ENNReal.finset_sum_iSup_nat fun p i j h ↦ ?_
430+
refine ENNReal.finsetSum_iSup_of_monotone fun p i j h ↦ ?_
431431
gcongr _ * μ ?_
432432
exact mono p h
433433
_ ≤ ⨆ n : ℕ, ((rs.map c).restrict { a | (rs.map c) a ≤ f n a }).lintegral μ := by

Mathlib/Topology/Instances/ENNReal.lean

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -633,21 +633,30 @@ theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k
633633
exact le_iSup_of_le k hk
634634
#align ennreal.supr_add_supr ENNReal.iSup_add_iSup
635635

636-
theorem iSup_add_iSup_of_monotone {ι : Type*} [SemilatticeSup ι] {f g : ι → ℝ≥0∞} (hf : Monotone f)
637-
(hg : Monotone g) : iSup f + iSup g = ⨆ a, f a + g a :=
638-
iSup_add_iSup fun i j => ⟨i ⊔ j, add_le_add (hf <| le_sup_left) (hg <| le_sup_right)⟩
636+
theorem iSup_add_iSup_of_monotone {ι : Type*} [Preorder ι] [IsDirected ι (· ≤ ·)]
637+
{f g : ι → ℝ≥0∞} (hf : Monotone f) (hg : Monotone g) : iSup f + iSup g = ⨆ a, f a + g a :=
638+
iSup_add_iSup fun i j ↦ (exists_ge_ge i j).imp fun _k ⟨hi, hj⟩ ↦ by gcongr <;> apply_rules
639639
#align ennreal.supr_add_supr_of_monotone ENNReal.iSup_add_iSup_of_monotone
640640

641-
theorem finset_sum_iSup_nat {α} {ι} [SemilatticeSup ι] {s : Finset α} {f : α → ι → ℝ≥0∞}
642-
(hf : ∀ a, Monotone (f a)) : (∑ a ∈ s, iSup (f a)) = ⨆ n, ∑ a ∈ s, f a n := by
643-
refine Finset.induction_on s ?_ ?_
644-
· simp
645-
· intro a s has ih
646-
simp only [Finset.sum_insert has]
647-
rw [ih, iSup_add_iSup_of_monotone (hf a)]
648-
intro i j h
649-
exact Finset.sum_le_sum fun a _ => hf a h
650-
#align ennreal.finset_sum_supr_nat ENNReal.finset_sum_iSup_nat
641+
theorem finsetSum_iSup {α ι : Type*} {s : Finset α} {f : α → ι → ℝ≥0∞}
642+
(hf : ∀ i j, ∃ k, ∀ a, f a i ≤ f a k ∧ f a j ≤ f a k) :
643+
∑ a ∈ s, ⨆ i, f a i = ⨆ i, ∑ a ∈ s, f a i := by
644+
induction s using Finset.cons_induction with
645+
| empty => simp
646+
| cons a s ha ihs =>
647+
simp_rw [Finset.sum_cons, ihs]
648+
refine iSup_add_iSup fun i j ↦ (hf i j).imp fun k hk ↦ ?_
649+
gcongr
650+
exacts [(hk a).1, (hk _).2]
651+
652+
theorem finsetSum_iSup_of_monotone {α} {ι} [Preorder ι] [IsDirected ι (· ≤ ·)]
653+
{s : Finset α} {f : α → ι → ℝ≥0∞} (hf : ∀ a, Monotone (f a)) :
654+
(∑ a ∈ s, iSup (f a)) = ⨆ n, ∑ a ∈ s, f a n :=
655+
finsetSum_iSup fun i j ↦ (exists_ge_ge i j).imp fun _k ⟨hi, hj⟩ a ↦ ⟨hf a hi, hf a hj⟩
656+
#align ennreal.finset_sum_supr_nat ENNReal.finsetSum_iSup_of_monotone
657+
658+
@[deprecated (since := "2024-07-14")]
659+
alias finset_sum_iSup_nat := finsetSum_iSup_of_monotone
651660

652661
theorem mul_iSup {ι : Sort*} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} : a * iSup f = ⨆ i, a * f i := by
653662
by_cases hf : ∀ i, f i = 0

0 commit comments

Comments
 (0)