Documentation

CslibFrontier.GameTheory.Market.GrossSubstitutes

Gross substitutability, separating hyperplanes, and Cobb–Douglas / CES demands #

For general exchange economies equilibrium price vectors need not be unique or even form a connected set ([CV07], Section 6.1.4, p. 138; Section 6.5.1, p. 151). When the aggregate excess-demand function Z : (G → ℝ) → G → ℝ on strictly positive price vectors satisfies gross substitutability (IsGrossSubstitutes) or weak gross substitutability (IsWeakGrossSubstitutes), raising the prices of some goods while holding the remaining prices fixed never decreases the excess demand for any good whose price remained fixed.

Building on CslibFrontier.GameTheory.Market.Basic, this module formalizes the structural and parametric results of [CV07], Sections 6.1.4–6.1.5, 6.3, 6.4.2, and Exercises 6.1–6.3:

  1. Excess-demand systems, GS/WGS, and uniqueness (§6.1.1, §6.1.4, pp. 137–138): degree-0 homogeneity (IsHomogeneousDegZero), Walras's law (SatisfiesWalrasLaw), positive Walrasian equilibria (IsWalrasianEquilibrium), closure of WGS/GS under aggregation, and uniqueness of positive Walrasian equilibrium prices up to positive scaling under strict gross substitutability (IsGrossSubstitutes.eq_smul_of_isWalrasianEquilibrium). Note that [CV07], Section 6.1.4, p. 138 informally attributes uniqueness up to scaling to WGS; under non-strict WGS alone, independent submarkets can produce a multi-ray convex cone of positive equilibria, whereas strict GS gives uniqueness up to scaling and WGS gives convexity.
  2. Arrow–Block–Hurwicz / Arrow–Hurwicz separating hyperplane (Lemma 6.4, pp. 142–143; Equations (6.5)–(6.6), pp. 145–146; §6.7, p. 156) and convexity (Exercise 6.3, p. 158): via the sorted price-ratio hybrid chain q^s = min(α_s p̂, p), in any homogeneous excess-demand system satisfying Walras's law and weak gross substitutability, every positive equilibrium p̂ and positive non-equilibrium p satisfy 0 < expenditure p̂ (Z p) (IsWeakGrossSubstitutes.expenditure_pos_of_not_isWalrasianEquilibrium). Consequently, moving from p in direction Z p makes a strictly acute angle with p̂ - p (§6.3.1, p. 143), and the set of positive Walrasian equilibrium price vectors is convex (IsWeakGrossSubstitutes.convex_setOf_isWalrasianEquilibrium, Exercise 6.3).
  3. Cobb–Douglas and CES Marshallian demands (§6.1.5, p. 139; §6.4.2 Eq. (6.7), p. 149; Exercises 6.1–6.2, p. 158): explicit closed-form demands cobbDouglasDemand and cesDemand, exact Market.demandSet characterizations via weighted AM–GM and reverse Hölder (Exercise 6.1), WGS of Cobb–Douglas exchange markets and 0 < ρ < 1 CES excess demands, and the polynomial-size linear-program characterization of positive equilibrium prices in Cobb–Douglas exchange economies (CobbDouglasExchangeMarket.isWalrasianEquilibrium_iff_linearInequalities, Exercise 6.2).

Main definitions #

Main results #

References #

Single-valued excess-demand systems and gross substitutability #

def Cslib.GameTheory.Market.IsHomogeneousDegZero {G : Type u_1} (Z : (G → ℝ) → G → ℝ) :

An excess-demand map Z : (G → ℝ) → G → ℝ is homogeneous of degree 0 on strictly positive price vectors ([CV07], Section 6.1.1, p. 137) if scaling all prices by c > 0 leaves Z unchanged.

def Cslib.GameTheory.Market.SatisfiesWalrasLaw {G : Type u_1} [Fintype G] (Z : (G → ℝ) → G → ℝ) :

An excess-demand map Z : (G → ℝ) → G → ℝ satisfies Walras's law on strictly positive price vectors ([CV07], Section 6.1.1, p. 137) if expenditure p (Z p) = 0 for every p > 0.

def Cslib.GameTheory.Market.IsWalrasianEquilibrium {G : Type u_1} (Z : (G → ℝ) → G → ℝ) (p : G → ℝ) :

A strictly positive price vector p is a Walrasian equilibrium of Z ([CV07], Section 6.1.1, p. 137) if Z p g ≤ 0 for every good g.

theorem Cslib.GameTheory.Market.SatisfiesWalrasLaw.eq_zero_of_isWalrasianEquilibrium {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hW : SatisfiesWalrasLaw Z) {p : G → ℝ} (heq : IsWalrasianEquilibrium Z p) :
Z p = 0

Under Walras's law, every strictly positive Walrasian equilibrium clears every good with exact equality (Z p = 0).

theorem Cslib.GameTheory.Market.SatisfiesWalrasLaw.isWalrasianEquilibrium_iff_eq_zero {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hW : SatisfiesWalrasLaw Z) {p : G → ℝ} :
IsWalrasianEquilibrium Z p ↔ (∀ (g : G), 0 < p g) ∧ Z p = 0
theorem Cslib.GameTheory.Market.IsHomogeneousDegZero.isWalrasianEquilibrium_smul {G : Type u_1} {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) {p : G → ℝ} (heq : IsWalrasianEquilibrium Z p) {c : ℝ} (hc : 0 < c) :
def Cslib.GameTheory.Market.IsWeakGrossSubstitutes {G : Type u_1} (Z : (G → ℝ) → G → ℝ) :

Weak gross substitutability (WGS) ([CV07], Section 6.1.4, p. 138): whenever prices move from p > 0 to p' ≥ p, the excess demand of any good g whose price remains unchanged (p' g = p g) does not decrease (Z p g ≤ Z p' g). (Note that [CV07] additionally writes ∃ j, p j < p' j; when p = p' the inequality Z p g ≤ Z p' g holds trivially by reflexivity.)

def Cslib.GameTheory.Market.IsGrossSubstitutes {G : Type u_1} (Z : (G → ℝ) → G → ℝ) :

Strict gross substitutability (GS) ([ABH59]; [CV07], Section 6.1.4, p. 138): whenever prices move from p > 0 to p' ≥ p with p j < p' j for at least one good j, the excess demand of every good g whose price remains unchanged (p' g = p g) strictly increases (Z p g < Z p' g).

theorem Cslib.GameTheory.Market.IsWeakGrossSubstitutes.sum {G : Type u_1} {ι : Type u_2} (s : Finset ι) {z : ι → (G → ℝ) → G → ℝ} (hz : ∀ i ∈ s, IsWeakGrossSubstitutes (z i)) :
IsWeakGrossSubstitutes fun (p : G → ℝ) (g : G) => ∑ i ∈ s, z i p g

Weak gross substitutability is closed under finite aggregation ([CV07], Section 6.1.4, p. 138).

theorem Cslib.GameTheory.Market.IsGrossSubstitutes.of_sum_exists {G : Type u_1} {ι : Type u_2} (s : Finset ι) {z : ι → (G → ℝ) → G → ℝ} (hwgs : ∀ i ∈ s, IsWeakGrossSubstitutes (z i)) (hgs : ∃ i ∈ s, IsGrossSubstitutes (z i)) :
IsGrossSubstitutes fun (p : G → ℝ) (g : G) => ∑ i ∈ s, z i p g

Aggregating a family of WGS excess-demand functions in which at least one agent satisfies strict GS yields strict GS.

theorem Cslib.GameTheory.Market.IsWeakGrossSubstitutes.sub_const {G : Type u_1} {X : (G → ℝ) → G → ℝ} (hX : IsWeakGrossSubstitutes X) (W : G → ℝ) :
IsWeakGrossSubstitutes fun (p : G → ℝ) (g : G) => X p g - W g
theorem Cslib.GameTheory.Market.IsGrossSubstitutes.sub_const {G : Type u_1} {X : (G → ℝ) → G → ℝ} (hX : IsGrossSubstitutes X) (W : G → ℝ) :
IsGrossSubstitutes fun (p : G → ℝ) (g : G) => X p g - W g
theorem Cslib.GameTheory.Market.IsGrossSubstitutes.eq_smul_of_isWalrasianEquilibrium {G : Type u_1} [Fintype G] [Nonempty G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hGS : IsGrossSubstitutes Z) {p p' : G → ℝ} (hp : IsWalrasianEquilibrium Z p) (hp' : IsWalrasianEquilibrium Z p') :
∃ (c : ℝ), 0 < c ∧ p' = c • p

Uniqueness of Walrasian equilibrium prices up to positive scaling under strict GS ([ABH59]; [CV07], Section 6.1.4, p. 138): if Z is homogeneous of degree 0, satisfies Walras's law, and satisfies strict gross substitutability, any two positive Walrasian equilibrium price vectors differ by a positive scalar factor.

Sorted price-ratio hybrid chain and Arrow–Hurwicz separating hyperplanes #

noncomputable def Cslib.GameTheory.Market.sortedPriceRatioEquiv {G : Type u_1} [Fintype G] (pHat p : G → ℝ) :

Bijection Fin (Fintype.card G) ≃ G ordering the goods so that the price ratio s ↦ p (σ s) / pHat (σ s) is nondecreasing ([CV07], Lemma 6.7 proof, p. 145).

theorem Cslib.GameTheory.Market.monotone_sortedPriceRatio {G : Type u_1} [Fintype G] (pHat p : G → ℝ) :
Monotone fun (s : Fin (Fintype.card G)) => p ((sortedPriceRatioEquiv pHat p) s) / pHat ((sortedPriceRatioEquiv pHat p) s)
def Cslib.GameTheory.Market.hybridPrice {G : Type u_1} (pHat p : G → ℝ) (α : ℝ) (g : G) :

Componentwise minimum min (α * pHat g) (p g) used as the intermediate hybrid price vector q^s in [CV07], Lemma 6.7, p. 145.

@[simp]
theorem Cslib.GameTheory.Market.hybridPrice_apply {G : Type u_1} (pHat p : G → ℝ) (α : ℝ) (g : G) :
hybridPrice pHat p α g = min (α * pHat g) (p g)
theorem Cslib.GameTheory.Market.hybridPrice_pos {G : Type u_1} {pHat p : G → ℝ} {α : ℝ} (hpHat : ∀ (g : G), 0 < pHat g) (hp : ∀ (g : G), 0 < p g) (hα : 0 < α) (g : G) :
0 < hybridPrice pHat p α g
theorem Cslib.GameTheory.Market.hybridPrice_le_smul {G : Type u_1} (pHat p : G → ℝ) (α : ℝ) (g : G) :
hybridPrice pHat p α g ≤ (α • pHat) g
theorem Cslib.GameTheory.Market.hybridPrice_mono {G : Type u_1} (pHat p : G → ℝ) {α₁ α₂ : ℝ} (hα : α₁ ≤ α₂) (hpHat : ∀ (g : G), 0 ≤ pHat g) (g : G) :
hybridPrice pHat p α₁ g ≤ hybridPrice pHat p α₂ g
theorem Cslib.GameTheory.Market.hybridPrice_sorted_of_le {G : Type u_1} [Fintype G] {pHat p : G → ℝ} (hpHat : ∀ (g : G), 0 < pHat g) {s t : Fin (Fintype.card G)} (ht : t ≤ s) :
have σ := sortedPriceRatioEquiv pHat p; hybridPrice pHat p (p (σ s) / pHat (σ s)) (σ t) = p (σ t)
theorem Cslib.GameTheory.Market.hybridPrice_sorted_of_ge {G : Type u_1} [Fintype G] {pHat p : G → ℝ} (hpHat : ∀ (g : G), 0 < pHat g) {s t : Fin (Fintype.card G)} (ht : s ≤ t) :
have σ := sortedPriceRatioEquiv pHat p; hybridPrice pHat p (p (σ s) / pHat (σ s)) (σ t) = p (σ s) / pHat (σ s) * pHat (σ t)
theorem Cslib.GameTheory.Market.hybridPrice_zero_eq_smul {G : Type u_1} [Fintype G] {pHat p : G → ℝ} (hpHat : ∀ (g : G), 0 < pHat g) (h0 : 0 < Fintype.card G) :
have σ := sortedPriceRatioEquiv pHat p; hybridPrice pHat p (p (σ ⟨0, h0⟩) / pHat (σ ⟨0, h0⟩)) = (p (σ ⟨0, h0⟩) / pHat (σ ⟨0, h0⟩)) • pHat
theorem Cslib.GameTheory.Market.hybridPrice_last_eq {G : Type u_1} [Fintype G] {pHat p : G → ℝ} (hpHat : ∀ (g : G), 0 < pHat g) (h0 : 0 < Fintype.card G) :
have σ := sortedPriceRatioEquiv pHat p; have sLast := ⟨Fintype.card G - 1, ⋯⟩; hybridPrice pHat p (p (σ sLast) / pHat (σ sLast)) = p
theorem Cslib.GameTheory.Market.excessDemand_hybridPrice_nonpos_of_ge {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) {s t : Fin (Fintype.card G)} (ht : s ≤ t) :
have σ := sortedPriceRatioEquiv pHat p; Z (hybridPrice pHat p (p (σ s) / pHat (σ s))) (σ t) ≤ 0

At step s, WGS against α_s • pHat implies Z q^s (σ t) ≤ 0 for all t ≥ s ([CV07], Lemma 6.7 proof, p. 145).

theorem Cslib.GameTheory.Market.excessDemand_hybridPrice_le_succ_of_le {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (hpHat : ∀ (g : G), 0 < pHat g) (hp : ∀ (g : G), 0 < p g) {s s' t : Fin (Fintype.card G)} (hss' : s ≤ s') (ht : t ≤ s) :
have σ := sortedPriceRatioEquiv pHat p; Z (hybridPrice pHat p (p (σ s) / pHat (σ s))) (σ t) ≤ Z (hybridPrice pHat p (p (σ s') / pHat (σ s'))) (σ t)

Between consecutive hybrid levels s and s' = s + 1, WGS implies that excess demand on the head {t | t ≤ s} is nondecreasing (Z q^s (σ t) ≤ Z q^{s'} (σ t)).

theorem Cslib.GameTheory.Market.expenditure_hybridPrice_step_ge {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) {s s' : Fin (Fintype.card G)} (hsucc : ↑s' = ↑s + 1) :
have σ := sortedPriceRatioEquiv pHat p; have α := fun (t : Fin (Fintype.card G)) => p (σ t) / pHat (σ t); have q := fun (t : Fin (Fintype.card G)) => hybridPrice pHat p (α t); (1 - α s / α s') * ∑ t : Fin (Fintype.card G) with t ≤ s, pHat (σ t) * (Z (q s') (σ t) - Z (q s) (σ t)) ≤ expenditure pHat (Z (q s')) - expenditure pHat (Z (q s))

Equation (6.5) of [CV07], Lemma 6.7, p. 145: for consecutive sorted indices s and s' (s'.val = s.val + 1), (1 - α s / α s') * ∑_{t ≤ s} pHat (σ t) * (Z (q s') (σ t) - Z (q s) (σ t)) ≤ expenditure pHat (Z (q s')) - expenditure pHat (Z (q s)), and both sides are nonnegative.

theorem Cslib.GameTheory.Market.expenditure_hybridPrice_step_nonneg {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) {s s' : Fin (Fintype.card G)} (hsucc : ↑s' = ↑s + 1) :
have σ := sortedPriceRatioEquiv pHat p; have α := fun (t : Fin (Fintype.card G)) => p (σ t) / pHat (σ t); have q := fun (t : Fin (Fintype.card G)) => hybridPrice pHat p (α t); 0 ≤ expenditure pHat (Z (q s')) - expenditure pHat (Z (q s))
theorem Cslib.GameTheory.Market.expenditure_eq_sum_hybridPrice_steps {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) (h0 : 0 < Fintype.card G) :
have σ := sortedPriceRatioEquiv pHat p; have α := fun (t : Fin (Fintype.card G)) => p (σ t) / pHat (σ t); have q := fun (t : Fin (Fintype.card G)) => hybridPrice pHat p (α t); expenditure pHat (Z p) = ∑ k : Fin (Fintype.card G - 1), (expenditure pHat (Z (q ⟨↑k + 1, ⋯⟩)) - expenditure pHat (Z (q ⟨↑k, ⋯⟩)))

Telescoping decomposition of expenditure pHat (Z p) along the sorted hybrid chain q^0, …, q^{n-1} ([CV07], Lemma 6.7 proof, p. 146).

theorem Cslib.GameTheory.Market.IsWeakGrossSubstitutes.expenditure_nonneg_of_isWalrasianEquilibrium {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) :
0 ≤ expenditure pHat (Z p)

In any WGS excess-demand system satisfying homogeneity and Walras's law, every positive equilibrium pHat and every positive price vector p satisfy 0 ≤ expenditure pHat (Z p) ([CV07], Equation (6.6), p. 146).

theorem Cslib.GameTheory.Market.IsWeakGrossSubstitutes.expenditure_pos_of_not_isWalrasianEquilibrium {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) (hnot : ¬IsWalrasianEquilibrium Z p) :
0 < expenditure pHat (Z p)

Arrow–Block–Hurwicz / Arrow–Hurwicz Separating Hyperplane Theorem (Lemma 6.4) ([ABH59]; [AH60]; [CV07], Section 6.3, Lemma 6.4, pp. 142–143 and Section 6.7, p. 156): if Z satisfies degree-0 homogeneity, Walras's law, and weak gross substitutability, then for every positive Walrasian equilibrium pHat and every positive non-equilibrium price vector p, 0 < expenditure pHat (Z p).

theorem Cslib.GameTheory.Market.IsWeakGrossSubstitutes.expenditure_sub_pos_of_not_isWalrasianEquilibrium {G : Type u_1} [Fintype G] {Z : (G → ℝ) → G → ℝ} (hH : IsHomogeneousDegZero Z) (hW : SatisfiesWalrasLaw Z) (hWGS : IsWeakGrossSubstitutes Z) {pHat p : G → ℝ} (heq : IsWalrasianEquilibrium Z pHat) (hp : ∀ (g : G), 0 < p g) (hnot : ¬IsWalrasianEquilibrium Z p) :
0 < expenditure (pHat - p) (Z p)

Continuous-tâtonnement acute-angle corollary ([CV07], Section 6.3.1, p. 143): at any positive non-equilibrium price p, the excess-demand direction Z p has strictly positive inner product with pHat - p, so the Lyapunov derivative d/dt (1/2 ‖p - pHat‖_2^2) = (p - pHat) · Z(p) = - pHat · Z(p) < 0 is strictly negative.

NRTV Exercise 6.3 ([CV07], Section 6.3, p. 143 and Exercise 6.3, p. 158): under degree-0 homogeneity, Walras's law, and weak gross substitutability, the set of positive Walrasian equilibrium price vectors {p | IsWalrasianEquilibrium Z p} is convex.

Cobb–Douglas utilities, Marshallian demand, and LP equilibrium characterization #

noncomputable def Cslib.GameTheory.Market.cobbDouglasUtility {G : Type u_1} [Fintype G] (α b : G → ℝ) :

Cobb–Douglas utility function ∏ g, (b g) ^ (α g) ([CV07], Section 6.1.5, p. 139).

theorem Cslib.GameTheory.Market.cobbDouglasUtility_eq_prod {G : Type u_1} [Fintype G] (α b : G → ℝ) :
cobbDouglasUtility α b = ∏ g : G, b g ^ α g
theorem Cslib.GameTheory.Market.cobbDouglasUtility_nonneg {G : Type u_1} [Fintype G] {α b : G → ℝ} (hb : ∀ (g : G), 0 ≤ b g) :
theorem Cslib.GameTheory.Market.cobbDouglasUtility_smul {G : Type u_1} [Fintype G] {α b : G → ℝ} (hα_sum : ∑ g : G, α g = 1) (hb : ∀ (g : G), 0 ≤ b g) {c : ℝ} (hc : 0 < c) :

Homogeneous-of-degree-1 scaling of Cobb–Douglas utility when ∑ g, α g = 1 ([CV07], Section 6.1.5, p. 139).

noncomputable def Cslib.GameTheory.Market.cobbDouglasDemand {G : Type u_1} (α p : G → ℝ) (m : ℝ) (g : G) :

Explicit Cobb–Douglas Marshallian demand α g * m / p g ([CV07], Section 6.1.5, p. 139; Exercise 6.1, p. 158): a Cobb–Douglas consumer spends fraction α g of budget m on good g.

@[simp]
theorem Cslib.GameTheory.Market.cobbDouglasDemand_apply {G : Type u_1} (α p : G → ℝ) (m : ℝ) (g : G) :
cobbDouglasDemand α p m g = α g * m / p g
theorem Cslib.GameTheory.Market.expenditure_cobbDouglasDemand {G : Type u_1} [Fintype G] {α p : G → ℝ} (hα_sum : ∑ g : G, α g = 1) (hp : ∀ (g : G), 0 < p g) (m : ℝ) :
theorem Cslib.GameTheory.Market.IsBudgetFeasible.eq_zero_of_zero {G : Type u_1} [Fintype G] {p b : G → ℝ} (hp : ∀ (g : G), 0 < p g) (hb : IsBudgetFeasible p 0 b) :
b = 0

At strictly positive prices, 0 is the unique bundle budget-feasible within income 0.

theorem Cslib.GameTheory.Market.cobbDouglasDemand_mem_demandSet {G : Type u_1} [Fintype G] {α p : G → ℝ} {m : ℝ} (hα_nn : ∀ (g : G), 0 ≤ α g) (hα_sum : ∑ g : G, α g = 1) (hp : ∀ (g : G), 0 < p g) (hm : 0 ≤ m) :

NRTV Exercise 6.1 (Cobb–Douglas optimality) ([CV07], p. 158): for nonnegative exponents α summing to 1, strictly positive prices p > 0, and budget m ≥ 0, cobbDouglasDemand α p m belongs to demandSet (cobbDouglasUtility α) p m.

theorem Cslib.GameTheory.Market.demandSet_cobbDouglasUtility_eq {G : Type u_1} [Fintype G] {α p : G → ℝ} {m : ℝ} (hα_pos : ∀ (g : G), 0 < α g) (hα_sum : ∑ g : G, α g = 1) (hp : ∀ (g : G), 0 < p g) (hm : 0 ≤ m) :

Strict uniqueness of Cobb–Douglas Marshallian demand ([CV07], Section 6.1.5, p. 139; Exercise 6.1, p. 158): when every exponent α g is strictly positive, cobbDouglasDemand α p m is the unique optimal bundle in demandSet (cobbDouglasUtility α) p m.

theorem Cslib.GameTheory.Market.isWeakGrossSubstitutes_cobbDouglasExcessDemand {G : Type u_1} [Fintype G] {α w : G → ℝ} (hα_nn : ∀ (g : G), 0 ≤ α g) (hw_nn : ∀ (g : G), 0 ≤ w g) :
IsWeakGrossSubstitutes fun (p : G → ℝ) (g : G) => cobbDouglasDemand α p (expenditure p w) g - w g

Individual excess demand of a Cobb–Douglas trader with endowment w ≥ 0 and weights α ≥ 0 satisfies weak gross substitutability.

structure Cslib.GameTheory.Market.CobbDouglasExchangeMarket (I : Type u_2) (G : Type u_3) [Fintype G] :
Type (max u_2 u_3)

A Cobb–Douglas Arrow–Debreu exchange economy ([CV07], Section 6.1.5, p. 139; Exercise 6.2, p. 158): each trader i : I has nonnegative endowment endowment i and nonnegative Cobb–Douglas expenditure shares weight i summing to 1.

  • endowment : I → G → ℝ

    Initial endowment endowment i g of good g held by trader i.

  • weight : I → G → ℝ

    Expenditure-share exponent weight i g placed by trader i on good g.

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

    Initial endowments are nonnegative.

  • weight_nonneg (i : I) (g : G) : 0 ≤ self.weight i g

    Expenditure shares are nonnegative.

  • sum_weight (i : I) : ∑ g : G, self.weight i g = 1

    Each trader's expenditure shares sum to 1.

View E as an ExchangeMarket I G with cobbDouglasUtility (E.weight i).

noncomputable def Cslib.GameTheory.Market.CobbDouglasExchangeMarket.excessDemandFn {G : Type u_1} [Fintype G] {I : Type u_2} [Fintype I] (E : CobbDouglasExchangeMarket I G) (p : G → ℝ) (g : G) :

Single-valued aggregate excess-demand function Z(p)_g = ∑_i α_{ig} (p · w_i) / p_g - W_g of Cobb–Douglas exchange economy E.

theorem Cslib.GameTheory.Market.CobbDouglasExchangeMarket.isGrossSubstitutes_excessDemandFn {G : Type u_1} [Fintype G] {I : Type u_2} [Fintype I] (E : CobbDouglasExchangeMarket I G) (hconn : ∀ (g j : G), j ≠ g → ∃ (i : I), 0 < E.weight i g ∧ 0 < E.endowment i j) :

If for every pair of distinct goods j ≠ g some trader holds a positive endowment of j and puts positive Cobb–Douglas weight on g, then E.excessDemandFn satisfies strict gross substitutability (and hence has a unique positive equilibrium price ray).

NRTV Exercise 6.2 ([CV07], p. 158): strictly positive prices p > 0 form a Walrasian equilibrium of Cobb–Douglas exchange economy E if and only if p satisfies the |G| homogeneous linear inequalities ∑ i, E.weight i g * expenditure p (E.endowment i) ≤ p g * E.toExchangeMarket.totalSupply g (equivalently, exact linear equalities, by Walras's law).

Any positive Walrasian equilibrium p of E.excessDemandFn induces a full competitive equilibrium (x, p) of E.toExchangeMarket at x i = cobbDouglasDemand (E.weight i) p (income p i).

Constant-elasticity-of-substitution (CES) utilities and demand formula (6.7) #

noncomputable def Cslib.GameTheory.Market.cesUtility {G : Type u_1} [Fintype G] (α : G → ℝ) (ρ : ℝ) (b : G → ℝ) :

Constant-elasticity-of-substitution (CES) utility function ([CV07], Section 6.1.5, p. 139 and Section 6.4.2, p. 149): for ρ < 0, cesUtility α ρ b = 0 whenever some coordinate b g ≤ 0 (ensuring continuity on ℝ_+^G); otherwise (∑ g, α g * (b g) ^ ρ) ^ (1 / ρ).

theorem Cslib.GameTheory.Market.cesUtility_of_pos_exp {G : Type u_1} [Fintype G] {α : G → ℝ} {ρ : ℝ} (hρ : 0 < ρ) (b : G → ℝ) :
cesUtility α ρ b = (∑ g : G, α g * b g ^ ρ) ^ (1 / ρ)
theorem Cslib.GameTheory.Market.cesUtility_of_bundle_pos {G : Type u_1} [Fintype G] (α : G → ℝ) (ρ : ℝ) {b : G → ℝ} (hb : ∀ (g : G), 0 < b g) :
cesUtility α ρ b = (∑ g : G, α g * b g ^ ρ) ^ (1 / ρ)
theorem Cslib.GameTheory.Market.cesUtility_of_neg_of_exists_nonpos {G : Type u_1} [Fintype G] (α : G → ℝ) {ρ : ℝ} (hρ : ρ < 0) {b : G → ℝ} (hb : ∃ (g : G), b g ≤ 0) :
cesUtility α ρ b = 0
theorem Cslib.GameTheory.Market.cesUtility_nonneg {G : Type u_1} [Fintype G] {α b : G → ℝ} (hα : ∀ (g : G), 0 ≤ α g) (ρ : ℝ) (hb : ∀ (g : G), 0 ≤ b g) :
0 ≤ cesUtility α ρ b
noncomputable def Cslib.GameTheory.Market.cesDemand {G : Type u_1} [Fintype G] (α : G → ℝ) (ρ : ℝ) (p : G → ℝ) (m : ℝ) (g : G) :

Explicit CES Marshallian demand formula (6.7) ([CV07], Section 6.4.2, p. 149; Exercise 6.1, p. 158): x_g(p, m) = (α_g / p_g)^{1 / (1 - ρ)} * m / ∑_k α_k^{1 / (1 - ρ)} p_k^{- ρ / (1 - ρ)}.

@[simp]
theorem Cslib.GameTheory.Market.cesDemand_apply {G : Type u_1} [Fintype G] (α : G → ℝ) (ρ : ℝ) (p : G → ℝ) (m : ℝ) (g : G) :
cesDemand α ρ p m g = α g ^ (1 / (1 - ρ)) / p g ^ (1 / (1 - ρ)) * (m / ∑ k : G, α k ^ (1 / (1 - ρ)) * p k ^ (-ρ / (1 - ρ)))
theorem Cslib.GameTheory.Market.expenditure_cesDemand {G : Type u_1} [Fintype G] [Nonempty G] {α p : G → ℝ} {ρ : ℝ} (hα : ∀ (g : G), 0 < α g) (hρ_lt : ρ < 1) (hp : ∀ (g : G), 0 < p g) (m : ℝ) :
expenditure p (cesDemand α ρ p m) = m
theorem Cslib.GameTheory.Market.cesDemand_mem_demandSet {G : Type u_1} [Fintype G] [Nonempty G] {α p : G → ℝ} {ρ m : ℝ} (hα : ∀ (g : G), 0 < α g) (hρ_lt : ρ < 1) (hρ_ne : ρ ≠ 0) (hp : ∀ (g : G), 0 < p g) (hm : 0 ≤ m) :
cesDemand α ρ p m ∈ demandSet (cesUtility α ρ) p m

NRTV Exercise 6.1 (CES demand optimality, Equation (6.7)) ([CV07], Section 6.4.2, p. 149 and Exercise 6.1, p. 158): for strictly positive utility weights α > 0, exponent ρ < 1 with ρ ≠ 0, strictly positive prices p > 0, and budget m ≥ 0, the closed-form vector cesDemand α ρ p m belongs to demandSet (cesUtility α ρ) p m.

theorem Cslib.GameTheory.Market.isWeakGrossSubstitutes_cesExcessDemand {G : Type u_1} [Fintype G] [Nonempty G] {α w : G → ℝ} {ρ : ℝ} (hα : ∀ (g : G), 0 < α g) (hw : ∀ (g : G), 0 ≤ w g) (hρ0 : 0 < ρ) (hρ1 : ρ < 1) :
IsWeakGrossSubstitutes fun (p : G → ℝ) (g : G) => cesDemand α ρ p (expenditure p w) g - w g

In the substitutes CES regime 0 < ρ < 1 ([CV07], Section 6.1.5, p. 139), the individual excess demand p ↦ cesDemand α ρ p (expenditure p w) - w of a CES trader with α > 0 and endowment w ≥ 0 satisfies weak gross substitutability.