@@ -363,8 +363,7 @@ end DoubleCounting
363
363
364
364
section CanonicallyOrderedMul
365
365
366
- variable [CommMonoid M] [PartialOrder M] [IsOrderedMonoid M] [CanonicallyOrderedMul M]
367
- {f : ι → M} {s t : Finset ι}
366
+ variable [CommMonoid M] [PartialOrder M] [CanonicallyOrderedMul M] {f : ι → M} {s t : Finset ι}
368
367
369
368
/-- In a canonically-ordered monoid, a product bounds each of its terms.
370
369
@@ -374,19 +373,23 @@ See also `Finset.single_le_prod'`. -/
374
373
See also `Finset.single_le_sum`." ]
375
374
lemma _root_.CanonicallyOrderedCommMonoid.single_le_prod {i : ι} (hi : i ∈ s) :
376
375
f i ≤ ∏ j ∈ s, f j :=
376
+ have := CanonicallyOrderedMul.toIsOrderedMonoid (α := M)
377
377
single_le_prod' (fun _ _ ↦ one_le _) hi
378
378
379
379
@[to_additive sum_le_sum_of_subset]
380
380
theorem prod_le_prod_of_subset' (h : s ⊆ t) : ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x :=
381
+ have := CanonicallyOrderedMul.toIsOrderedMonoid (α := M)
381
382
prod_le_prod_of_subset_of_one_le' h fun _ _ _ ↦ one_le _
382
383
383
384
@[to_additive sum_mono_set]
384
385
theorem prod_mono_set' (f : ι → M) : Monotone fun s ↦ ∏ x ∈ s, f x := fun _ _ hs ↦
386
+ have := CanonicallyOrderedMul.toIsOrderedMonoid (α := M)
385
387
prod_le_prod_of_subset' hs
386
388
387
389
@[to_additive sum_le_sum_of_ne_zero]
388
390
theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
389
391
∏ x ∈ s, f x ≤ ∏ x ∈ t, f x := by
392
+ have := CanonicallyOrderedMul.toIsOrderedMonoid (α := M)
390
393
classical calc
391
394
∏ x ∈ s, f x = (∏ x ∈ s with f x = 1 , f x) * ∏ x ∈ s with f x ≠ 1 , f x := by
392
395
rw [← prod_union, filter_union_filter_neg_eq]
@@ -398,6 +401,7 @@ theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
398
401
399
402
@[to_additive sum_pos_iff]
400
403
lemma one_lt_prod_iff : 1 < ∏ x ∈ s, f x ↔ ∃ x ∈ s, 1 < f x :=
404
+ have := CanonicallyOrderedMul.toIsOrderedMonoid (α := M)
401
405
Finset.one_lt_prod_iff_of_one_le <| fun _ _ => one_le _
402
406
403
407
end CanonicallyOrderedMul
0 commit comments