English
Equality case for MonovaryOn: ∑ f i · g i = ∑ f i · g(σ i) iff MonovaryOn f (g ∘ σ) s.
Русский
Равенство для MonovaryOn: сумма равна тогда и только тогда, когда MonovaryOn f (g ∘ σ) s.
LaTeX
$$$\displaystyle \text{If } \operatorname{MonovaryOn}(f,g,s) \text{ then } \sum_{i\in s} f(i) \cdot g(i) = \sum_{i\in s} f(i) \cdot g(σ(i)) \iff \operatorname{MonovaryOn}(f, g \circ σ, s).$$$
Lean4
/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which monovary together on `s`, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not monovary together on `s`. Stated by permuting the entries of `f`. -/
theorem sum_comp_perm_mul_lt_sum_mul_iff (hfg : MonovaryOn f g s) (hσ : {x | σ x ≠ x} ⊆ s) :
∑ i ∈ s, f (σ i) * g i < ∑ i ∈ s, f i * g i ↔ ¬MonovaryOn (f ∘ σ) g s :=
hfg.sum_comp_perm_smul_lt_sum_smul_iff hσ