Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Shared rewards add a reward-entanglement term to the error

Open
MarkovEntanglement.cooperative_decomposition_error_with_reward_entanglement

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

error-boundmulti-agent-systemsreinforcement-learningreward-shapingvalue-decomposition

Statement

Proposition. For a fully cooperative system whose global reward need not decompose, let e(r)e(r)e(r) be the measure of reward entanglement, the μ\muμ-norm distance from rrr to the nearest sum of local rewards. Then

∥Qπ−∑i=1NQiπ∥μπ  ≤  e(r)1−γ  +  4γ∑i=1NEi(Pπ) rmax⁡i(1−γ)2.\Bigl\| Q^\pi - \sum_{i=1}^N Q^\pi_i \Bigr\|_{\mu^\pi} \;\le\; \frac{e(r)}{1-\gamma} \;+\; \frac{4\gamma \sum_{i=1}^N \mathcal{E}_i(P^\pi)\, r^i_{\max}}{(1-\gamma)^2}.​Qπ−i=1∑N​Qiπ​​μπ​≤1−γe(r)​+(1−γ)24γ∑i=1N​Ei​(Pπ)rmaxi​​.

Notes

The main bound assumes the reward already splits across agents. In genuinely cooperative problems it usually does not — there is one shared reward — and this proposition covers that case by adding a second source of error.

The two terms separate cleanly and are worth reading side by side. Reward entanglement enters with a single factor (1−γ)−1(1-\gamma)^{-1}(1−γ)−1, because a reward misfit is a zeroth-order error that is merely summed along the trajectory. Transition entanglement enters with (1−γ)−2(1-\gamma)^{-2}(1−γ)−2, because a one-step transition error compounds through the value recursion. So an imperfectly decomposable reward is the milder of the two defects.

Search terms: shared reward multi-agent, reward decomposition error, cooperative MARL value decomposition, credit assignment error bound.

Preamble
import Mathlib
import Definitions.Def_markov_entanglement_multi

open scoped BigOperators
open MarkovEntanglement
Formal statement
namespace MarkovEntanglement

theorem cooperative_decomposition_error_with_reward_entanglement
    {N : ℕ} {S : Fin N → Type*} [∀ i, Fintype (S i)] [∀ i, DecidableEq (S i)]
    (P : Matrix (Joint S) (Joint S) ℝ) (μ : Joint S → ℝ) (γ : ℝ) (rmax : Fin N → ℝ)
    (r : Joint S → ℝ) (rl : ∀ i, S i → ℝ) (Q : Joint S → ℝ)
    (Pl : ∀ i, Matrix (S i) (S i) ℝ) (Qi : ∀ i, S i → ℝ)
    (hγ : 0 ≤ γ) (hγ1 : γ < 1) (hP : IsTransitionMatrix P)
    (hμ : IsPositiveDist μ) (hstat : IsStationary P μ)
    (hr : ∀ i s, |rl i s| ≤ rmax i)
    -- `rl` must attain the measure of reward entanglement, exactly as `Pl` attains
    -- the measure of Markov entanglement; without this the local rewards are free
    -- and the bound is false.
    (hrl : muNorm μ (fun p => r p - ∑ i, rl i (p i)) = rewardEntanglement μ r)
    (hQ : IsBellmanQ P r γ Q)
    (hPl : ∀ i, IsTransitionMatrix (Pl i))
    (hopt : ∀ i, muAgentTVDistN i μ P (Pl i) = entanglementN i μ P)
    (hQi : ∀ i, IsBellmanQ (Pl i) (rl i) γ (Qi i)) :
    muNorm μ (fun p => Q p - ∑ i, Qi i (p i))
      ≤ rewardEntanglement μ r / (1 - γ)
        + 4 * γ * (∑ i, entanglementN i μ P * rmax i) / (1 - γ) ^ 2 := by
  sorry

end MarkovEntanglement
Source
Shuze Chen and Tianyi Peng, *Multi-agent Markov Entanglement*, arXiv:2506.02385v3, Proposition 4, p. 48
Read-back

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

Read-back: cooperative_decomposition_error_with_reward_entanglement

The setting and all the data

Fix a natural number NNN (implicit) and a family of types S0,S1,…,SN−1S_0, S_1, \dots, S_{N-1}S0​,S1​,…,SN−1​ (implicit), each of which is finite and has decidable equality. Write

J  =  ∏i=0N−1Si\mathcal{J} \;=\; \prod_{i=0}^{N-1} S_iJ=i=0∏N−1​Si​

for the joint space: an element p∈Jp \in \mathcal{J}p∈J is a tuple assigning to each agent iii a point pi∈Sip_i \in S_ipi​∈Si​. J\mathcal{J}J is finite. The following data are given, all explicitly quantified over (the theorem asserts its conclusion for every choice of them satisfying the hypotheses below):

  • P∈RJ×JP \in \mathbb{R}^{\mathcal{J} \times \mathcal{J}}P∈RJ×J, a matrix on the joint space;
  • μ:J→R\mu : \mathcal{J} \to \mathbb{R}μ:J→R, a weight function on the joint space;
  • γ∈R\gamma \in \mathbb{R}γ∈R, a scalar;
  • rmax⁡:{0,…,N−1}→Rr_{\max} : \{0,\dots,N-1\} \to \mathbb{R}rmax​:{0,…,N−1}→R, one real number per agent;
  • r:J→Rr : \mathcal{J} \to \mathbb{R}r:J→R, a function on the joint space;
  • riloc:Si→Rr^{\mathrm{loc}}_i : S_i \to \mathbb{R}riloc​:Si​→R for each agent iii (a family of local functions);
  • Q:J→RQ : \mathcal{J} \to \mathbb{R}Q:J→R;
  • Piloc∈RSi×SiP^{\mathrm{loc}}_i \in \mathbb{R}^{S_i \times S_i}Piloc​∈RSi​×Si​ for each agent iii;
  • Qi:Si→RQ_i : S_i \to \mathbb{R}Qi​:Si​→R for each agent iii.

The non-standard notions, expanded

All of the following are definitions from this bundle; they are unfolded here so the statement can be read without them.

  • Row-stochastic ("IsTransitionMatrix") for a square matrix MMM indexed by a finite set: Mxy≥0M_{xy} \ge 0Mxy​≥0 for all x,yx, yx,y, and ∑yMxy=1\sum_y M_{xy} = 1∑y​Mxy​=1 for every xxx. Nothing is required of columns.
  • Strictly positive distribution ("IsPositiveDist") for μ\muμ: μ(p)>0\mu(p) > 0μ(p)>0 for every p∈Jp \in \mathcal{J}p∈J, and ∑p∈Jμ(p)=1\sum_{p \in \mathcal{J}} \mu(p) = 1∑p∈J​μ(p)=1.
  • Stationarity ("IsStationary") of μ\muμ for PPP: for every q∈Jq \in \mathcal{J}q∈J, ∑pμ(p) Ppq=μ(q)\sum_{p} \mu(p)\,P_{pq} = \mu(q)∑p​μ(p)Ppq​=μ(q).
  • μ\muμ-norm ("muNorm") of a function xxx on a finite index set: ∥x∥μ=∑pμ(p) ∣x(p)∣\|x\|_\mu = \sum_{p} \mu(p)\,\lvert x(p)\rvert∥x∥μ​=∑p​μ(p)∣x(p)∣. (The weights μ(p)\mu(p)μ(p) enter without an absolute value of their own; here they are positive by hypothesis.)
  • Agent-iii marginal of the joint matrix ("marginalN"): for p∈Jp \in \mathcal{J}p∈J and t∈Sit \in S_it∈Si​,
(marg⁡iP)(p,t)  =  ∑q∈J,  qi=tPpq,\bigl(\operatorname{marg}_i P\bigr)(p, t) \;=\; \sum_{q \in \mathcal{J},\; q_i = t} P_{pq},(margi​P)(p,t)=q∈J,qi​=t∑​Ppq​,

i.e. the total mass that row ppp of PPP puts on joint points whose iii-th coordinate is ttt. Note this depends on the whole tuple ppp, not only on pip_ipi​.

  • μ\muμ-weighted agent-wise total variation distance ("muAgentTVDistN") between the joint matrix PPP and a candidate local matrix M∈RSi×SiM \in \mathbb{R}^{S_i\times S_i}M∈RSi​×Si​:
Di(μ,P,M)  =  ∑p∈Jμ(p)⋅12∑t∈Si∣(marg⁡iP)(p,t)−M pi t∣.D_i(\mu, P, M) \;=\; \sum_{p \in \mathcal{J}} \mu(p)\cdot \tfrac12 \sum_{t \in S_i} \bigl\lvert (\operatorname{marg}_i P)(p,t) - M_{\,p_i\, t} \bigr\rvert .Di​(μ,P,M)=p∈J∑​μ(p)⋅21​t∈Si​∑​​(margi​P)(p,t)−Mpi​t​​.

It is a μ\muμ-weighted average over joint points, not a maximum.

  • Agent-wise measure of Markov entanglement ("entanglementN") for agent iii:
Ei(μ,P)  =  inf⁡{ Di(μ,P,M)  :  M∈RSi×Si row-stochastic },E_i(\mu, P) \;=\; \inf \bigl\{\, D_i(\mu, P, M) \;:\; M \in \mathbb{R}^{S_i\times S_i} \text{ row-stochastic} \,\bigr\},Ei​(μ,P)=inf{Di​(μ,P,M):M∈RSi​×Si​ row-stochastic},

the greatest lower bound of the above distance over all row-stochastic local candidates.

  • Measure of reward entanglement ("rewardEntanglement"):
R(μ,r)  =  inf⁡{ ∥ p↦r(p)−∑ifi(pi) ∥μ  :  fi:Si→R for each i },R(\mu, r) \;=\; \inf \Bigl\{\, \bigl\| \,p \mapsto r(p) - \textstyle\sum_i f_i(p_i)\, \bigr\|_\mu \;:\; f_i : S_i \to \mathbb{R} \text{ for each } i \,\Bigr\},R(μ,r)=inf{​p↦r(p)−∑i​fi​(pi​)​μ​:fi​:Si​→R for each i},

the greatest lower bound, over all families of local functions, of the μ\muμ-weighted average absolute deviation of rrr from a sum of local functions.

  • Bellman fixed point ("IsBellmanQ") for a square matrix MMM on a finite set XXX, a function g:X→Rg : X \to \mathbb{R}g:X→R, a scalar γ\gammaγ, and a function V:X→RV : X \to \mathbb{R}V:X→R: V(x)=g(x)+γ∑yMxyV(y)V(x) = g(x) + \gamma \sum_{y} M_{xy} V(y)V(x)=g(x)+γ∑y​Mxy​V(y) for every x∈Xx \in Xx∈X.

The bundle also defines separability of a joint matrix, tensor products of local matrices, product-form transitions, local-transition compatibility, decomposable rewards, and value decomposition. None of those notions occurs in this statement; the only entanglement quantities used are Ei(μ,P)E_i(\mu,P)Ei​(μ,P) and R(μ,r)R(\mu,r)R(μ,r) as expanded above.

The hypotheses

  1. 0≤γ0 \le \gamma0≤γ.
  2. γ<1\gamma < 1γ<1 (strict).
  3. PPP is row-stochastic on the joint space.
  4. μ\muμ is a strictly positive probability distribution on the joint space.
  5. μ\muμ is stationary for PPP.
  6. For every agent iii and every s∈Sis \in S_is∈Si​: ∣riloc(s)∣≤rmax⁡(i)\lvert r^{\mathrm{loc}}_i(s)\rvert \le r_{\max}(i)∣riloc​(s)∣≤rmax​(i). (This bounds the local functions rilocr^{\mathrm{loc}}_iriloc​; it says nothing about rrr.)
  7. ∥p↦r(p)−∑iriloc(pi)∥μ=R(μ,r)\bigl\| p \mapsto r(p) - \sum_i r^{\mathrm{loc}}_i(p_i) \bigr\|_\mu = R(\mu, r)​p↦r(p)−∑i​riloc​(pi​)​μ​=R(μ,r) — i.e. the given family rlocr^{\mathrm{loc}}rloc exactly attains the reward-entanglement infimum.
  8. QQQ is the Bellman fixed point for PPP, rrr, γ\gammaγ: for every p∈Jp \in \mathcal{J}p∈J, Q(p)=r(p)+γ∑qPpqQ(q)Q(p) = r(p) + \gamma \sum_{q} P_{pq} Q(q)Q(p)=r(p)+γ∑q​Ppq​Q(q).
  9. Each PilocP^{\mathrm{loc}}_iPiloc​ is row-stochastic.
  10. For every agent iii: Di(μ,P,Piloc)=Ei(μ,P)D_i(\mu, P, P^{\mathrm{loc}}_i) = E_i(\mu, P)Di​(μ,P,Piloc​)=Ei​(μ,P) — i.e. each PilocP^{\mathrm{loc}}_iPiloc​ exactly attains the agent-wise entanglement infimum.
  11. For every agent iii, QiQ_iQi​ is the Bellman fixed point for PilocP^{\mathrm{loc}}_iPiloc​, rilocr^{\mathrm{loc}}_iriloc​, γ\gammaγ: Qi(s)=riloc(s)+γ∑t∈Si(Piloc)stQi(t)Q_i(s) = r^{\mathrm{loc}}_i(s) + \gamma \sum_{t \in S_i} (P^{\mathrm{loc}}_i)_{st} Q_i(t)Qi​(s)=riloc​(s)+γ∑t∈Si​​(Piloc​)st​Qi​(t) for every s∈Sis \in S_is∈Si​.

The conclusion

∑p∈Jμ(p) ∣ Q(p)−∑i=0N−1Qi(pi) ∣    ≤    R(μ,r)1−γ  +  4 γ ∑i=0N−1Ei(μ,P) rmax⁡(i)(1−γ)2.\sum_{p \in \mathcal{J}} \mu(p)\, \Bigl\lvert\, Q(p) - \sum_{i=0}^{N-1} Q_i(p_i) \,\Bigr\rvert \;\;\le\;\; \frac{R(\mu, r)}{1-\gamma} \;+\; \frac{4\,\gamma\,\displaystyle\sum_{i=0}^{N-1} E_i(\mu, P)\, r_{\max}(i)}{(1-\gamma)^2}.p∈J∑​μ(p)​Q(p)−i=0∑N−1​Qi​(pi​)​≤1−γR(μ,r)​+(1−γ)24γi=0∑N−1​Ei​(μ,P)rmax​(i)​.

The grouping is as displayed: the whole sum over agents is multiplied by 4γ4\gamma4γ and then divided by (1−γ)2(1-\gamma)^2(1−γ)2; the first term is R(μ,r)R(\mu,r)R(μ,r) divided by (1−γ)(1-\gamma)(1−γ) (first power). It is a non-strict inequality (≤\le≤).

Every variable of the conclusion: constrained or free

  • NNN and the family (Si)(S_i)(Si​) — free, apart from finiteness and decidable equality. In particular N=0N = 0N=0 is permitted. Each SiS_iSi​ is forced to be nonempty, but only indirectly: hypothesis 4 requires ∑p∈Jμ(p)=1\sum_{p \in \mathcal{J}} \mu(p) = 1∑p∈J​μ(p)=1, which is impossible if J\mathcal{J}J is empty, and J\mathcal{J}J nonempty forces every SiS_iSi​ nonempty. (This matters for rmax⁡r_{\max}rmax​; see below.)
  • μ\muμ — constrained: strictly positive, sums to 111, stationary for PPP (hyps. 4, 5).
  • PPP — constrained: row-stochastic with μ\muμ stationary (hyps. 3, 5); it also feeds hypotheses 8 and 10. Otherwise arbitrary; nothing forces it to be separable, product-form, or close to any local dynamics.
  • γ\gammaγ — constrained to 0≤γ<10 \le \gamma < 10≤γ<1 (hyps. 1, 2). Both denominators 1−γ1-\gamma1−γ and (1−γ)2(1-\gamma)^2(1−γ)2 are therefore strictly positive, so no division-by-zero junk value can arise.
  • rrr — entirely free: no bound, no sign condition, no decomposability condition is imposed on rrr. It is not itself controlled by rmax⁡r_{\max}rmax​. It appears on both sides of the conclusion: it determines QQQ through hypothesis 8, and it determines R(μ,r)R(\mu,r)R(μ,r) on the right.
  • rlocr^{\mathrm{loc}}rloc — constrained by hypothesis 7 to be an exact minimizer of the reward-entanglement objective (and by hypothesis 6 to be bounded by rmax⁡r_{\max}rmax​). Minimizers need not be unique (for instance, a constant may be shifted between two agents' local functions without changing the objective); the conclusion is asserted for every minimizer, together with the QiQ_iQi​ it induces.
  • rmax⁡r_{\max}rmax​ — constrained only from below: hypothesis 6 forces rmax⁡(i)≥max⁡s∈Si∣riloc(s)∣≥0r_{\max}(i) \ge \max_{s \in S_i} \lvert r^{\mathrm{loc}}_i(s)\rvert \ge 0rmax​(i)≥maxs∈Si​​∣riloc​(s)∣≥0 (using that SiS_iSi​ is nonempty, as forced by hypothesis 4). Any larger value is legal, so rmax⁡r_{\max}rmax​ is free upward. Because Ei(μ,P)≥0E_i(\mu,P) \ge 0Ei​(μ,P)≥0 and γ≥0\gamma \ge 0γ≥0, enlarging rmax⁡(i)r_{\max}(i)rmax​(i) can only enlarge the right-hand side; it appears nowhere on the left. Had some SiS_iSi​ been empty, hypothesis 6 would have been vacuous for that iii and rmax⁡(i)r_{\max}(i)rmax​(i) could have been taken arbitrarily negative, which — given a strictly positive EiE_iEi​ — would drive the right-hand side to −∞-\infty−∞ while the left-hand side stayed fixed; hypothesis 4 is what blocks this.
  • QQQ — constrained and in fact uniquely determined by hypothesis 8: the equation (I−γP)Q=r(I - \gamma P)Q = r(I−γP)Q=r has a unique solution because PPP is row-stochastic and 0≤γ<10 \le \gamma < 10≤γ<1.
  • PilocP^{\mathrm{loc}}_iPiloc​ — constrained: row-stochastic and an exact minimizer of Di(μ,P,⋅)D_i(\mu,P,\cdot)Di​(μ,P,⋅) (hyps. 9, 10). Such a minimizer always exists (the row-stochastic matrices on a nonempty finite SiS_iSi​ form a nonempty compact set and DiD_iDi​ is continuous in its matrix argument), but it need not be unique; the conclusion is asserted for every choice.
  • QiQ_iQi​ — constrained and uniquely determined by hypothesis 11, given PilocP^{\mathrm{loc}}_iPiloc​, rilocr^{\mathrm{loc}}_iriloc​ and γ\gammaγ, for the same invertibility reason.
  • Ei(μ,P)E_i(\mu,P)Ei​(μ,P) and R(μ,r)R(\mu,r)R(μ,r) are not free variables: they are determined by μ,P,r\mu, P, rμ,P,r.

On falsification by a free variable. The two data with genuinely unbounded freedom are rrr and rmax⁡r_{\max}rmax​. rmax⁡r_{\max}rmax​ occurs only on the right, with the nonnegative coefficient 4γEi(μ,P)/(1−γ)24\gamma E_i(\mu,P)/(1-\gamma)^24γEi​(μ,P)/(1−γ)2, so increasing it only weakens the claim, and hypothesis 6 together with the nonemptiness of SiS_iSi​ prevents it from being negative. rrr occurs on both sides. The residual freedom — the choice of PPP, μ\muμ, rrr, and of which minimizers rlocr^{\mathrm{loc}}rloc, PlocP^{\mathrm{loc}}Ploc are taken — is not resolved by inspection of the statement: no variable appears solely on the left-hand side in a way that a sign or scaling argument alone would exploit. I therefore report no explicit falsifying instantiation.

Joint satisfiability, and degenerate cases

  • The hypotheses are jointly satisfiable, including non-degenerately. Take any N≥1N \ge 1N≥1 and any nonempty finite SiS_iSi​; let PPP be the matrix all of whose entries equal 1/∣J∣1/\lvert\mathcal{J}\rvert1/∣J∣ and μ\muμ the uniform distribution on J\mathcal{J}J. Then hypotheses 3, 4, 5 hold. Take γ\gammaγ anywhere in [0,1)[0,1)[0,1) and rrr arbitrary; a minimizing family rlocr^{\mathrm{loc}}rloc exists (the objective is the μ\muμ-norm distance from rrr to a fixed finite-dimensional linear subspace of functions on J\mathcal{J}J, so the infimum is attained), giving hypothesis 7; set rmax⁡(i)=max⁡s∣riloc(s)∣r_{\max}(i) = \max_s \lvert r^{\mathrm{loc}}_i(s)\rvertrmax​(i)=maxs​∣riloc​(s)∣ for hypothesis 6; take PilocP^{\mathrm{loc}}_iPiloc​ uniform on SiS_iSi​, which makes Di=0=Ei(μ,P)D_i = 0 = E_i(\mu,P)Di​=0=Ei​(μ,P), giving hypotheses 9, 10; and let QQQ, QiQ_iQi​ be the (unique) Bellman solutions. So the statement is not vacuous.
  • N=0N = 0N=0. Permitted. Then J\mathcal{J}J is a one-point set (the empty tuple), every sum over agents is 000, μ\muμ of that point is 111, PPP is the 1×11\times11×1 matrix (1)(1)(1), R(μ,r)=∣r(⋆)∣R(\mu,r) = \lvert r(\star)\rvertR(μ,r)=∣r(⋆)∣, hypothesis 7 holds automatically, and Q(⋆)=r(⋆)/(1−γ)Q(\star) = r(\star)/(1-\gamma)Q(⋆)=r(⋆)/(1−γ). Both sides of the conclusion equal ∣r(⋆)∣/(1−γ)\lvert r(\star)\rvert/(1-\gamma)∣r(⋆)∣/(1−γ), so it holds with equality.
  • γ=0\gamma = 0γ=0. Permitted. Then Q=rQ = rQ=r and Qi=rilocQ_i = r^{\mathrm{loc}}_iQi​=riloc​, the second term on the right vanishes, and both sides equal R(μ,r)R(\mu,r)R(μ,r) by hypothesis 7 — equality again.
  • Empty SiS_iSi​ / empty joint space. Ruled out by hypothesis 4, as noted above.
  • The infima are genuine. Both defining sets are nonempty (for RRR: take all fi=0f_i = 0fi​=0; for EiE_iEi​: take any row-stochastic MMM, which exists since SiS_iSi​ is nonempty and finite) and are bounded below by 000, since μ>0\mu > 0μ>0 and the summands are absolute values. Hence R(μ,r)≥0R(\mu,r) \ge 0R(μ,r)≥0 and Ei(μ,P)≥0E_i(\mu,P) \ge 0Ei​(μ,P)≥0, and neither infimum falls back on the convention that assigns the value 000 to the infimum of an empty or unbounded-below set of reals.
  • Both attainment hypotheses (7 and 10) are equalities, not inequalities: the given rlocr^{\mathrm{loc}}rloc and PilocP^{\mathrm{loc}}_iPiloc​ must sit exactly at the respective infima, not merely near them.
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