Documentation

CslibFrontier.GameTheory.RandomAssignment.Basic

Random assignment: stochastic dominance, efficiency, fairness and incentives #

Foundations for the house allocation / random assignment problem with n agents and n indivisible objects (Fin n), without monetary transfers and without initial endowments, following the framework of Bogomolnaia and Moulin ([BM01]; note: the primary article PDF has not been consulted locally, so theorem/lemma/page numbers are not cited).

A strict preference profile p : Profile n assigns to each agent i : Fin n a bijection p i : Equiv.Perm (Fin n) listing agent i's strict ranking from best (k = 0) to worst (k = n - 1). Thus p i k is agent i's k-th preferred object, and (p i).symm o is the rank of object o in agent i's preference order (smaller rank means strictly preferred).

A random assignment (probabilistic assignment / bistochastic matrix) is a matrix P : Matrix (Fin n) (Fin n) ℝ lying in doublyStochastic ℝ (Fin n). Entry P i o is the probability that agent i receives object o. By Birkhoff's theorem (already formalized in Mathlib as exists_eq_sum_perm_of_mem_doublyStochastic), every doubly stochastic matrix can be realized as a probability distribution over deterministic assignments Equiv.Perm (Fin n).

Main definitions #

Main results #

References #

@[reducible, inline]

A strict preference profile for n agents over n objects. Agent i's k-th preferred object is p i k, with 0 most preferred and n - 1 least preferred. Thus (p i).symm o is the rank of object o for agent i.

@[reducible, inline]

A random assignment rule maps a preference profile to an n × n real matrix whose (i, o) entry represents the probability that agent i receives object o.

An assignment rule is feasible if it always returns a doubly stochastic matrix.

Cumulative probability mass assigned to the k + 1 best objects {π r | r ≤ k} under strict ranking π and lottery vector x : Fin n → ℝ.

theorem Cslib.GameTheory.RandomAssignment.upperContourSum_eq_sum_filter {n : ℕ} (π : Equiv.Perm (Fin n)) (x : Fin n → ℝ) (k : Fin n) :
upperContourSum π x k = ∑ o : Fin n with (Equiv.symm π) o ≤ k, x o
theorem Cslib.GameTheory.RandomAssignment.upperContourSum_succ {n : ℕ} (π : Equiv.Perm (Fin n)) (x : Fin n → ℝ) {k : Fin n} (hk : 0 < ↑k) :
upperContourSum π x k = upperContourSum π x ⟨↑k - 1, ⋯⟩ + x (π k)
theorem Cslib.GameTheory.RandomAssignment.upperContourSum_zero {n : ℕ} (π : Equiv.Perm (Fin n)) (x : Fin n → ℝ) {k : Fin n} (hk : ↑k = 0) :
upperContourSum π x k = x (π k)
theorem Cslib.GameTheory.RandomAssignment.eq_of_upperContourSum_eq {n : ℕ} (π : Equiv.Perm (Fin n)) {x y : Fin n → ℝ} (h : ∀ (k : Fin n), upperContourSum π x k = upperContourSum π y k) :
x = y

First-order stochastic dominance: lottery x weakly sd-dominates lottery y with respect to the strict ranking π when every upper contour set {π r | r ≤ k} receives at least as much probability mass under x as under y.

Strict first-order stochastic dominance: x weakly sd-dominates y and strictly dominates it at some rank k.

theorem Cslib.GameTheory.RandomAssignment.SDDominates.trans {n : ℕ} {π : Equiv.Perm (Fin n)} {x y z : Fin n → ℝ} (hxy : SDDominates π x y) (hyz : SDDominates π y z) :
theorem Cslib.GameTheory.RandomAssignment.SDDominates.antisymm {n : ℕ} {π : Equiv.Perm (Fin n)} {x y : Fin n → ℝ} (hxy : SDDominates π x y) (hyx : SDDominates π y x) :
x = y
theorem Cslib.GameTheory.RandomAssignment.SDDominates.add {n : ℕ} {π : Equiv.Perm (Fin n)} {x₁ y₁ x₂ y₂ : Fin n → ℝ} (h₁ : SDDominates π x₁ y₁) (h₂ : SDDominates π x₂ y₂) :
SDDominates π (x₁ + x₂) (y₁ + y₂)
theorem Cslib.GameTheory.RandomAssignment.sdDominates_single_iff {n : ℕ} (π : Equiv.Perm (Fin n)) (a b : Fin n) {c : ℝ} (hc : 0 < c) :
(SDDominates π (fun (o : Fin n) => if o = a then c else 0) fun (o : Fin n) => if o = b then c else 0) ↔ (Equiv.symm π) a ≤ (Equiv.symm π) b
theorem Cslib.GameTheory.RandomAssignment.sdDominates_iff_forall_antitone {n : ℕ} (π : Equiv.Perm (Fin n)) {x y : Fin n → ℝ} (hsum : ∑ o : Fin n, x o = ∑ o : Fin n, y o) :
SDDominates π x y ↔ ∀ (u : Fin n → ℝ), (Antitone fun (k : Fin n) => u (π k)) → ∑ o : Fin n, y o * u o ≤ ∑ o : Fin n, x o * u o

First-order stochastic dominance characterizes weakly higher expected utility across all von Neumann–Morgenstern utility vectors consistent with the strict preference ranking π.

Equal treatment of equals (ETE): agents with identical strict preferences receive the exact same lottery row.

Stochastic-dominance (sd-) envy-freeness: every agent's own lottery weakly sd-dominates every other agent's lottery under that agent's strict preference order.

Ordinal (sd-) efficiency of a random assignment P: P is doubly stochastic and no other doubly stochastic matrix Q weakly sd-dominates P for every agent and strictly for at least one agent.

Deterministic Pareto efficiency of a bijection μ : Equiv.Perm (Fin n): no bijection ν gives every agent a weakly better rank and at least one agent a strictly better rank.

Ex-post efficiency: P is a convex combination of deterministic Pareto-efficient matchings.

Strong sd-strategy-proofness: for every profile p, agent i, and alternative report π', truth-telling weakly sd-dominates misreporting π' under i's true preference p i.

Weak sd-strategy-proofness: no unilateral misreport strictly sd-dominates truth-telling under the agent's true preference.

theorem Cslib.GameTheory.RandomAssignment.IsSDStrategyProof.upperContour_eq {n : ℕ} {φ : AssignmentRule n} (hsp : IsSDStrategyProof φ) (p : Profile n) (i : Fin n) (π' : Equiv.Perm (Fin n)) (k : Fin n) (hset : ∀ (o : Fin n), (Equiv.symm (p i)) o ≤ k ↔ (Equiv.symm π') o ≤ k) :
upperContourSum (p i) (φ p i) k = upperContourSum (p i) (φ (Function.update p i π') i) k

Upper-contour invariance: under a strong sd-strategy-proof rule, if two reports p i and π' share the same k-th upper contour set, the total probability mass assigned to that set is equal under both reports.

theorem Cslib.GameTheory.RandomAssignment.IsSDStrategyProof.adjSwap_invariance {n : ℕ} {φ : AssignmentRule n} (hsp : IsSDStrategyProof φ) (p : Profile n) (i k : Fin n) (hk : ↑k + 1 < n) (π' : Equiv.Perm (Fin n)) (hswap : π' = Equiv.swap ((p i) k) ((p i) ⟨↑k + 1, hk⟩) * p i) :
(∀ (r : Fin n), r ≠ k → r ≠ ⟨↑k + 1, hk⟩ → φ (Function.update p i π') i ((p i) r) = φ p i ((p i) r)) ∧ φ (Function.update p i π') i ((p i) k) + φ (Function.update p i π') i ((p i) ⟨↑k + 1, hk⟩) = φ p i ((p i) k) + φ p i ((p i) ⟨↑k + 1, hk⟩)

Swapping two adjacent ranks k and k + 1 in agent i's preference leaves the probability of every other object unchanged and preserves the sum of the two swapped objects' probabilities.

def Cslib.GameTheory.RandomAssignment.tradeRel {n : ℕ} (p : Profile n) (P : Matrix (Fin n) (Fin n) ℝ) (a b : Fin n) :

The pairwise trade (envy/improvement) relation induced by a random assignment P: there is a directed edge a ≻_P b if some agent i receives positive probability of b and strictly prefers a over b.

theorem Cslib.GameTheory.RandomAssignment.exists_simple_tradeCycle {n : ℕ} {p : Profile n} {P : Matrix (Fin n) (Fin n) ℝ} {a : Fin n} (h : Relation.TransGen (tradeRel p P) a a) :
∃ (m : ℕ) (x : 2 ≤ m) (c : Fin m → Fin n), Function.Injective c ∧ ∀ (j : Fin m), tradeRel p P (c ⟨(↑j + 1) % m, ⋯⟩) (c j)

Every simple cycle extracted from a self-loop in tradeRel p P, reusing Relation.exists_cycle_chain_of_transGen and Relation.exists_nodup_of_cycle_chain.

Bogomolnaia–Moulin ordinal efficiency characterization ([BM01], locator unverified): a doubly stochastic matrix P is sd-efficient if and only if its trade relation tradeRel p P is acyclic (Relation.Acyclic).

theorem Cslib.GameTheory.RandomAssignment.IsSDEfficient.not_twoCycle {n : ℕ} {p : Profile n} {P : Matrix (Fin n) (Fin n) ℝ} (heff : IsSDEfficient p P) {i j a b : Fin n} (hib : 0 < P i b) (hij : (Equiv.symm (p i)) a < (Equiv.symm (p i)) b) (hja : 0 < P j a) (hji : (Equiv.symm (p j)) b < (Equiv.symm (p j)) a) :

Every sd-efficient random assignment is ex-post efficient: in any Birkhoff–von Neumann decomposition into permutation matrices, every positively weighted matching is Pareto efficient.