Documentation

CslibFrontier.GameTheory.Graphical.ExchangeEconomy

Graphical exchange economies and bipartite price variation #

This module formalizes graphical exchange economies from [Kea07], §7.5 (pp. 176–177, originating in Kakade, Kearns, and Ortiz 2004 and Kakade, Kearns, Ortiz, Pemantle, and Suri 2005), bridging directly to Cslib.GameTheory.Market.ExchangeMarket and Cslib.GameTheory.Market.LinearFisherMarket.

General graphical exchange economies #

A GraphicalExchangeEconomy I G equips an ExchangeMarket I G (endowments and utilities over divisible goods G) with an undirected trade graph graph : SimpleGraph I: consumer i may trade only within its closed neighborhood i = j ∨ graph.Adj i j (no resale / one-shot trade, [Kea07], §7.5, p. 176). Sellers post local good–consumer prices p : I → G → ℝ, and rationality requires every buyer i to purchase each good g solely from closed-neighborhood sellers offering the minimum local price minNeighborPrice p i g.

Bipartite cash-and-wheat economies and price variation #

In the bipartite cash-and-wheat model of [Kea07], §7.5 (p. 177), buyers B each hold 1 unit of cash and value only wheat, while sellers S each hold 1 unit of wheat and value only cash, trading across a bipartite graph adj : B → S → Prop.

References #

General graphical exchange economies ([Kea07], §7.5, p. 176) #

structure Cslib.GameTheory.GraphicalExchangeEconomy (I : Type u_1) (G : Type u_2) :
Type (max u_1 u_2)

A graphical exchange economy ([Kea07], §7.5, p. 176): consumers I exchange divisible goods G only within closed neighborhoods of an undirected trade graph graph : SimpleGraph I.

  • graph : SimpleGraph I

    Undirected trade network permitting exchange between adjacent consumers.

  • endowment : I → G → ℝ

    Initial nonnegative endowment endowment i : G → ℝ of consumer i.

  • utility : I → (G → ℝ) → ℝ

    Utility function utility i : (G → ℝ) → ℝ of consumer i.

  • endowment_nonneg (i : I) (g : G) : 0 ≤ self.endowment i g

    Initial endowments are nonnegative.

Forget the graph restriction to obtain the underlying classical ExchangeMarket.

def Cslib.GameTheory.GraphicalExchangeEconomy.consumedBundle {I : Type u_1} {G : Type u_2} [Fintype I] (x : I → I → G → ℝ) (i : I) (g : G) :

Total consumption bundle consumedBundle x i g = ∑ j, x i j g received by consumer i under bilateral trade allocation x : I → I → G → ℝ.

theorem Cslib.GameTheory.GraphicalExchangeEconomy.consumedBundle_eq_sum {I : Type u_1} {G : Type u_2} [Fintype I] (x : I → I → G → ℝ) (i : I) (g : G) :
consumedBundle x i g = ∑ j : I, x i j g
noncomputable def Cslib.GameTheory.GraphicalExchangeEconomy.minNeighborPrice {I : Type u_1} {G : Type u_2} [Fintype I] (E : GraphicalExchangeEconomy I G) (p : I → G → ℝ) (i : I) (g : G) :

Minimum local price for good g available to consumer i across its closed neighborhood {j | j = i ∨ E.graph.Adj i j} ([Kea07], §7.5, p. 176).

theorem Cslib.GameTheory.GraphicalExchangeEconomy.minNeighborPrice_le {I : Type u_1} {G : Type u_2} [Fintype I] (E : GraphicalExchangeEconomy I G) (p : I → G → ℝ) {i j : I} (h : j = i ∨ E.graph.Adj i j) (g : G) :
E.minNeighborPrice p i g ≤ p j g
theorem Cslib.GameTheory.GraphicalExchangeEconomy.le_minNeighborPrice_iff {I : Type u_1} {G : Type u_2} [Fintype I] (E : GraphicalExchangeEconomy I G) (p : I → G → ℝ) (i : I) (g : G) {c : ℝ} :
c ≤ E.minNeighborPrice p i g ↔ ∀ (j : I), j = i ∨ E.graph.Adj i j → c ≤ p j g
theorem Cslib.GameTheory.GraphicalExchangeEconomy.minNeighborPrice_uniform {I : Type u_1} {G : Type u_2} [Fintype I] (E : GraphicalExchangeEconomy I G) (q : G → ℝ) (i : I) :
E.minNeighborPrice (fun (x : I) => q) i = q
structure Cslib.GameTheory.GraphicalExchangeEconomy.IsGraphicalEquilibrium {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] (E : GraphicalExchangeEconomy I G) (x : I → I → G → ℝ) (p : I → G → ℝ) :

Graphical competitive equilibrium ([Kea07], §7.5, p. 176): bilateral trade flows x : I → I → G → ℝ (where x i j g is the quantity of good g bought by i from j) and local seller prices p : I → G → ℝ such that trade occurs only along closed neighborhoods, buyers buy solely from minimum-price neighbors, every buyer's net bundle lies in their Marshallian demand set at their neighborhood minimum prices and endowment income expenditure (p i) (E.endowment i), and every seller's supply clears with complementary slackness.

  • price_nonneg (j : I) (g : G) : 0 ≤ p j g

    Local seller prices are nonnegative.

  • trade_nonneg (i j : I) (g : G) : 0 ≤ x i j g

    Bilateral trade flows are nonnegative.

  • trade_local (i j : I) (g : G) : 0 < x i j g → j = i ∨ E.graph.Adj i j

    Positive trade occurs only within closed neighborhoods of E.graph.

  • min_price_rational (i j : I) (g : G) : 0 < x i j g → ∀ (k : I), k = i ∨ E.graph.Adj i k → p j g ≤ p k g

    Minimum-price rationality: buyers purchase good g only from lowest-price neighbors.

  • Each buyer chooses a utility-maximizing bundle at their neighborhood minimum prices.

  • market_clear (j : I) (g : G) : ∑ i : I, x i j g ≤ E.endowment j g

    No seller oversells their initial endowment.

  • price_slackness (j : I) (g : G) : p j g * (E.endowment j g - ∑ i : I, x i j g) = 0

    Complementary slackness: positively priced seller endowments clear completely.

theorem Cslib.GameTheory.GraphicalExchangeEconomy.IsGraphicalEquilibrium.localExpenditure_eq_minNeighborPrice {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : GraphicalExchangeEconomy I G} {x : I → I → G → ℝ} {p : I → G → ℝ} (heq : E.IsGraphicalEquilibrium x p) (i : I) :
∑ j : I, ∑ g : G, p j g * x i j g = Market.expenditure (E.minNeighborPrice p i) (consumedBundle x i)

Under minimum-price rationality, consumer i's actual bilateral expenditure ∑ j, ∑ g, p j g * x i j g equals expenditure (E.minNeighborPrice p i) (consumedBundle x i).

theorem Cslib.GameTheory.GraphicalExchangeEconomy.IsGraphicalEquilibrium.graphical_walras_law {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : GraphicalExchangeEconomy I G} {x : I → I → G → ℝ} {p : I → G → ℝ} (heq : E.IsGraphicalEquilibrium x p) (hlns : ∀ (i : I), Market.IsLocallyNonsatiated (E.utility i)) :
∑ i : I, ∑ j : I, ∑ g : G, p j g * x i j g = ∑ j : I, ∑ g : G, p j g * E.endowment j g

Graphical Walras's Law: under local nonsatiation of all consumers, aggregate bilateral spending equals aggregate endowment value at local equilibrium prices.

theorem Cslib.GameTheory.GraphicalExchangeEconomy.IsGraphicalEquilibrium.complete_law_of_one_price {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : GraphicalExchangeEconomy I G} {x : I → I → G → ℝ} {p : I → G → ℝ} (htop : E.graph = ⊤) (heq : E.IsGraphicalEquilibrium x p) {j₁ j₂ : I} {g : G} (h₁ : 0 < ∑ i : I, x i j₁ g) (h₂ : 0 < ∑ i : I, x i j₂ g) :
p j₁ g = p j₂ g

Law of One Price on the complete graph ⊤ ([Kea07], §7.5, p. 176): when every pair of consumers can trade (E.graph = ⊤), any two sellers with strictly positive sales of good g must post the exact same price for good g.

Projection of uniform-price graphical equilibria to classical Arrow–Debreu equilibria: for any graph E.graph on a nonempty set of consumers, a uniform-price graphical equilibrium (x, fun _ => q) yields a classical Arrow–Debreu competitive equilibrium (consumedBundle x, q) of E.toExchangeMarket.

Graphical First Welfare Theorem under uniform prices: if every consumer is locally nonsatiated and (x, fun _ => q) is a uniform-price graphical equilibrium, then the net consumption allocation consumedBundle x is Pareto optimal in E.toExchangeMarket.

theorem Cslib.GameTheory.GraphicalExchangeEconomy.exists_isGraphicalEquilibrium_of_isCompetitiveEquilibrium {I : Type u_1} {G : Type u_2} [Fintype I] [Fintype G] {E : GraphicalExchangeEconomy I G} (htop : E.graph = ⊤) {alloc : I → G → ℝ} {q : G → ℝ} (hce : E.toExchangeMarket.IsCompetitiveEquilibrium alloc q) :
∃ (x : I → I → G → ℝ), consumedBundle x = alloc ∧ E.IsGraphicalEquilibrium x fun (x : I) => q

Lifting classical Arrow–Debreu equilibria to the complete graph ⊤: every competitive equilibrium (alloc, q) of E.toExchangeMarket lifts to a uniform-price graphical equilibrium on E.graph = ⊤ with identical consumption bundles consumedBundle x = alloc.

Bipartite cash-and-wheat graphical economies ([Kea07], §7.5, p. 177) #

structure Cslib.GameTheory.BipartiteCashWheatEconomy (B : Type u_1) (S : Type u_2) :
Type (max u_1 u_2)

A bipartite cash-and-wheat graphical economy ([Kea07], §7.5, p. 177; Kakade–Kearns– Ortiz–Pemantle–Suri 2005): buyers B (each endowed with 1 unit of cash, desiring wheat) trade with sellers S (each endowed with 1 unit of wheat, desiring cash) along bipartite edges adj : B → S → Prop.

  • adj : B → S → Prop

    Bipartite trade relation: adj b s holds iff buyer b can purchase wheat from seller s.

Every bipartite cash-and-wheat graphical economy is an instance of Cslib.GameTheory.Market.LinearFisherMarket with unit buyer budgets, unit seller supplies, and {0, 1} adjacency marginal utilities.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.isNonDegenerate_toLinearFisherMarket_iff {B : Type u_1} {S : Type u_2} (E : BipartiteCashWheatEconomy B S) :
E.toLinearFisherMarket.IsNonDegenerate ↔ (∀ (b : B), ∃ (s : S), E.adj b s) ∧ ∀ (s : S), ∃ (b : B), E.adj b s

Non-degeneracy of E.toLinearFisherMarket holds iff no buyer or seller is isolated.

structure Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] (E : BipartiteCashWheatEconomy B S) (x : B → S → ℝ) (p : S → ℝ) :

Price equilibrium of a bipartite cash-and-wheat graphical economy ([Kea07], §7.5, p. 177): seller wheat prices p : S → ℝ and bilateral wheat purchases x : B → S → ℝ such that prices are positive, buyers buy only from lowest-price adjacent sellers, every buyer exhausts their 1 unit of cash, and every seller clears their 1 unit of wheat.

  • price_pos (s : S) : 0 < p s

    Every seller's wheat price is strictly positive.

  • alloc_nonneg (b : B) (s : S) : 0 ≤ x b s

    Bilateral wheat purchases are nonnegative.

  • alloc_local (b : B) (s : S) : 0 < x b s → E.adj b s

    Positive purchases occur only along edges of the bipartite trade graph.

  • min_price_rational (b : B) (s : S) : 0 < x b s → ∀ (s' : S), E.adj b s' → p s ≤ p s'

    Minimum-price rationality: buyers purchase only from lowest-price neighboring sellers.

  • budget_clear (b : B) : ∑ s : S, p s * x b s = 1

    Each buyer spends their 1 unit of cash completely.

  • supply_clear (s : S) : ∑ b : B, x b s = 1

    Each seller sells their 1 unit of wheat completely.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.isPriceEquilibrium_iff_linearFisher {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} (hB : ∀ (b : B), ∃ (s : S), E.adj b s) (hS : ∀ (s : S), ∃ (b : B), E.adj b s) {x : B → S → ℝ} {p : S → ℝ} :

Exact equivalence with LinearFisherMarket: when no buyer or seller is isolated, (x, p) is a bipartite cash-and-wheat price equilibrium if and only if (x, p) is a linear Fisher market equilibrium of E.toLinearFisherMarket.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.exists_isPriceEquilibrium {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} (hB : ∀ (b : B), ∃ (s : S), E.adj b s) (hS : ∀ (s : S), ∃ (b : B), E.adj b s) :
∃ (x : B → S → ℝ) (p : S → ℝ), E.IsPriceEquilibrium x p

Existence of equilibrium in every bipartite cash-and-wheat graphical economy with no isolated vertices ([Kea07], §7.5, p. 177; proved via Eisenberg–Gale).

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.price_eq_of_isPriceEquilibrium {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} (hB : ∀ (b : B), ∃ (s : S), E.adj b s) (hS : ∀ (s : S), ∃ (b : B), E.adj b s) {x₁ x₂ : B → S → ℝ} {p₁ p₂ : S → ℝ} (h₁ : E.IsPriceEquilibrium x₁ p₁) (h₂ : E.IsPriceEquilibrium x₂ p₂) :
p₁ = p₂

Uniqueness of equilibrium seller prices in every bipartite cash-and-wheat graphical economy with no isolated vertices.

Graph-expansion bounds on equilibrium price variation ([Kea07], §7.5, p. 177) #

Set of buyers having at least one neighboring seller in L : Finset S.

Set of buyers whose entire seller neighborhood is contained in U : Finset S.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.mem_lockedBuyers_iff {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] (E : BipartiteCashWheatEconomy B S) (U : Finset S) {b : B} :
b ∈ E.lockedBuyers U ↔ ∀ (s : S), E.adj b s → s ∈ U
theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.sum_price_eq_card_buyers {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) :
∑ s : S, p s = ↑(Fintype.card B)

Total equilibrium seller price equals the number of buyers: ∑ s, p s = |B|.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.card_buyerNeighbors_le_sum_price {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) (t : ℝ) :
have L := {s : S | p s ≤ t}; ↑(E.buyerNeighbors L).card ≤ ∑ s ∈ L, p s ∧ ∑ s ∈ L, p s ≤ t * ↑L.card

Sublevel expansion inequality: for any threshold t : ℝ, setting L = {s : S | p s ≤ t}, every buyer in buyerNeighbors L spends all 1 unit of cash on sellers in L, so |buyerNeighbors L| ≤ ∑ s ∈ L, p s ≤ t * |L|.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.sum_price_le_card_lockedBuyers {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) (t : ℝ) :
have U := {s : S | t ≤ p s}; t * ↑U.card ≤ ∑ s ∈ U, p s ∧ ∑ s ∈ U, p s ≤ ↑(E.lockedBuyers U).card

Superlevel isolation inequality: for any threshold t : ℝ, setting U = {s : S | t ≤ p s}, only buyers in lockedBuyers U can purchase from sellers in U, so t * |U| ≤ ∑ s ∈ U, p s ≤ |lockedBuyers U|.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.price_eq_one_of_hall_expansion {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) (hcard : Fintype.card B = Fintype.card S) (hhall : ∀ (L : Finset S), L.card ≤ (E.buyerNeighbors L).card) (s : S) :
p s = 1

Zero price variation under Hall expansion: if |B| = |S| and every seller subset L has |L| ≤ |buyerNeighbors L|, then every equilibrium seller price equals 1 (hence price variation p s₁ / p s₂ = 1).

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.price_eq_one_of_regular {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) {d : ℕ} (hd : 0 < d) [DecidableRel E.adj] (hB_deg : ∀ (b : B), {s : S | E.adj b s}.card = d) (hS_deg : ∀ (s : S), {b : B | E.adj b s}.card = d) (s : S) :
p s = 1

Zero price variation on d-regular bipartite networks (d ≥ 1): every d-regular bipartite cash-and-wheat economy has uniform equilibrium price p s = 1 for all sellers s.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.IsPriceEquilibrium.price_eq_card_div_of_complete {B : Type u_1} {S : Type u_2} [Fintype B] [Fintype S] {E : BipartiteCashWheatEconomy B S} {x : B → S → ℝ} {p : S → ℝ} (heq : E.IsPriceEquilibrium x p) (hcomp : ∀ (b : B) (s : S), E.adj b s) (s : S) :
p s = ↑(Fintype.card B) / ↑(Fintype.card S)

Complete bipartite zero price variation: on the complete bipartite graph K_{m, n}, every seller posts the exact same equilibrium price |B| / |S| (zero price variation).

Hub-and-spoke bipartite family with unbounded price variation ([Kea07], §7.5) #

A connected (k + 1) × (k + 1) tree bipartite cash-and-wheat economy: buyers 0, …, k - 1 connect exclusively to hub seller 0, while bridge buyer k connects to all k + 1 sellers.

Explicit equilibrium allocation for hubSpokeEconomy k (k ≥ 1).

Explicit equilibrium seller prices for hubSpokeEconomy k (k ≥ 1): hub seller 0 commands price k, while each spoke seller s ≠ 0 commands price 1 / k.

theorem Cslib.GameTheory.BipartiteCashWheatEconomy.hubSpoke_price_ratio {k : ℕ} (hk : 1 ≤ k) {x : Fin (k + 1) → Fin (k + 1) → ℝ} {p : Fin (k + 1) → ℝ} (heq : (hubSpokeEconomy k).IsPriceEquilibrium x p) :
p 0 / p ⟨1, ⋯⟩ = ↑k ^ 2

Unbounded price variation in connected bipartite networks ([Kea07], §7.5, p. 177): in every price equilibrium of the connected (k + 1) × (k + 1) tree economy hubSpokeEconomy k (k ≥ 1), the ratio of the highest to lowest seller price is exactly k ^ 2.