Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Core keeps records valid and returns well-formed aligned pieces

Proved
EnvyFreeCake104.Divide.core_invariants

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

cake-cuttingenvy-freefair-divisionquery-complexity

Core keeps pieces well formed. Let NNN be a set of n≥2n\ge2n≥2 agents, c∈Nc\in Nc∈N a designated cutter, and CCC a well-formed piece (a finite list of pairwise disjoint intervals of [0,1][0,1][0,1]) whose endpoints are recorded in a record state sss that is valid for NNN.

Then every successful run of Core(c,N,C)\mathrm{Core}(c,N,C)Core(c,N,C) (Algorithm 3; any choice oracle, any prior transcript) ending in records s′s's′ satisfies: s′s's′ is valid for NNN, every point recorded in sss is recorded in s′s's′, every returned bundle YiY_iYi​ (i∈Ni\in Ni∈N) is a well-formed piece with endpoints recorded in s′s's′, and so is the returned residue UUU.

This is the §1.3 convention for the outputs of Core, used whenever Dominate passes Core's outputs to Repair or to a later Core call.

Preamble
import Definitions.Def_EnvyFreeCake104_Divide_Protocols

set_option autoImplicit false
Formal statement
namespace EnvyFreeCake104.Divide

/-- Run invariant of Core (Algorithm 3): from valid records in which the well-formed cake is
aligned, every successful run keeps the records valid, only adds recorded points, and returns
well-formed aligned bundles and a well-formed aligned residue. -/
theorem core_invariants {ι : Type} [DecidableEq ι] (V : ι → Valuation) (N : Finset ι)
    (hN : 2 ≤ N.card) (c : ι) (hc : c ∈ N) (C : Piece) (hC : C.WF)
    (s : Rec ι) (hs : s.Valid V N) (hCs : s.Aligned C)
    (o : ChoiceOracle ι) (tr₀ : List (Event ι))
    (Y : ι → Piece) (U : Piece) (s' : Rec ι) (tr : List (Event ι))
    (hrun : Prog.run V o ((core N c C).run s) tr₀ = some (((Y, U), s'), tr)) :
    s'.Valid V N ∧ s.pts ⊆ s'.pts ∧ (∀ i ∈ N, (Y i).WF ∧ s'.Aligned (Y i)) ∧
      U.WF ∧ s'.Aligned U := by sorry

end EnvyFreeCake104.Divide
Source
Alexandros Psomas, Cutting a Cake For Human Consumption: An Elementary n-agent Cake Cutting Protocol, arXiv:2610.30370v1, §1.3 (pp.4-5); Algorithm 3 (p.10)

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