Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§8.8 — the perturbation u~=(1−ξ2u,ξ)\tilde u=(\sqrt{1-\xi^2}u,\xi)u~=(1−ξ2​u,ξ) and D~i=(1−ξ2)Di+nξ2\tilde D_i=(1-\xi^2)D_i+n\xi^2D~i​=(1−ξ2)Di​+nξ2

Proved
CosDensity.perturbation

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

communication-complexitycosine-similaritylower-boundp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1streaming

Let u1,…,unu_1,\dots,u_nu1​,…,un​ be unit vectors of Rι\mathbb R^\iotaRι and ξ∈[0,1]\xi\in[0,1]ξ∈[0,1], and let u~i=(1−ξ2 ui, ξ)\tilde u_i=(\sqrt{1-\xi^2}\,u_i,\ \xi)u~i​=(1−ξ2​ui​, ξ). Then each u~i\tilde u_iu~i​ is a unit vector,

⟨u~i,u~j⟩=(1−ξ2)⟨ui,uj⟩+ξ2,\langle\tilde u_i,\tilde u_j\rangle=(1-\xi^2)\langle u_i,u_j\rangle+\xi^2,⟨u~i​,u~j​⟩=(1−ξ2)⟨ui​,uj​⟩+ξ2,

which is at least ξ2\xi^2ξ2 when all ⟨ui,uj⟩≥0\langle u_i,u_j\rangle\ge0⟨ui​,uj​⟩≥0, and the densities satisfy D~i=(1−ξ2)Di+nξ2\tilde D_i=(1-\xi^2)D_i+n\xi^2D~i​=(1−ξ2)Di​+nξ2.

The perturbation makes every similarity strictly positive while changing every density by a factor 1+o(1)1+o(1)1+o(1) in the paper's regime ξ=m−2p\xi=m^{-2p}ξ=m−2p.

Differences from the source:

  • generalization: the hard stream in ℝ^{4m} with ξ = m^{−2p} → any stream of n unit vectors of ℝ^ι (ι finite) and any ξ ∈ [0, 1]; reason: the identities hold for every unit stream; the paper's case is an instance
  • encoding: (1 + o(1)) conclusions for the densities and the moment → the exact identities; the asymptotic conclusions are carried by Theorem 8.1; reason: the o(1) statements are consequences of the exact identities at the paper's ξ
Preamble
import Mathlib
import Definitions.Def_CosDensity_Stream
import Definitions.Def_CosDensity_Perturb

open scoped RealInnerProductSpace
Formal statement
namespace CosDensity

/-- **§8.8, the perturbation.** Q. Zhang, *Frequency Moments Beyond Equality: Streaming Cosine
Density Moments*, arXiv:2609.06925 (held version, sha256 f4d4df22…), §8.8, p.36 (pdf_page 37).

For a stream of `n` unit vectors `u_i` and `ξ ∈ [0, 1]`, the perturbed vectors
`ũ_i = (√(1 − ξ²) u_i, ξ)` are unit vectors with `⟨ũ_i, ũ_j⟩ = (1 − ξ²)⟨u_i, u_j⟩ + ξ²`, which is
at least `ξ²` when the `u_i` have pairwise nonnegative inner products, and the densities satisfy
`D̃_i = (1 − ξ²) D_i + n ξ²`.

**Formalization Note.** Streams are `Fin n → E` and densities `densityF`. The source space is
`EuclideanSpace ℝ ι` for any finite `ι` (the paper's `ℝ^{4m}`), the perturbed space
`EuclideanSpace ℝ (Option ι)`. `ξ ∈ [0, 1]` is arbitrary (the paper takes `ξ = m^{−2p}`); the
`(1 + o(1))` conclusions are carried by Theorem 8.1. -/
theorem perturbation {ι : Type*} [Fintype ι] {n : ℕ} (u : Fin n → EuclideanSpace ℝ ι)
    (hu : ∀ i, ‖u i‖ = 1) (ξ : ℝ) (hξ0 : 0 ≤ ξ) (hξ1 : ξ ≤ 1) :
    (∀ i, ‖perturb ξ (u i)‖ = 1) ∧
    (∀ i j, ⟪perturb ξ (u i), perturb ξ (u j)⟫ = (1 - ξ ^ 2) * ⟪u i, u j⟫ + ξ ^ 2) ∧
    ((∀ i j, 0 ≤ ⟪u i, u j⟫) → ∀ i j, ξ ^ 2 ≤ ⟪perturb ξ (u i), perturb ξ (u j)⟫) ∧
    ∀ i, densityF (fun k => perturb ξ (u k)) i = (1 - ξ ^ 2) * densityF u i + n * ξ ^ 2 := by sorry

end CosDensity
Source
Q. Zhang, Frequency Moments Beyond Equality: Streaming Cosine Density Moments, arXiv:2609.06925 (held version, sha256 f4d4df22…), §8.8, p.36 (pdf_page 37)
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 6, 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