Documentation

CslibFrontier.GameTheory.Market.Auction

Money-good reduction and the Garg–Kapoor auction algorithm for linear Arrow–Debreu markets #

This module formalizes Sections 5.11 and 5.12 of [Vaz07] (pp. 121–124):

  1. Money-good reduction from linear Fisher to linear Arrow–Debreu markets ([Vaz07], Section 5.11, p. 122): LinearFisherMarket.toMoneyExchangeMarket embeds an m-buyer, n-good linear Fisher market into an (m + 1)-agent, (n + 1)-good LinearExchangeMarket by adjoining money (none : Option G) as an extra good and a seller (none : Option I) who endows all market goods and derives utility exclusively from money. This reduction is distinct from the same-(I, G) proportional-endowment embedding FisherMarket.toExchangeMarket ([CV07], Section 6.1.7). We prove exact equivalence of equilibria (isEquilibrium_iff_toMoneyExchangeMarket) and rescaling recovery from any competitive equilibrium of the reduced exchange market (isEquilibrium_of_toMoneyExchangeMarket).

  2. The Garg–Kapoor (1 + ε)-auction algorithm for linear Arrow–Debreu markets ([Vaz07], Section 5.12, pp. 122–124): starting from unit prices p_j = 1 and unsold goods, each round processes agents in a fixed order agents : List I. Each agent with positive surplus spends on a maximum bang-per-buck good g by first buying any unsold units at p_g, next repricing its own holdings from p_g to (1 + ε) p_g, and then outbidding other holders of g at p_g to acquire units at (1 + ε) p_g. When no units of g remain unsold or at p_g, p_g is raised to (1 + ε) p_g, ending the current iteration and updating agents' endowment incomes. When total surplus drops to at most ε · a_min at the end of a round, any remaining unsold goods are assigned to an arbitrary agent so the market clears exactly.

Main definitions #

Main results #

Source notes #

Three minor slips in the printed text of [Vaz07], Sections 5.11–5.12 (pp. 122–124) are addressed explicitly:

  1. Page 122 prints a_i = ∑_{j=1}^m e_{ij} where the sum is over the n goods (G).
  2. Page 122 introduces u_min, u_max for minimum and maximum utilities, whereas page 124 writes v_min, v_max; both denote the same bounds on E.utility i g.
  3. Page 124 bounds p_max ≤ v_max / v_min; because a good's price may be raised by 1 + ε from a pre-raise price ≤ v_max / v_min, the exact post-raise bound is p_max ≤ (1 + ε) · v_max / v_min, which changes the logarithmic factor only by an additive 1.

References #

Section 5.11: Money-good reduction from linear Fisher to linear Arrow–Debreu #

Money-good Fisher-to-Arrow–Debreu reduction ([Vaz07], Section 5.11, p. 122): adjoin money (none : Option G) as the (n + 1)-st good and a seller (none : Option I) as the (m + 1)-st agent. Each buyer some i brings M.budget i units of money and values only goods some g according to M.utility i g; the seller none brings all market goods M.supply g and values only money (none) with marginal utility 1.

def Cslib.GameTheory.Market.LinearFisherMarket.toMoneyAllocation {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] (M : LinearFisherMarket I G) (x : I → G → ℝ) :
Option I → Option G → ℝ

Extend a Fisher allocation x : I → G → ℝ to the money-good exchange market by giving each buyer some i bundle x i (and zero money) and giving the seller none the entire money supply M.toFisherMarket.totalBudget (and zero goods).

Extend Fisher prices p : G → ℝ to the money-good exchange market with money numéraire price 1.

@[simp]

Equilibrium correspondence for the Section 5.11 money-good reduction ([Vaz07], Section 5.11, p. 122): in a non-degenerate linear Fisher market M, (x, p) is a Fisher equilibrium if and only if (M.toMoneyAllocation x, toMoneyPrice p) is a competitive equilibrium of M.toMoneyExchangeMarket.

theorem Cslib.GameTheory.Market.LinearFisherMarket.isEquilibrium_of_toMoneyExchangeMarket {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {M : LinearFisherMarket I G} (hnd : M.IsNonDegenerate) {x' : Option I → Option G → ℝ} {p' : Option G → ℝ} (heq : M.toMoneyExchangeMarket.IsCompetitiveEquilibrium x' p') (hp_money : 0 < p' none) :
M.IsEquilibrium (fun (i : I) (g : G) => x' (some i) (some g)) fun (g : G) => p' (some g) / p' none

Equilibrium recovery from the Section 5.11 money-good reduction ([Vaz07], Section 5.11, p. 122): in a non-degenerate linear Fisher market M, any competitive equilibrium (x', p') of M.toMoneyExchangeMarket with positive money price 0 < p' none projects directly to an exact Fisher equilibrium (fun i g => x' (some i) (some g), fun g => p' (some g) / p' none) of M.

Section 5.12: Garg–Kapoor (1 + ε)-auction algorithm for linear Arrow–Debreu markets #

noncomputable def Cslib.GameTheory.Market.LinearExchangeMarket.maxBangPerBuck {I : Type u_1} {G : Type u_2} [Fintype G] (E : LinearExchangeMarket I G) (p : G → ℝ) (i : I) :

Maximum bang-per-buck max_g (E.utility i g / p g) of trader i at prices p (0 when G is empty).

theorem Cslib.GameTheory.Market.LinearExchangeMarket.div_price_le_maxBangPerBuck {I : Type u_1} {G : Type u_2} [Fintype G] (E : LinearExchangeMarket I G) (p : G → ℝ) (i : I) (g : G) :
E.utility i g / p g ≤ E.maxBangPerBuck p i
theorem Cslib.GameTheory.Market.LinearExchangeMarket.maxBangPerBuck_nonneg {I : Type u_1} {G : Type u_2} [Fintype G] (E : LinearExchangeMarket I G) {p : G → ℝ} (hp : ∀ (g : G), 0 < p g) (i : I) :
theorem Cslib.GameTheory.Market.LinearExchangeMarket.exists_eq_maxBangPerBuck {I : Type u_1} {G : Type u_2} [Fintype G] [Nonempty G] (E : LinearExchangeMarket I G) (p : G → ℝ) (i : I) :
∃ (g : G), E.utility i g / p g = E.maxBangPerBuck p i
theorem Cslib.GameTheory.Market.LinearExchangeMarket.maxBangPerBuck_le {I : Type u_1} {G : Type u_2} [Fintype G] [Nonempty G] (E : LinearExchangeMarket I G) (p : G → ℝ) (i : I) {c : ℝ} (hc : ∀ (g : G), E.utility i g / p g ≤ c) :
noncomputable def Cslib.GameTheory.Market.LinearExchangeMarket.optUtility {I : Type u_1} {G : Type u_2} [Fintype G] (E : LinearExchangeMarket I G) (p : G → ℝ) (i : I) :

Optimal bundle utility income p i * max_g (u_{i g} / p_g) achievable by trader i within her budget at prices p.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.linearUtility_le_optUtility {I : Type u_1} {G : Type u_2} [Fintype G] (E : LinearExchangeMarket I G) {p : G → ℝ} (hp : ∀ (g : G), 0 < p g) {i : I} {b : G → ℝ} (hb : IsBudgetFeasible p (E.toExchangeMarket.income p i) b) :
theorem Cslib.GameTheory.Market.LinearExchangeMarket.exists_isBudgetFeasible_eq_optUtility {I : Type u_1} {G : Type u_2} [Fintype G] [Nonempty G] (E : LinearExchangeMarket I G) {p : G → ℝ} (hp : ∀ (g : G), 0 < p g) (i : I) :
∃ (b : G → ℝ), IsBudgetFeasible p (E.toExchangeMarket.income p i) b ∧ linearUtility (E.utility i) b = E.optUtility p i
def Cslib.GameTheory.Market.LinearExchangeMarket.IsApproxEquilibrium {I : Type u_1} {G : Type u_2} [Fintype G] [Fintype I] (E : LinearExchangeMarket I G) (ε : ℝ) (x : I → G → ℝ) (p : G → ℝ) :

Approximate market equilibrium of [Vaz07], Section 5.12, p. 122: strictly positive prices p and a nonnegative market-clearing allocation x (∑ i, x i g = totalSupply g) such that every agent obtains utility at least (1 - ε)^2 times the utility of her optimal bundle at prices p.

Auction state, invariants, and single-agent operations #

structure Cslib.GameTheory.Market.LinearExchangeMarket.AuctionState (I : Type u_1) (G : Type u_2) :
Type (max u_1 u_2)

State of the Garg–Kapoor (1 + ε)-auction algorithm ([Vaz07], Section 5.12, pp. 122–123): current base prices price, quantities low held at price g, quantities high held at (1 + ε) * price g, and per-good price-raise counts priceSteps.

  • price : G → ℝ

    Current base price p_g of good g.

  • low : I → G → ℝ

    Quantity of good g held by agent i at base price p_g.

  • high : I → G → ℝ

    Quantity of good g held by agent i at elevated price (1 + ε) p_g.

  • priceSteps : G → ℕ

    Number of (1 + ε) price raises executed on good g so far.

Initial auction state: unit prices 1, zero allocations, zero price raises ([Vaz07], Section 5.12, p. 122).

Unsold fraction 1 - ∑ i, (low i g + high i g) of unit-supply good g.

Money spent by agent i on current holdings at their respective purchase tiers p_g and (1 + ε) p_g.

Surplus (unspent) money of agent i relative to endowment value at current prices.

Total surplus (unspent) money across all agents.

Total number of price-raising iterations executed across all goods.

Clearing allocation obtained at termination by giving any remaining unsold goods to an arbitrary designated agent i₀ ([Vaz07], Section 5.12, p. 123).

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionState.totalSurplus_eq {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] (E : LinearExchangeMarket I G) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (ε : ℝ) (s : AuctionState I G) :
totalSurplus E ε s = ∑ g : G, s.unsold g * s.price g - ε * ∑ g : G, (∑ i : I, s.high i g) * s.price g

Exact conservation identity relating total agent surplus to unsold goods and (1 + ε)-tier holdings in a unit-supply exchange market.

Core invariant maintained at every step of the Garg–Kapoor auction algorithm ([Vaz07], Section 5.12, pp. 122–124).

  • price_eq_pow (g : G) : s.price g = (1 + ε) ^ s.priceSteps g

    Every price equals (1 + ε) ^ priceSteps g.

  • low_nonneg (i : I) (g : G) : 0 ≤ s.low i g

    Base-tier holdings are nonnegative.

  • high_nonneg (i : I) (g : G) : 0 ≤ s.high i g

    Elevated-tier holdings are nonnegative.

  • unsold_nonneg (g : G) : 0 ≤ s.unsold g

    Unsold quantities are nonnegative (∑ i, (low i g + high i g) ≤ 1).

  • unsold_eq_zero_of_one_lt (g : G) : 1 < s.price g → s.unsold g = 0

    Every good whose price has risen above 1 is completely sold.

  • surplus_nonneg (i : I) : 0 ≤ AuctionState.surplus E ε s i

    Every agent's surplus money is nonnegative.

  • exists_price_eq_one : Nonempty G → ∃ (g : G), s.price g = 1

    At least one good stays at unit price 1 whenever G is nonempty.

  • low_bpb (i : I) (g : G) : 0 < s.low i g → ∀ (g' : G), E.utility i g' / s.price g' ≤ (1 + ε) * (E.utility i g / s.price g)

    Every base-tier holding is within a (1 + ε) factor of optimal bang-per-buck.

  • high_bpb (i : I) (g : G) : 0 < s.high i g → ∀ (g' : G), E.utility i g' / s.price g' ≤ E.utility i g / s.price g

    Every elevated-tier holding achieves exact optimal bang-per-buck at current base prices.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.one_le_price {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) (g : G) :
1 ≤ s.price g
theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.price_pos {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) (g : G) :
0 < s.price g
theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.totalSurplus_le_sum_price {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hε : 0 < ε) :
AuctionState.totalSurplus E ε s ≤ ∑ g : G, s.price g
theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.totalSurplus_le_card_mul_pmax {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hε : 0 < ε) {pmax : ℝ} (hpmax : ∀ (g : G), s.price g ≤ pmax) :
theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.totalPriceSteps_le {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) {pmax : ℝ} (hpmax : ∀ (g : G), s.price g ≤ pmax) :

Lemma 5.24 ([Vaz07], Section 5.12, p. 123): if every good's price is bounded above by pmax, then the total number of (1 + ε) price raises across all goods is at most n · ⌊log pmax / log (1 + ε)⌋.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.totalPriceSteps_le_real {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) (hε1 : ε ≤ 1) {pmax : ℝ} (hpmax1 : 1 ≤ pmax) (hpmax : ∀ (g : G), s.price g ≤ pmax) :
↑s.totalPriceSteps ≤ 2 * ↑(Fintype.card G) / ε * Real.log pmax

Elementary (2 n / ε) log pmax real bound from Lemma 5.24 when 0 < ε ≤ 1.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.linearUtility_holdings_ge {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) (i : I) :
AuctionState.spent ε s i / (1 + ε) * E.maxBangPerBuck s.price i ≤ linearUtility (E.utility i) fun (g : G) => s.low i g + s.high i g

Pre-redistribution holdings low + high deliver utility at least (spent i / (1 + ε)) * maxBangPerBuck.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.isApproxEquilibrium_finalAllocation {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} [DecidableEq I] (hinv : E.AuctionInv ε s) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hε : 0 < ε) (hε1 : ε ≤ 1) {amin : ℝ} (hamin : ∀ (i : I), amin ≤ ∑ g : G, E.endowment i g) (hstop : AuctionState.totalSurplus E ε s ≤ ε * amin) (i₀ : I) :

Lemma 5.25 ([Vaz07], Section 5.12, p. 124): once totalSurplus ≤ ε * amin (where every agent's total endowment satisfies amin ≤ ∑ g, E.endowment i g), assigning any remaining unsold goods to i₀ produces an exact market-clearing (1 - ε)^2-approximate equilibrium (E.IsApproxEquilibrium ε (s.finalAllocation i₀) s.price).

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.isBudgetFeasible_holdings {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hε : 0 < ε) (i : I) :
IsBudgetFeasible s.price (E.toExchangeMarket.income s.price i) fun (g : G) => s.low i g + s.high i g

Pre-redistribution holdings low + high are budget-feasible at current prices s.price.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.AuctionInv.exists_ne_price_eq_one_of_sum_high_eq_one {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : LinearExchangeMarket I G} {ε : ℝ} {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hε : 0 < ε) {g : G} (hun0 : s.unsold g = 0) (hhigh : ∑ i : I, s.high i g = 1) :
∃ (g₀ : G), g₀ ≠ g ∧ s.price g₀ = 1

Whenever every good with price > 1 is fully sold and some good g has ∑ i, high i g = 1 (hence unsold g = 0), there exists another good g₀ ≠ g with s.price g₀ = 1 (so not all goods can rise above 1).

Elementary transitions: buy unsold, upgrade own holding, outbid, raise price #

Rounds, iterations, and full Garg–Kapoor algorithm (Lemmas 5.23–5.25, Theorem 5.26) #

Minimum total endowment a_min = min_i ∑_g e_{i g} across all agents.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.minEndowment_pos {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [Nonempty I] {E : LinearExchangeMarket I G} (hpos : ∀ (i : I), 0 < ∑ g : G, E.endowment i g) :

Minimum utility u_min = min_{i, g} u_{i g} across all agent–good pairs.

Maximum utility u_max = max_{i, g} u_{i g} across all agent–good pairs.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.le_minUtility {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [Nonempty I] [Nonempty G] (E : LinearExchangeMarket I G) {c : ℝ} (hc : ∀ (i : I) (g : G), c ≤ E.utility i g) :
theorem Cslib.GameTheory.Market.LinearExchangeMarket.maxUtility_le {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [Nonempty I] [Nonempty G] (E : LinearExchangeMarket I G) {c : ℝ} (hc : ∀ (i : I) (g : G), E.utility i g ≤ c) :
theorem Cslib.GameTheory.Market.LinearExchangeMarket.minUtility_pos {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [Nonempty I] [Nonempty G] {E : LinearExchangeMarket I G} (hpos : ∀ (i : I) (g : G), 0 < E.utility i g) :

Round fuel bound for a single iteration (⌊log_{1+ε}(n · pmax / (ε · amin))⌋ + 1; [Vaz07], Lemma 5.23, p. 123).

Iteration fuel bound (n · ⌊log_{1+ε} pmax⌋ + 1; [Vaz07], Lemma 5.24, p. 123).

Result of a single iteration of the Garg–Kapoor auction algorithm: updated state, whether a price raise occurred, number of rounds executed, and number of agent turns executed.

  • state : AuctionState I G

    Auction state at the end of the iteration.

  • raised : Bool

    Whether a good's price was raised by (1 + ε) during this iteration.

  • rounds : ℕ

    Number of rounds executed during this iteration.

  • turns : ℕ

    Number of single-agent turns executed during this iteration.

Execution statistics recorded by the Garg–Kapoor auction algorithm.

  • iterations : ℕ

    Number of iterations executed (each non-final one raises a good's price by 1 + ε).

  • rounds : ℕ

    Total number of rounds executed across all iterations.

  • agentTurns : ℕ

    Total number of single-agent turns executed across all rounds.

noncomputable def Cslib.GameTheory.Market.LinearExchangeMarket.auctionIteration {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] [Nonempty G] (E : LinearExchangeMarket I G) (ε : ℝ) (agents : List I) (threshold : ℝ) :

Execute a single iteration of the Garg–Kapoor auction algorithm, running up to fuel rounds until either totalSurplus ≤ threshold or a good's price is raised by (1 + ε).

theorem Cslib.GameTheory.Market.LinearExchangeMarket.auctionIteration_spec {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] [Nonempty G] {E : LinearExchangeMarket I G} {ε : ℝ} {agents : List I} (hnodup : agents.Nodup) (hmem : ∀ (k : I), k ∈ agents) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) {vmin vmax amin : ℝ} (hvmin : 0 < vmin) (hamin : 0 < amin) (hu_bounds : ∀ (i : I) (g : G), vmin ≤ E.utility i g ∧ E.utility i g ≤ vmax) (hε : 0 < ε) {s : AuctionState I G} (hinv : E.AuctionInv ε s) (hpmax : ∀ (g : G), s.price g ≤ (1 + ε) * (vmax / vmin)) :
have pmax := (1 + ε) * (vmax / vmin); have fuel := auctionRoundBound (Fintype.card G) pmax ε amin; have res := E.auctionIteration ε agents (ε * amin) fuel s; E.AuctionInv ε res.state ∧ (∀ (g : G), res.state.price g ≤ pmax) ∧ res.rounds ≤ fuel ∧ res.turns ≤ Fintype.card I * res.rounds ∧ (res.raised = true → res.state.totalPriceSteps = s.totalPriceSteps + 1) ∧ (res.raised = false → res.state.totalPriceSteps = s.totalPriceSteps ∧ AuctionState.totalSurplus E ε res.state ≤ ε * amin)

Lemma 5.23 ([Vaz07], Section 5.12, p. 123): starting from any valid auction state with prices bounded by pmax = (1 + ε) * (vmax / vmin), running an iteration with fuel auctionRoundBound (Fintype.card G) pmax ε amin terminates in at most ⌊log_{1+ε}(n · pmax / (ε · amin))⌋ + 1 rounds, either raising some good's price by 1 + ε or reaching total surplus ≤ ε · amin.

structure Cslib.GameTheory.Market.LinearExchangeMarket.AuctionOutput (I : Type u_3) (G : Type u_4) :
Type (max u_3 u_4)

Full output of the Garg–Kapoor auction algorithm ([Vaz07], Section 5.12, pp. 122–124).

  • allocation : I → G → ℝ

    Terminating market-clearing allocation (with unsold remainder assigned to i₀).

  • price : G → ℝ

    Terminating positive price vector.

  • preAllocation : I → G → ℝ

    Exact pre-redistribution budget-feasible holdings low + high.

  • stats : AuctionStats

    Combinatorial execution counters (iterations, rounds, and agent turns).

noncomputable def Cslib.GameTheory.Market.LinearExchangeMarket.auctionAlgorithm {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] [Nonempty I] [Nonempty G] (E : LinearExchangeMarket I G) (ε : ℝ) (agents : List I) (i₀ : I) :

The Garg–Kapoor (1 + ε)-auction algorithm ([Vaz07], Section 5.12, pp. 122–124) for linear Arrow–Debreu exchange markets, parameterized by accuracy ε, fixed round order agents, and an arbitrary recipient i₀ for terminating unsold remainder.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.auctionAlgorithm_spec {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] [Nonempty I] [Nonempty G] {E : LinearExchangeMarket I G} {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) {agents : List I} (hnodup : agents.Nodup) (hmem : ∀ (k : I), k ∈ agents) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hend_pos : ∀ (i : I), 0 < ∑ g : G, E.endowment i g) (hu_pos : ∀ (i : I) (g : G), 0 < E.utility i g) (i₀ : I) :
have out := E.auctionAlgorithm ε agents i₀; have pmax := (1 + ε) * (E.maxUtility / E.minUtility); have roundFuel := auctionRoundBound (Fintype.card G) pmax ε E.minEndowment; have iterFuel := auctionIterBound (Fintype.card G) pmax ε; E.IsApproxEquilibrium ε out.allocation out.price ∧ (∀ (i : I), IsBudgetFeasible out.price (E.toExchangeMarket.income out.price i) (out.preAllocation i)) ∧ (∀ (g : G), 1 ≤ out.price g ∧ out.price g ≤ pmax) ∧ (∃ (g : G), out.price g = 1) ∧ out.stats.iterations ≤ iterFuel ∧ out.stats.rounds ≤ out.stats.iterations * roundFuel ∧ out.stats.agentTurns ≤ Fintype.card I * out.stats.rounds

Theorem 5.26 ([Vaz07], Section 5.12, p. 124): on any unit-supply linear Arrow–Debreu exchange market with positive agent endowments (0 < ∑_g e_{i g}) and positive utilities (0 < u_{i g}), for every 0 < ε ≤ 1, auctionAlgorithm E ε agents i₀ outputs a (1 - ε)^2-approximate market equilibrium (x, p) such that:

  1. E.IsApproxEquilibrium ε x p (exact market clearing and (1 - ε)^2-optimal utility for every agent; Lemma 5.25);
  2. pre-redistribution holdings preAllocation are budget-feasible and already deliver at least (1 - ε)^2 of optimal utility for every agent;
  3. every price lies in [1, p_max] with p_max = (1 + ε) * (u_max / u_min), and at least one good has price 1 at termination;
  4. iterations are bounded by n · ⌊log_{1+ε} p_max⌋ + 1 (Lemma 5.24), rounds are bounded by iterations · (⌊log_{1+ε}(n · p_max / (ε · a_min))⌋ + 1) (Lemma 5.23), and agent turns are bounded by m · rounds.

This theorem certifies the exact combinatorial iteration, round, and agent-turn bounds matching O((m n / ε^2) log(u_max / u_min) log(n u_max / (ε a_min u_min))); it is not a Word-RAM or Turing-machine bit-complexity theorem.

theorem Cslib.GameTheory.Market.LinearExchangeMarket.auctionAlgorithm_turns_le_real {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] [Nonempty I] [Nonempty G] {E : LinearExchangeMarket I G} {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) {agents : List I} (hnodup : agents.Nodup) (hmem : ∀ (k : I), k ∈ agents) (hunit : ∀ (g : G), E.toExchangeMarket.totalSupply g = 1) (hend_pos : ∀ (i : I), 0 < ∑ g : G, E.endowment i g) (hu_pos : ∀ (i : I) (g : G), 0 < E.utility i g) (i₀ : I) :
have out := E.auctionAlgorithm ε agents i₀; have pmax := (1 + ε) * (E.maxUtility / E.minUtility); ↑out.stats.agentTurns ≤ ↑(Fintype.card I) * (2 * ↑(Fintype.card G) / ε * Real.log pmax + 1) * (2 / ε * max 0 (Real.log (↑(Fintype.card G) * pmax / (ε * E.minEndowment))) + 1)

Real-valued O((m n / ε^2) log(pmax) log(n pmax / (ε amin))) agent-turn corollary of Theorem 5.26 ([Vaz07], Section 5.12, p. 124) for 0 < ε ≤ 1.