Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The mean-field map is piecewise affine (Lem. 7)

Proved
MarkovEntanglement.meanFieldMap_piecewise_affine

by tianyipeng · Aug 28, 2026 · Mathlib c5ea003 (Lean v4.30.0)

Let ν\nuν be an injective priority index on the finite local state space SSS — the paper's assumption ν1>ν2>⋯>ν∣S∣\nu_1 > \nu_2 > \cdots > \nu_{|S|}ν1​>ν2​>⋯>ν∣S∣​, which is no loss of generality since state labels may be permuted — and let α\alphaα be the activation fraction.

Then the mean-field map φ\varphiφ of the induced index policy is a continuous function of the configuration, and it is affine on each of the ∣S∣|S|∣S∣ priority regions: for every local state xxx there are a matrix KKK and a vector bbb such that

φ(m)=K⊤m+bfor every configuration m with ∑νy>νxmy≤α<∑νy>νxmy+mx.\varphi(m) = K^{\top} m + b \qquad \text{for every configuration } m \text{ with } \sum_{\nu_y > \nu_x} m_y \le \alpha < \sum_{\nu_y > \nu_x} m_y + m_x.φ(m)=K⊤m+bfor every configuration m with νy​>νx​∑​my​≤α<νy​>νx​∑​my​+mx​.

The region condition says exactly that xxx is the state in which the budget runs out. Inside it the behaviour of the policy is frozen: every state of strictly higher priority than xxx is fully activated, every state of strictly lower priority is fully idle, and only xxx itself is served fractionally, by the amount α−∑νy>νxmy\alpha - \sum_{\nu_y > \nu_x} m_yα−∑νy​>νx​​my​ — which is linear in mmm. Injectivity of ν\nuν is what rules out ties, where two states would have to share the residual budget and the map would pick up a genuine minimum.

The affine pieces are what the stability analysis works with: the matrix attached to the region containing the fixed point m∗m^\astm∗ is the linearisation of the dynamics there, and Lemma 11 asserts that it is a stable matrix.

Preamble
import Mathlib
import Definitions.Def_markov_entanglement_meanfield

open scoped BigOperators
open MarkovEntanglement
Formal statement
namespace MarkovEntanglement

variable {S : Type*} [Fintype S] [DecidableEq S]

/-- Lemma 7 (Piecewise Affine).  The mean-field map of an index policy is continuous, and on
each of the `|S|` priority regions — the configurations at which a given state is the one the
budget runs out in — it is an affine function of the configuration.  The priority index is
assumed injective, which is the paper's `ν₁ > ν₂ > ⋯ > ν_{|S|}`. -/
theorem meanFieldMap_piecewise_affine
    (P0 P1 : Matrix S S ℝ) (ν : S → ℝ) (hν : Function.Injective ν) (α : ℝ) :
    Continuous (meanFieldMap P0 P1 ν α) ∧
      ∀ x : S, ∃ (K : Matrix S S ℝ) (b : S → ℝ),
        ∀ m : S → ℝ, (∀ z, 0 ≤ m z) → IsPriorityRegion ν α m x →
          meanFieldMap P0 P1 ν α m = fun z => (∑ y, m y * K y z) + b z := by
  sorry

/-! ### M3 — Lemma 8, entanglement is controlled by the configuration's deviation -/

end MarkovEntanglement
Source
Shuze Chen and Tianyi Peng, 'Multi-agent Markov Entanglement', arXiv:2506.02385v3, Appendix I, p. 41, Lemma 7 (adapted from Lemma B.1 of Gast, Gaujal and Yan 2023)
Read-back

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

For every finite type SSS with decidable equality, every pair of real matrices P0,P1∈RS×SP_0, P_1 \in \mathbb{R}^{S\times S}P0​,P1​∈RS×S, every function ν:S→R\nu : S \to \mathbb{R}ν:S→R that is injective, and every real number α\alphaα, the following two assertions both hold, where for a vector m:S→Rm : S \to \mathbb{R}m:S→R and a state x∈Sx \in Sx∈S one writes

Hν(m,x)  =  ∑y∈Sν(x)<ν(y)m(y),aν,α(m,x)  =  min⁡(m(x), max⁡(0, α−Hν(m,x))),H_\nu(m,x) \;=\; \sum_{\substack{y \in S \\ \nu(x) < \nu(y)}} m(y), \qquad a_{\nu,\alpha}(m,x) \;=\; \min\bigl(m(x),\ \max(0,\ \alpha - H_\nu(m,x))\bigr),Hν​(m,x)=y∈Sν(x)<ν(y)​∑​m(y),aν,α​(m,x)=min(m(x), max(0, α−Hν​(m,x))),

and where the map Φ=ΦP0,P1,ν,α:(S→R)→(S→R)\Phi = \Phi_{P_0,P_1,\nu,\alpha} : (S\to\mathbb{R}) \to (S\to\mathbb{R})Φ=ΦP0​,P1​,ν,α​:(S→R)→(S→R) is defined coordinatewise by

Φ(m)(y)  =  ∑x∈S[(m(x)−aν,α(m,x)) (P0)x,y  +  aν,α(m,x) (P1)x,y]:\Phi(m)(y) \;=\; \sum_{x \in S} \Bigl[\bigl(m(x) - a_{\nu,\alpha}(m,x)\bigr)\,(P_0)_{x,y} \;+\; a_{\nu,\alpha}(m,x)\,(P_1)_{x,y}\Bigr]:Φ(m)(y)=x∈S∑​[(m(x)−aν,α​(m,x))(P0​)x,y​+aν,α​(m,x)(P1​)x,y​]:
  • (1) Φ\PhiΦ is continuous as a map from S→RS \to \mathbb{R}S→R to S→RS \to \mathbb{R}S→R, both carrying the product topology (for finite SSS, the usual Euclidean topology on R∣S∣\mathbb{R}^{|S|}R∣S∣). This is asserted for Φ\PhiΦ on all of RS\mathbb{R}^SRS, with no restriction to nonnegative vectors, to probability vectors, or to any region.
  • (2) For every state x∈Sx \in Sx∈S there exist a matrix K∈RS×SK \in \mathbb{R}^{S\times S}K∈RS×S and a vector b:S→Rb : S \to \mathbb{R}b:S→R — chosen after xxx but before mmm, hence uniform in mmm — such that for every m:S→Rm : S \to \mathbb{R}m:S→R satisfying both
    • m(z)≥0m(z) \ge 0m(z)≥0 for all z∈Sz \in Sz∈S (pointwise nonnegativity only; ∑zm(z)=1\sum_z m(z) = 1∑z​m(z)=1 is not required), and
    • the two-sided "priority region" condition at that single state xxx, namely
Hν(m,x)  ≤  αandα  <  Hν(m,x)+m(x)H_\nu(m,x) \;\le\; \alpha \quad\text{and}\quad \alpha \;<\; H_\nu(m,x) + m(x)Hν​(m,x)≤αandα<Hν​(m,x)+m(x)
(weak inequality on the left, strict on the right; imposed at $x$ only, and at no other state),

one has the exact equality of functions

Φ(m)  =  (z↦∑y∈Sm(y) Ky,z  +  b(z)),\Phi(m) \;=\; \Bigl(z \mapsto \sum_{y \in S} m(y)\,K_{y,z} \;+\; b(z)\Bigr),Φ(m)=(z↦y∈S∑​m(y)Ky,z​+b(z)),

i.e. Φ(m)\Phi(m)Φ(m) equals the row-vector–matrix product mKmKmK plus the fixed offset bbb, at every coordinate z∈Sz \in Sz∈S.

The statement places no constraints on P0P_0P0​ and P1P_1P1​ beyond being real-valued matrices — they need not be row-stochastic, nonnegative, or related to each other — and none on α\alphaα beyond being real, so α\alphaα may be negative or exceed 111; ν\nuν is constrained only by injectivity, which in particular is automatic when SSS has at most one element. Degenerate readings are included silently by the quantifiers: if SSS is empty, part (2) is vacuous and Φ\PhiΦ is the unique map on a one-point space, so (1) is trivial; if α<0\alpha < 0α<0, then for nonnegative mmm one always has Hν(m,x)≥0>αH_\nu(m,x) \ge 0 > \alphaHν​(m,x)≥0>α, so the hypotheses of (2) are unsatisfiable for every xxx and any K,bK, bK,b whatsoever discharge the claim; more generally, for any xxx for which no nonnegative mmm meets the priority-region condition, part (2) at that xxx is satisfied vacuously. When the hypotheses are satisfiable they force m(x)>0m(x) > 0m(x)>0, since Hν(m,x)≤α<Hν(m,x)+m(x)H_\nu(m,x) \le \alpha < H_\nu(m,x) + m(x)Hν​(m,x)≤α<Hν​(m,x)+m(x). The conclusion asserts only the existence of such KKK and bbb; it says nothing about their uniqueness, their entries, whether KKK is stochastic, whether bbb vanishes, or how KKK and bbb vary with xxx, and it makes no claim about Φ\PhiΦ outside the region described.

Human review
  • Endorsed by Shuze Chen · Aug 28, 2026

  • Endorsed by tianyipeng · Aug 30, 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.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me