Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The local transition deviates by at most twice the entanglement

Open
MarkovEntanglement.local_transition_deviation_le_two_entanglement

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

entanglementmarkov-chainsmulti-agent-systemsperturbationtotal-variation

Statement

Theorem. With Ei(Pπ)\mathcal{E}_i(P^\pi)Ei​(Pπ) the agent-wise measure of Markov entanglement and PiP_iPi​ an optimal solution of the corresponding minimisation, for every agent iii

∥Piπ−Pi∥μiπ, ∞  ≤  2 Ei(Pπ).\bigl\| P^\pi_i - P_i \bigr\|_{\mu^\pi_i,\,\infty} \;\le\; 2\,\mathcal{E}_i(P^\pi).​Piπ​−Pi​​μiπ​,∞​≤2Ei​(Pπ).

Notes

The agent-wise, occupancy-weighted refinement of the previous bound, and the last ingredient before the decomposition error itself. The factor 222 is the price of passing from an averaged distance to a uniform one over rows.

This is the form the value-function argument consumes: combined with the resolvent identity it propagates a one-step transition error into an error on the discounted QQQ-function, producing the (1−γ)−2(1-\gamma)^{-2}(1−γ)−2 factor in the main bound.

Search terms: agent-wise total variation, occupancy-weighted sup norm, one-step transition perturbation, multi-agent value decomposition error.

Preamble
import Mathlib
import Definitions.Def_markov_entanglement_multi

open scoped BigOperators
open MarkovEntanglement
Formal statement
namespace MarkovEntanglement

theorem local_transition_deviation_le_two_entanglement
    {N : ℕ} {S : Fin N → Type*} [∀ i, Fintype (S i)] [∀ i, DecidableEq (S i)]
    (P : Matrix (Joint S) (Joint S) ℝ) (hP : IsTransitionMatrix P)
    (μ : Joint S → ℝ) (hμ : IsPositiveDist μ) (hstat : IsStationary P μ) (i : Fin N)
    (Pi Ptrue : Matrix (S i) (S i) ℝ)
    (hPi : IsTransitionMatrix Pi)
    (hopt : muAgentTVDistN i μ P Pi = entanglementN i μ P)
    (hPtrue : IsTransitionMatrix Ptrue) (htrue : IsLocalTransitionN i P μ Ptrue) :
    ∀ s t, |Ptrue s t - Pi s t| ≤ 2 * entanglementN i μ P := by
  sorry

end MarkovEntanglement
Source
Shuze Chen and Tianyi Peng, *Multi-agent Markov Entanglement*, arXiv:2506.02385v3, Theorem 5, p. 19 and Theorem 8, p. 40
Read-back

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

Read-back — local_transition_deviation_le_two_entanglement

What the statement asserts

Fix a natural number NNN and a family of types S0,…,SN−1S_0,\dots,S_{N-1}S0​,…,SN−1​ indexed by Fin N\mathrm{Fin}\,NFinN, each finite and with decidable equality. Write

J  =  ∏j∈Fin NSj\mathcal J \;=\; \prod_{j\in\mathrm{Fin}\,N} S_jJ=j∈FinN∏​Sj​

for the joint space (the code's Joint S), whose elements ppp are functions assigning to each index jjj a point pj∈Sjp_j\in S_jpj​∈Sj​; J\mathcal JJ is again a finite type. The claim is: for every

  • real matrix PPP indexed by J×J\mathcal J\times\mathcal JJ×J that is row-stochastic — Ppq≥0P_{pq}\ge0Ppq​≥0 for all p,qp,qp,q and ∑q∈JPpq=1\sum_{q\in\mathcal J}P_{pq}=1∑q∈J​Ppq​=1 for every ppp (this is IsTransitionMatrix);
  • real-valued μ:J→R\mu:\mathcal J\to\mathbb Rμ:J→R that is a strictly positive probability distribution — μ(p)>0\mu(p)>0μ(p)>0 for every p∈Jp\in\mathcal Jp∈J and ∑p∈Jμ(p)=1\sum_{p\in\mathcal J}\mu(p)=1∑p∈J​μ(p)=1 (IsPositiveDist);
  • with μ\muμ stationary for PPP: ∑p∈Jμ(p) Ppq=μ(q)\sum_{p\in\mathcal J}\mu(p)\,P_{pq}=\mu(q)∑p∈J​μ(p)Ppq​=μ(q) for every q∈Jq\in\mathcal Jq∈J (IsStationary);
  • index i∈Fin Ni\in\mathrm{Fin}\,Ni∈FinN (whose existence forces N≥1N\ge1N≥1);
  • two real matrices Π\PiΠ and PtrueP^{\mathrm{true}}Ptrue on Si×SiS_i\times S_iSi​×Si​ (the code's Pi and Ptrue), both assumed row-stochastic: nonnegative entries and each row summing to 111;

such that the following two hypotheses hold —

  1. (hopt) Π\PiΠ attains the infimum defining agent-iii entanglement:
∑p∈Jμ(p)⋅12∑t∈Si∣∑q∈J[ qi=t ]Ppq⏟marginalN−Πpi t∣  =  ε,\sum_{p\in\mathcal J}\mu(p)\cdot\frac12\sum_{t\in S_i}\Bigl|\underbrace{\textstyle\sum_{q\in\mathcal J}[\,q_i=t\,]P_{pq}}_{\texttt{marginalN}}-\Pi_{p_i\,t}\Bigr| \;=\; \varepsilon,p∈J∑​μ(p)⋅21​t∈Si​∑​​marginalN∑q∈J​[qi​=t]Ppq​​​−Πpi​t​​=ε,

where

ε  :=  entanglementN i μ P  =  inf⁡{r∈R  ∣  ∃ Π′∈RSi×Si row-stochastic, r=∑p∈Jμ(p)⋅12∑t∈Si∣∑q[qi=t]Ppq−Πpit′∣},\varepsilon \;:=\; \texttt{entanglementN}\ i\ \mu\ P \;=\; \inf\Bigl\{r\in\mathbb R \;\Bigm|\; \exists\,\Pi'\in\mathbb R^{S_i\times S_i}\ \text{row-stochastic},\ r=\sum_{p\in\mathcal J}\mu(p)\cdot\tfrac12\sum_{t\in S_i}\bigl|\textstyle\sum_{q}[q_i=t]P_{pq}-\Pi'_{p_i t}\bigr|\Bigr\},ε:=entanglementN i μ P=inf{r∈R​∃Π′∈RSi​×Si​ row-stochastic, r=p∈J∑​μ(p)⋅21​t∈Si​∑​​∑q​[qi​=t]Ppq​−Πpi​t′​​},

with [ ⋅ ][\,\cdot\,][⋅] equal to 111 when the condition holds and 000 otherwise; 2. (htrue, the definition IsLocalTransitionN) for all s,t∈Sis,t\in S_is,t∈Si​,

(∑q∈J[ qi=s ]μ(q))⋅Psttrue  =  ∑p∈J([ pi=s ] μ(p))⋅(∑q∈J[ qi=t ]Ppq),\Bigl(\sum_{q\in\mathcal J}[\,q_i=s\,]\mu(q)\Bigr)\cdot P^{\mathrm{true}}_{s t} \;=\; \sum_{p\in\mathcal J}\bigl([\,p_i=s\,]\,\mu(p)\bigr)\cdot\Bigl(\sum_{q\in\mathcal J}[\,q_i=t\,]P_{pq}\Bigr),(q∈J∑​[qi​=s]μ(q))⋅Psttrue​=p∈J∑​([pi​=s]μ(p))⋅(q∈J∑​[qi​=t]Ppq​),

i.e. PtrueP^{\mathrm{true}}Ptrue is the μ\muμ-conditional average of the agent-iii marginals of PPP over all joint states whose iii-th coordinate is sss, written in cleared-denominator form (both sides multiplied by the μ\muμ-marginal at sss, so no division occurs);

then for all s,t∈Sis,t\in S_is,t∈Si​,

∣Psttrue−Πst∣  ≤  2 ε.\bigl|P^{\mathrm{true}}_{s t}-\Pi_{s t}\bigr| \;\le\; 2\,\varepsilon .​Psttrue​−Πst​​≤2ε.

This is a bound on a single matrix entry at a time — an absolute difference of two numbers, not a summed or averaged distance — it is asserted uniformly for every pair (s,t)(s,t)(s,t), the relation is non-strict ≤\le≤, and the right-hand side is exactly twice the entanglement quantity, independent of sss and ttt. Note that the μ\muμ-marginal weight ∑q[qi=s]μ(q)\sum_q[q_i=s]\mu(q)∑q​[qi​=s]μ(q) that appears on the left of htrue does not appear anywhere in the conclusion.

Everything unfolded

  • Joint S =∏jSj=\prod_j S_j=∏j​Sj​: functions ppp with pj∈Sjp_j\in S_jpj​∈Sj​.
  • IsTransitionMatrix A === (Axy≥0A_{xy}\ge0Axy​≥0 for all x,yx,yx,y) and (∑yAxy=1\sum_y A_{xy}=1∑y​Axy​=1 for all xxx).
  • IsPositiveDist μ === (μ(p)>0\mu(p)>0μ(p)>0 for all ppp) and ∑pμ(p)=1\sum_p\mu(p)=1∑p​μ(p)=1. Strict positivity everywhere, not mere nonnegativity.
  • IsStationary P μ === ∀q, ∑pμ(p)Ppq=μ(q)\forall q,\ \sum_p \mu(p)P_{pq}=\mu(q)∀q, ∑p​μ(p)Ppq​=μ(q).
  • marginalN i P p t =∑q[ qi=t ]Ppq=\sum_{q}[\,q_i=t\,]P_{pq}=∑q​[qi​=t]Ppq​: the probability, from joint state ppp, of landing in any joint state whose iii-th coordinate is ttt.
  • marginalDist i μ s =∑q[ qi=s ]μ(q)=\sum_{q}[\,q_i=s\,]\mu(q)=∑q​[qi​=s]μ(q): the push-forward of μ\muμ along the iii-th coordinate.
  • IsLocalTransitionN i P μ Ptrue === the displayed equation (2) above, for all s,ts,ts,t.
  • muAgentTVDistN i μ P Π =∑p∈Jμ(p)⋅12∑t∈Si∣marginalN i P p t−Πpit∣=\sum_{p\in\mathcal J}\mu(p)\cdot\frac12\sum_{t\in S_i}\bigl|\texttt{marginalN}\,i\,P\,p\,t-\Pi_{p_i t}\bigr|=∑p∈J​μ(p)⋅21​∑t∈Si​​​marginalNiPpt−Πpi​t​​: a μ\muμ-weighted average over joint states, not a maximum.
  • entanglementN i μ P =inf⁡=\inf=inf of the set of values of muAgentTVDistN over row-stochastic Π′\Pi'Π′ — an infimum over a set of reals, which by the order-theoretic convention would return 000 on an empty or unbounded-below set.
  • The bundle's IsSeparableN, tensorProdN, entanglementWith, muTVDist, muNorm, IsProductTransition, rewardEntanglement etc. are not used here: separability of PPP is never mentioned, and the entanglement quantity used is the agent-iii, μ\muμ-weighted one, not the distance-to-nearest-separable-matrix one.

Which variables are constrained and which are free

  • NNN, SSS, iii: universally quantified; i:Fin Ni:\mathrm{Fin}\,Ni:FinN forces N≥1N\ge1N≥1.
  • J\mathcal JJ is necessarily nonempty: IsPositiveDist μ demands ∑p∈Jμ(p)=1\sum_{p\in\mathcal J}\mu(p)=1∑p∈J​μ(p)=1, which fails for an empty index type (empty sum =0=0=0). Hence every SjS_jSj​, in particular SiS_iSi​, is nonempty, and the coordinate map p↦pip\mapsto p_ip↦pi​ is surjective onto SiS_iSi​. The empty-type degeneracies are therefore excluded by the hypotheses, not left open.
  • PPP: constrained to be row-stochastic and to admit μ\muμ as a stationary distribution; otherwise arbitrary (no separability, no product form, no irreducibility, no symmetry).
  • μ\muμ: constrained to be a strictly positive stationary distribution.
  • PtrueP^{\mathrm{true}}Ptrue: uniquely determined by PPP, μ\muμ and iii. Since μ>0\mu>0μ>0 everywhere and {q:qi=s}≠∅\{q:q_i=s\}\ne\varnothing{q:qi​=s}=∅ for each sss, the weight m(s):=∑q[qi=s]μ(q)m(s):=\sum_q[q_i=s]\mu(q)m(s):=∑q​[qi​=s]μ(q) is strictly positive, so htrue forces Psttrue=1m(s)∑p[pi=s]μ(p)∑q[qi=t]PpqP^{\mathrm{true}}_{st}=\frac{1}{m(s)}\sum_{p}[p_i=s]\mu(p)\sum_q[q_i=t]P_{pq}Psttrue​=m(s)1​∑p​[pi​=s]μ(p)∑q​[qi​=t]Ppq​ for every s,ts,ts,t. No freedom remains.
  • The extra hypothesis hPtrue (that PtrueP^{\mathrm{true}}Ptrue is row-stochastic) is implied by the others: nonnegativity follows from P≥0,μ>0P\ge0,\mu>0P≥0,μ>0, and summing htrue over ttt gives m(s)∑tPsttrue=∑p[pi=s]μ(p)⋅1=m(s)m(s)\sum_t P^{\mathrm{true}}_{st}=\sum_p[p_i=s]\mu(p)\cdot1=m(s)m(s)∑t​Psttrue​=∑p​[pi​=s]μ(p)⋅1=m(s), hence unit row sums. It is thus a redundant but consistent assumption, not an additional restriction.
  • Π\PiΠ: constrained to be row-stochastic and to attain the infimum ε\varepsilonε. It need not be unique if several minimisers exist; the statement is asserted for whichever minimiser is supplied.
  • sss and ttt in the conclusion are universally quantified over SiS_iSi​. No variable in the conclusion is free or unquantified.

Joint satisfiability, degeneracy, and the strength of the hypotheses

  • The hypotheses are jointly satisfiable, so the statement is not vacuous. A witness: let every SjS_jSj​ be a nonempty finite type, let μ\muμ be any strictly positive distribution on J\mathcal JJ (e.g. uniform), and let Ppq=μ(q)P_{pq}=\mu(q)Ppq​=μ(q) (rank-one). Then PPP is row-stochastic and μ\muμ is stationary for it. More generally any irreducible aperiodic row-stochastic PPP on a finite J\mathcal JJ has a strictly positive stationary μ\muμ, so genuinely non-product PPP satisfying all hypotheses exist; the hypotheses do not force PPP to be separable or product-form.
  • hopt is satisfiable for every such P,μ,iP,\mu,iP,μ,i: the set of row-stochastic matrices on SiS_iSi​ is nonempty (Si≠∅S_i\ne\varnothingSi​=∅) and compact, and muAgentTVDistN is continuous in Π′\Pi'Π′, so its image is compact and the infimum is attained. The infimum is therefore a genuine attained minimum, not the junk value 000 that the order-theoretic infimum returns on an empty or unbounded-below set. Because μ>0\mu>0μ>0, the infimum satisfies ε≥0\varepsilon\ge0ε≥0.
  • Collapsing cases that the quantifiers include. If SiS_iSi​ is a singleton, both PtrueP^{\mathrm{true}}Ptrue and Π\PiΠ are forced to be the 1×11\times11×1 matrix [1][1][1] and the conclusion reads 0≤2ε0\le2\varepsilon0≤2ε with ε=0\varepsilon=0ε=0. In the rank-one example above, marginalN i P p t does not depend on ppp, the minimiser drives ε\varepsilonε to 000, and strict positivity of μ\muμ then forces Π=Ptrue\Pi=P^{\mathrm{true}}Π=Ptrue, so the conclusion again reads 0≤00\le00≤0. Neither of these is forced in general: the hypotheses admit ε>0\varepsilon>0ε>0.
  • Relation between the two sides. Under htrue one has, for each s,ts,ts,t, Psttrue−Πst=1m(s)∑p[pi=s]μ(p)(marginalN i P p t−Πst)P^{\mathrm{true}}_{st}-\Pi_{st}=\frac{1}{m(s)}\sum_{p}[p_i=s]\mu(p)\bigl(\texttt{marginalN}\,i\,P\,p\,t-\Pi_{st}\bigr)Psttrue​−Πst​=m(s)1​∑p​[pi​=s]μ(p)(marginalNiPpt−Πst​), so the left-hand side of the conclusion is naturally controlled by a quantity of the form 2εm(s)\frac{2\varepsilon}{m(s)}m(s)2ε​, where m(s)=∑q[qi=s]μ(q)∈(0,1]m(s)=\sum_q[q_i=s]\mu(q)\in(0,1]m(s)=∑q​[qi​=s]μ(q)∈(0,1] is the μ\muμ-marginal weight of row sss. The statement as written omits any such 1/m(s)1/m(s)1/m(s) factor: the right-hand side 2ε2\varepsilon2ε is uniform over sss, while ε\varepsilonε is a μ\muμ-weighted average over all of J\mathcal JJ (weights summing to 111) and the left-hand side is an unweighted per-entry deviation at a single row sss. Whether the hypotheses (row-stochasticity, strict positivity, stationarity, optimality of Π\PiΠ) suffice to close that gap is exactly the content of the claim and is not something the statement itself assumes.
  • No hypothesis is individually vacuous, and none is strong enough to force ε=0\varepsilon=0ε=0 or to force Ptrue=ΠP^{\mathrm{true}}=\PiPtrue=Π in general; the only hypothesis that fully pins down a variable is htrue, which determines PtrueP^{\mathrm{true}}Ptrue from PPP, μ\muμ, iii.
Human review
  • Endorsed by Shuze Chen · Aug 7, 2026

  • Endorsed by tianyipeng · Aug 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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 works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me