Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Repair returns a partial allocation of the residue plus the old bundles

Proved
EnvyFreeCake104.Divide.repair_partition

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

cake-cuttingenvy-freefair-divisionquery-complexity

Repair allocates part of R∪⋃iDiR\cup\bigcup_i D_iR∪⋃i​Di​ and returns the rest as residue. Let NNN be a set of agents, ε∈R\varepsilon\in\mathbb Rε∈R, (Di)i∈N(D_i)_{i\in N}(Di​)i∈N​ pairwise disjoint well-formed pieces and RRR a well-formed piece disjoint from every DiD_iDi​, all with endpoints recorded in a record state valid for NNN.

Then every successful run of Repair(N,D,R,ε)\mathrm{Repair}(N,D,R,\varepsilon)Repair(N,D,R,ε) (Algorithm 4; any choice oracle, any prior transcript) returning bundles (Wi)i∈N(W_i)_{i\in N}(Wi​)i∈N​ and residue UUU satisfies

Wi∩Wj=∅ (i≠j),Wi⊆R∪⋃j∈NDj,U=(R∪⋃j∈NDj)∖⋃i∈NWi.W_i\cap W_j=\emptyset\ (i\ne j),\qquad W_i\subseteq R\cup\bigcup_{j\in N}D_j,\qquad U=\Big(R\cup\bigcup_{j\in N}D_j\Big)\setminus\bigcup_{i\in N}W_i .Wi​∩Wj​=∅ (i=j),Wi​⊆R∪j∈N⋃​Dj​,U=(R∪j∈N⋃​Dj​)∖i∈N⋃​Wi​.

This is Line 9 of Algorithm 4 ("return allocation WWW and residue (R∪(⋃iDi))∖⋃iWi(R\cup(\bigcup_i D_i))\setminus\bigcup_i W_i(R∪(⋃i​Di​))∖⋃i​Wi​"), stated for every run, without the value hypotheses of Lemma 4.

Preamble
import Definitions.Def_EnvyFreeCake104_Divide_Protocols

set_option autoImplicit false
Formal statement
namespace EnvyFreeCake104.Divide

/-- Repair (Algorithm 4) returns a partial allocation of `R ∪ ⋃ D_i` with the residue of
Line 9: every successful run returns pairwise disjoint bundles inside `R ∪ ⋃ D_i`, and its
residue is `(R ∪ ⋃ D_i) \ ⋃ W_i`. -/
theorem repair_partition {ι : Type} [DecidableEq ι] (V : ι → Valuation) (N : Finset ι)
    (D : ι → Piece) (R : Piece) (ε : ℝ) (hD : ∀ i ∈ N, (D i).WF) (hR : R.WF)
    (hDdisj : ∀ i ∈ N, ∀ j ∈ N, i ≠ j → Disjoint (D i).toSet (D j).toSet)
    (hDR : ∀ i ∈ N, Disjoint (D i).toSet R.toSet)
    (s : Rec ι) (hs : s.Valid V N) (hDs : ∀ i ∈ N, s.Aligned (D i)) (hRs : s.Aligned R)
    (o : ChoiceOracle ι) (tr₀ : List (Event ι))
    (W : ι → Piece) (U : Piece) (s' : Rec ι) (tr : List (Event ι))
    (hrun : Prog.run V o ((repair N D R ε).run s) tr₀ = some (((W, U), s'), tr)) :
    (∀ i ∈ N, ∀ j ∈ N, i ≠ j → Disjoint (W i).toSet (W j).toSet) ∧
    (∀ i ∈ N, (W i).toSet ⊆ R.toSet ∪ ⋃ j ∈ N, (D j).toSet) ∧
    U.toSet = (R.toSet ∪ ⋃ j ∈ N, (D j).toSet) \ ⋃ i ∈ N, (W i).toSet := by sorry

end EnvyFreeCake104.Divide
Source
Alexandros Psomas, Cutting a Cake For Human Consumption: An Elementary n-agent Cake Cutting Protocol, arXiv:2610.30370v1, Algorithm 4 (p.11), Line 9

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