The finite Cauchy–Schwarz inequality
ProvedProofsInTheBook.Chapter18.chapter18_cauchy_schwarzanalysisbook-chapter-20lean4proofs-from-the-book
Let be any index set, let be finite, and let be arbitrary. Then
The set may be empty, and the entries need not be nonnegative.
Preamble
import Mathlib
Formal statement
theorem ProofsInTheBook.Chapter18.chapter18_cauchy_schwarz {ι : Type*} (s : Finset ι) (f g : ι → ℝ) :
(∑ i ∈ s, f i * g i) ^ 2 ≤ (∑ i ∈ s, f i ^ 2) * (∑ i ∈ s, g i ^ 2) := by sorrySource
Martin Aigner and Günter M. Ziegler, Proofs from THE BOOK, 6th edition, Springer, 2018, Chapter 20, “In praise of inequalities”, pp. 143–150 (https://doi.org/10.1007/978-3-662-57265-8_20). Formalization: https://github.com/xiangyazi24/proof_in_the_book/blob/88d88d141768cded75e782c525ef1bf04b8fe220/ProofsInTheBook/Chapter18.lean#L67. The book citation identifies the topic; the selected declaration does not claim to reproduce the entire chapter.