Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6: approximating g⋆g^\starg⋆ by inner products suffices

Proved
MultiViewRedundancy.direct_embedding_approximation

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

conditional-expectationcontrastive-learningdensity-ratiomulti-view-learningrepresentation-learning

Let (X,Z,Y)(X,Z,Y)(X,Z,Y) have E[Y2]<∞\mathbb E[Y^2]<\inftyE[Y2]<∞, ZZZ valued in a standard Borel space and pX,Z≪pX⊗pZp_{X,Z}\ll p_X\otimes p_ZpX,Z​≪pX​⊗pZ​. For all measurable η:X→Rm\eta:\mathcal X\to\mathbb R^mη:X→Rm and ψ:Z→Rm\psi:\mathcal Z\to\mathbb R^mψ:Z→Rm there is w∈Rmw\in\mathbb R^mw∈Rm with

E[(w⊤η(X)−μ(X))2]≤E[Y2]⋅εdirect(η,ψ),εdirect(η,ψ)=E[(η(X)⊤ψ(Z~)−g⋆(X,Z~))2],\mathbb E\big[(w^\top\eta(X)-\mu(X))^2\big]\le\mathbb E[Y^2]\cdot\varepsilon_{\mathrm{direct}}(\eta,\psi),\qquad \varepsilon_{\mathrm{direct}}(\eta,\psi)=\mathbb E\big[(\eta(X)^\top\psi(\tilde Z)-g^\star(X,\tilde Z))^2\big],E[(w⊤η(X)−μ(X))2]≤E[Y2]⋅εdirect​(η,ψ),εdirect​(η,ψ)=E[(η(X)⊤ψ(Z~)−g⋆(X,Z~))2],

where (X,Z~)∼pX⊗pZ(X,\tilde Z)\sim p_X\otimes p_Z(X,Z~)∼pX​⊗pZ​.

So it suffices to find embeddings whose inner product approximates g⋆g^\starg⋆ under the product of the marginals.

Formalization Note Both sides take values in [0,∞][0,\infty][0,∞], so the statement also covers εdirect=∞\varepsilon_{\mathrm{direct}}=\inftyεdirect​=∞. Measurability of η,ψ\eta,\psiη,ψ, finiteness of E[Y2]\mathbb E[Y^2]E[Y2] and pX,Z≪pX⊗pZp_{X,Z}\ll p_X\otimes p_ZpX,Z​≪pX​⊗pZ​ are the paper's standing conventions, stated as hypotheses.

Preamble
import Mathlib
import Definitions.Def_MultiViewRedundancy_Basic

open MeasureTheory ProbabilityTheory
open scoped ENNReal NNReal
Formal statement
namespace MultiViewRedundancy

theorem direct_embedding_approximation {X Z : Type*} [MeasurableSpace X] [MeasurableSpace Z]
    [StandardBorelSpace Z] [Nonempty Z]
    (ρ : Measure (X × Z × ℝ)) [IsProbabilityMeasure ρ] (hY : MemLp (fun t => t.2.2) 2 ρ)
    (hac : lawXZ ρ ≪ (lawXZ ρ).fst.prod (lawXZ ρ).snd)
    {m : ℕ} (η : X → Fin m → ℝ) (ψ : Z → Fin m → ℝ) (hη : Measurable η) (hψ : Measurable ψ) :
    ∃ w : Fin m → ℝ,
      ∫⁻ x, ENNReal.ofReal ((∑ i, w i * η x i - muFn ρ x) ^ 2) ∂(lawXZ ρ).fst ≤
        ENNReal.ofReal (∫ t, t.2.2 ^ 2 ∂ρ) * epsDirect (lawXZ ρ) η ψ := by sorry

end MultiViewRedundancy
Source
Tosh, Krishnamurthy and Hsu, Contrastive learning, multi-view redundancy, and linear models, arXiv:2008.10150v2 (2021), Section 4.2, Lemma 6, p. 11; proof in Appendix A.5, p. 18
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Let X\mathcal XX and Z\mathcal ZZ be measurable spaces. Z\mathcal ZZ is assumed to be a standard Borel space and nonempty. No further assumption is placed on X\mathcal XX. Let ρ\rhoρ be a probability measure on X×Z×R\mathcal X \times \mathcal Z \times \mathbb RX×Z×R, viewed as the law of a triple (X,Z,Y)(X, Z, Y)(X,Z,Y). The hypotheses are:

  • (Square-integrable label) The coordinate YYY (the R\mathbb RR-component) belongs to L2(ρ)L^2(\rho)L2(ρ): it is a.e.-strongly measurable and Eρ[Y2]<∞\mathbb E_\rho[Y^2] < \inftyEρ​[Y2]<∞.
  • (Absolute continuity) Let pX,Zp_{X,Z}pX,Z​ be the law of (X,Z)(X,Z)(X,Z) under ρ\rhoρ (the pushforward of ρ\rhoρ under (x,z,y)↦(x,z)(x,z,y)\mapsto(x,z)(x,z,y)↦(x,z)), and let pXp_XpX​, pZp_ZpZ​ be its two marginals. Then pX,Z≪pX⊗pZp_{X,Z} \ll p_X \otimes p_ZpX,Z​≪pX​⊗pZ​.
  • (Embeddings) m∈Nm \in \mathbb Nm∈N is arbitrary, and m=0m = 0m=0 is allowed. The maps η:X→Rm\eta : \mathcal X \to \mathbb R^mη:X→Rm and ψ:Z→Rm\psi : \mathcal Z \to \mathbb R^mψ:Z→Rm are arbitrary measurable maps.

Objects appearing in the conclusion.

  • Regression of YYY on ZZZ. Let κY∣Z\kappa_{Y\mid Z}κY∣Z​ be the specific disintegration (conditional) kernel of the law of (Z,Y)(Z,Y)(Z,Y) under ρ\rhoρ. Define
rZ(z)=∫Ry κY∣Z(dy∣z).r_Z(z) = \int_{\mathbb R} y \,\kappa_{Y\mid Z}(dy \mid z).rZ​(z)=∫R​yκY∣Z​(dy∣z).

This is a Bochner integral, so it takes the value 000 at any zzz where y↦yy \mapsto yy↦y is not κY∣Z(⋅∣z)\kappa_{Y\mid Z}(\cdot\mid z)κY∣Z​(⋅∣z)-integrable.

  • The function μ\muμ. Let κZ∣X\kappa_{Z\mid X}κZ∣X​ be the specific disintegration kernel of pX,Zp_{X,Z}pX,Z​ given the first coordinate. Define
μ(x)=∫ZrZ(z) κZ∣X(dz∣x).\mu(x) = \int_{\mathcal Z} r_Z(z)\,\kappa_{Z\mid X}(dz \mid x).μ(x)=∫Z​rZ​(z)κZ∣X​(dz∣x).

This is again a Bochner integral, equal to 000 wherever rZr_ZrZ​ is not integrable.

  • The density ratio. g⋆(x,z)g^\star(x,z)g⋆(x,z) is the real part (the [0,∞][0,\infty][0,∞]-valued value converted to a real number, with ∞\infty∞ sent to 000) of a fixed version of the Radon–Nikodym derivative
dpX,Zd(pX⊗pZ)(x,z).\frac{dp_{X,Z}}{d(p_X\otimes p_Z)}(x,z).d(pX​⊗pZ​)dpX,Z​​(x,z).
  • Direct approximation error. Define
εdirect(η,ψ)=∫X×Z(η(x)⊤ψ(z)−g⋆(x,z))2 d(pX⊗pZ)(x,z)  ∈[0,∞].\varepsilon_{\mathrm{direct}}(\eta,\psi) = \int_{\mathcal X\times\mathcal Z} \big(\eta(x)^\top\psi(z) - g^\star(x,z)\big)^2 \, d(p_X\otimes p_Z)(x,z) \;\in [0,\infty].εdirect​(η,ψ)=∫X×Z​(η(x)⊤ψ(z)−g⋆(x,z))2d(pX​⊗pZ​)(x,z)∈[0,∞].

This is a nonnegative (lower) integral and may equal +∞+\infty+∞.

Conclusion. There exists a vector w∈Rmw \in \mathbb R^mw∈Rm such that, as an inequality in [0,∞][0,\infty][0,∞],

∫X(∑i=1mwi ηi(x)−μ(x))2 dpX(x)  ≤  Eρ[Y2]⋅εdirect(η,ψ).\int_{\mathcal X} \Big(\sum_{i=1}^m w_i\,\eta_i(x) - \mu(x)\Big)^2 \, dp_X(x) \;\le\; \mathbb E_\rho[Y^2]\cdot \varepsilon_{\mathrm{direct}}(\eta,\psi).∫X​(i=1∑m​wi​ηi​(x)−μ(x))2dpX​(x)≤Eρ​[Y2]⋅εdirect​(η,ψ).

The left side is a nonnegative integral that may be +∞+\infty+∞. On the right, the real number Eρ[Y2]=∫y2 dρ\mathbb E_\rho[Y^2] = \int y^2\,d\rhoEρ​[Y2]=∫y2dρ is embedded into [0,∞][0,\infty][0,∞].

Edge cases.

  • Infinite error. If εdirect(η,ψ)=∞\varepsilon_{\mathrm{direct}}(\eta,\psi) = \inftyεdirect​(η,ψ)=∞ and Eρ[Y2]>0\mathbb E_\rho[Y^2] > 0Eρ​[Y2]>0, the right side is ∞\infty∞ and the claim is trivial.
  • Zero second moment. If Eρ[Y2]=0\mathbb E_\rho[Y^2] = 0Eρ​[Y2]=0, the right side is 000 under the convention 0⋅∞=00\cdot\infty = 00⋅∞=0, even when εdirect=∞\varepsilon_{\mathrm{direct}} = \inftyεdirect​=∞.
  • m=0m = 0m=0. Then www is the empty vector and every sum is 000. The claim reduces to
∫μ2 dpX≤E[Y2]∫(g⋆)2 d(pX⊗pZ).\int \mu^2\,dp_X \le \mathbb E[Y^2]\int (g^\star)^2\,d(p_X\otimes p_Z).∫μ2dpX​≤E[Y2]∫(g⋆)2d(pX​⊗pZ​).
  • Role of ψ\psiψ. ψ\psiψ enters only through εdirect\varepsilon_{\mathrm{direct}}εdirect​. The left side depends only on η\etaη and www.
  • Existential, not infimum. The statement asserts the existence of a single www achieving the bound. It is not stated as an infimum over www.
  • Choice of versions. μ\muμ and g⋆g^\starg⋆ are defined through particular versions of the conditional kernels and of the Radon–Nikodym derivative.
Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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