Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 2 — construction of ρ:R→R\rho:\mathbb R\to\mathbb Rρ:R→R with f(X)=ρ(∑x∈X4−c(x))f(X)=\rho\left(\sum_{x\in X}4^{-c(x)}\right)f(X)=ρ(∑x∈X​4−c(x))

Proved
DeepSets.exists_rho_of_four_pow_code

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

deep-setsp2o-gran-per-chapterp2o-plan-paperp2o-v1permutation-invarianceset-functions

Let UUU be a set of elements and c:U→Nc : U\to\mathbb Nc:U→N injective, and put ϕ(x)=4−c(x)\phi(x)=4^{-c(x)}ϕ(x)=4−c(x). For every real-valued function fff of the finite subsets of UUU there is a function ρ:R→R\rho:\mathbb R\to\mathbb Rρ:R→R such that

f(X)=ρ(∑x∈X4−c(x))for every finite X⊆U.f(X) = \rho\Bigl(\sum_{x\in X}4^{-c(x)}\Bigr)\qquad\text{for every finite } X\subseteq U.f(X)=ρ(x∈X∑​4−c(x))for every finite X⊆U.

This is the last step of the necessity half of Theorem 2: once the sum encodes the set, the set function is a function of the sum.

Formalization Note The set function is g:Finset U→Rg:\mathrm{Finset}\,U\to\mathbb Rg:FinsetU→R. The countability of the elements enters through the injective ccc, as in the proof; Mathlib's Countable.exists_injective_nat gives one for every countable UUU.

Differences from the source:

  • reading: "a mapping from the elements to natural numbers" c : 𝔛 → ℕ → an injective c : U → ℕ; reason: the step relies on the unique representation of the previous sentence, which forces injectivity; a countable set has such a map
  • reading: the set function f on 2^𝔛 → g : Finset U → ℝ; reason: in §A the elements of 2^𝔛 on which f acts are the sets X = {x₁, …, x_M}, so 2^𝔛 denotes finite sets there
Preamble
import Mathlib
Formal statement
namespace DeepSets

/-- Zaheer et al., *Deep Sets*, arXiv:1703.06114v3, §A.1, proof of Theorem 2, p.12,
"Now a function `ρ : ℝ → ℝ` can always be constructed such that `f(X) = ρ(∑_{x∈X} φ(x))`",
where `φ(x) = 4^{-c(x)}` for the mapping `c : 𝔛 → ℕ` introduced just before.

For an injective `c : U → ℕ` and every real function `g` of finite subsets of `U`, there is
`ρ : ℝ → ℝ` with `g(X) = ρ(∑_{x ∈ X} 4^{-c(x)})` for every finite `X ⊆ U`.

**Formalization Note** The set function `f(X)` of the page is `g : Finset U → ℝ` (the sets of §A
are finite). The countability of the elements enters, as in the proof, through the injective
`c : U → ℕ`; Mathlib's `Countable.exists_injective_nat` provides one for any countable `U`. -/
theorem exists_rho_of_four_pow_code {U : Type*} (c : U → ℕ) (hc : Function.Injective c)
    (g : Finset U → ℝ) :
    ∃ ρ : ℝ → ℝ, ∀ X : Finset U, g X = ρ (∑ x ∈ X, (4 : ℝ) ^ (-(c x : ℤ))) := by sorry

end DeepSets
Source
Zaheer, Kottur, Ravanbakhsh, Póczos, Salakhutdinov, Smola, Deep Sets, arXiv:1703.06114v3, §A.1, proof of Theorem 2, p.12 (PDF p.12), "Now a function ρ : ℝ → ℝ can always be constructed such that f(X) = ρ(Σ_{x∈X} φ(x))"
Human review
  • Endorsed by Shuze Chen · Nov 4, 2026

    Confirmed by the moderator at approval.

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