Drug-market vertical network: primitives
Definitiondrug_market_modelPrimitives of the vertically related illegal drug market (Nogueira Júnior 2019, ch. 3). Consumers are uniformly distributed on with unit demand; the two retail points of sale sit at the endpoints (, ). A consumer at gets utility , where is the retail price, the transport cost, and the disutility from total violence (retail violence and police repression ), which is a non-rival, non-excludable bad and therefore cancels in the choice between outlets. Hotelling demands are and . The police succeed against retailer with probability and against wholesaler with probability , where measures repression effectiveness; a caught agent pays cost . Retailer 's expected profit is , with the wholesale price. Wholesaler 's expected profit is , with constant marginal cost and demand evaluated at the retail price equilibrium. All functions are total on ; the economic parameter regime is imposed as hypotheses in the theorems.
import Mathlib
noncomputable section
namespace DrugMarket
/-- Consumer utility at point of sale `a = 0` (eq. 3.2, with `a = 0`). -/
def utilA (u z t p_a v_a v_b v_r x : ℝ) : ℝ :=
u - p_a - t * |x| - z * (v_a + v_b + v_r)
/-- Consumer utility at point of sale `1 - b = 1` (eq. 3.3, with `b = 0`). -/
def utilB (u z t p_b v_a v_b v_r x : ℝ) : ℝ :=
u - p_b - t * |1 - x| - z * (v_a + v_b + v_r)
/-- Hotelling demand of retailer A (eq. 3.7, `a = b = 0`). -/
def demandA (t p_a p_b : ℝ) : ℝ := (1 : ℝ) / 2 + (p_b - p_a) / (2 * t)
/-- Hotelling demand of retailer B (eq. 3.7, `a = b = 0`). -/
def demandB (t p_a p_b : ℝ) : ℝ := (1 : ℝ) / 2 + (p_a - p_b) / (2 * t)
/-- Probability the police succeed against retailer i: `q ^ (v_i / v_r)` (§3.4). -/
def catchRetail (q v_r v_i : ℝ) : ℝ := Real.rpow q (v_i / v_r)
/-- Probability the police succeed against wholesaler i: `q ^ (1 / v_ri)` (§3.7.1). -/
def catchWholesale (q v_ri : ℝ) : ℝ := Real.rpow q (1 / v_ri)
/-- Retailer A expected profit (eq. 3.13 / 3.15). -/
def retailProfitA (q s t v_r w_a p_a p_b v_a : ℝ) : ℝ :=
(1 - catchRetail q v_r v_a) * (p_a - w_a) * demandA t p_a p_b
- s * catchRetail q v_r v_a - v_a
/-- Retailer B expected profit (eq. 3.14 / 3.16). -/
def retailProfitB (q s t v_r w_b p_a p_b v_b : ℝ) : ℝ :=
(1 - catchRetail q v_r v_b) * (p_b - w_b) * demandB t p_a p_b
- s * catchRetail q v_r v_b - v_b
/-- Demand faced by wholesaler A at the retail price equilibrium (eq. 3.23 / 3.44). -/
def wholesaleDemandA (t w_a w_b : ℝ) : ℝ := (1 : ℝ) / 2 + (w_b - w_a) / (6 * t)
/-- Demand faced by wholesaler B at the retail price equilibrium (eq. 3.24 / 3.45). -/
def wholesaleDemandB (t w_a w_b : ℝ) : ℝ := (1 : ℝ) / 2 + (w_a - w_b) / (6 * t)
/-- Wholesaler A expected profit (eq. 3.42 / 3.44). -/
def wholesaleProfitA (q s t c v_ra w_a w_b : ℝ) : ℝ :=
(1 - catchWholesale q v_ra) * (w_a - c) * wholesaleDemandA t w_a w_b
- s * wholesaleDemandA t w_a w_b * catchWholesale q v_ra
/-- Wholesaler B expected profit (eq. 3.43 / 3.45, with the cost-term index `v_rb`
as in the first-order condition (3.47)). -/
def wholesaleProfitB (q s t c v_rb w_a w_b : ℝ) : ℝ :=
(1 - catchWholesale q v_rb) * (w_b - c) * wholesaleDemandB t w_a w_b
- s * wholesaleDemandB t w_a w_b * catchWholesale q v_rb
/-- Retailer A's objective as a function of its own violence, at fixed gross profit
`g = (p_a - w_a) D_a` (eq. 3.26). -/
def retailViolenceObjective (q s v_r g v : ℝ) : ℝ :=
(1 - catchRetail q v_r v) * g - s * catchRetail q v_r v - v
end DrugMarket
end
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.