Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 (proof, map fff): f(z)f(z)f(z) has the same distribution as zzz

Proved
DisentanglementImpossibility.entanglingMap_preserves_law

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

disentanglementidentifiabilitynonlinear-icarepresentation-learning

Let d≥0d\ge0d≥0 be any dimension, let zzz have a factorized density (independent coordinates zi∼μiz_i\sim\mu_izi​∼μi​, each with a Lebesgue density), with marginal distribution functions FiF_iFi​, and let AAA be an orthogonal d×dd\times dd×d matrix. Define

f(u)=g−1(h−1(A h(g(u)))),fi(u)=Fi−1(ψ((A h(g(u)))i)),f(u)=g^{-1}\big(h^{-1}(A\,h(g(u)))\big),\qquad f_i(u)=F_i^{-1}\Big(\psi\big((A\,h(g(u)))_i\big)\Big),f(u)=g−1(h−1(Ah(g(u)))),fi​(u)=Fi−1​(ψ((Ah(g(u)))i​)),

where Fi−1F_i^{-1}Fi−1​ is the quantile function of μi\mu_iμi​. Then fff is measurable, f(z)f(z)f(z) has the same distribution as zzz, and in particular

P(z≤u)=P(f(z)≤u)for all u∈Rd,P(z\le u)=P(f(z)\le u)\qquad\text{for all }u\in\mathbb{R}^d,P(z≤u)=P(f(z)≤u)for all u∈Rd,

where ≤\le≤ is the coordinatewise order.

Formalization Note The paper's g−1g^{-1}g−1 is the inverse of ggg, which the paper asserts is bijective. Here g−1g^{-1}g−1 is the coordinatewise quantile map. It is defined for every factorized density and equals the inverse of ggg when every marginal support is an interval.

Preamble
import Mathlib
import Definitions.Def_DisentanglementImpossibility_Basic

open MeasureTheory ProbabilityTheory
Formal statement
namespace DisentanglementImpossibility

theorem entanglingMap_preserves_law {d : ℕ} (μ : Fin d → Measure ℝ) (hμ : IsFactorizedDensity μ)
    (A : Matrix (Fin d) (Fin d) ℝ) (hA : A ∈ Matrix.orthogonalGroup (Fin d) ℝ) :
    Measurable (entanglingMap μ A) ∧
    (latentLaw μ).map (entanglingMap μ A) = latentLaw μ ∧
    ∀ u, latentLaw μ {z | z ≤ u} = latentLaw μ {z | entanglingMap μ A z ≤ u} := by sorry

end DisentanglementImpossibility
Source
Locatello, Bauer, Lucic, Rätsch, Gelly, Schölkopf, Bachem, Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations, ICML 2019, arXiv:1811.12359v4, Appendix A (Proof of Theorem 1), definition of f and the sentence after it, p. 12
Read-back

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

Let d≥0d \ge 0d≥0 be a natural number, and let μ1,…,μd\mu_1, \dots, \mu_dμ1​,…,μd​ be measures on R\mathbb{R}R. The hypothesis on them is that every μi\mu_iμi​ is a probability measure and is absolutely continuous with respect to Lebesgue measure (μi≪λ\mu_i \ll \lambdaμi​≪λ), so each has a density. Write P=μ1⊗⋯⊗μdP = \mu_1 \otimes \cdots \otimes \mu_dP=μ1​⊗⋯⊗μd​ for their product measure on Rd\mathbb{R}^dRd, the law of a vector with independent coordinates zi∼μiz_i \sim \mu_izi​∼μi​.

Let AAA be an arbitrary real d×dd \times dd×d orthogonal matrix, meaning A⊤A=AA⊤=IdA^\top A = A A^\top = I_dA⊤A=AA⊤=Id​. Nothing else is assumed about AAA.

The following notation is needed to define the map fff:

  • Fi(x)=μi((−∞,x])F_i(x) = \mu_i((-\infty, x])Fi​(x)=μi​((−∞,x]) is the cumulative distribution function of μi\mu_iμi​.
  • Φ\PhiΦ is the cumulative distribution function of the standard normal law N(0,1)\mathcal N(0,1)N(0,1), with mean 000 and variance 111.
  • For a law ν\nuν on R\mathbb{R}R with distribution function FνF_\nuFν​, the quantile is Qν(w)=inf⁡{x∈R:w≤Fν(x)}Q_\nu(w) = \inf\{x \in \mathbb{R} : w \le F_\nu(x)\}Qν​(w)=inf{x∈R:w≤Fν​(x)}. The infimum follows the real-number convention that it equals 000 when the set is empty or unbounded below. So Qν(w)=0Q_\nu(w) = 0Qν​(w)=0 for every w≤0w \le 0w≤0 and every w>1w > 1w>1. At w=1w = 1w=1 it is 000 unless FνF_\nuFν​ actually reaches 111.
  • Φ−1\Phi^{-1}Φ−1 denotes QN(0,1)Q_{\mathcal N(0,1)}QN(0,1)​ in this sense. In particular Φ−1(0)=Φ−1(1)=0\Phi^{-1}(0) = \Phi^{-1}(1) = 0Φ−1(0)=Φ−1(1)=0.

The map f:Rd→Rdf : \mathbb{R}^d \to \mathbb{R}^df:Rd→Rd is defined coordinatewise. For each u∈Rdu \in \mathbb{R}^du∈Rd and i=1,…,di = 1, \dots, di=1,…,d,

fi(u)=Qμi ⁣(Φ((A w(u))i)),w(u)j=Φ−1(Fj(uj))(j=1,…,d).f_i(u) = Q_{\mu_i}\!\Big(\Phi\big((A\,w(u))_i\big)\Big), \qquad w(u)_j = \Phi^{-1}\big(F_j(u_j)\big) \quad (j = 1, \dots, d).fi​(u)=Qμi​​(Φ((Aw(u))i​)),w(u)j​=Φ−1(Fj​(uj​))(j=1,…,d).

In words: apply each marginal distribution function FjF_jFj​ coordinatewise, then Φ−1\Phi^{-1}Φ−1 coordinatewise, then multiply by AAA, then apply Φ\PhiΦ coordinatewise, and finally apply the quantile QμiQ_{\mu_i}Qμi​​ of the iii-th marginal in coordinate iii. This fff is defined on all of Rd\mathbb{R}^dRd, not only on the support of PPP. At points where some Fj(uj)∈{0,1}F_j(u_j) \in \{0, 1\}Fj​(uj​)∈{0,1}, the junk value Φ−1(⋅)=0\Phi^{-1}(\cdot) = 0Φ−1(⋅)=0 is used.

The theorem asserts the conjunction of three statements:

  1. fff is Borel measurable as a map Rd→Rd\mathbb{R}^d \to \mathbb{R}^dRd→Rd.
  2. The pushforward of PPP under fff equals PPP:
f#P=P,i.e. P(f−1(B))=P(B) for every Borel B⊆Rd.f_{\#}P = P, \quad \text{i.e. } P(f^{-1}(B)) = P(B) \text{ for every Borel } B \subseteq \mathbb{R}^d.f#​P=P,i.e. P(f−1(B))=P(B) for every Borel B⊆Rd.
  1. For every u∈Rdu \in \mathbb{R}^du∈Rd,
P({z:z≤u})=P({z:f(z)≤u}),P\big(\{z : z \le u\}\big) = P\big(\{z : f(z) \le u\}\big),P({z:z≤u})=P({z:f(z)≤u}),

where ≤\le≤ is the coordinatewise order: z≤uz \le uz≤u means zi≤uiz_i \le u_izi​≤ui​ for all iii.

The statement makes no claim about derivatives of fff, about AAA being any particular matrix such as a Householder reflection, or about fff restricted to the support of PPP.

In the degenerate case d=0d = 0d=0, the space R0\mathbb{R}^0R0 is a single point and PPP is the unit mass on it. All three claims then hold trivially. The hypotheses are satisfiable for every ddd; for example, take every μi=N(0,1)\mu_i = \mathcal N(0,1)μi​=N(0,1) and A=IdA = I_dA=Id​.

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