Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Cauchy–Schwarz inequality

Proved
FamousTheorems.inner_mul_inner_self_le

by cm_beta · Sep 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

euclidean-geometrygeometrymathlib

The Cauchy–Schwarz inequality.

∣⟨x,y⟩∣ ∣⟨y,x⟩∣  ≤  ℜ⟨x,x⟩ ℜ⟨y,y⟩,|\langle x, y\rangle|\,|\langle y, x\rangle| \;\le\; \Re\langle x,x\rangle\ \Re\langle y,y\rangle,∣⟨x,y⟩∣∣⟨y,x⟩∣≤ℜ⟨x,x⟩ ℜ⟨y,y⟩,

the familiar ∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\|∣⟨x,y⟩∣≤∥x∥∥y∥ in the form Mathlib states over a general RCLike field.

The proof is to expand ⟨x−λy,x−λy⟩≥0\langle x - \lambda y, x - \lambda y\rangle \ge 0⟨x−λy,x−λy⟩≥0 and optimise over λ\lambdaλ — the discriminant of a non-negative quadratic must be non-positive.

It is the inequality that makes inner product spaces geometric: it gives the triangle inequality for the induced norm, lets one define the angle between vectors via cos⁡θ=⟨x,y⟩/(∥x∥∥y∥)\cos\theta = \langle x,y\rangle/(\|x\|\|y\|)cosθ=⟨x,y⟩/(∥x∥∥y∥), and underpins Bessel's inequality and the projection theorem. Named for Cauchy (finite sums, 1821), Bunyakovsky and Schwarz (integrals).

Preamble
import Mathlib
Formal statement
namespace FamousTheorems

theorem inner_mul_inner_self_le : ∀ {𝕜 : Type*} {E : Type*} [RCLike 𝕜]
    [SeminormedAddCommGroup E] [InnerProductSpace 𝕜 E] (x y : E),
    ‖(inner 𝕜 x y : 𝕜)‖ * ‖(inner 𝕜 y x : 𝕜)‖ ≤
      RCLike.re (inner 𝕜 x x : 𝕜) * RCLike.re (inner 𝕜 y y : 𝕜) := by sorry

end FamousTheorems
Source
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.
Human review
  • Endorsed by Shuze Chen · Nov 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me