Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Max-min normal form for continuous piecewise linear functions

Proved
WangSun.maxmin_normal_form

by carlok · Sep 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-theoryconvex-analysislattice-theorypiecewise-linear

Throughout, nnn is a fixed dimension and functions are real valued on Rn\mathbb{R}^nRn. An nnn-order hinge is a function of the form x↦σmax⁡0≤i≤nℓi(x)x \mapsto \sigma \max_{0 \le i \le n} \ell_i(x)x↦σmax0≤i≤n​ℓi​(x) with σ∈{+1,−1}\sigma \in \{+1,-1\}σ∈{+1,−1} and ℓ0,…,ℓn\ell_0,\dots,\ell_nℓ0​,…,ℓn​ affine; IsHH f means that fff is a finite sum of nnn-order hinges. CPWL is the class of continuous piecewise linear functions, presented as the sublattice of RRn\mathbb{R}^{\mathbb{R}^n}RRn generated by the affine maps. These notions are supplied by the definition module WangSunCPWL.

Max-min normal form. Every continuous piecewise linear function is a maximum of minima of finitely many affine functions, and the index set may be taken rectangular: for every CPWL fff there are integers I,J≥0I, J \ge 0I,J≥0 and affine functions ℓi,j:Rn→R\ell_{i,j} : \mathbb{R}^n \to \mathbb{R}ℓi,j​:Rn→R, for 0≤i≤I0 \le i \le I0≤i≤I and 0≤j≤J0 \le j \le J0≤j≤J, such that

f(x)  =  max⁡0≤i≤I min⁡0≤j≤J ℓi,j(x)(x∈Rn).f(x) \;=\; \max_{0 \le i \le I} \ \min_{0 \le j \le J} \ \ell_{i,j}(x) \qquad (x \in \mathbb{R}^n).f(x)=0≤i≤Imax​ 0≤j≤Jmin​ ℓi,j​(x)(x∈Rn).

Rectangularity costs nothing: repeating an entry inside a minimum does not change it, so families of different sizes can be padded to a common length J+1J+1J+1.

The statement is the lattice-theoretic normal form for the sublattice of RRn\mathbb{R}^{\mathbb{R}^n}RRn generated by the affine maps, and it holds because R\mathbb{R}R is a distributive lattice under max⁡\maxmax and min⁡\minmin: a join of meets is preserved by joins, and meets of joins of meets redistribute into joins of meets. Its difficulty is combinatorial rather than geometric - no bound on III or JJJ in terms of nnn is asserted. It is the entry point to the Wang-Sun theorem, which converts this normal form into a signed sum of maxima of at most n+1n+1n+1 affine arguments.

Preamble
import Definitions.Def_WangSunCPWL

open Finset

variable {n : ℕ}
Formal statement
namespace WangSun

theorem maxmin_normal_form {f : (Fin n → ℝ) → ℝ} (hf : CPWL f) :
    ∃ (I J : ℕ) (L : Fin (I + 1) → Fin (J + 1) → ((Fin n → ℝ) →ᵃ[ℝ] ℝ)),
      f = fun x => (univ : Finset (Fin (I + 1))).sup' univ_nonempty
        (fun i => (univ : Finset (Fin (J + 1))).inf' univ_nonempty (fun j => L i j x)) := by
  sorry

end WangSun
Source
Auxiliary lemma in the decomposition of the Prove2Me theorem WangSun.Main (theorem_id 63eec3c9-377a-4237-8fe6-f5d41ac2d0e2), whose natural-language statement attributes the result to S. Wang and X. Sun, Generalization of hinging hyperplanes, IEEE Transactions on Information Theory 51 (2005), 4425-4431. This statement is a step in that decomposition, not a numbered statement of the paper.

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