algebra.order.chebyshev
⟷
Mathlib.Algebra.Order.Chebyshev
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-/
-import Algebra.BigOperators.Order
+import Algebra.Order.BigOperators.Group.Finset
import Algebra.Order.Rearrangement
import GroupTheory.Perm.Cycle.Basic
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -174,7 +174,7 @@ theorem sum_div_card_sq_le_sum_sq_div_card :
by
obtain rfl | hs := s.eq_empty_or_nonempty
· simp
- rw [← card_pos, ← @Nat.cast_pos α] at hs
+ rw [← card_pos, ← @Nat.cast_pos α] at hs
rw [div_pow, div_le_div_iff (sq_pos_of_ne_zero _ hs.ne') hs, sq (s.card : α), mul_left_comm, ←
mul_assoc]
exact mul_le_mul_of_nonneg_right sq_sum_le_card_mul_sum_sq hs.le
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -59,7 +59,13 @@ variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [O
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
- (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i := by classical
+ (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i := by
+ classical
+ obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on
+ rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
+ exact
+ sum_le_card_nsmul _ _ _ fun n _ =>
+ hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -59,13 +59,7 @@ variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [O
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
- (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i := by
- classical
- obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on
- rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
- exact
- sum_le_card_nsmul _ _ _ fun n _ =>
- hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
+ (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i := by classical
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-/
-import Mathbin.Algebra.BigOperators.Order
-import Mathbin.Algebra.Order.Rearrangement
-import Mathbin.GroupTheory.Perm.Cycle.Basic
+import Algebra.BigOperators.Order
+import Algebra.Order.Rearrangement
+import GroupTheory.Perm.Cycle.Basic
#align_import algebra.order.chebyshev from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-
-! This file was ported from Lean 3 source module algebra.order.chebyshev
-! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.BigOperators.Order
import Mathbin.Algebra.Order.Rearrangement
import Mathbin.GroupTheory.Perm.Cycle.Basic
+#align_import algebra.order.chebyshev from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
+
/-!
# Chebyshev's sum inequality
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -57,6 +57,7 @@ section Smul
variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [OrderedSMul α β]
{s : Finset ι} {σ : Perm ι} {f : ι → α} {g : ι → β}
+#print MonovaryOn.sum_smul_sum_le_card_smul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -69,7 +70,9 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
sum_le_card_nsmul _ _ _ fun n _ =>
hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
+-/
+#print AntivaryOn.card_smul_sum_le_sum_smul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -77,9 +80,11 @@ theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
s.card • ∑ i in s, f i • g i ≤ (∑ i in s, f i) • ∑ i in s, g i := by
convert hfg.dual_right.sum_smul_sum_le_card_smul_sum
#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sum
+-/
variable [Fintype ι]
+#print Monovary.sum_smul_sum_le_card_smul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -87,7 +92,9 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
(∑ i, f i) • ∑ i, g i ≤ Fintype.card ι • ∑ i, f i • g i :=
(hfg.MonovaryOn _).sum_smul_sum_le_card_smul_sum
#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sum
+-/
+#print Antivary.card_smul_sum_le_sum_smul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -95,6 +102,7 @@ theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
Fintype.card ι • ∑ i, f i • g i ≤ (∑ i, f i) • ∑ i, g i := by
convert (hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
+-/
end Smul
@@ -109,6 +117,7 @@ section Mul
variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
+#print MonovaryOn.sum_mul_sum_le_card_mul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -116,7 +125,9 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
(∑ i in s, f i) * ∑ i in s, g i ≤ s.card * ∑ i in s, f i * g i := by rw [← nsmul_eq_mul];
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
+-/
+#print AntivaryOn.card_mul_sum_le_sum_mul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
@@ -124,15 +135,19 @@ theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
(s.card : α) * ∑ i in s, f i * g i ≤ (∑ i in s, f i) * ∑ i in s, g i := by rw [← nsmul_eq_mul];
exact hfg.card_smul_sum_le_sum_smul_sum
#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sum
+-/
+#print sq_sum_le_card_mul_sum_sq /-
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
of the sum is less than the size of the set times the sum of the squares. -/
theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in s, f i ^ 2 := by
simp_rw [sq]; exact (monovaryOn_self _ _).sum_mul_sum_le_card_mul_sum
#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sq
+-/
variable [Fintype ι]
+#print Monovary.sum_mul_sum_le_card_mul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -140,7 +155,9 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
(∑ i, f i) * ∑ i, g i ≤ Fintype.card ι * ∑ i, f i * g i :=
(hfg.MonovaryOn _).sum_mul_sum_le_card_mul_sum
#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sum
+-/
+#print Antivary.card_mul_sum_le_sum_mul_sum /-
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -148,11 +165,13 @@ theorem Antivary.card_mul_sum_le_sum_mul_sum (hfg : Antivary f g) :
(Fintype.card ι : α) * ∑ i, f i * g i ≤ (∑ i, f i) * ∑ i, g i :=
(hfg.AntivaryOn _).card_mul_sum_le_sum_mul_sum
#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sum
+-/
end Mul
variable [LinearOrderedField α] {s : Finset ι} {f : ι → α}
+#print sum_div_card_sq_le_sum_sq_div_card /-
theorem sum_div_card_sq_le_sum_sq_div_card :
((∑ i in s, f i) / s.card) ^ 2 ≤ (∑ i in s, f i ^ 2) / s.card :=
by
@@ -163,4 +182,5 @@ theorem sum_div_card_sq_le_sum_sq_div_card :
mul_assoc]
exact mul_le_mul_of_nonneg_right sq_sum_le_card_mul_sum_sq hs.le
#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_card
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -61,7 +61,7 @@ variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [O
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
- ((∑ i in s, f i) • ∑ i in s, g i) ≤ s.card • ∑ i in s, f i • g i := by
+ (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i := by
classical
obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on
rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
@@ -74,7 +74,7 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
- (s.card • ∑ i in s, f i • g i) ≤ (∑ i in s, f i) • ∑ i in s, g i := by
+ s.card • ∑ i in s, f i • g i ≤ (∑ i in s, f i) • ∑ i in s, g i := by
convert hfg.dual_right.sum_smul_sum_le_card_smul_sum
#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sum
@@ -84,7 +84,7 @@ variable [Fintype ι]
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
- ((∑ i, f i) • ∑ i, g i) ≤ Fintype.card ι • ∑ i, f i • g i :=
+ (∑ i, f i) • ∑ i, g i ≤ Fintype.card ι • ∑ i, f i • g i :=
(hfg.MonovaryOn _).sum_smul_sum_le_card_smul_sum
#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sum
@@ -92,7 +92,7 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
- (Fintype.card ι • ∑ i, f i • g i) ≤ (∑ i, f i) • ∑ i, g i := by
+ Fintype.card ι • ∑ i, f i • g i ≤ (∑ i, f i) • ∑ i, g i := by
convert (hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
@@ -113,7 +113,7 @@ variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
- ((∑ i in s, f i) * ∑ i in s, g i) ≤ s.card * ∑ i in s, f i * g i := by rw [← nsmul_eq_mul];
+ (∑ i in s, f i) * ∑ i in s, g i ≤ s.card * ∑ i in s, f i * g i := by rw [← nsmul_eq_mul];
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
@@ -121,8 +121,8 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
- ((s.card : α) * ∑ i in s, f i * g i) ≤ (∑ i in s, f i) * ∑ i in s, g i := by
- rw [← nsmul_eq_mul]; exact hfg.card_smul_sum_le_sum_smul_sum
+ (s.card : α) * ∑ i in s, f i * g i ≤ (∑ i in s, f i) * ∑ i in s, g i := by rw [← nsmul_eq_mul];
+ exact hfg.card_smul_sum_le_sum_smul_sum
#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sum
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
@@ -137,7 +137,7 @@ variable [Fintype ι]
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
- ((∑ i, f i) * ∑ i, g i) ≤ Fintype.card ι * ∑ i, f i * g i :=
+ (∑ i, f i) * ∑ i, g i ≤ Fintype.card ι * ∑ i, f i * g i :=
(hfg.MonovaryOn _).sum_mul_sum_le_card_mul_sum
#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sum
@@ -145,7 +145,7 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
other is antitone), the product of their sum is less than the size of the set times their scalar
product. -/
theorem Antivary.card_mul_sum_le_sum_mul_sum (hfg : Antivary f g) :
- ((Fintype.card ι : α) * ∑ i, f i * g i) ≤ (∑ i, f i) * ∑ i, g i :=
+ (Fintype.card ι : α) * ∑ i, f i * g i ≤ (∑ i, f i) * ∑ i, g i :=
(hfg.AntivaryOn _).card_mul_sum_le_sum_mul_sum
#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sum
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -63,11 +63,11 @@ scalar product. -/
theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
((∑ i in s, f i) • ∑ i in s, g i) ≤ s.card • ∑ i in s, f i • g i := by
classical
- obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on
- rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
- exact
- sum_le_card_nsmul _ _ _ fun n _ =>
- hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
+ obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on
+ rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
+ exact
+ sum_le_card_nsmul _ _ _ fun n _ =>
+ hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
@@ -93,7 +93,7 @@ other is antitone), the scalar product of their sum is less than the size of the
scalar product. -/
theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
(Fintype.card ι • ∑ i, f i • g i) ≤ (∑ i, f i) • ∑ i, g i := by
- convert(hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
+ convert (hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
end Smul
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -158,7 +158,7 @@ theorem sum_div_card_sq_le_sum_sq_div_card :
by
obtain rfl | hs := s.eq_empty_or_nonempty
· simp
- rw [← card_pos, ← @Nat.cast_pos α] at hs
+ rw [← card_pos, ← @Nat.cast_pos α] at hs
rw [div_pow, div_le_div_iff (sq_pos_of_ne_zero _ hs.ne') hs, sq (s.card : α), mul_left_comm, ←
mul_assoc]
exact mul_le_mul_of_nonneg_right sq_sum_le_card_mul_sum_sq hs.le
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -45,7 +45,7 @@ file because it is easily deducible from the `monovary` API.
open Equiv Equiv.Perm Finset Function OrderDual
-open BigOperators
+open scoped BigOperators
variable {ι α β : Type _}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -57,9 +57,6 @@ section Smul
variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [OrderedSMul α β]
{s : Finset ι} {σ : Perm ι} {f : ι → α} {g : ι → β}
-/- warning: monovary_on.sum_smul_sum_le_card_smul_sum -> MonovaryOn.sum_smul_sum_le_card_smul_sum is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -73,9 +70,6 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
-/- warning: antivary_on.card_smul_sum_le_sum_smul_sum -> AntivaryOn.card_smul_sum_le_sum_smul_sum is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -86,9 +80,6 @@ theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
variable [Fintype ι]
-/- warning: monovary.sum_smul_sum_le_card_smul_sum -> Monovary.sum_smul_sum_le_card_smul_sum is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -97,9 +88,6 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
(hfg.MonovaryOn _).sum_smul_sum_le_card_smul_sum
#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sum
-/- warning: antivary.card_smul_sum_le_sum_smul_sum -> Antivary.card_smul_sum_le_sum_smul_sum is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -121,12 +109,6 @@ section Mul
variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
-/- warning: monovary_on.sum_mul_sum_le_card_mul_sum -> MonovaryOn.sum_mul_sum_le_card_mul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
-Case conversion may be inaccurate. Consider using '#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -135,12 +117,6 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
-/- warning: antivary_on.card_mul_sum_le_sum_mul_sum -> AntivaryOn.card_mul_sum_le_sum_mul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))))
-Case conversion may be inaccurate. Consider using '#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
@@ -149,12 +125,6 @@ theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
rw [← nsmul_eq_mul]; exact hfg.card_smul_sum_le_sum_smul_sum
#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sum
-/- warning: sq_sum_le_card_mul_sum_sq -> sq_sum_le_card_mul_sum_sq is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))))
-but is expected to have type
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (NonUnitalNonAssocRing.toMul.{u2} α (NonAssocRing.toNonUnitalNonAssocRing.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))))
-Case conversion may be inaccurate. Consider using '#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sqₓ'. -/
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
of the sum is less than the size of the set times the sum of the squares. -/
theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in s, f i ^ 2 := by
@@ -163,12 +133,6 @@ theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in
variable [Fintype ι]
-/- warning: monovary.sum_mul_sum_le_card_mul_sum -> Monovary.sum_mul_sum_le_card_mul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Monovary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Monovary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
-Case conversion may be inaccurate. Consider using '#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -177,12 +141,6 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
(hfg.MonovaryOn _).sum_mul_sum_le_card_mul_sum
#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sum
-/- warning: antivary.card_mul_sum_le_sum_mul_sum -> Antivary.card_mul_sum_le_sum_mul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Antivary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Antivary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))))
-Case conversion may be inaccurate. Consider using '#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -195,12 +153,6 @@ end Mul
variable [LinearOrderedField α] {s : Finset ι} {f : ι → α}
-/- warning: sum_div_card_sq_le_sum_sq_div_card -> sum_div_card_sq_le_sum_sq_div_card is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s)))
-but is expected to have type
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s)))
-Case conversion may be inaccurate. Consider using '#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_cardₓ'. -/
theorem sum_div_card_sq_le_sum_sq_div_card :
((∑ i in s, f i) / s.card) ^ 2 ≤ (∑ i in s, f i ^ 2) / s.card :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -131,9 +131,7 @@ Case conversion may be inaccurate. Consider using '#align monovary_on.sum_mul_su
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
- ((∑ i in s, f i) * ∑ i in s, g i) ≤ s.card * ∑ i in s, f i * g i :=
- by
- rw [← nsmul_eq_mul]
+ ((∑ i in s, f i) * ∑ i in s, g i) ≤ s.card * ∑ i in s, f i * g i := by rw [← nsmul_eq_mul];
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
@@ -147,10 +145,8 @@ Case conversion may be inaccurate. Consider using '#align antivary_on.card_mul_s
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
- ((s.card : α) * ∑ i in s, f i * g i) ≤ (∑ i in s, f i) * ∑ i in s, g i :=
- by
- rw [← nsmul_eq_mul]
- exact hfg.card_smul_sum_le_sum_smul_sum
+ ((s.card : α) * ∑ i in s, f i * g i) ≤ (∑ i in s, f i) * ∑ i in s, g i := by
+ rw [← nsmul_eq_mul]; exact hfg.card_smul_sum_le_sum_smul_sum
#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sum
/- warning: sq_sum_le_card_mul_sum_sq -> sq_sum_le_card_mul_sum_sq is a dubious translation:
@@ -161,10 +157,8 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sqₓ'. -/
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
of the sum is less than the size of the set times the sum of the squares. -/
-theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in s, f i ^ 2 :=
- by
- simp_rw [sq]
- exact (monovaryOn_self _ _).sum_mul_sum_le_card_mul_sum
+theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in s, f i ^ 2 := by
+ simp_rw [sq]; exact (monovaryOn_self _ _).sum_mul_sum_le_card_mul_sum
#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sq
variable [Fintype ι]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -58,10 +58,7 @@ variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [O
{s : Finset ι} {σ : Perm ι} {f : ι → α} {g : ι → β}
/- warning: monovary_on.sum_smul_sum_le_card_smul_sum -> MonovaryOn.sum_smul_sum_le_card_smul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
-but is expected to have type
- forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
+<too large>
Case conversion may be inaccurate. Consider using '#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
@@ -77,10 +74,7 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
/- warning: antivary_on.card_smul_sum_le_sum_smul_sum -> AntivaryOn.card_smul_sum_le_sum_smul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))))
-but is expected to have type
- forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))))
+<too large>
Case conversion may be inaccurate. Consider using '#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
@@ -93,10 +87,7 @@ theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
variable [Fintype ι]
/- warning: monovary.sum_smul_sum_le_card_smul_sum -> Monovary.sum_smul_sum_le_card_smul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Monovary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
-but is expected to have type
- forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Monovary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
+<too large>
Case conversion may be inaccurate. Consider using '#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
@@ -107,10 +98,7 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sum
/- warning: antivary.card_smul_sum_le_sum_smul_sum -> Antivary.card_smul_sum_le_sum_smul_sum is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Antivary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))))
-but is expected to have type
- forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Antivary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))))
+<too large>
Case conversion may be inaccurate. Consider using '#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -59,7 +59,7 @@ variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [O
/- warning: monovary_on.sum_smul_sum_le_card_smul_sum -> MonovaryOn.sum_smul_sum_le_card_smul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
but is expected to have type
forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sumₓ'. -/
@@ -78,7 +78,7 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
/- warning: antivary_on.card_smul_sum_le_sum_smul_sum -> AntivaryOn.card_smul_sum_le_sum_smul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))))
but is expected to have type
forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sumₓ'. -/
@@ -94,7 +94,7 @@ variable [Fintype ι]
/- warning: monovary.sum_smul_sum_le_card_smul_sum -> Monovary.sum_smul_sum_le_card_smul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Monovary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Monovary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
but is expected to have type
forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Monovary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sumₓ'. -/
@@ -108,7 +108,7 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
/- warning: antivary.card_smul_sum_le_sum_smul_sum -> Antivary.card_smul_sum_le_sum_smul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Antivary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Antivary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))))
but is expected to have type
forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Antivary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sumₓ'. -/
@@ -135,7 +135,7 @@ variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
/- warning: monovary_on.sum_mul_sum_le_card_mul_sum -> MonovaryOn.sum_mul_sum_le_card_mul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sumₓ'. -/
@@ -151,7 +151,7 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
/- warning: antivary_on.card_mul_sum_le_sum_mul_sum -> AntivaryOn.card_mul_sum_le_sum_mul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sumₓ'. -/
@@ -167,7 +167,7 @@ theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
/- warning: sq_sum_le_card_mul_sum_sq -> sq_sum_le_card_mul_sum_sq is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))))
but is expected to have type
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (NonUnitalNonAssocRing.toMul.{u2} α (NonAssocRing.toNonUnitalNonAssocRing.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))))
Case conversion may be inaccurate. Consider using '#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sqₓ'. -/
@@ -183,7 +183,7 @@ variable [Fintype ι]
/- warning: monovary.sum_mul_sum_le_card_mul_sum -> Monovary.sum_mul_sum_le_card_mul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Monovary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Monovary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Monovary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sumₓ'. -/
@@ -197,7 +197,7 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
/- warning: antivary.card_mul_sum_le_sum_mul_sum -> Antivary.card_mul_sum_le_sum_mul_sum is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Antivary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Antivary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Antivary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sumₓ'. -/
@@ -215,7 +215,7 @@ variable [LinearOrderedField α] {s : Finset ι} {f : ι → α}
/- warning: sum_div_card_sq_le_sum_sq_div_card -> sum_div_card_sq_le_sum_sq_div_card is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s)))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s)))
but is expected to have type
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s)))
Case conversion may be inaccurate. Consider using '#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_cardₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -137,7 +137,7 @@ variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
@@ -153,7 +153,7 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))))
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
@@ -169,7 +169,7 @@ theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))))
but is expected to have type
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (NonUnitalNonAssocRing.toMul.{u2} α (NonAssocRing.toNonUnitalNonAssocRing.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))))) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (NonUnitalNonAssocRing.toMul.{u2} α (NonAssocRing.toNonUnitalNonAssocRing.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))))
Case conversion may be inaccurate. Consider using '#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sqₓ'. -/
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
of the sum is less than the size of the set times the sum of the squares. -/
@@ -185,7 +185,7 @@ variable [Fintype ι]
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Monovary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Monovary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Monovary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
Case conversion may be inaccurate. Consider using '#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
@@ -199,7 +199,7 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Antivary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Antivary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))))
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Antivary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (StrictOrderedSemiring.toSemiring.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))))
Case conversion may be inaccurate. Consider using '#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is less than the size of the set times their scalar
@@ -217,7 +217,7 @@ variable [LinearOrderedField α] {s : Finset ι} {f : ι → α}
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s)))
but is expected to have type
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (Finset.card.{u1} ι s)))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))) (Nat.cast.{u2} α (Semiring.toNatCast.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) (Finset.card.{u1} ι s)))
Case conversion may be inaccurate. Consider using '#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_cardₓ'. -/
theorem sum_div_card_sq_le_sum_sq_div_card :
((∑ i in s, f i) / s.card) ^ 2 ≤ (∑ i in s, f i ^ 2) / s.card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/347636a7a80595d55bedf6e6fbd996a3c39da69a
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
! This file was ported from Lean 3 source module algebra.order.chebyshev
-! leanprover-community/mathlib commit b7399344324326918d65d0c74e9571e3a8cb9199
+! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.GroupTheory.Perm.Cycle.Basic
/-!
# Chebyshev's sum inequality
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file proves the Chebyshev sum inequality.
Chebyshev's inequality states `(∑ i in s, f i) * (∑ i in s, g i) ≤ s.card * ∑ i in s, f i * g i`
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -54,6 +54,12 @@ section Smul
variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [OrderedSMul α β]
{s : Finset ι} {σ : Perm ι} {f : ι → α} {g : ι → β}
+/- warning: monovary_on.sum_smul_sum_le_card_smul_sum -> MonovaryOn.sum_smul_sum_le_card_smul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
+but is expected to have type
+ forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (MonovaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
+Case conversion may be inaccurate. Consider using '#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -67,6 +73,12 @@ theorem MonovaryOn.sum_smul_sum_le_card_smul_sum (hfg : MonovaryOn f g s) :
hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| is_fixed_pt.perm_pow h _
#align monovary_on.sum_smul_sum_le_card_smul_sum MonovaryOn.sum_smul_sum_le_card_smul_sum
+/- warning: antivary_on.card_smul_sum_le_sum_smul_sum -> AntivaryOn.card_smul_sum_le_sum_smul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Finset.card.{u1} ι s) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) s (fun (i : ι) => g i))))
+but is expected to have type
+ forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {s : Finset.{u3} ι} {f : ι -> α} {g : ι -> β}, (AntivaryOn.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g (Finset.toSet.{u3} ι s)) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Finset.card.{u3} ι s) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) s (fun (i : ι) => g i))))
+Case conversion may be inaccurate. Consider using '#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -77,6 +89,12 @@ theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
variable [Fintype ι]
+/- warning: monovary.sum_smul_sum_le_card_smul_sum -> Monovary.sum_smul_sum_le_card_smul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Monovary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))))
+but is expected to have type
+ forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Monovary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))))
+Case conversion may be inaccurate. Consider using '#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -85,6 +103,12 @@ theorem Monovary.sum_smul_sum_le_card_smul_sum (hfg : Monovary f g) :
(hfg.MonovaryOn _).sum_smul_sum_le_card_smul_sum
#align monovary.sum_smul_sum_le_card_smul_sum Monovary.sum_smul_sum_le_card_smul_sum
+/- warning: antivary.card_smul_sum_le_sum_smul_sum -> Antivary.card_smul_sum_le_sum_smul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u3} β] [_inst_3 : Module.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u3} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (StrictOrderedRing.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (OrderedAddCommMonoid.toAddCommMonoid.{u3} β (OrderedCancelAddCommMonoid.toOrderedAddCommMonoid.{u3} β (OrderedAddCommGroup.toOrderedCancelAddCommMonoid.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u1} ι], (Antivary.{u1, u2, u3} ι α β (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) f g) -> (LE.le.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (OrderedAddCommGroup.toPartialOrder.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))) (SMul.smul.{0, u3} Nat β (AddMonoid.SMul.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Fintype.card.{u1} ι _inst_5) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (f i) (g i)))) (SMul.smul.{u2, u3} α β (SMulZeroClass.toHasSmul.{u2, u3} α β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} α β (MulZeroClass.toHasZero.{u2} α (MulZeroOneClass.toMulZeroClass.{u2} α (MonoidWithZero.toMulZeroOneClass.{u2} α (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} α β (Semiring.toMonoidWithZero.{u2} α (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β (AddCommMonoid.toAddMonoid.{u3} β (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u3} α β (Ring.toSemiring.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) _inst_3)))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u3, u1} β ι (AddCommGroup.toAddCommMonoid.{u3} β (OrderedAddCommGroup.toAddCommGroup.{u3} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u3} β _inst_2))) (Finset.univ.{u1} ι _inst_5) (fun (i : ι) => g i))))
+but is expected to have type
+ forall {ι : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrderedRing.{u2} α] [_inst_2 : LinearOrderedAddCommGroup.{u1} β] [_inst_3 : Module.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))] [_inst_4 : OrderedSMul.{u2, u1} α β (StrictOrderedSemiring.toOrderedSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (AddMonoid.toZero.{u1} β (AddCommMonoid.toAddMonoid.{u1} β (OrderedAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toLinearOrderedAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2)))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))] {f : ι -> α} {g : ι -> β} [_inst_5 : Fintype.{u3} ι], (Antivary.{u3, u2, u1} ι α β (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))) (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))) f g) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (OrderedAddCommGroup.toPartialOrder.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2)))) (HSMul.hSMul.{0, u1, u1} Nat β β (instHSMul.{0, u1} Nat β (AddMonoid.SMul.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Fintype.card.{u3} ι _inst_5) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (f i) (g i)))) (HSMul.hSMul.{u2, u1, u1} α β β (instHSMul.{u2, u1} α β (SMulZeroClass.toSMul.{u2, u1} α β (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (SMulWithZero.toSMulZeroClass.{u2, u1} α β (MonoidWithZero.toZero.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} α β (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (NegZeroClass.toZero.{u1} β (SubNegZeroMonoid.toNegZeroClass.{u1} β (SubtractionMonoid.toSubNegZeroMonoid.{u1} β (SubtractionCommMonoid.toSubtractionMonoid.{u1} β (AddCommGroup.toDivisionAddCommMonoid.{u1} β (OrderedAddCommGroup.toAddCommGroup.{u1} β (LinearOrderedAddCommGroup.toOrderedAddCommGroup.{u1} β _inst_2))))))) (Module.toMulActionWithZero.{u2, u1} α β (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))) (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) _inst_3))))) (Finset.sum.{u2, u3} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => f i)) (Finset.sum.{u1, u3} β ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} β (LinearOrderedCancelAddCommMonoid.toOrderedCancelAddCommMonoid.{u1} β (LinearOrderedAddCommGroup.toLinearOrderedAddCancelCommMonoid.{u1} β _inst_2))) (Finset.univ.{u3} ι _inst_5) (fun (i : ι) => g i))))
+Case conversion may be inaccurate. Consider using '#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the scalar product of their sum is less than the size of the set times their
scalar product. -/
@@ -106,6 +130,12 @@ section Mul
variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
+/- warning: monovary_on.sum_mul_sum_le_card_mul_sum -> MonovaryOn.sum_mul_sum_le_card_mul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
+but is expected to have type
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (MonovaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
+Case conversion may be inaccurate. Consider using '#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -116,6 +146,12 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
+/- warning: antivary_on.card_mul_sum_le_sum_mul_sum -> AntivaryOn.card_mul_sum_le_sum_mul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s)) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => g i))))
+but is expected to have type
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {s : Finset.{u2} ι} {f : ι -> α} {g : ι -> α}, (AntivaryOn.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g (Finset.toSet.{u2} ι s)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Finset.card.{u2} ι s)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) s (fun (i : ι) => g i))))
+Case conversion may be inaccurate. Consider using '#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
@@ -126,6 +162,12 @@ theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
exact hfg.card_smul_sum_le_sum_smul_sum
#align antivary_on.card_mul_sum_le_sum_mul_sum AntivaryOn.card_mul_sum_le_sum_mul_sum
+/- warning: sq_sum_le_card_mul_sum_sq -> sq_sum_le_card_mul_sum_sq is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))))
+but is expected to have type
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => f i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (NonUnitalNonAssocRing.toMul.{u2} α (NonAssocRing.toNonUnitalNonAssocRing.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))))) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.card.{u1} ι s)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1)))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedRing.toLinearOrderedSemiring.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))))
+Case conversion may be inaccurate. Consider using '#align sq_sum_le_card_mul_sum_sq sq_sum_le_card_mul_sum_sqₓ'. -/
/-- Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square
of the sum is less than the size of the set times the sum of the squares. -/
theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in s, f i ^ 2 :=
@@ -136,6 +178,12 @@ theorem sq_sum_le_card_mul_sum_sq : (∑ i in s, f i) ^ 2 ≤ s.card * ∑ i in
variable [Fintype ι]
+/- warning: monovary.sum_mul_sum_le_card_mul_sum -> Monovary.sum_mul_sum_le_card_mul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Monovary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))))
+but is expected to have type
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Monovary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))))
+Case conversion may be inaccurate. Consider using '#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -144,6 +192,12 @@ theorem Monovary.sum_mul_sum_le_card_mul_sum (hfg : Monovary f g) :
(hfg.MonovaryOn _).sum_mul_sum_le_card_mul_sum
#align monovary.sum_mul_sum_le_card_mul_sum Monovary.sum_mul_sum_le_card_mul_sum
+/- warning: antivary.card_mul_sum_le_sum_mul_sum -> Antivary.card_mul_sum_le_sum_mul_sum is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedRing.{u2} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u1} ι], (Antivary.{u1, u2, u2} ι α α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) f g) -> (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))))))) (Fintype.card.{u1} ι _inst_2)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (f i) (g i)))) (HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (Distrib.toHasMul.{u2} α (Ring.toDistrib.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α _inst_1)))) (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => g i))))
+but is expected to have type
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : LinearOrderedRing.{u1} α] {f : ι -> α} {g : ι -> α} [_inst_2 : Fintype.{u2} ι], (Antivary.{u2, u1, u1} ι α α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1))) f g) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (StrictOrderedRing.toPartialOrder.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))) (Fintype.card.{u2} ι _inst_2)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (f i) (g i)))) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (StrictOrderedRing.toRing.{u1} α (LinearOrderedRing.toStrictOrderedRing.{u1} α _inst_1)))))) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => f i)) (Finset.sum.{u1, u2} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u1} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} α (LinearOrderedRing.toLinearOrderedSemiring.{u1} α _inst_1)))) (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => g i))))
+Case conversion may be inaccurate. Consider using '#align antivary.card_mul_sum_le_sum_mul_sum Antivary.card_mul_sum_le_sum_mul_sumₓ'. -/
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -156,6 +210,12 @@ end Mul
variable [LinearOrderedField α] {s : Finset ι} {f : ι → α}
+/- warning: sum_div_card_sq_le_sum_sq_div_card -> sum_div_card_sq_le_sum_sq_div_card is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommGroup.toPartialOrder.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (DivInvMonoid.toHasDiv.{u2} α (DivisionRing.toDivInvMonoid.{u2} α (Field.toDivisionRing.{u2} α (LinearOrderedField.toField.{u2} α _inst_1))))) (Finset.sum.{u2, u1} α ι (AddCommGroup.toAddCommMonoid.{u2} α (OrderedAddCommGroup.toAddCommGroup.{u2} α (StrictOrderedRing.toOrderedAddCommGroup.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (Ring.toMonoid.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))) (f i) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u2} Nat α (CoeTCₓ.coe.{1, succ u2} Nat α (Nat.castCoe.{u2} α (AddMonoidWithOne.toNatCast.{u2} α (AddGroupWithOne.toAddMonoidWithOne.{u2} α (AddCommGroupWithOne.toAddGroupWithOne.{u2} α (Ring.toAddCommGroupWithOne.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1))))))))))) (Finset.card.{u1} ι s)))
+but is expected to have type
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : LinearOrderedField.{u2} α] {s : Finset.{u1} ι} {f : ι -> α}, LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (StrictOrderedRing.toPartialOrder.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => f i)) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (Finset.card.{u1} ι s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) (HDiv.hDiv.{u2, u2, u2} α α α (instHDiv.{u2} α (LinearOrderedField.toDiv.{u2} α _inst_1)) (Finset.sum.{u2, u1} α ι (OrderedCancelAddCommMonoid.toAddCommMonoid.{u2} α (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1)))))) s (fun (i : ι) => HPow.hPow.{u2, 0, u2} α Nat α (instHPow.{u2, 0} α Nat (Monoid.Pow.{u2} α (MonoidWithZero.toMonoid.{u2} α (Semiring.toMonoidWithZero.{u2} α (StrictOrderedSemiring.toSemiring.{u2} α (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} α (LinearOrderedCommSemiring.toLinearOrderedSemiring.{u2} α (LinearOrderedSemifield.toLinearOrderedCommSemiring.{u2} α (LinearOrderedField.toLinearOrderedSemifield.{u2} α _inst_1))))))))) (f i) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))) (Nat.cast.{u2} α (NonAssocRing.toNatCast.{u2} α (Ring.toNonAssocRing.{u2} α (StrictOrderedRing.toRing.{u2} α (LinearOrderedRing.toStrictOrderedRing.{u2} α (LinearOrderedCommRing.toLinearOrderedRing.{u2} α (LinearOrderedField.toLinearOrderedCommRing.{u2} α _inst_1)))))) (Finset.card.{u1} ι s)))
+Case conversion may be inaccurate. Consider using '#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_cardₓ'. -/
theorem sum_div_card_sq_le_sum_sq_div_card :
((∑ i in s, f i) / s.card) ^ 2 ≤ (∑ i in s, f i ^ 2) / s.card :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -90,7 +90,7 @@ other is antitone), the scalar product of their sum is less than the size of the
scalar product. -/
theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
(Fintype.card ι • ∑ i, f i • g i) ≤ (∑ i, f i) • ∑ i, g i := by
- convert (hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
+ convert(hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
end Smul
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
This matches our general policy and zpow_two_pos_of_ne_zero.
Also define sq_pos_of_ne_zero as an alias.
@@ -156,7 +156,7 @@ theorem sum_div_card_sq_le_sum_sq_div_card :
obtain rfl | hs := s.eq_empty_or_nonempty
· simp
rw [← card_pos, ← @Nat.cast_pos α] at hs
- rw [div_pow, div_le_div_iff (sq_pos_of_ne_zero _ hs.ne') hs, sq (s.card : α), mul_left_comm, ←
+ rw [div_pow, div_le_div_iff (sq_pos_of_ne_zero hs.ne') hs, sq (s.card : α), mul_left_comm, ←
mul_assoc]
exact mul_le_mul_of_nonneg_right sq_sum_le_card_mul_sum_sq hs.le
#align sum_div_card_sq_le_sum_sq_div_card sum_div_card_sq_le_sum_sq_div_card
Take the content of
Algebra.BigOperators.List.Basic
Algebra.BigOperators.List.Lemmas
Algebra.BigOperators.Multiset.Basic
Algebra.BigOperators.Multiset.Lemmas
Algebra.BigOperators.Multiset.Order
Algebra.BigOperators.Order
and sort it into six files:
Algebra.Order.BigOperators.Group.List
. I credit Yakov for https://github.com/leanprover-community/mathlib/pull/8543.Algebra.Order.BigOperators.Group.Multiset
. Copyright inherited from Algebra.BigOperators.Multiset.Order
.Algebra.Order.BigOperators.Group.Finset
. Copyright inherited from Algebra.BigOperators.Order
.Algebra.Order.BigOperators.Ring.List
. I credit Stuart for https://github.com/leanprover-community/mathlib/pull/10184.Algebra.Order.BigOperators.Ring.Multiset
. I credit Ruben for https://github.com/leanprover-community/mathlib/pull/8787.Algebra.Order.BigOperators.Ring.Finset
. I credit Floris for https://github.com/leanprover-community/mathlib/pull/1294.Here are the design decisions at play:
Data.Nat.Order.Basic
in a few List
files.Algebra.Order.BigOperators
instead of Algebra.BigOperators.Order
because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators.Algebra.Order.BigOperators.Group
should be additivisable (except a few Nat
- or Int
-specific lemmas). In contrast, things under Algebra.Order.BigOperators.Ring
are more prone to having heavy imports.List
vs Multiset
vs Finset
. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the AbsoluteValue
lemmas from Algebra.Order.BigOperators.Ring.Finset
to a file Algebra.Order.BigOperators.Ring.AbsoluteValue
and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset
, Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset
, etc...Finsupp
big operator and finprod
/finsum
order lemmas also belong in Algebra.Order.BigOperators
. I haven't done so in this PR because the diff is big enough like that.@@ -3,8 +3,8 @@ Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-/
-import Mathlib.Algebra.BigOperators.Order
import Mathlib.Algebra.GroupPower.Order
+import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Rearrangement
import Mathlib.GroupTheory.Perm.Cycle.Basic
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -70,7 +70,7 @@ other is antitone), the scalar product of their sum is less than the size of the
scalar product. -/
theorem AntivaryOn.card_smul_sum_le_sum_smul_sum (hfg : AntivaryOn f g s) :
(s.card • ∑ i in s, f i • g i) ≤ (∑ i in s, f i) • ∑ i in s, g i := by
- refine hfg.dual_right.sum_smul_sum_le_card_smul_sum
+ exact hfg.dual_right.sum_smul_sum_le_card_smul_sum
#align antivary_on.card_smul_sum_le_sum_smul_sum AntivaryOn.card_smul_sum_le_sum_smul_sum
variable [Fintype ι]
@@ -88,7 +88,7 @@ other is antitone), the scalar product of their sum is less than the size of the
scalar product. -/
theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
(Fintype.card ι • ∑ i, f i • g i) ≤ (∑ i, f i) • ∑ i, g i := by
- refine (hfg.dual_right.monovaryOn _).sum_smul_sum_le_card_smul_sum
+ exact (hfg.dual_right.monovaryOn _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
end SMul
positivity
extensions (#10140)
The goal here is to have access to positivity
earlier in the import hierarchy
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-/
import Mathlib.Algebra.BigOperators.Order
+import Mathlib.Algebra.GroupPower.Order
import Mathlib.Algebra.Order.Rearrangement
import Mathlib.GroupTheory.Perm.Cycle.Basic
Nsmul
-> NSMul
, Zpow
-> ZPow
, etc (#9067)
Normalising to naming convention rule number 6.
@@ -46,7 +46,7 @@ variable {ι α β : Type*}
/-! ### Scalar multiplication versions -/
-section Smul
+section SMul
variable [LinearOrderedRing α] [LinearOrderedAddCommGroup β] [Module α β] [OrderedSMul α β]
{s : Finset ι} {σ : Perm ι} {f : ι → α} {g : ι → β}
@@ -90,7 +90,7 @@ theorem Antivary.card_smul_sum_le_sum_smul_sum (hfg : Antivary f g) :
refine (hfg.dual_right.monovaryOn _).sum_smul_sum_le_card_smul_sum
#align antivary.card_smul_sum_le_sum_smul_sum Antivary.card_smul_sum_le_sum_smul_sum
-end Smul
+end SMul
/-!
### Multiplication versions
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -41,7 +41,7 @@ open Equiv Equiv.Perm Finset Function OrderDual
open BigOperators
-variable {ι α β : Type _}
+variable {ι α β : Type*}
/-! ### Scalar multiplication versions -/
@@ -2,16 +2,13 @@
Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-
-! This file was ported from Lean 3 source module algebra.order.chebyshev
-! leanprover-community/mathlib commit b7399344324326918d65d0c74e9571e3a8cb9199
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.BigOperators.Order
import Mathlib.Algebra.Order.Rearrangement
import Mathlib.GroupTheory.Perm.Cycle.Basic
+#align_import algebra.order.chebyshev from "leanprover-community/mathlib"@"b7399344324326918d65d0c74e9571e3a8cb9199"
+
/-!
# Chebyshev's sum inequality
Now that leanprover/lean4#2210 has been merged, this PR:
set_option synthInstance.etaExperiment true
commands (and some etaExperiment%
term elaborators)set_option maxHeartbeats
commandsCo-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -106,7 +106,6 @@ section Mul
variable [LinearOrderedRing α] {s : Finset ι} {σ : Perm ι} {f g : ι → α}
-set_option synthInstance.etaExperiment true in -- Porting note: gets around lean4#2074
/-- **Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both
monotone/antitone), the product of their sum is less than the size of the set times their scalar
product. -/
@@ -116,7 +115,6 @@ theorem MonovaryOn.sum_mul_sum_le_card_mul_sum (hfg : MonovaryOn f g s) :
exact hfg.sum_smul_sum_le_card_smul_sum
#align monovary_on.sum_mul_sum_le_card_mul_sum MonovaryOn.sum_mul_sum_le_card_mul_sum
-set_option synthInstance.etaExperiment true in -- Porting note: gets around lean4#2074
/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
The unported dependencies are