English
If f is submultiplicative and p is a predicate preserved under multiplication, then the expectation over a finite nonempty set is bounded by the product of the expectations of f on each element.
Русский
Если f субумножаемая и pred сохраняется при умножении, тогда ожидание конечного множества ограничено произведением ожиданий отдельных элементов.
LaTeX
$$$\\text{¬contradictory}$$$
Lean4
/-- **Cauchy-Schwarz inequality** in terms of `Finset.expect`. -/
theorem expect_mul_sq_le_sq_mul_sq (s : Finset ι) (f g : ι → R) :
(𝔼 i ∈ s, f i * g i) ^ 2 ≤ (𝔼 i ∈ s, f i ^ 2) * 𝔼 i ∈ s, g i ^ 2 :=
by
simp only [expect, smul_pow, inv_pow, smul_mul_smul_comm, ← sq]
gcongr
exact sum_mul_sq_le_sq_mul_sq ..