Skip to content

Commit

Permalink
feat(Topology/Algebra/InfiniteSum/Real): Add partition lemma (#12446)
Browse files Browse the repository at this point in the history
We also  `summable_partition` (and the required  `Set.sigmaEquiv`), needed for #10377.  



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
  • Loading branch information
CBirkbeck and CBirkbeck committed May 3, 2024
1 parent 7e9dce6 commit 2dd08f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Mathlib/Data/Set/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,15 @@ theorem sigmaToiUnion_bijective (h : Pairwise fun i j => Disjoint (t i) (t j)) :
⟨sigmaToiUnion_injective t h, sigmaToiUnion_surjective t⟩
#align set.sigma_to_Union_bijective Set.sigmaToiUnion_bijective

/-- Equivalence from the disjoint union of a family of sets forming a partition of `β`, to `β`
itself. -/
noncomputable def sigmaEquiv (s : α → Set β) (hs : ∀ b, ∃! i, b ∈ s i) :
(Σ i, s i) ≃ β where
toFun | ⟨_, b⟩ => b
invFun b := ⟨(hs b).choose, b, (hs b).choose_spec.1
left_inv | ⟨i, b, hb⟩ => Sigma.subtype_ext ((hs b).choose_spec.2 i hb).symm rfl
right_inv _ := rfl

/-- Equivalence between a disjoint union and a dependent sum. -/
noncomputable def unionEqSigmaOfDisjoint {t : α → Set β}
(h : Pairwise fun i j => Disjoint (t i) (t j)) :
Expand Down
5 changes: 5 additions & 0 deletions Mathlib/Topology/Algebra/InfiniteSum/Real.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ theorem summable_sigma_of_nonneg {β : α → Type*} {f : (Σ x, β x) → ℝ}
exact mod_cast NNReal.summable_sigma
#align summable_sigma_of_nonneg summable_sigma_of_nonneg

lemma summable_partition {α β : Type*} {f : β → ℝ} (hf : 0 ≤ f) {s : α → Set β}
(hs : ∀ i, ∃! j, i ∈ s j) : Summable f ↔
(∀ j, Summable fun i : s j ↦ f i) ∧ Summable fun j ↦ ∑' i : s j, f i := by
simpa only [← (Set.sigmaEquiv s hs).summable_iff] using summable_sigma_of_nonneg (fun _ ↦ hf _)

theorem summable_prod_of_nonneg {f : (α × β) → ℝ} (hf : 0 ≤ f) :
Summable f ↔ (∀ x, Summable fun y ↦ f (x, y)) ∧ Summable fun x ↦ ∑' y, f (x, y) :=
(Equiv.sigmaEquivProd _ _).summable_iff.symm.trans <| summable_sigma_of_nonneg fun _ ↦ hf _
Expand Down

0 comments on commit 2dd08f8

Please sign in to comment.