Skip to content

Commit e1fdf0d

Browse files
committed
feat(Topology/Algebra/InfiniteSum): lemmas about tprods in a GroupWithZero (#23803)
Show that a sequence with a zero term is always multipliable, and a congruence lemma for `Multipliable` for eventually-equal sequences. (We have [Multipliable.congr_cofinite](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Topology/Algebra/InfiniteSum/Group.html#Multipliable.congr_cofinite) but that requires the target to be a group under multiplication, which is never satisfied for the underlying multiplicative monoid of a ring; so this new lemma is useful for manipulating products valued in rings / fields.)
1 parent 6549a57 commit e1fdf0d

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,3 +607,20 @@ theorem tprod_finset_bUnion_disjoint {ι} {s : Finset ι} {t : ι → Set β}
607607
end ContinuousMul
608608

609609
end tprod
610+
611+
section CommMonoidWithZero
612+
variable [CommMonoidWithZero α] [TopologicalSpace α] {f : β → α}
613+
614+
lemma hasProd_zero_of_exists_eq_zero (hf : ∃ b, f b = 0) : HasProd f 0 := by
615+
obtain ⟨b, hb⟩ := hf
616+
apply tendsto_const_nhds.congr'
617+
filter_upwards [eventually_ge_atTop {b}] with s hs
618+
exact (Finset.prod_eq_zero (Finset.singleton_subset_iff.mp hs) hb).symm
619+
620+
lemma multipliable_of_exists_eq_zero (hf : ∃ b, f b = 0) : Multipliable f :=
621+
0, hasProd_zero_of_exists_eq_zero hf⟩
622+
623+
lemma tprod_of_exists_eq_zero [T2Space α] (hf : ∃ b, f b = 0) : ∏' b, f b = 0 :=
624+
(hasProd_zero_of_exists_eq_zero hf).tprod_eq
625+
626+
end CommMonoidWithZero

Mathlib/Topology/Algebra/InfiniteSum/Group.lean

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ theorem hasProd_ite_div_hasProd [DecidableEq β] (hf : HasProd f a) (b : β) :
128128
· rw [div_mul_eq_mul_div, one_mul]
129129

130130
/-- A more general version of `Multipliable.congr`, allowing the functions to
131-
disagree on a finite set. -/
131+
disagree on a finite set.
132+
133+
Note that this requires the target to be a group, and hence fails for products valued
134+
in a ring. See `Multipliable.congr_cofinite₀` for a version applying in this case,
135+
with an additional non-vanishing hypothesis.
136+
-/
132137
@[to_additive "A more general version of `Summable.congr`, allowing the functions to
133138
disagree on a finite set."]
134139
theorem Multipliable.congr_cofinite (hf : Multipliable f) (hfg : f =ᶠ[cofinite] g) :
@@ -397,3 +402,49 @@ theorem tprod_const [T2Space G] (a : G) : ∏' _ : β, a = a ^ (Nat.card β) :=
397402
simpa [multipliable_const_iff] using ha
398403

399404
end IsTopologicalGroup
405+
406+
section CommGroupWithZero
407+
variable {K : Type*} [CommGroupWithZero K] [TopologicalSpace K] [ContinuousMul K] {f g : α → K}
408+
/-!
409+
## Groups with a zero
410+
411+
These lemmas apply to a `CommGroupWithZero`; the most familiar case is when `K` is a field. These
412+
are specific to the product setting and do not have a sensible additive analogue.
413+
-/
414+
415+
open Finset in
416+
lemma HasProd.congr_cofinite₀ {c : K} (hc : HasProd f c) {s : Finset α}
417+
(hs : ∀ a ∈ s, f a ≠ 0) (hs' : ∀ a ∉ s, f a = g a) :
418+
HasProd g (c * ((∏ i ∈ s, g i) / ∏ i ∈ s, f i)) := by
419+
classical
420+
refine (Tendsto.mul_const ((∏ i ∈ s, g i) / ∏ i ∈ s, f i) hc).congr' ?_
421+
filter_upwards [eventually_ge_atTop s] with t ht
422+
calc (∏ i ∈ t, f i) * ((∏ i ∈ s, g i) / ∏ i ∈ s, f i)
423+
_ = ((∏ i ∈ s, f i) * ∏ i ∈ t \ s, g i) * _ := by
424+
conv_lhs => rw [← union_sdiff_of_subset ht, prod_union disjoint_sdiff,
425+
prod_congr rfl fun i hi ↦ hs' i (mem_sdiff.mp hi).2]
426+
_ = (∏ i ∈ s, g i) * ∏ i ∈ t \ s, g i := by
427+
rw [← mul_div_assoc, ← div_mul_eq_mul_div, ← div_mul_eq_mul_div, div_self, one_mul, mul_comm]
428+
exact prod_ne_zero_iff.mpr hs
429+
_ = ∏ i ∈ t, g i := by
430+
rw [← prod_union disjoint_sdiff, union_sdiff_of_subset ht]
431+
432+
lemma tsum_congr_cofinite₀ [T2Space K] (hc : Multipliable f) {s : Finset α}
433+
(hs : ∀ a ∈ s, f a ≠ 0) (hs' : ∀ a ∉ s, f a = g a) :
434+
∏' i, g i = ((∏' i, f i) * ((∏ i ∈ s, g i) / ∏ i ∈ s, f i)) :=
435+
(hc.hasProd.congr_cofinite₀ hs hs').tprod_eq
436+
437+
/--
438+
See also `Multipliable.congr_cofinite`, which does not have a non-vanishing condition, but instead
439+
requires the target to be a group under multiplication (and hence fails for infinite products in a
440+
ring).
441+
-/
442+
lemma Multipliable.congr_cofinite₀ (hf : Multipliable f) (hf' : ∀ a, f a ≠ 0)
443+
(hfg : ∀ᶠ a in cofinite, f a = g a) :
444+
Multipliable g := by
445+
classical
446+
obtain ⟨c, hc⟩ := hf
447+
obtain ⟨s, hs⟩ : ∃ s : Finset α, ∀ i ∉ s, f i = g i := ⟨hfg.toFinset, by simp⟩
448+
exact (hc.congr_cofinite₀ (fun a _ ↦ hf' a) hs).multipliable
449+
450+
end CommGroupWithZero

0 commit comments

Comments
 (0)