@@ -55,6 +55,38 @@ lemma prod_le_one (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ 1) :
5555lemma one_le_prod (hf : ∀ i ∈ s, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i := by
5656 simpa using prod_le_prod (by simp) hf
5757
58+ @[gcongr]
59+ theorem prod_le_prod_of_subset_of_one_le (h : s ⊆ t)
60+ (hf0 : ∀ i ∈ s, 0 ≤ f i)
61+ (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) : ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i := by
62+ have := posMulMono_iff_mulPosMono.1 ‹PosMulMono R›
63+ classical
64+ calc
65+ ∏ i ∈ s, f i ≤ (∏ i ∈ t \ s, f i) * ∏ i ∈ s, f i :=
66+ le_mul_of_one_le_left (prod_nonneg hf0) <| one_le_prod <| by simpa only [mem_sdiff, and_imp]
67+ _ = ∏ i ∈ t \ s ∪ s, f i := (prod_union sdiff_disjoint).symm
68+ _ = ∏ i ∈ t, f i := by rw [sdiff_union_of_subset h]
69+
70+ theorem prod_le_prod_of_subset_of_le_one (h : s ⊆ t) (hf0 : ∀ i ∈ t, 0 ≤ f i)
71+ (hf : ∀ i ∈ t, i ∉ s → f i ≤ 1 ) :
72+ ∏ i ∈ t, f i ≤ ∏ i ∈ s, f i := by
73+ have := posMulMono_iff_mulPosMono.1 ‹PosMulMono R›
74+ classical
75+ calc
76+ ∏ i ∈ t, f i = ∏ i ∈ t \ s ∪ s, f i := by rw [sdiff_union_of_subset h]
77+ _ = (∏ i ∈ t \ s, f i) * ∏ i ∈ s, f i := prod_union sdiff_disjoint
78+ _ ≤ ∏ i ∈ s, f i :=
79+ mul_le_of_le_one_left (prod_nonneg (by grind)) (prod_le_one (by grind) (by grind))
80+
81+ theorem prod_mono_set_of_one_le (hf : ∀ x, 1 ≤ f x) :
82+ Monotone fun s ↦ ∏ x ∈ s, f x :=
83+ fun _ _ hst ↦ prod_le_prod_of_subset_of_one_le hst
84+ (fun i _ ↦ zero_le_one.trans (hf i)) (fun x _ _ ↦ hf x)
85+
86+ theorem prod_anti_set_of_le_one (hf0 : ∀ (x : ι), 0 ≤ f x) (hf : ∀ (x : ι), f x ≤ 1 ) :
87+ Antitone fun (s : Finset ι) => ∏ x ∈ s, f x :=
88+ fun _ _ hst ↦ prod_le_prod_of_subset_of_le_one hst (by grind) (by simp [hf])
89+
5890end PosMulMono
5991
6092section PosMulStrictMono
0 commit comments