Documentation

CslibFrontier.GameTheory.FairDivision.SelfridgeConway

Selfridge–Conway Discrete Three-Player Envy-Free Cake Cutting #

Formalizes the discrete three-player envy-free cake-cutting protocol discovered independently by John Selfridge and John Horton Conway c. 1960 and published in [BT95] and [RW98], over arbitrary nonatomic finite additive valuations (CakeValuation) on [0, 1] in the Robertson–Webb query model (FreeM (RWQuery (Fin 3))).

Protocol overview #

  1. Initial division (2 cuts): Player 0 cuts [0, 1] at 0 ≤ c₁ ≤ c₂ ≤ 1 into three intervals X 0 = [0, c₁], X 1 = [c₁, c₂], X 2 = [c₂, 1] of equal v₀-value 1 / 3.
  2. Player 1 inspection: Player 1 evaluates X 0, X 1, X 2 and sorts them in nonincreasing order v₁(X p₀) ≥ v₁(X p₁) ≥ v₁(X p₂).
    • Untrimmed branch (v₁(X p₀) ≤ v₁(X p₁)): Player 1's top two pieces are tied. No further cuts are made (2 cuts total): Player 2 takes a favorite piece X q₂, Player 1 takes an available piece X q₁ from {p₀, p₁} (v₁(X q₁) = v₁(X p₀)), and Player 0 receives the remaining piece X q₀ (v₀(X q₀) = 1 / 3).
    • Trimmed branch (v₁(X p₁) < v₁(X p₀)):
      • Phase 1 (1 trim cut): Player 1 trims X p₀ = [ℓ, r] at t ∈ [ℓ, r] so that Y p₀ = [ℓ, t] satisfies v₁(Y p₀) = v₁(X p₁), setting aside the trimming T = [t, r] while leaving Y k = X k for k ≠ p₀. Player 2 chooses a favorite Y q₂; Player 1 takes Y p₀ if q₂ ≠ p₀ and Y p₁ if q₂ = p₀; Player 0 receives the remaining untrimmed piece Y q₀ (q₀ ≠ p₀, so v₀(Y q₀) = 1 / 3).
      • Phase 2 (2 trimming cuts): Let pa ∈ {1, 2} be whichever of Players 1, 2 received the trimmed piece Y p₀, and pd ∈ {1, 2} \ {pa} the other. Player pd cuts T = [t, r] at t ≤ u₁ ≤ u₂ ≤ r into three pieces T₀, T₁, T₂ of equal v_{pd}-value v_{pd}(T) / 3. Player pa chooses a favorite T_{s_{pa}} first, Player 0 chooses a preferred remaining piece T_{s₀} second, and pd receives the last piece T_{s_{pd}}.

In Phase 2, Player 0 holds an irrevocable advantage over pa: because Y p₀ and T₀, T₁, T₂ partition X p₀, v₀(Y p₀) + v₀(T_{s_{pa}}) ≤ v₀(X p₀) = 1 / 3 ≤ v₀(Y q₀) + v₀(T_{s₀}). Thus every player weakly prefers their combined bundle to every other player's bundle using at most 5 physical cuts.

Main definitions #

Main results #

References #

Finite Fin 3 selection and permutation helpers #

Pure Piece Constructors and Staged Sub-Programs #

Selfridge–Conway discrete three-player envy-free cake-cutting protocol in the Robertson–Webb query model ([BT95]; [RW98]).

Canonical pure evaluation of selfridgeConwayQ against RWQuery.oracleOf v.

Cut-Count, Query-Count, and Partition Validity Proofs #

theorem Cslib.GameTheory.FairDivision.numCuts_selfridgeConwayQ_eq_two_or_five (oracle : {ι : Type} → RWQuery (Fin 3) ι → ι) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).numCuts = 2 ∨ (FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).numCuts = 5

selfridgeConwayQ makes either 2 physical cuts (untrimmed branch) or 5 physical cuts (trimmed branch).

theorem Cslib.GameTheory.FairDivision.numCuts_selfridgeConwayQ_eq_two_of_eq {v : Fin 3 → CakeValuation} {oracle : {ι : Type} → RWQuery (Fin 3) ι → ι} (ho : RWQuery.IsValidOracle v fun {ι : Type} => oracle) (h10 : v 1 = v 0) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).numCuts = 2

When Player 1 shares Player 0's valuation (v 1 = v 0), all three initial thirds have equal v₁-value 1 / 3, so selfridgeConwayQ takes the untrimmed 2-cut branch.

theorem Cslib.GameTheory.FairDivision.numCuts_selfridgeConwayQ_eq_five_of_strict_max {v : Fin 3 → CakeValuation} {oracle : {ι : Type} → RWQuery (Fin 3) ι → ι} (ho : RWQuery.IsValidOracle v fun {ι : Type} => oracle) (k : Fin 3) (hstrict : ∀ (j : Fin 3), j ≠ k → have c1 := FreeM.eval (fun {ι : Type} => oracle) (RWQuery.cutIn 0 0 1 (1 / 3)); have c2 := FreeM.eval (fun {ι : Type} => oracle) (RWQuery.cutIn 0 c1 1 (1 / 3)); have X := fun (x : Fin 3) => match x with | 0 => { left := 0, right := c1 } | 1 => { left := c1, right := c2 } | 2 => { left := c2, right := 1 }; (v 1).pieceVal (X j) < (v 1).pieceVal (X k)) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).numCuts = 5

When Player 1 has a unique strictly largest initial piece among [0, c₁], [c₁, c₂], [c₂, 1], selfridgeConwayQ takes the trimmed 5-cut branch.

theorem Cslib.GameTheory.FairDivision.numCuts_selfridgeConwayQ_le (oracle : {ι : Type} → RWQuery (Fin 3) ι → ι) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).numCuts ≤ 5

Five-cut bound: selfridgeConwayQ makes at most 5 physical cuts (2 in the untrimmed branch and 5 in the trimmed branch) against every oracle.

theorem Cslib.GameTheory.FairDivision.length_pieces_selfridgeConwayQ_le (oracle : {ι : Type} → RWQuery (Fin 3) ι → ι) (i : Fin 3) :
((FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).pieces i).length ≤ 2

Each player receives at most 2 interval pieces under selfridgeConwayQ.

theorem Cslib.GameTheory.FairDivision.countQueries_selfridgeConwayQ_le (oracle : {ι : Type} → RWQuery (Fin 3) ι → ι) :
FreeM.countQueries (fun {ι : Type} => oracle) selfridgeConwayQ ≤ 18

selfridgeConwayQ makes at most 18 Robertson–Webb queries (8 untrimmed or 18 trimmed) against every oracle.

selfridgeConwayQ produces a valid interval partition of [0, 1] against every oracle.

Complete Case Analysis of Envy-Freeness #

theorem Cslib.GameTheory.FairDivision.isEnvyFree_selfridgeConwayQ {v : Fin 3 → CakeValuation} {oracle : {ι : Type} → RWQuery (Fin 3) ι → ι} (ho : RWQuery.IsValidOracle v fun {ι : Type} => oracle) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).IsEnvyFree v

Selfridge–Conway Envy-Freeness Theorem: for every three-player valuation profile v : Fin 3 → CakeValuation and every valid Robertson–Webb oracle oracle, selfridgeConwayQ produces an allocation in which all three players (0, 1, 2) are envy-free.

theorem Cslib.GameTheory.FairDivision.isProportional_selfridgeConwayQ {v : Fin 3 → CakeValuation} {oracle : {ι : Type} → RWQuery (Fin 3) ι → ι} (ho : RWQuery.IsValidOracle v fun {ι : Type} => oracle) :
(FreeM.eval (fun {ι : Type} => oracle) selfridgeConwayQ).IsProportional v

Selfridge–Conway Proportionality Corollary: under any valid Robertson–Webb oracle, every player receives at least 1 / 3 of the cake according to their own valuation.