Skip to content

Commit 2c7f8fd

Browse files
committed
feat(Topology/InfiniteSum): tprod_one_{add/sub}_ordered
1 parent 412e7b8 commit 2c7f8fd

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

Mathlib/Algebra/BigOperators/Ring/Finset.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ theorem prod_add_ordered [LinearOrder ι] (s : Finset ι) (f g : ι → R) :
220220
mul_left_comm]
221221
exact mt (fun ha => (mem_filter.1 ha).1) ha'
222222

223+
theorem prod_one_add_ordered [LinearOrder ι] (s : Finset ι) (f : ι → R) :
224+
∏ i ∈ s, (1 + f i) = 1 + ∑ i ∈ s, f i * ∏ j ∈ s with j < i, (1 + f j) := by
225+
rw [prod_add_ordered]
226+
simp
227+
223228
/-- Summing `a ^ #t * b ^ (n - #t)` over all finite subsets `t` of a finset `s`
224229
gives `(a + b) ^ #s`. -/
225230
theorem sum_pow_mul_eq_add_pow (a b : R) (s : Finset ι) :

Mathlib/Topology/Algebra/InfiniteSum/Ring.lean

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,43 @@ theorem tprod_one_add [T2Space α] (h : Summable (∏ i ∈ ·, f i)) :
307307
∏' i, (1 + f i) = ∑' s, ∏ i ∈ s, f i :=
308308
HasProd.tprod_eq <| hasProd_one_add_of_hasSum_prod h.hasSum
309309

310+
section Ordered
311+
variable [LinearOrder ι] [LocallyFiniteOrderBot ι] [T2Space α]
312+
313+
/-- The infinite version of `Finset.prod_one_add_ordered`. -/
314+
theorem tprod_one_add_ordered [ContinuousAdd α]
315+
(hsum : Summable fun i ↦ f i * ∏ j ∈ Iio i, (1 + f j))
316+
(hprod : Multipliable (1 + f ·)) :
317+
∏' i, (1 + f i) = 1 + ∑' i, f i * ∏ j ∈ Iio i, (1 + f j) := by
318+
rcases isEmpty_or_nonempty ι with _ | _
319+
· simp
320+
obtain ⟨x, hx⟩ := hprod
321+
obtain ⟨a, ha⟩ := hsum
322+
convert hx.tprod_eq
323+
unfold HasProd at hx
324+
conv at hx in fun _ ↦ _ => ext _; rw [prod_one_add_ordered] -- simp_rw would cause loop
325+
rw [ha.tsum_eq]
326+
refine (tendsto_nhds_unique (hx.comp tendsto_finset_Iic_atTop_atTop) ?_).symm
327+
apply Tendsto.const_add
328+
convert ha.comp tendsto_finset_Iic_atTop_atTop using 2 with s
329+
refine sum_congr rfl (fun i hi ↦ ?_)
330+
congr
331+
ext j
332+
suffices j < i → j ≤ s by simpa
333+
exact fun hj ↦ (hj.trans_le (by simpa using hi)).le
334+
335+
omit [CommSemiring α] in
336+
/-- The infinite version of `Finset.prod_one_sub_ordered`. -/
337+
theorem tprod_one_sub_ordered [CommRing α] [IsTopologicalAddGroup α]
338+
(hsum : Summable fun i ↦ f i * ∏ j ∈ Iio i, (1 - f j))
339+
(hprod : Multipliable (1 - f ·)) :
340+
∏' i, (1 - f i) = 1 - ∑' i, f i * ∏ j ∈ Iio i, (1 - f j) := by
341+
simp_rw [sub_eq_add_neg] at hsum hprod ⊢
342+
obtain hsum' := hsum.neg
343+
simp_rw [← neg_mul] at hsum'
344+
simp_rw [← tsum_neg, ← neg_mul]
345+
exact tprod_one_add_ordered hsum' hprod
346+
347+
end Ordered
348+
310349
end ProdOneSum

0 commit comments

Comments
 (0)