Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Cauchy–Schwarz display: ∣∑Vf∣2=∣∑Rf∣2≤∣R∣∑Rf2|\sum_{V}f|^2=|\sum_{R}f|^2\le|R|\sum_{R}f^2∣∑V​f∣2=∣∑R​f∣2≤∣R∣∑R​f2 when ∑Uf=0\sum_U f=0∑U​f=0 (Section 2.4)

Proved
ExplicitExpanders.Attach.cauchy_schwarz_R

by mikedeng1 · Oct 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

cauchy-schwarzexpander-graphsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let VVV be a finite set, let RRR be a set of rrr further elements, and let fff be a real function on U=V∪RU=V\cup RU=V∪R (disjoint union) with ∑u∈Uf(u)=0\sum_{u\in U} f(u)=0∑u∈U​f(u)=0. Then

∣∑u∈Vf(u)∣2=∣∑u∈Rf(u)∣2≤∣R∣∑u∈Rf2(u).\Big|\sum_{u\in V} f(u)\Big|^2=\Big|\sum_{u\in R} f(u)\Big|^2\le |R|\sum_{u\in R} f^2(u).​u∈V∑​f(u)​2=​u∈R∑​f(u)​2≤∣R∣u∈R∑​f2(u).

The equality holds because the two partial sums are negatives of each other, and the inequality is the Cauchy–Schwarz inequality. In the proof of Theorem 1.2 this shows that a unit vector orthogonal to the constant vector on UUU has only a small component along the constant vector of the old vertex set VVV, since ∣R∣=r=o(m)|R|=r=o(m)∣R∣=r=o(m).

Formalization Note The paper also uses ∥f∥2=1\|f\|_2=1∥f∥2​=1 to write ∣R∣∑u∈Rf2(u)≤∣R∣|R|\sum_{u\in R}f^2(u)\le |R|∣R∣∑u∈R​f2(u)≤∣R∣; the statement keeps the unnormalised form, from which that follows.

Preamble
import Mathlib
Formal statement
namespace ExplicitExpanders.Attach

/-- The Cauchy–Schwarz display (arXiv:2003.11673v1, §2.4, p. 9): for a real function `f` on
`U = V ⊕ R`, `R = Fin r`, with `∑_{u ∈ U} f(u) = 0`, one has
`|∑_{u∈V} f(u)|² = |∑_{u∈R} f(u)|² ≤ |R| ∑_{u∈R} f(u)²`. -/
theorem cauchy_schwarz_R {V : Type*} [Fintype V] {r : ℕ} (f : V ⊕ Fin r → ℝ)
    (hf : ∑ u, f u = 0) :
    (∑ v, f (Sum.inl v)) ^ 2 = (∑ i, f (Sum.inr i)) ^ 2 ∧
      (∑ i, f (Sum.inr i)) ^ 2 ≤ (r : ℝ) * ∑ i, f (Sum.inr i) ^ 2 := by sorry

end ExplicitExpanders.Attach
Source
N. Alon, Explicit expanders of every degree and size, arXiv:2003.11673v1, p. 9, Section 2.4, unnumbered display after (2) ("By Cauchy-Schwarz ...")
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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