Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 2 — sufficiency, ρ(∑x∈Xϕ(x))\rho\left(\sum_{x\in X}\phi(x)\right)ρ(∑x∈X​ϕ(x)) is permutation invariant

Proved
DeepSets.sum_decomposition_isPermInvariant

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

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

Let UUU be any set of elements, ϕ:U→R\phi : U\to\mathbb Rϕ:U→R and ρ:R→R\rho:\mathbb R\to\mathbb Rρ:R→R. The function that sends a listing x1,…,xMx_1,\dots,x_Mx1​,…,xM​ of distinct elements of UUU (any M≥0M\ge 0M≥0) to

ρ(∑m=1Mϕ(xm))\rho\Bigl(\sum_{m=1}^{M}\phi(x_m)\Bigr)ρ(m=1∑M​ϕ(xm​))

is permutation invariant (Property 1).

This is the sufficiency half of Theorem 2: every function of the form ρ(∑x∈Xϕ(x))\rho\left(\sum_{x\in X}\phi(x)\right)ρ(∑x∈X​ϕ(x)) is a valid set function.

Differences from the source:

  • generalization: countable universe 𝔛 → any type U; reason: the argument uses no countability; it specializes to a countable U
  • encoding: a set X = {x₁, …, x_M} and Σ_{x∈X} φ(x) → an injective tuple x : Fin M → U and Σ_m φ(x m); reason: Lean convention; for distinct x_m the two sums are equal
Preamble
import Mathlib
import Definitions.Def_DeepSets_IsPermInvariant
Formal statement
namespace DeepSets

/-- Zaheer et al., *Deep Sets*, arXiv:1703.06114v3, §A.1, proof of Theorem 2, p.12,
"The sufficiency follows by observing that the function `ρ(∑_{x∈X} φ(x))` satisfies the
permutation invariance condition."

For every `φ : U → ℝ` and `ρ : ℝ → ℝ`, the function `X = {x₁, …, x_M} ↦ ρ(∑_{m=1}^M φ(x_m))`
satisfies Property 1.

**Formalization Note** No countability is assumed: the statement holds for every type `U`. -/
theorem sum_decomposition_isPermInvariant {U : Type*} (φ : U → ℝ) (ρ : ℝ → ℝ) :
    IsPermInvariant (fun (M : ℕ) (x : Fin M → U) => ρ (∑ m, φ (x m))) := 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), "The sufficiency follows by observing …"
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