Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition A.2: with optimal views, minimal sufficient encoders give sufficient statistics for yyy

Proved
GoodViews.optimal_views_sufficient_representation

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

contrastive-learninginformation-theorymutual-informationself-supervised-learningsufficient-statistics

Let xxx be the data and yyy the task label, finitely-valued random variables on a finite probability space. Let (v1∗,v2∗)=(g1(x),g2(x))(v_1^*,v_2^*)=(g_1(x),g_2(x))(v1∗​,v2∗​)=(g1​(x),g2​(x)) be optimal views: among all pairs of views g1′:X→V1g_1':X\to V_1g1′​:X→V1​, g2′:X→V2g_2':X\to V_2g2′​:X→V2​ with I(g1′(x);y)=I(g2′(x);y)=I(x;y)I(g_1'(x);y)=I(g_2'(x);y)=I(x;y)I(g1′​(x);y)=I(g2′​(x);y)=I(x;y), they minimise I(g1′(x);g2′(x))I(g_1'(x);g_2'(x))I(g1′​(x);g2′​(x)). Let f1f_1f1​ and f2f_2f2​ be minimal sufficient encoders of v1∗v_1^*v1∗​ and v2∗v_2^*v2∗​ (Definitions 1 and 2). Then the representations z1=f1(v1∗)z_1=f_1(v_1^*)z1​=f1​(v1∗​) and z2=f2(v2∗)z_2=f_2(v_2^*)z2​=f2​(v2∗​) are sufficient statistics of v1∗v_1^*v1∗​ and v2∗v_2^*v2∗​ for yyy:

I(z1;y)=I(v1∗;y),I(z2;y)=I(v2∗;y).I(z_1;y)=I(v_1^*;y),\qquad I(z_2;y)=I(v_2^*;y).I(z1​;y)=I(v1∗​;y),I(z2​;y)=I(v2∗​;y).

Together with Proposition A.3 this shows that contrastive learning with optimal views loses no task information.

Formalization Note The paper writes "z1z_1z1​ (or z2z_2z2​)"; both conclusions are stated. Sufficiency of f2f_2f2​ is written as I(v2;v1)=I(f2(v2);v1)I(v_2;v_1)=I(f_2(v_2);v_1)I(v2​;v1​)=I(f2​(v2​);v1​), which equals the paper's I(v1;v2)=I(v1;f2(v2))I(v_1;v_2)=I(v_1;f_2(v_2))I(v1​;v2​)=I(v1​;f2​(v2​)) by symmetry of mutual information.

Preamble
import Mathlib
import Definitions.Def_GoodViews_Basic

open Finset
Formal statement
namespace GoodViews

theorem optimal_views_sufficient_representation {S X Y V₁ V₂ Z₁ Z₂ : Type} [Fintype S]
    [Fintype X] [Fintype Y] [Fintype V₁] [Fintype V₂] [Fintype Z₁] [Fintype Z₂]
    (P : S → ℝ) (hP : IsPMF P) (x : S → X) (y : S → Y) (g₁ : X → V₁) (g₂ : X → V₂)
    (hopt : IsOptimalViews P x y g₁ g₂) (f₁ : V₁ → Z₁) (f₂ : V₂ → Z₂)
    (hf₁ : IsMinimalSufficientEncoder P (g₁ ∘ x) (g₂ ∘ x) f₁)
    (hf₂ : IsMinimalSufficientEncoder P (g₂ ∘ x) (g₁ ∘ x) f₂) :
    IsSufficientStat P (g₁ ∘ x) y f₁ ∧ IsSufficientStat P (g₂ ∘ x) y f₂ := by sorry

end GoodViews
Source
Tian, Sun, Poole, Krishnan, Schmid and Isola, What Makes for Good Views for Contrastive Learning?, arXiv:2005.10243v3 (2020), Appendix A.2, Proposition A.2, pp. 15-16
Read-back

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

Setting. Fix finite sets S,X,Y,V1,V2,Z1,Z2S, X, Y, V_1, V_2, Z_1, Z_2S,X,Y,V1​,V2​,Z1​,Z2​. Let P:S→RP : S \to \mathbb{R}P:S→R be a probability mass function on SSS, so P(ω)≥0P(\omega) \ge 0P(ω)≥0 for all ω\omegaω and ∑ω∈SP(ω)=1\sum_{\omega \in S} P(\omega) = 1∑ω∈S​P(ω)=1. In particular SSS is nonempty.

Fix the following functions on SSS, viewed as random variables:

  • the data x:S→Xx : S \to Xx:S→X;
  • the label y:S→Yy : S \to Yy:S→Y.

Fix two maps g1:X→V1g_1 : X \to V_1g1​:X→V1​ and g2:X→V2g_2 : X \to V_2g2​:X→V2​, and write the two "views" as

v1=g1∘x:S→V1,v2=g2∘x:S→V2.v_1 = g_1 \circ x : S \to V_1, \qquad v_2 = g_2 \circ x : S \to V_2.v1​=g1​∘x:S→V1​,v2​=g2​∘x:S→V2​.

Fix two further maps (the "encoders") f1:V1→Z1f_1 : V_1 \to Z_1f1​:V1​→Z1​ and f2:V2→Z2f_2 : V_2 \to Z_2f2​:V2​→Z2​.

Information quantities. For any random variable A:S→αA : S \to \alphaA:S→α with α\alphaα finite:

  • its law is P(A=a)=∑ω:A(ω)=aP(ω)P(A = a) = \sum_{\omega : A(\omega) = a} P(\omega)P(A=a)=∑ω:A(ω)=a​P(ω);
  • its entropy is H(A)=∑a∈α−P(A=a) log⁡P(A=a)H(A) = \sum_{a \in \alpha} -P(A=a)\,\log P(A=a)H(A)=∑a∈α​−P(A=a)logP(A=a), using the natural logarithm and the convention 0log⁡0=00 \log 0 = 00log0=0.

The mutual information of two random variables A,BA, BA,B is defined as

I(A;B)=H(A)+H(B)−H(A,B),I(A;B) = H(A) + H(B) - H(A,B),I(A;B)=H(A)+H(B)−H(A,B),

where (A,B)(A,B)(A,B) is the pair-valued random variable ω↦(A(ω),B(ω))\omega \mapsto (A(\omega), B(\omega))ω↦(A(ω),B(ω)).

Hypotheses.

  1. Optimal views. The pair (g1,g2)(g_1, g_2)(g1​,g2​) is "optimal" in the following sense.
    • Feasibility: I(v1;y)=I(x;y)I(v_1; y) = I(x; y)I(v1​;y)=I(x;y) and I(v2;y)=I(x;y)I(v_2; y) = I(x; y)I(v2​;y)=I(x;y).
    • Minimality: for every pair of maps g1′:X→V1g_1' : X \to V_1g1′​:X→V1​ and g2′:X→V2g_2' : X \to V_2g2′​:X→V2​ with the same codomains V1,V2V_1, V_2V1​,V2​ that is also feasible, i.e. I(g1′∘x;y)=I(g2′∘x;y)=I(x;y)I(g_1'\circ x; y) = I(g_2'\circ x; y) = I(x;y)I(g1′​∘x;y)=I(g2′​∘x;y)=I(x;y), we have
I(v1;v2)≤I(g1′∘x; g2′∘x).I(v_1; v_2) \le I(g_1' \circ x;\, g_2' \circ x).I(v1​;v2​)≤I(g1′​∘x;g2′​∘x).
  • Competing views with other codomains are not considered.
  1. f1f_1f1​ is a minimal sufficient encoder of v1v_1v1​ with respect to v2v_2v2​.
    • Sufficiency: I(v1;v2)=I(f1(v1);v2)I(v_1; v_2) = I(f_1(v_1); v_2)I(v1​;v2​)=I(f1​(v1​);v2​).
    • Minimality: for every finite type WWW and every map f′:V1→Wf' : V_1 \to Wf′:V1​→W satisfying I(v1;v2)=I(f′(v1);v2)I(v_1; v_2) = I(f'(v_1); v_2)I(v1​;v2​)=I(f′(v1​);v2​), we have
I(f1(v1);v1)≤I(f′(v1);v1).I(f_1(v_1); v_1) \le I(f'(v_1); v_1).I(f1​(v1​);v1​)≤I(f′(v1​);v1​).
  1. f2f_2f2​ is a minimal sufficient encoder of v2v_2v2​ with respect to v1v_1v1​. This is the same as hypothesis 2 with the roles of the views exchanged.
    • Sufficiency: I(v2;v1)=I(f2(v2);v1)I(v_2; v_1) = I(f_2(v_2); v_1)I(v2​;v1​)=I(f2​(v2​);v1​).
    • Minimality: for every finite type WWW and every f′:V2→Wf' : V_2 \to Wf′:V2​→W with I(v2;v1)=I(f′(v2);v1)I(v_2; v_1) = I(f'(v_2); v_1)I(v2​;v1​)=I(f′(v2​);v1​), we have I(f2(v2);v2)≤I(f′(v2);v2)I(f_2(v_2); v_2) \le I(f'(v_2); v_2)I(f2​(v2​);v2​)≤I(f′(v2​);v2​).

Conclusion. Both encoded views retain all of each view's mutual information with the label:

I(f1(v1); y)=I(v1; y)andI(f2(v2); y)=I(v2; y).I(f_1(v_1);\, y) = I(v_1;\, y) \qquad\text{and}\qquad I(f_2(v_2);\, y) = I(v_2;\, y).I(f1​(v1​);y)=I(v1​;y)andI(f2​(v2​);y)=I(v2​;y).

Scope of the conclusion.

  • It asserts only these two equalities, i.e. that f1(v1)f_1(v_1)f1​(v1​) and f2(v2)f_2(v_2)f2​(v2​) are sufficient statistics of v1v_1v1​ and v2v_2v2​ for yyy.
  • It asserts nothing about minimality of f1f_1f1​ or f2f_2f2​ with respect to yyy.
  • It says nothing directly about I( ⋅ ;x)I(\,\cdot\,; x)I(⋅;x).
  • The equalities are stated relative to I(vi;y)I(v_i; y)I(vi​;y). By hypothesis 1 these both equal I(x;y)I(x; y)I(x;y).

Degenerate cases.

  • All the sets involved are automatically nonempty, since SSS is nonempty and every map is defined on it.
  • The theorem's content is conditional on the optimality hypothesis 1 actually holding for the given (g1,g2)(g_1, g_2)(g1​,g2​). It is not asserted that such an optimal pair exists.
Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

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