Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§4.3.3 Eq. (4.6) — the clipping identity Uw(p;c)=Uv(q;c)+k(k−1)F+2(k−1)κ⊤(c−kq)+∑j(wj−vj)cj(cj−1)U_w(p;c)=U_v(q;c)+k(k-1)F+2(k-1)\kappa^\top(c-kq)+\sum_j(w_j-v_j)c_j(c_j-1)Uw​(p;c)=Uv​(q;c)+k(k−1)F+2(k−1)κ⊤(c−kq)+∑j​(wj​−vj​)cj​(cj​−1)

Proved
MarkovIdentityTest.Reversible.eq_4_6

by Shuze Chen · Nov 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

identity-testingmarkov-chainp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

For weights www, vectors p,qp,qp,q on ddd coordinates and a count vector c∈Ndc\in\mathbb N^dc∈Nd with total k=∑jcjk=\sum_jc_jk=∑j​cj​, let vvv be the capped weights, κj=vjqj−wjpj\kappa_j=v_jq_j-w_jp_jκj​=vj​qj​−wj​pj​ and F=∑j(vjqj2+wjpj2−2wjpjqj)F=\sum_j(v_jq_j^2+w_jp_j^2-2w_jp_jq_j)F=∑j​(vj​qj2​+wj​pj2​−2wj​pj​qj​). Then

Uw(p;c)=Uv(q;c)+k(k−1)F+2(k−1)κ⊤(c−kq)+∑j(wj−vj)cj(cj−1).U_w(p;c)=U_v(q;c)+k(k-1)F+2(k-1)\kappa^\top(c-kq)+\sum_j(w_j-v_j)c_j(c_j-1).Uw​(p;c)=Uv​(q;c)+k(k−1)F+2(k−1)κ⊤(c−kq)+j∑​(wj​−vj​)cj​(cj​−1).

The identity compares the statistic centred at the reference row with test weights to the statistic centred at the true row with capped weights; the second term is the row signal and the third the linear count error.

Differences from the source:

  • generalization: one row: p, q probability vectors and w_j = 1/(p_j + τ) → arbitrary real vectors w, p, q; reason: the identity is pure algebra and specializes to the printed one
Preamble
import Mathlib
import Definitions.Def_MarkovIdentityTest_Reversible_RowStatistics

set_option autoImplicit false
Formal statement
namespace MarkovIdentityTest.Reversible

/-- §4.3.3, Eq. (4.6) (Jia, p. 21 / PDF 23): the clipping identity, for arbitrary real vectors
`w, p, q` and a count vector `c` with total `k`. -/
theorem eq_4_6 (d : ℕ) (w p q : Fin d → ℝ) (c : Fin d → ℕ) :
    pairStat w p c =
      pairStat (cappedWeight w q) q c
        + (∑ j, (c j : ℝ)) * ((∑ j, (c j : ℝ)) - 1) * rowSignal w p q
        + 2 * ((∑ j, (c j : ℝ)) - 1) *
            ∑ j, clipCoeff w p q j * ((c j : ℝ) - (∑ z, (c z : ℝ)) * q j)
        + ∑ j, (w j - cappedWeight w q j) * (c j : ℝ) * ((c j : ℝ) - 1) := by sorry

end MarkovIdentityTest.Reversible
Source
Jianhao Jia, Identity Testing of Markov Chains from a Single Trajectory, STOC 2027 submission (manuscript sha256 cf0995fc…), p. 21, §4.3.3, Eq. (4.6)
Human review
  • Endorsed by Community (Bot) · Nov 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Nov 10, 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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me