Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

A separable transition acts on a local reward one agent at a time

Proved
MarkovEntanglement.separable_apply_local_reward

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

linear-algebramarkov-chainsstochastic-matrixtensor-product

Statement

Lemma. Let P=∑j=1Kxj P1(j)⊗⋯⊗PN(j)P = \sum_{j=1}^{K} x_j\, P^{(j)}_1 \otimes \cdots \otimes P^{(j)}_NP=∑j=1K​xj​P1(j)​⊗⋯⊗PN(j)​ be separable and let rir_iri​ depend only on agent iii's coordinate. Then

(∑jxj P1(j)⊗⋯⊗PN(j))(e⊗(i−1)⊗ri⊗e⊗(N−i))  =  e⊗(i−1)⊗(∑jxjPi(j)ri)⊗e⊗(N−i).\Bigl( \sum_{j} x_j\, P^{(j)}_1 \otimes \cdots \otimes P^{(j)}_N \Bigr) \bigl( e^{\otimes (i-1)} \otimes r_i \otimes e^{\otimes (N-i)} \bigr) \;=\; e^{\otimes (i-1)} \otimes \Bigl( \sum_j x_j P^{(j)}_i r_i \Bigr) \otimes e^{\otimes (N-i)} .(j∑​xj​P1(j)​⊗⋯⊗PN(j)​)(e⊗(i−1)⊗ri​⊗e⊗(N−i))=e⊗(i−1)⊗(j∑​xj​Pi(j)​ri​)⊗e⊗(N−i).

Notes

The computational engine behind exact value decomposition. Applying a separable transition to a reward that involves only agent iii leaves every other coordinate untouched: the other factors act on the all-ones vector eee and return it unchanged, because each Pk(j)P^{(j)}_kPk(j)​ is a transition matrix and therefore row-stochastic.

Iterating this is what shows the Bellman recursion never mixes agents, so the QQQ-function stays a sum of local terms. It is elementary but does the real work.

Search terms: tensor product of stochastic matrices, row-stochastic acts trivially on the all-ones vector, Kronecker product Bellman recursion.

Preamble
import Mathlib
import Definitions.Def_markov_entanglement_multi

open scoped BigOperators
open MarkovEntanglement
Formal statement
namespace MarkovEntanglement

theorem separable_apply_local_reward
    {N : ℕ} {S : Fin N → Type*} [∀ i, Fintype (S i)] [∀ i, DecidableEq (S i)]
    {K : ℕ} (x : Fin K → ℝ) (Pj : Fin K → ∀ i, Matrix (S i) (S i) ℝ)
    (hPj : ∀ k i, IsTransitionMatrix (Pj k i)) (hx : ∑ k, x k = 1)
    (i : Fin N) (r : S i → ℝ) (p : Joint S) :
    ∑ q : Joint S, (∑ k, x k • tensorProdN (Pj k)) p q * r (q i)
      = ∑ k, x k * ∑ t : S i, Pj k i (p i) t * r t := by
  sorry

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

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

Read-back: separable_apply_local_reward

What the statement asserts

Fix a natural number NNN (implicit) and a family of types S0,…,SN−1S_0,\dots,S_{N-1}S0​,…,SN−1​ indexed by i∈Fin N={0,…,N−1}i \in \mathrm{Fin}\,N = \{0,\dots,N-1\}i∈FinN={0,…,N−1} (implicit), where each SiS_iSi​ is assumed finite and to have decidable equality. Write

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

for the joint space, whose elements are the dependent tuples ppp assigning to each index jjj an element pj∈Sjp_j \in S_jpj​∈Sj​; J\mathcal{J}J is again a finite type. Fix a natural number KKK (implicit), a vector of real coefficients x:Fin K→Rx : \mathrm{Fin}\,K \to \mathbb{R}x:FinK→R, and a doubly-indexed family of real square matrices Pj(k)∈RSj×SjP^{(k)}_j \in \mathbb{R}^{S_j \times S_j}Pj(k)​∈RSj​×Sj​ for k∈Fin Kk \in \mathrm{Fin}\,Kk∈FinK, j∈Fin Nj \in \mathrm{Fin}\,Nj∈FinN. The hypotheses are:

  • (hPj) for every k∈Fin Kk \in \mathrm{Fin}\,Kk∈FinK and every index j∈Fin Nj \in \mathrm{Fin}\,Nj∈FinN, the matrix Pj(k)P^{(k)}_jPj(k)​ is row-stochastic in the sense of this bundle's IsTransitionMatrix, i.e. all its entries are ≥0\ge 0≥0 and each of its rows sums to exactly 111: ∑t∈SjPj(k)(s,t)=1\sum_{t \in S_j} P^{(k)}_j(s,t) = 1∑t∈Sj​​Pj(k)​(s,t)=1 for all s∈Sjs \in S_js∈Sj​;
  • (hx) ∑k∈Fin Kxk=1\sum_{k \in \mathrm{Fin}\,K} x_k = 1∑k∈FinK​xk​=1 — an affine constraint only; no sign condition is imposed on the individual xkx_kxk​.

Finally fix an index i∈Fin Ni \in \mathrm{Fin}\,Ni∈FinN, an arbitrary real-valued function r:Si→Rr : S_i \to \mathbb{R}r:Si​→R (no nonnegativity, boundedness, or normalisation assumed), and an arbitrary joint point p∈Jp \in \mathcal{J}p∈J.

The bundle's NNN-fold tensor product tensorProdN of a family (Pj)j(P_j)_j(Pj​)j​ is the matrix on J\mathcal{J}J whose entry at (p,q)(p,q)(p,q) is ∏jPj(pj,qj)\prod_{j} P_j(p_j, q_j)∏j​Pj​(pj​,qj​). The claimed identity is then, entrywise in the real matrix ∑kxk⋅(⨂jPj(k))\sum_k x_k \cdot \big(\bigotimes_j P^{(k)}_j\big)∑k​xk​⋅(⨂j​Pj(k)​) evaluated at the row ppp:

∑q∈J(∑k∈Fin Kxk∏j∈Fin NPj(k)(pj,qj)) r(qi)  =  ∑k∈Fin Kxk∑t∈SiPi(k)(pi,t) r(t).\sum_{q \in \mathcal{J}} \left( \sum_{k \in \mathrm{Fin}\,K} x_k \prod_{j \in \mathrm{Fin}\,N} P^{(k)}_j(p_j, q_j) \right) \, r(q_i) \;=\; \sum_{k \in \mathrm{Fin}\,K} x_k \sum_{t \in S_i} P^{(k)}_i(p_i, t)\, r(t).q∈J∑​​k∈FinK∑​xk​j∈FinN∏​Pj(k)​(pj​,qj​)​r(qi​)=k∈FinK∑​xk​t∈Si​∑​Pi(k)​(pi​,t)r(t).

Here the outer sum on the left ranges over the whole finite joint space, the scalar action xk∙(−)x_k \bullet(-)xk​∙(−) is ordinary real scaling of a matrix, and the sum of matrices is taken entrywise before evaluation at (p,q)(p,q)(p,q). The equality is an exact equality of real numbers — not an inequality, not an approximation.

Quantification, satisfiability, and degenerate cases

  • Every variable occurring in the conclusion is bound. NNN, SSS, KKK, xxx, Pj(k)P^{(k)}_jPj(k)​, iii, rrr, ppp are all binders of the theorem (some implicit, some explicit), universally quantified; the typeclass assumptions (finiteness and decidable equality of each SjS_jSj​) are likewise binders. Nothing in the conclusion is free, and the identity is asserted for the single given ppp and given iii, universally over all choices of them.
  • The hypotheses are jointly satisfiable and do not collapse the statement. For instance K=1K = 1K=1, x0=1x_0 = 1x0​=1, and any row-stochastic Pj(0)P^{(0)}_jPj(0)​ (e.g. identity matrices) satisfies both hPj and hx, with any nonempty finite SjS_jSj​'s. So the theorem is not vacuous.
  • (hx) forces K≥1K \ge 1K≥1. If K=0K = 0K=0 the sum ∑kxk\sum_k x_k∑k​xk​ is the empty sum 0≠10 \ne 10=1, so hx cannot hold; the K=0K = 0K=0 instance is vacuous.
  • N=0N = 0N=0 makes the statement vacuous for a different reason: Fin 0\mathrm{Fin}\,0Fin0 is empty, so no index iii can be supplied and no instance of the theorem exists.
  • Supplying p∈Jp \in \mathcal{J}p∈J forces every SjS_jSj​ to be nonempty (a dependent tuple picks out an element of each SjS_jSj​). Hence J\mathcal{J}J is nonempty in every instance, and the left-hand sum is over a nonempty finite set. There is therefore no "empty joint space" instance in which the left side degenerates to 000 while the right side does not.
  • The coefficients xkx_kxk​ may be negative, so ∑kxk⨂jPj(k)\sum_k x_k \bigotimes_j P^{(k)}_j∑k​xk​⨂j​Pj(k)​ need not itself be a nonnegative matrix; only the affine condition ∑kxk=1\sum_k x_k = 1∑k​xk​=1 is imposed. The statement is about this possibly-signed affine combination, not about a convex mixture.
  • Asymmetry between the two sides. Hypothesis hPj is asserted for all kkk and all indices jjj, including j≠ij \ne ij=i; the right-hand side mentions only agent iii's matrices Pi(k)P^{(k)}_iPi(k)​ and the reward rrr on SiS_iSi​, while the left-hand side involves all the Pj(k)P^{(k)}_jPj(k)​.
  • Small KKK, NNN, or singleton SjS_jSj​ are all included: with N=1N = 1N=1 the products ∏j\prod_j∏j​ have a single factor and both sides read as the same sum; with SjS_jSj​ a singleton for j≠ij \ne ij=i the left-hand sum collapses to a sum over SiS_iSi​.
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