Documentation

CslibFrontier.GameTheory.Contract.CombinatorialAgency

Combinatorial agency, contracts, and the Price of Unaccountability #

This module formalizes the combinatorial principal-agent (moral-hazard in teams) framework from [BCF07] (NRTV Chapter 23, Section 23.6, pp. 602–607, and Exercises 23.3–23.4 and 23.6, pp. 610–611):

References #

def Cslib.GameTheory.Contract.marginalContrib {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (i : ι) (a : ι → Bool) :

Marginal contribution (Δ_i(a_{-i}), [BCF07], Definition 23.3, p. 604) of agent i under production technology t given the opponents' actions in a: t(1, a_{-i}) - t(0, a_{-i}).

theorem Cslib.GameTheory.Contract.marginalContrib_eq {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (i : ι) (a : ι → Bool) :
theorem Cslib.GameTheory.Contract.marginalContrib_update {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (i : ι) (a : ι → Bool) (b : Bool) :

A production technology t : (ι → Bool) → ℝ is strictly monotone if strictly raising at least one agent's effort strictly increases the success probability.

theorem Cslib.GameTheory.Contract.IsStrictlyMonotone.le_of_le {ι : Type u_1} {t : (ι → Bool) → ℝ} (ht : IsStrictlyMonotone t) {a b : ι → Bool} (h : ∀ (i : ι), a i = true → b i = true) :
t a ≤ t b
theorem Cslib.GameTheory.Contract.isStrictlyMonotone_iff_marginalContrib_pos {ι : Type u_1} [DecidableEq ι] [Finite ι] (t : (ι → Bool) → ℝ) :
IsStrictlyMonotone t ↔ ∀ (i : ι) (a : ι → Bool), 0 < marginalContrib t i a

A Boolean-action technology is strictly monotone iff every agent has strictly positive marginal contribution everywhere.

def Cslib.GameTheory.Contract.contractCostGame {ι : Type u_1} (t : (ι → Bool) → ℝ) (c p : ι → ℝ) :
CostGame ι fun (x : ι) => Bool

The normal-form strategic game (in cost-minimization form) induced by production technology t, effort costs c, and limited-liability success payments p: agent i minimizes c_i a_i - p_i t(a).

@[simp]
theorem Cslib.GameTheory.Contract.contractCostGame_cost {ι : Type u_1} (t : (ι → Bool) → ℝ) (c p : ι → ℝ) (i : ι) (a : ι → Bool) :
(contractCostGame t c p).cost i a = (if a i = true then c i else 0) - p i * t a
theorem Cslib.GameTheory.Contract.bestResponse_true_iff {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c p : ι → ℝ) {i : ι} {a : ι → Bool} (hΔ : 0 < marginalContrib t i a) :

Best-response effort threshold ([BCF07], Claim 23.4, p. 605): exerting effort (true) is weakly optimal for agent i given a_{-i} iff p_i ≥ c_i / Δ_i(a_{-i}).

theorem Cslib.GameTheory.Contract.bestResponse_false_iff {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c p : ι → ℝ) {i : ι} {a : ι → Bool} (hΔ : 0 < marginalContrib t i a) :

Best-response shirking threshold ([BCF07], Claim 23.4, p. 605): shirking (false) is weakly optimal for agent i given a_{-i} iff p_i ≤ c_i / Δ_i(a_{-i}).

theorem Cslib.GameTheory.Contract.isPureNash_iff_marginalContrib {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c p : ι → ℝ) (a : ι → Bool) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) :
(contractCostGame t c p).IsPureNash a ↔ ∀ (i : ι), (a i = true → c i / marginalContrib t i a ≤ p i) ∧ (a i = false → p i ≤ c i / marginalContrib t i a)

Characterization of pure Nash equilibria in contractCostGame t c p.

noncomputable def Cslib.GameTheory.Contract.optContract {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (i : ι) :

Minimal limited-liability success-payment contract inducing profile a: pays c_i / Δ_i(a_{-i}) to agents with a_i = true and 0 otherwise.

theorem Cslib.GameTheory.Contract.optContract_eq {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (i : ι) :
optContract t c a i = if a i = true then c i / marginalContrib t i a else 0
@[simp]
theorem Cslib.GameTheory.Contract.optContract_of_true {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) {a : ι → Bool} {i : ι} (h : a i = true) :
optContract t c a i = c i / marginalContrib t i a
@[simp]
theorem Cslib.GameTheory.Contract.optContract_of_false {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) {a : ι → Bool} {i : ι} (h : a i = false) :
optContract t c a i = 0
noncomputable def Cslib.GameTheory.Contract.optPayment {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) :

Expected total payment made by the principal under the optimal inducing contract optContract t c a: t(a) * ∑ i, optContract t c a i.

theorem Cslib.GameTheory.Contract.optPayment_eq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) :
optPayment t c a = t a * ∑ i : ι, optContract t c a i
theorem Cslib.GameTheory.Contract.optPayment_false {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) :
(optPayment t c fun (x : ι) => false) = 0
theorem Cslib.GameTheory.Contract.isPureNash_optContract {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) (hc : ∀ (i : ι), 0 ≤ c i) :

The minimal contract optContract t c a implements a as a pure Nash equilibrium.

theorem Cslib.GameTheory.Contract.optContract_le_of_isPureNash {ι : Type u_1} [DecidableEq ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) {p : ι → ℝ} (hp : ∀ (i : ι), 0 ≤ p i) (hnash : (contractCostGame t c p).IsPureNash a) (i : ι) :
optContract t c a i ≤ p i

Optimality of optContract t c a: any nonnegative success-payment contract p under which a is a pure Nash equilibrium of contractCostGame t c p pays at least optContract t c a i to every agent.

theorem Cslib.GameTheory.Contract.optPayment_le_of_isPureNash {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) (ht0 : 0 ≤ t a) {p : ι → ℝ} (hp : ∀ (i : ι), 0 ≤ p i) (hnash : (contractCostGame t c p).IsPureNash a) :
optPayment t c a ≤ t a * ∑ i : ι, p i

Any nonnegative success-payment contract p implementing a as a pure Nash equilibrium has expected payment at least optPayment t c a.

theorem Cslib.GameTheory.Contract.optPayment_le_of_limitedLiability {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) (ht0 : 0 ≤ t a) (ht1 : t a ≤ 1) {p q : ι → ℝ} (hp : ∀ (i : ι), 0 ≤ p i) (hq : ∀ (i : ι), 0 ≤ q i) (hnash : ∀ (i : ι) (b : Bool), (if a i = true then c i else 0) - (p i * t a + q i * (1 - t a)) ≤ (if b = true then c i else 0) - (p i * t (Function.update a i b) + q i * (1 - t (Function.update a i b)))) :
optPayment t c a ≤ t a * ∑ i : ι, p i + (1 - t a) * ∑ i : ι, q i

Optimality under two-outcome limited liability ([BCF07], Claim 23.5, p. 605): any limited-liability contract (p, q) (0 ≤ p, 0 ≤ q on success and failure) under which a is a pure Nash equilibrium incurs expected total payment at least optPayment t c a.

theorem Cslib.GameTheory.Contract.isStrongEquilibrium_optContract {ι : Type u_1} [DecidableEq ι] [Finite ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (ht : IsStrictlyMonotone t) (hc : ∀ (i : ι), 0 ≤ c i) :

Under any strictly monotone technology t and nonnegative costs c, the optimal contract optContract t c a implements a as a strong equilibrium (no nonempty coalition can strictly improve every member; [BCF07], Exercise 23.6, p. 611).

theorem Cslib.GameTheory.Contract.isStrongNash_optContract {ι : Type u_1} [DecidableEq ι] [Finite ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (ht : IsStrictlyMonotone t) (hc : ∀ (i : ι), 0 < c i) :

Under strictly positive effort costs 0 < c i, optContract t c a implements a as a strong Nash equilibrium (no coalition can weakly improve all members and strictly improve one, strengthening [BCF07], Exercise 23.6, p. 611). Notice strict positivity is necessary: with c j = 0, an agent with a j = false can weakly profitably raise a_j to help a coalitional partner.

def Cslib.GameTheory.Contract.profileWelfare {ι : Type u_1} [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :

Social welfare of effort profile a under full information when project success yields v and agent costs are c: t(a) * v - ∑_{a_i} c_i.

theorem Cslib.GameTheory.Contract.profileWelfare_eq {ι : Type u_1} [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :
profileWelfare t c a v = t a * v - ∑ i : ι, if a i = true then c i else 0
noncomputable def Cslib.GameTheory.Contract.firstBestWelfare {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (v : ℝ) :

First-best social welfare (SW_ns(v)): maximum achievable total welfare without moral hazard, max_{a} (t(a) * v - ∑_{a_i} c_i).

theorem Cslib.GameTheory.Contract.firstBestWelfare_eq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (v : ℝ) :
firstBestWelfare t c v = Finset.univ.sup' ⋯ fun (a : ι → Bool) => profileWelfare t c a v
noncomputable def Cslib.GameTheory.Contract.principalUtility {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :

Expected utility of the principal when inducing profile a via optContract t c a: t(a) * v - optPayment t c a.

theorem Cslib.GameTheory.Contract.principalUtility_eq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :
principalUtility t c a v = t a * v - optPayment t c a
noncomputable def Cslib.GameTheory.Contract.agencyPrincipalUtility {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (v : ℝ) :

Hidden-action optimal principal utility (U_ag(v)): maximum of principalUtility t c a v = t(a) * v - optPayment t c a over action profiles a. Under the §23.6.1 assumptions IsStrictlyMonotone t (∀ i a, 0 < marginalContrib t i a), 0 ≤ t a ≤ 1, and ∀ i, 0 ≤ c i, every profile a is pure-Nash implementable via optContract t c a (isPureNash_optContract) and no limited-liability contract implementing a achieves smaller expected payment (optPayment_le_of_limitedLiability), so this equals the maximum expected principal utility over all Nash-implementable limited-liability contracts.

theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_eq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (v : ℝ) :
agencyPrincipalUtility t c v = Finset.univ.sup' ⋯ fun (a : ι → Bool) => principalUtility t c a v
theorem Cslib.GameTheory.Contract.profileWelfare_le_firstBestWelfare {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :
theorem Cslib.GameTheory.Contract.principalUtility_le_agencyPrincipalUtility {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (v : ℝ) :
theorem Cslib.GameTheory.Contract.sum_costs_le_optPayment {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (a : ι → Bool) (ht0 : ∀ (s : ι → Bool), 0 ≤ t s) (hΔ : ∀ (i : ι), 0 < marginalContrib t i a) (hc : ∀ (i : ι), 0 ≤ c i) :
(∑ i : ι, if a i = true then c i else 0) ≤ optPayment t c a
theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_le_firstBestWelfare {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (ht0 : ∀ (s : ι → Bool), 0 ≤ t s) (hΔ : ∀ (i : ι) (s : ι → Bool), 0 < marginalContrib t i s) (hc : ∀ (i : ι), 0 ≤ c i) (v : ℝ) :
theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_pos {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (htpos : ∀ (s : ι → Bool), 0 < t s) {v : ℝ} (hv : 0 < v) :
theorem Cslib.GameTheory.Contract.firstBestWelfare_mono {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (ht0 : ∀ (s : ι → Bool), 0 ≤ t s) {v₁ v₂ : ℝ} (hv : v₁ ≤ v₂) :
theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_mono {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (ht0 : ∀ (s : ι → Bool), 0 ≤ t s) {v₁ v₂ : ℝ} (hv : v₁ ≤ v₂) :
theorem Cslib.GameTheory.Contract.monotonicity_firstBest {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) {v₁ v₂ : ℝ} {a₁ a₂ : ι → Bool} (h₁ : profileWelfare t c a₁ v₁ = firstBestWelfare t c v₁) (h₂ : profileWelfare t c a₂ v₂ = firstBestWelfare t c v₂) (hv₀ : 0 ≤ v₁) (hv : v₁ < v₂) :
t a₁ ≤ t a₂ ∧ (∑ i : ι, if a₁ i = true then c i else 0) ≤ ∑ i : ι, if a₂ i = true then c i else 0

Monotonicity Lemma for first-best welfare ([BCF07], Lemma 23.7, p. 606): as the principal's value v strictly increases (0 ≤ v₁ < v₂), any sequence of optimal profiles has nondecreasing success probability t(a₁) ≤ t(a₂) and nondecreasing effort cost.

theorem Cslib.GameTheory.Contract.monotonicity_agency {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) {v₁ v₂ : ℝ} {a₁ a₂ : ι → Bool} (h₁ : principalUtility t c a₁ v₁ = agencyPrincipalUtility t c v₁) (h₂ : principalUtility t c a₂ v₂ = agencyPrincipalUtility t c v₂) (hv₀ : 0 ≤ v₁) (hv : v₁ < v₂) :
t a₁ ≤ t a₂ ∧ optPayment t c a₁ ≤ optPayment t c a₂

Monotonicity Lemma for hidden-action principal utility ([BCF07], Lemma 23.7, p. 606): as the principal's value v strictly increases (0 ≤ v₁ < v₂), optimal contracts achieve nondecreasing success probability t(a₁) ≤ t(a₂) and incur nondecreasing expected payment optPayment.

noncomputable def Cslib.GameTheory.Contract.priceOfUnaccountability {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) :

Price of Unaccountability (POU(t, c), [BCF07], Definition 23.6, pp. 605–606): worst-case ratio sup_{v > 0} SW_ns(v) / U_ag(v) measuring welfare loss from hidden action under limited liability.

theorem Cslib.GameTheory.Contract.priceOfUnaccountability_eq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) :
priceOfUnaccountability t c = ⨆ (v : { v : ℝ // 0 < v }), firstBestWelfare t c ↑v / agencyPrincipalUtility t c ↑v
theorem Cslib.GameTheory.Contract.bddAbove_pou_range {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (htpos : ∀ (s : ι → Bool), 0 < t s) (hc : ∀ (i : ι), 0 ≤ c i) :
BddAbove (Set.range fun (v : { v : ℝ // 0 < v }) => firstBestWelfare t c ↑v / agencyPrincipalUtility t c ↑v)
theorem Cslib.GameTheory.Contract.le_priceOfUnaccountability {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (htpos : ∀ (s : ι → Bool), 0 < t s) (hc : ∀ (i : ι), 0 ≤ c i) {v : ℝ} (hv : 0 < v) :
theorem Cslib.GameTheory.Contract.priceOfUnaccountability_le_iff {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (htpos : ∀ (s : ι → Bool), 0 < t s) (hc : ∀ (i : ι), 0 ≤ c i) {B : ℝ} :
theorem Cslib.GameTheory.Contract.one_le_priceOfUnaccountability {ι : Type u_1} [DecidableEq ι] [Fintype ι] (t : (ι → Bool) → ℝ) (c : ι → ℝ) (htpos : ∀ (s : ι → Bool), 0 < t s) (hΔ : ∀ (i : ι) (s : ι → Bool), 0 < marginalContrib t i s) (hc : ∀ (i : ι), 0 ≤ c i) :

Number of agents exerting effort (true) in profile a.

theorem Cslib.GameTheory.Contract.countTrue_eq {n : ℕ} (a : Fin n → Bool) :
countTrue a = {i : Fin n | a i = true}.card
theorem Cslib.GameTheory.Contract.exists_profile_countTrue {n k : ℕ} (hk : k ≤ n) :
∃ (a : Fin n → Bool), countTrue a = k
theorem Cslib.GameTheory.Contract.countTrue_pos_of_true {n : ℕ} {a : Fin n → Bool} {i : Fin n} (hai : a i = true) :
noncomputable def Cslib.GameTheory.Contract.anonOptPayment (f : ℕ → ℝ) (c : ℝ) (k : ℕ) :

Minimal expected payment under an anonymous technology t(a) = f (countTrue a) and uniform effort cost c as a function of team size k.

theorem Cslib.GameTheory.Contract.anonOptPayment_eq (f : ℕ → ℝ) (c : ℝ) (k : ℕ) :
anonOptPayment f c k = if k = 0 then 0 else ↑k * c * f k / (f k - f (k - 1))
@[simp]
theorem Cslib.GameTheory.Contract.anonOptPayment_succ (f : ℕ → ℝ) (c : ℝ) (k : ℕ) :
anonOptPayment f c (k + 1) = ↑(k + 1) * c * f (k + 1) / (f (k + 1) - f k)
theorem Cslib.GameTheory.Contract.anon_marginalContrib {n : ℕ} {t : (Fin n → Bool) → ℝ} {f : ℕ → ℝ} (ht : ∀ (a : Fin n → Bool), t a = f (countTrue a)) {a : Fin n → Bool} {i : Fin n} (hai : a i = true) :
marginalContrib t i a = f (countTrue a) - f (countTrue a - 1)
theorem Cslib.GameTheory.Contract.anon_sum_costs {n : ℕ} (c : ℝ) (a : Fin n → Bool) :
(∑ i : Fin n, if a i = true then c else 0) = ↑(countTrue a) * c
theorem Cslib.GameTheory.Contract.anon_optPayment {n : ℕ} {t : (Fin n → Bool) → ℝ} {f : ℕ → ℝ} (ht : ∀ (a : Fin n → Bool), t a = f (countTrue a)) (c : ℝ) (a : Fin n → Bool) :
optPayment t (fun (x : Fin n) => c) a = anonOptPayment f c (countTrue a)
theorem Cslib.GameTheory.Contract.firstBestWelfare_anon {n : ℕ} {t : (Fin n → Bool) → ℝ} {f : ℕ → ℝ} (ht : ∀ (a : Fin n → Bool), t a = f (countTrue a)) (c v : ℝ) :
firstBestWelfare t (fun (x : Fin n) => c) v = (Finset.range (n + 1)).sup' ⋯ fun (k : ℕ) => f k * v - ↑k * c
theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_anon {n : ℕ} {t : (Fin n → Bool) → ℝ} {f : ℕ → ℝ} (ht : ∀ (a : Fin n → Bool), t a = f (countTrue a)) (c v : ℝ) :
agencyPrincipalUtility t (fun (x : Fin n) => c) v = (Finset.range (n + 1)).sup' ⋯ fun (k : ℕ) => f k * v - anonOptPayment f c k
theorem Cslib.GameTheory.Contract.strictly_decreasing_slope_skips {n : ℕ} (hn : 1 ≤ n) (f cost : ℕ → ℝ) (hf : ∀ k < n, f k < f (k + 1)) (hslope : ∀ (k : ℕ), 0 < k → k < n → (cost (k + 1) - cost k) / (f (k + 1) - f k) < (cost k - cost (k - 1)) / (f k - f (k - 1))) (v : ℝ) :
((Finset.range (n + 1)).sup' ⋯ fun (k : ℕ) => f k * v - cost k) = max (f 0 * v - cost 0) (f n * v - cost n) ∧ ∀ (k : ℕ), 0 < k → k < n → f k * v - cost k < max (f (k - 1) * v - cost (k - 1)) (f (k + 1) * v - cost (k + 1))

General slope-monotonicity criterion (skipping case, used for the AND single-transition proof of [BCF07], Theorem 23.8, p. 606 and Exercise 23.3, p. 610): if f is strictly increasing on 0..n and marginal cost per marginal success probability strictly decreases around every interior team size 0 < k < n, then no interior size k ever strictly maximizes f k * v - cost k, and the supremum reduces to max (f 0 * v - cost 0) (f n * v - cost n).

theorem Cslib.GameTheory.Contract.strictly_increasing_slope_attains_all {n : ℕ} (hn : 1 ≤ n) (f cost : ℕ → ℝ) (hf : ∀ k < n, f k < f (k + 1)) (hs₀ : 0 < (cost 1 - cost 0) / (f 1 - f 0)) (hslope : ∀ (k : ℕ), k + 1 < n → (cost (k + 1) - cost k) / (f (k + 1) - f k) < (cost (k + 2) - cost (k + 1)) / (f (k + 2) - f (k + 1))) (k : ℕ) :
k ≤ n → ∃ (v : ℝ), 0 < v ∧ ∀ j ≤ n, j ≠ k → f j * v - cost j < f k * v - cost k

General slope-monotonicity criterion (stepping case, used for the OR all-transitions proof of [BCF07], Theorem 23.9, p. 607 and Exercise 23.4, p. 610): if f is strictly increasing on 0..n and marginal cost per marginal success probability strictly increases with each step (with positive initial slope), then every team size k ≤ n is uniquely optimal for some v > 0.

AND technology (Theorem 23.8, p. 606; Exercise 23.3, p. 610) #

Success probability as a function of k active agents in the noisy n-agent AND technology: (1 - γ) ^ k * γ ^ (n - k).

theorem Cslib.GameTheory.Contract.andProb_eq (n : ℕ) (γ : ℝ) (k : ℕ) :
andProb n γ k = (1 - γ) ^ k * γ ^ (n - k)
def Cslib.GameTheory.Contract.andTech (n : ℕ) (γ : ℝ) (a : Fin n → Bool) :

Noisy n-agent AND technology with parameter γ: each agent exerts effort with failure probability γ on effort and success probability γ on shirking, so all n signals must succeed with probability (1 - γ) ^ k * γ ^ (n - k).

theorem Cslib.GameTheory.Contract.andTech_eq (n : ℕ) (γ : ℝ) (a : Fin n → Bool) :
andTech n γ a = andProb n γ (countTrue a)
theorem Cslib.GameTheory.Contract.andProb_pos {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγ₁ : γ < 1) (k : ℕ) :
0 < andProb n γ k
theorem Cslib.GameTheory.Contract.andTech_pos {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγ₁ : γ < 1) (a : Fin n → Bool) :
0 < andTech n γ a
theorem Cslib.GameTheory.Contract.andProb_diff {n : ℕ} (γ : ℝ) {k : ℕ} (hk : k < n) :
andProb n γ (k + 1) - andProb n γ k = (1 - 2 * γ) * (1 - γ) ^ k * γ ^ (n - k - 1)
theorem Cslib.GameTheory.Contract.andProb_strictMono {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) {k : ℕ} (hk : k < n) :
andProb n γ k < andProb n γ (k + 1)
theorem Cslib.GameTheory.Contract.isStrictlyMonotone_andTech (n : ℕ) {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) :
theorem Cslib.GameTheory.Contract.and_anonOptPayment {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (c : ℝ) {k : ℕ} (hk : k ≤ n) :
anonOptPayment (andProb n γ) c k = ↑k * (c * (1 - γ) / (1 - 2 * γ))
noncomputable def Cslib.GameTheory.Contract.andThreshold (n : ℕ) (γ c : ℝ) :

Exact hidden-action value threshold at which the principal transitions directly from inducing 0 agents to inducing all n agents under andTech n γ ([BCF07], Theorem 23.8, p. 606).

theorem Cslib.GameTheory.Contract.andThreshold_eq (n : ℕ) (γ c : ℝ) :
andThreshold n γ c = ↑n * c * (1 - γ) / ((1 - 2 * γ) * ((1 - γ) ^ n - γ ^ n))
theorem Cslib.GameTheory.Contract.andThreshold_pos {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) :
0 < andThreshold n γ c
theorem Cslib.GameTheory.Contract.firstBestWelfare_andTech {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (v : ℝ) :
firstBestWelfare (andTech n γ) (fun (x : Fin n) => c) v = max (γ ^ n * v) ((1 - γ) ^ n * v - ↑n * c)
theorem Cslib.GameTheory.Contract.agencyPrincipalUtility_andTech {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (v : ℝ) :
agencyPrincipalUtility (andTech n γ) (fun (x : Fin n) => c) v = max (γ ^ n * v) ((1 - γ) ^ n * v - ↑n * (c * (1 - γ) / (1 - 2 * γ)))
theorem Cslib.GameTheory.Contract.andTech_skips_interior {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (v : ℝ) (k : ℕ) (hk0 : 0 < k) (hkn : k < n) :
andProb n γ k * v - ↑k * c < max (andProb n γ (k - 1) * v - ↑(k - 1) * c) (andProb n γ (k + 1) * v - ↑(k + 1) * c) ∧ andProb n γ k * v - anonOptPayment (andProb n γ) c k < max (andProb n γ (k - 1) * v - anonOptPayment (andProb n γ) c (k - 1)) (andProb n γ (k + 1) * v - anonOptPayment (andProb n γ) c (k + 1))

In the noisy AND technology, optimal team size jumps directly from 0 to n, skipping all intermediate cardinalities 0 < k < n in both first-best and hidden-action optima ([BCF07], Theorem 23.8, p. 606; Exercise 23.3, p. 610).

theorem Cslib.GameTheory.Contract.andTech_pou_eq {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) :
(priceOfUnaccountability (andTech n γ) fun (x : Fin n) => c) = (1 / γ - 1) ^ (n - 1) + (1 - γ / (1 - γ))

Price of Unaccountability for the noisy AND technology ([BCF07], Theorem 23.8, p. 606; Exercise 23.3, p. 610): POU(andTech n γ, c) = (1 / γ - 1) ^ (n - 1) + (1 - γ / (1 - γ)), attained at v = andThreshold n γ c.

theorem Cslib.GameTheory.Contract.andTech_pou_unbounded_in_n {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (B : ℝ) :
∃ n ≥ 1, B < priceOfUnaccountability (andTech n γ) fun (x : Fin n) => c

POU(andTech n γ, c) is unbounded in n for any fixed γ ∈ (0, 1 / 2) and c > 0 ([BCF07], Theorem 23.8, p. 606).

theorem Cslib.GameTheory.Contract.andTech_pou_unbounded_in_gamma {n : ℕ} (hn : 2 ≤ n) {c : ℝ} (hc : 0 < c) (B : ℝ) :
∃ (γ : ℝ), 0 < γ ∧ γ < 1 / 2 ∧ B < priceOfUnaccountability (andTech n γ) fun (x : Fin n) => c

POU(andTech n γ, c) is unbounded as γ → 0⁺ for any fixed n ≥ 2 and c > 0 ([BCF07], Theorem 23.8, p. 606).

OR technology (Theorem 23.9, p. 607; Exercise 23.4, p. 610) #

Success probability as a function of k active agents in the noisy n-agent OR technology: 1 - γ ^ k * (1 - γ) ^ (n - k).

theorem Cslib.GameTheory.Contract.orProb_eq (n : ℕ) (γ : ℝ) (k : ℕ) :
orProb n γ k = 1 - γ ^ k * (1 - γ) ^ (n - k)
def Cslib.GameTheory.Contract.orTech (n : ℕ) (γ : ℝ) (a : Fin n → Bool) :

Noisy n-agent OR technology with parameter γ: success occurs unless all n signals fail, yielding probability 1 - γ ^ k * (1 - γ) ^ (n - k).

theorem Cslib.GameTheory.Contract.orTech_eq (n : ℕ) (γ : ℝ) (a : Fin n → Bool) :
orTech n γ a = orProb n γ (countTrue a)
theorem Cslib.GameTheory.Contract.orProb_pos {n : ℕ} (hn : 1 ≤ n) {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) {k : ℕ} (hk : k ≤ n) :
0 < orProb n γ k
theorem Cslib.GameTheory.Contract.orTech_pos {n : ℕ} (hn : 1 ≤ n) {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (a : Fin n → Bool) :
0 < orTech n γ a
theorem Cslib.GameTheory.Contract.orProb_lt_one {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγ₁ : γ < 1) (k : ℕ) :
orProb n γ k < 1
theorem Cslib.GameTheory.Contract.orProb_diff {n : ℕ} (γ : ℝ) {k : ℕ} (hk : k < n) :
orProb n γ (k + 1) - orProb n γ k = (1 - 2 * γ) * γ ^ k * (1 - γ) ^ (n - k - 1)
theorem Cslib.GameTheory.Contract.orProb_strictMono {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) {k : ℕ} (hk : k < n) :
orProb n γ k < orProb n γ (k + 1)
theorem Cslib.GameTheory.Contract.orProb_mono {n : ℕ} {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) {k₁ k₂ : ℕ} (hk₁₂ : k₁ ≤ k₂) (hk₂ : k₂ ≤ n) :
orProb n γ k₁ ≤ orProb n γ k₂
theorem Cslib.GameTheory.Contract.isStrictlyMonotone_orTech (n : ℕ) {γ : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) :
theorem Cslib.GameTheory.Contract.orTech_transitions {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (k : ℕ) :
k ≤ n → ∃ (v : ℝ), 0 < v ∧ ∀ j ≤ n, j ≠ k → orProb n γ j * v - anonOptPayment (orProb n γ) c j < orProb n γ k * v - anonOptPayment (orProb n γ) c k

Under the noisy OR technology, optimal hidden-action team size increases strictly through every cardinality 0, 1, …, n at n strictly increasing value thresholds ([BCF07], Theorem 23.9, p. 607; Exercise 23.4, p. 610).

theorem Cslib.GameTheory.Contract.orTech_firstBest_transitions {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) (k : ℕ) :
k ≤ n → ∃ (v : ℝ), 0 < v ∧ ∀ j ≤ n, j ≠ k → orProb n γ j * v - ↑j * c < orProb n γ k * v - ↑k * c

Under the noisy OR technology, first-best optimal team size also steps strictly through every cardinality 0, 1, …, n ([BCF07], Theorem 23.9, p. 607; Exercise 23.4, p. 610).

theorem Cslib.GameTheory.Contract.orTech_pou_le_two {n : ℕ} (hn : 1 ≤ n) {γ c : ℝ} (hγ₀ : 0 < γ) (hγh : γ < 1 / 2) (hc : 0 < c) :
(priceOfUnaccountability (orTech n γ) fun (x : Fin n) => c) ≤ 2

Price of Unaccountability bound for the noisy OR technology ([BCF07], Theorem 23.9, p. 607): POU(orTech n γ, c) ≤ 2 uniformly across all n ≥ 1, γ ∈ (0, 1 / 2), and c > 0 (sharpening Theorem 23.9's ≤ 5 / 2 bound on p. 607), using only the 0-agent and 1-agent contracts.