Skip to content

Commit 9bbace6

Browse files
committed
feat(BigOperators/Finprod): add finsum_cond_pos (#33508)
1 parent 27c981d commit 9bbace6

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,14 +507,28 @@ theorem finprod_mem_congr (h₀ : s = t) (h₁ : ∀ x ∈ t, f x = g x) :
507507
theorem finprod_eq_one_of_forall_eq_one {f : α → M} (h : ∀ x, f x = 1) : ∏ᶠ i, f i = 1 := by
508508
simp +contextual [h]
509509

510-
@[to_additive finsum_pos']
511-
theorem one_lt_finprod' {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrderedCancelMonoid M]
510+
@[to_additive finprod_cond_pos]
511+
theorem one_lt_finprod_cond {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrderedCancelMonoid M]
512+
{f : ι → M} {p : ι → Prop} (h : ∀ i, p i → 1 ≤ f i) (h' : ∃ i, p i ∧ 1 < f i)
513+
(hf : (mulSupport f ∩ {i | p i}).Finite) : 1 < ∏ᶠ (i) (_ : p i), f i := by
514+
rw [finprod_cond_eq_prod_of_cond_iff (t := hf.toFinset)]
515+
· apply Finset.one_lt_prod'
516+
· simp +contextual [h]
517+
· aesop
518+
· simp +contextual
519+
520+
@[to_additive finsum_pos]
521+
theorem one_lt_finprod {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrderedCancelMonoid M]
512522
{f : ι → M}
513523
(h : ∀ i, 1 ≤ f i) (h' : ∃ i, 1 < f i) (hf : (mulSupport f).Finite) : 1 < ∏ᶠ i, f i := by
514-
rcases h' with ⟨i, hi⟩
515-
rw [finprod_eq_prod _ hf]
516-
refine Finset.one_lt_prod' (fun i _ ↦ h i) ⟨i, ?_, hi⟩
517-
simpa only [Finite.mem_toFinset, mem_mulSupport] using ne_of_gt hi
524+
rw [← finprod_mem_univ]
525+
apply one_lt_finprod_cond <;> simpa
526+
527+
@[deprecated (since := "2026-01-03")]
528+
alias finsum_pos' := finsum_pos
529+
530+
@[to_additive existing finsum_pos', deprecated (since := "2026-01-03")]
531+
alias one_lt_finprod' := one_lt_finprod
518532

519533
/-!
520534
### Distributivity w.r.t. addition, subtraction, and (scalar) multiplication

Mathlib/Geometry/Manifold/PartitionOfUnity.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ theorem IsOpen.exists_contMDiff_support_eq {s : Set M} (hs : IsOpen s) :
765765
rw [← mem_support, g_supp, ← mem_preimage, preimage_inter]
766766
have Hx : x ∈ tsupport (f c) := subset_tsupport _ (ne_of_gt hc)
767767
simp [(chartAt H c).left_inv (hf c Hx), hx, (chartAt H c).map_source (hf c Hx)]
768-
apply finsum_pos' (fun c ↦ h''g c x) B
768+
apply finsum_pos (fun c ↦ h''g c x) B
769769
apply (f.locallyFinite.point_finite x).subset
770770
apply compl_subset_compl.2
771771
rintro c (hc : f c x = 0)

0 commit comments

Comments
 (0)