Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3 — A positive-routing path to unused capacity

Proved
MatchingWhileLearning.DEEM.lemma_3

by Shuze Chen · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

bandit-algorithmsoperations-researchp2o-gran-per-chapterp2o-plan-paperp2o-v1probability

Fix the continuum market of §§3.1–3.5: finite nonempty type sets, positive normalized worker proportions, positive finite real-job capacities, an unlimited empty job, and a known distinct-row reward matrix in [0,1][0,1][0,1]. Assume generalized imbalance. For any feasible row-stochastic routing and any saturated job, there is a finite alternating job/worker path starting at that job and ending at an under-utilized job, possibly the empty job. All job vertices are distinct, all jobs before the terminal one are saturated, and every incident routing probability along the path is positive. This is the full path used in the source proof.

Differences from the source:

  • encoding: arbitrary finite type sets with probability vectors and a dummy job of infinite capacity → finite Lean types, published finite probability distributions, and no capacity constraint at the dummy job; reason: the same markets are represented and no expression zero times infinity is introduced
  • reading: the displayed formula reverses the first edge indices, omits the final edge, and the row-sum parenthesis uses a fixed job index → worker-first routing indices, both edges at every step including the final one, and row-stochastic distributions; reason: the prose says every consecutive pair and the graph proof uses positive x(i,j) on the entire shortest path; see insight I2
  • encoding: an alternating finite sequence indexed from zero for jobs and one for workers → jobs indexed by Fin (ell+1), workers by Fin ell, with ell positive; reason: a saturated starting job cannot also be the under-utilized terminal job
Preamble
import Definitions.Def_MatchingWhileLearning_DEEM_Stopping

open scoped BigOperators ENNReal
open Filter MeasureTheory ProbabilityTheory
open MatchingWhileLearning.DEEM
Formal statement
namespace MatchingWhileLearning.DEEM

theorem lemma_3 {I J : Type} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
    [Nonempty I] (M : MatchingWhileLearning.DEEM.Model I J) (hM : Imbalance M) (x : Routing I J)
    (hx : CapacityFeasible M (fun i => (x i).prob)) (j : J)
    (hj : j ≠ M.kappa) (hfull : load M (fun i => (x i).prob) j = M.capacity j) :
    ∃ (ell : ℕ) (jobs : Fin (ell + 1) → J) (workers : Fin ell → I),
      0 < ell ∧ jobs 0 = j ∧ Function.Injective jobs ∧
      (jobs (Fin.last ell) = M.kappa ∨
        load M (fun i => (x i).prob) (jobs (Fin.last ell)) < M.capacity (jobs (Fin.last ell))) ∧
      (∀ k : Fin ell, jobs k.castSucc ≠ M.kappa ∧
        load M (fun i => (x i).prob) (jobs k.castSucc) = M.capacity (jobs k.castSucc)) ∧
      (∀ k : Fin ell, 0 < (x (workers k)).prob (jobs k.castSucc) ∧
        0 < (x (workers k)).prob (jobs k.succ)) := by sorry

end MatchingWhileLearning.DEEM
Source
Johari, Kamble, Kanoria, Matching While Learning, arXiv:1603.04549v7, https://arxiv.org/abs/1603.04549v7, Lemma 3, p. 52 (PDF p. 52)
Read-back

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

Setting.

  • III is a nonempty finite set and JJJ a finite set.
  • MMM is a model: ρi>0\rho_i>0ρi​>0 summing to 111; κ∈J\kappa\in Jκ∈J; cj>0c_j>0cj​>0 for j≠κj\ne\kappaj=κ; rij∈[0,1]r_{ij}\in[0,1]rij​∈[0,1] with riκ=0r_{i\kappa}=0riκ​=0 and distinct rows.

Hypotheses.

  • Imbalance. For every nonempty S⊆IS\subseteq IS⊆I and every T⊆J∖{κ}T\subseteq J\setminus\{\kappa\}T⊆J∖{κ}, ∑i∈Sρi≠∑j∈Tcj\sum_{i\in S}\rho_i\ne\sum_{j\in T}c_j∑i∈S​ρi​=∑j∈T​cj​.
  • Routing. xxx assigns each iii a probability distribution (xij)j(x_{ij})_j(xij​)j​ on JJJ.
  • Capacity feasibility. With loadj=∑iρixij\mathrm{load}_j=\sum_i\rho_ix_{ij}loadj​=∑i​ρi​xij​, we have loadj≤cj\mathrm{load}_j\le c_jloadj​≤cj​ for every j≠κj\ne\kappaj=κ.
  • A full job. j∈Jj\in Jj∈J with j≠κj\ne\kappaj=κ and loadj=cj\mathrm{load}_j=c_jloadj​=cj​.

Conclusion. There exist an integer ℓ≥1\ell\ge1ℓ≥1, jobs j0,j1,…,jℓ∈Jj_0,j_1,\dots,j_\ell\in Jj0​,j1​,…,jℓ​∈J, and workers i0,…,iℓ−1∈Ii_0,\dots,i_{\ell-1}\in Ii0​,…,iℓ−1​∈I such that:

  1. j0=jj_0=jj0​=j, and j0,…,jℓj_0,\dots,j_\ellj0​,…,jℓ​ are pairwise distinct;
  2. jℓ=κj_\ell=\kappajℓ​=κ, or loadjℓ<cjℓ\mathrm{load}_{j_\ell}<c_{j_\ell}loadjℓ​​<cjℓ​​;
  3. for each k<ℓk<\ellk<ℓ: jk≠κj_k\ne\kappajk​=κ and loadjk=cjk\mathrm{load}_{j_k}=c_{j_k}loadjk​​=cjk​​;
  4. for each k<ℓk<\ellk<ℓ: xikjk>0x_{i_kj_k}>0xik​jk​​>0 and xikjk+1>0x_{i_kj_{k+1}}>0xik​jk+1​​>0.

Not required. The workers iki_kik​ need not be distinct.

Degenerate cases. The hypotheses are satisfiable only if some j≠κj\ne\kappaj=κ exists, so ∣J∣≥2|J|\ge2∣J∣≥2. Nothing else is degenerate here.

Human review
  • Endorsed by Community (Bot) · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 29, 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