Documentation

CslibFrontier.GameTheory.RationalCrypto.NonCooperativeComputation

Correlated Equilibrium Min-Max Bounds and Non-Cooperatively Computable Functions #

This module formalizes two results from Dodis and Rabin's chapter Cryptography and Game Theory ([DR07], Chapter 8 of Nisan–Roughgarden–Tardos–Vazirani 2007):

  1. Correlated equilibrium min-max lower bound ([DR07], Section 8.4.2, Claim 8.4, p. 195): in any finite strategic payoff game G : PayoffGame ι S with nonempty action sets, player i's correlated min-max value v_i = min_{z_{-i} ∈ Δ(S_{-i})} max_{a ∈ S_i} u_i(a, z_{-i}) (PayoffGame.correlatedMinMax) is attained by a punishing correlated profile (PayoffGame.exists_correlatedMinMax_punisher), equals the zero-sum minimax value of the opponent-vs-player payoff matrix (PayoffGame.isMinimaxValue_correlatedMinMax), and lower-bounds player i's conditional expected payoff E[u_i(s) | s_i = a] at every action a in the support of any correlated equilibrium σ (PayoffGame.correlatedMinMax_le_condPayoff).

  2. Non-cooperatively computable (NCC) and k-NCC functions ([DR07], Section 8.5.1, Definition 8.5, Theorem 8.6, Footnote 8, and "Collusions", pp. 197–199):

    • Parties hold private inputs t : ∀ i, T i drawn from a full-support prior D and wish to evaluate a single-output function f : (∀ i, T i) → O via a canonical mediator that evaluates f on the reported inputs and broadcasts an error message (none, written ⊥ in the source) if any party refuses to participate.
    • Utilities u : ι → (ι → Bool) → ℝ depend only on the correctness vector c : ι → Bool and satisfy correctness and exclusivity (CorrectnessExclusivity), and for the full characterization also high-correctness priority (HighCorrectnessPriority), where even the smallest input probability ε = min_t D t makes any correctness loss strictly worse than any exclusivity gain (highCorrectnessPriority_iff_minProb).
    • IsNCC (Definition 8.5) states that truthful reporting and obedience (honestProfile) form a pure Nash equilibrium of the mediated game mediatedGame (equivalently, the canonical mediated strategy is a correlated equilibrium of the function evaluation game); by linearity of expectation this rules out mixed/randomized unilateral deviations as well.
    • IsKNCC extends IsNCC to coalitions C of size at most k that pool their inputs and jointly choose reports and output interpretations (CoalitionDev), requiring Pareto k-resilience (no coalition can weakly improve all its members and strictly improve some member, matching CostGame.IsStrongNash); k = 1 recovers IsNCC (isKNCC_one_iff_isNCC).
    • Footnote 8 (IsDominated.isReversible, and IsKDominated.isKReversible for coalitions): every dominated non-constant function (in particular under EveryInputMatters) is reversible.
    • Theorem 8.6 (isNCC_iff_not_dominated_and_not_reversible, p. 199) and its k-coalition characterization (isKNCC_iff_not_kDominated_and_not_kReversible, after "Collusions", p. 199): under correctness, exclusivity, high-correctness priority (which together with correctness automatically implies full support ∀ t, 0 < D t, HighCorrectnessPriority.pos), 2 ≤ |ι| (resp. k < |ι|), and non-constancy of f (strictly weaker than the source's p. 197 assumption EveryInputMatters), f is (k-)NCC iff it is neither (k-)dominated nor (k-)reversible, uniformly in the honest error-fallback strategy fallback.
    • Boolean function witnesses: matching the explicit examples in [DR07], p. 199, Cslib.parity n (n ≥ 2) is reversible and not NCC (not_isNCC_parity), while odd-player majority Cslib.majority (2 * m + 1) (m ≥ 1) is NCC (isNCC_majority); as concrete Boolean corollaries of p. 198's domination rule, Cslib.threshold n 1 (OR, n ≥ 2) and Cslib.threshold n n (AND, n ≥ 2) are dominated and not NCC (not_isNCC_or, not_isNCC_and); extending to coalitions, Cslib.majority (2 * m + 1) (m ≥ 1) is k-NCC if and only if k ≤ m (isKNCC_majority_iff).

Main definitions #

Main results #

References #

def Cslib.GameTheory.PayoffGame.insertAction {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (i : ι) (a : S i) (s : (j : { j : ι // j ≠ i }) → S ↑j) (j : ι) :
S j

Insert player i's action a into a joint strategy profile s of the remaining players P_{-i}.

@[simp]
theorem Cslib.GameTheory.PayoffGame.insertAction_self {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (i : ι) (a : S i) (s : (j : { j : ι // j ≠ i }) → S ↑j) :
insertAction i a s i = a
theorem Cslib.GameTheory.PayoffGame.insertAction_of_ne {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (i : ι) (a : S i) (s : (j : { j : ι // j ≠ i }) → S ↑j) {j : ι} (h : j ≠ i) :
insertAction i a s j = s ⟨j, h⟩
@[simp]
theorem Cslib.GameTheory.PayoffGame.update_insertAction {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (i : ι) (a b : S i) (s : (j : { j : ι // j ≠ i }) → S ↑j) :
@[simp]
theorem Cslib.GameTheory.PayoffGame.insertAction_proj {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (i : ι) (s : (j : ι) → S j) :
(insertAction i (s i) fun (j : { j : ι // j ≠ i }) => s ↑j) = s
noncomputable def Cslib.GameTheory.PayoffGame.payoffAgainst {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) (a : S i) (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) :

Player i's expected payoff when playing pure action a against a correlated strategy z ∈ Δ(S_{-i}) of the remaining players ([DR07], Section 8.4.2, p. 195).

theorem Cslib.GameTheory.PayoffGame.payoffAgainst_eq {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) (a : S i) (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) :
G.payoffAgainst i a z = ∑ s : (j : { j : ι // j ≠ i }) → S ↑j, z.weights s * G.payoff i (insertAction i a s)
noncomputable def Cslib.GameTheory.PayoffGame.bestResponsePayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) [Nonempty (S i)] (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) :

Player i's best-response payoff max_{a ∈ S_i} u_i(a, z_{-i}) against a correlated strategy z ∈ Δ(S_{-i}) of the remaining players.

theorem Cslib.GameTheory.PayoffGame.payoffAgainst_le_bestResponsePayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) [Nonempty (S i)] (a : S i) (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) :
theorem Cslib.GameTheory.PayoffGame.bestResponsePayoff_le_iff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) [Nonempty (S i)] (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) {c : ℝ} :
G.bestResponsePayoff i z ≤ c ↔ ∀ (a : S i), G.payoffAgainst i a z ≤ c
noncomputable def Cslib.GameTheory.PayoffGame.correlatedMinMax {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (i : ι) [Nonempty (S i)] :

Player i's correlated min-max value v_i = inf_{z_{-i} ∈ Δ(S_{-i})} max_{a ∈ S_i} u_i(a, z_{-i}) ([DR07], Section 8.4.2, p. 195), representing the worst expected payoff that the remaining players P_{-i} can jointly enforce on P_i. When all action sets are nonempty, this infimum is attained (exists_correlatedMinMax_punisher) and equals the zero-sum minimax value (isMinimaxValue_correlatedMinMax).

noncomputable def Cslib.GameTheory.PayoffGame.marginalWeight {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (σ : Convexity.StdSimplex ℝ ((j : ι) → S j)) (i : ι) [DecidableEq (S i)] (a : S i) :

Marginal probability mass placed by profile distribution σ on player i receiving recommendation a.

theorem Cslib.GameTheory.PayoffGame.marginalWeight_eq {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (σ : Convexity.StdSimplex ℝ ((j : ι) → S j)) (i : ι) [DecidableEq (S i)] (a : S i) :
marginalWeight σ i a = ∑ s : (j : ι) → S j, if s i = a then σ.weights s else 0
noncomputable def Cslib.GameTheory.PayoffGame.condPayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (σ : Convexity.StdSimplex ℝ ((j : ι) → S j)) (i : ι) [DecidableEq (S i)] (a : S i) :

Conditional expected payoff E_{s ∼ σ}[u_i(s) | s_i = a] of player i given recommendation a ([DR07], Section 8.4.2, Claim 8.4, p. 195). Meaningful when 0 < marginalWeight σ i a.

theorem Cslib.GameTheory.PayoffGame.condPayoff_eq {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (σ : Convexity.StdSimplex ℝ ((j : ι) → S j)) (i : ι) [DecidableEq (S i)] (a : S i) :
G.condPayoff σ i a = (∑ s : (j : ι) → S j, if s i = a then σ.weights s * G.payoff i s else 0) / marginalWeight σ i a
theorem Cslib.GameTheory.PayoffGame.isMinimaxValue_correlatedMinMax {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] [∀ (j : ι), Nonempty (S j)] (G : PayoffGame ι S) (i : ι) :
Probability.IsMinimaxValue (fun (s : (j : { j : ι // j ≠ i }) → S ↑j) (a : S i) => G.payoff i (insertAction i a s)) (G.correlatedMinMax i)

G.correlatedMinMax i is the unique von Neumann minimax value of the two-player zero-sum game in which P_{-i} chooses s_{-i} to minimize u_i(a, s_{-i}) and P_i chooses a to maximize it.

theorem Cslib.GameTheory.PayoffGame.correlatedMinMax_le_bestResponsePayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] [∀ (j : ι), Nonempty (S j)] (G : PayoffGame ι S) (i : ι) (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)) :

Every correlated strategy z of the remaining players allows player i a best-response expected payoff of at least G.correlatedMinMax i.

theorem Cslib.GameTheory.PayoffGame.exists_correlatedMinMax_punisher {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] [∀ (j : ι), Nonempty (S j)] (G : PayoffGame ι S) (i : ι) :
∃ (z : Convexity.StdSimplex ℝ ((j : { j : ι // j ≠ i }) → S ↑j)), G.bestResponsePayoff i z = G.correlatedMinMax i

The correlated min-max value is attained: the remaining players P_{-i} possess a correlated punishment strategy z ∈ Δ(S_{-i}) holding player i's best-response payoff down to G.correlatedMinMax i ([DR07], Section 8.4.2, p. 195).

theorem Cslib.GameTheory.PayoffGame.correlatedMinMax_le_condPayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(j : ι) → Fintype (S j)] [∀ (j : ι), Nonempty (S j)] {G : PayoffGame ι S} {σ : Convexity.StdSimplex ℝ ((j : ι) → S j)} (hce : G.toCostGame.IsCorrelatedEquilibrium σ) (i : ι) [DecidableEq (S i)] {a : S i} (ha : 0 < marginalWeight σ i a) :

Claim 8.4 ([DR07], Section 8.4.2, p. 195): in any correlated equilibrium σ of a finite strategic payoff game G, for every player i and every action a in the support of σ's i-th marginal (0 < marginalWeight σ i a), player i's conditional expected payoff given recommendation a is at least its correlated min-max value G.correlatedMinMax i.

Non-Cooperatively Computable (NCC) and k-NCC Functions #

structure Cslib.GameTheory.RationalCrypto.CorrectnessExclusivity {ι : Type u_1} (u : ι → (ι → Bool) → ℝ) :

Correctness and exclusivity utility preferences for the function evaluation game ([DR07], Section 8.5.1, p. 198):

  • correctness: learning the true output (c i = true) strictly beats failing (c' i = false);
  • exclusivity: holding player i's own correctness fixed (c i = c' i), having strictly fewer other players succeed (∀ j ≠ i, c j → c' j and ∃ j ≠ i, ¬ c j ∧ c' j) is strictly preferred.
  • correctness (i : ι) (c c' : ι → Bool) : c i = true → c' i = false → u i c' < u i c

    Correctness preference: c i = true strictly beats c' i = false.

  • exclusivity (i : ι) (c c' : ι → Bool) : c i = c' i → (∀ (j : ι), j ≠ i → c j = true → c' j = true) → (∃ (j : ι), j ≠ i ∧ c j = false ∧ c' j = true) → u i c' < u i c

    Exclusivity preference: given the same own correctness, fewer other correct players strictly increases utility.

def Cslib.GameTheory.RationalCrypto.HighCorrectnessPriority {ι : Type u_1} {T : ι → Type u_2} (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) :

High-correctness priority ([DR07], Section 8.5.1, p. 199): for every input profile t (in particular at the minimum probability ε = min_t D t, see highCorrectnessPriority_iff_minProb), any chance D t of losing correctness outweighs any exclusivity gain on the complementary event 1 - D t.

theorem Cslib.GameTheory.RationalCrypto.HighCorrectnessPriority.pos {ι : Type u_1} {T : ι → Type u_2} [Nonempty ι] {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} (hprio : HighCorrectnessPriority u D) (hu : CorrectnessExclusivity u) (t : (j : ι) → T j) :
0 < D t

Under CorrectnessExclusivity on a nonempty player set, HighCorrectnessPriority u D implies that the prior D has full support (∀ t, 0 < D t).

theorem Cslib.GameTheory.RationalCrypto.highCorrectnessPriority_iff_minProb {ι : Type u_1} {T : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [Nonempty ((j : ι) → T j)] {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} (hu : CorrectnessExclusivity u) :
HighCorrectnessPriority u D ↔ have ε := Finset.univ.inf' ⋯ D; ∀ (i : ι) (c c' c'' : ι → Bool), c i = true → c' i = true → c'' i = false → (1 - ε) * u i c' + ε * u i c'' < u i c

Equivalence of HighCorrectnessPriority with the explicit minimum-probability inequality u_i(c) > (1 - ε) u_i(c') + ε u_i(c'') where ε = min_t D t ([DR07], p. 199).

def Cslib.GameTheory.RationalCrypto.EveryInputMatters {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] (f : ((i : ι) → T i) → O) :

Standing non-degeneracy assumption of [DR07], Section 8.5.1, p. 197: every player's input matters for f on at least one profile of the other players' inputs.

theorem Cslib.GameTheory.RationalCrypto.EveryInputMatters.exists_ne {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] [Nonempty ι] {f : ((i : ι) → T i) → O} (h : EveryInputMatters f) :
∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂

If at least one player exists and every input matters, then f is non-constant.

structure Cslib.GameTheory.RationalCrypto.UnilateralDev {ι : Type u_1} (T : ι → Type u_4) (O : Type u_5) (i : ι) :
Type (max u_4 u_5)

A unilateral strategy of player i in the mediated function evaluation game ([DR07], Section 8.5.1, p. 198): given true input t_i, player i sends report t_i to the mediator (none = refuse / send invalid type ⊥) and then outputs interpret t_i reply upon receiving the mediator's reply (some y or error none).

  • report : T i → Option (T i)

    Input reported to the mediator (none models submitting invalid type ⊥).

  • interpret : T i → Option O → O

    Output guess produced from the true type and the mediator's message (none = error).

def Cslib.GameTheory.RationalCrypto.honestProfile {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} (fallback : (i : ι) → T i → O) (i : ι) :

The canonical honest strategy profile ([DR07], Section 8.5.1, p. 198): every party reports its true input some (t i), outputs y upon receiving some y, and uses fallback i (t i) if another party triggers an error message none.

def Cslib.GameTheory.RationalCrypto.mediatorReply {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] (f : ((i : ι) → T i) → O) (s : (i : ι) → UnilateralDev T O i) (t : (i : ι) → T i) :

Reply broadcast by the canonical mediator on strategy profile s and true input profile t: some (f t') if every player reports a valid input some (t' j), and none (error) otherwise.

def Cslib.GameTheory.RationalCrypto.mediatedGame {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) :
PayoffGame ι fun (i : ι) => UnilateralDev T O i

The mediated function evaluation game ([DR07], Section 8.5.1, p. 198) in normal-form PayoffGame representation: expected utility over t ∼ D when each player j runs s j with the canonical mediator computing f.

@[simp]
theorem Cslib.GameTheory.RationalCrypto.mediatedGame_payoff {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) (i : ι) (s : (j : ι) → UnilateralDev T O j) :
(mediatedGame f u D).payoff i s = ∑ t : (j : ι) → T j, D t * u i fun (j : ι) => decide ((s j).interpret (t j) (mediatorReply f s t) = f t)
def Cslib.GameTheory.RationalCrypto.IsNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) (fallback : (i : ι) → T i → O) :

Definition 8.5 ([DR07], Section 8.5.1, p. 198): a function f is non-cooperatively computable (NCC) with respect to utilities u, input prior D, and error-fallback rule fallback if the canonical honest profile is a Nash equilibrium of the mediated game (equivalently, the canonical mediator strategy is a correlated equilibrium of the function evaluation game).

def Cslib.GameTheory.RationalCrypto.IsDominated {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} (f : ((i : ι) → T i) → O) :

A function f is dominated ([DR07], Section 8.5.1, p. 198) if some player i has an input t_i that fixes f (t_i, t_{-i}) = c independently of all other players' inputs.

def Cslib.GameTheory.RationalCrypto.IsReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] (f : ((i : ι) → T i) → O) :

A function f is reversible ([DR07], Section 8.5.1, pp. 198–199) if some player i has an input t_i, another report t'_i, and a recovery map g : O → O (since t_i is fixed, g (·, t_i) is g) such that g (f (t'_i, t_{-i})) = f (t_i, t_{-i}) for all t_{-i} and f (t'_i, t_{-i}) ≠ f (t_i, t_{-i}) for at least one t_{-i}.

Coalitional (k-NCC) definitions ([DR07], Section 8.5.1, p. 199) #

def Cslib.GameTheory.RationalCrypto.patchProfile {ι : Type u_1} {T : ι → Type u_2} [DecidableEq ι] (C : Finset ι) (rC : (j : ↥C) → T ↑j) (t : (j : ι) → T j) (j : ι) :
T j

Replace the coordinates of t inside coalition C with the pooled values rC, leaving outsiders j ∉ C unchanged.

@[simp]
theorem Cslib.GameTheory.RationalCrypto.patchProfile_mem {ι : Type u_1} {T : ι → Type u_2} [DecidableEq ι] {C : Finset ι} (rC : (j : ↥C) → T ↑j) (t : (j : ι) → T j) {j : ι} (hj : j ∈ C) :
patchProfile C rC t j = rC ⟨j, hj⟩
@[simp]
theorem Cslib.GameTheory.RationalCrypto.patchProfile_notMem {ι : Type u_1} {T : ι → Type u_2} [DecidableEq ι] {C : Finset ι} (rC : (j : ↥C) → T ↑j) (t : (j : ι) → T j) {j : ι} (hj : j ∉ C) :
patchProfile C rC t j = t j
@[simp]
theorem Cslib.GameTheory.RationalCrypto.patchProfile_self {ι : Type u_1} {T : ι → Type u_2} [DecidableEq ι] (C : Finset ι) (t : (j : ι) → T j) :
patchProfile C (fun (j : ↥C) => t ↑j) t = t
@[simp]
theorem Cslib.GameTheory.RationalCrypto.patchProfile_patchProfile {ι : Type u_1} {T : ι → Type u_2} [DecidableEq ι] (C : Finset ι) (r₁ r₂ : (j : ↥C) → T ↑j) (t : (j : ι) → T j) :
patchProfile C r₁ (patchProfile C r₂ t) = patchProfile C r₁ t
structure Cslib.GameTheory.RationalCrypto.CoalitionDev {ι : Type u_1} (T : ι → Type u_4) (O : Type u_5) (C : Finset ι) :
Type (max (max u_1 u_4) u_5)

A joint strategy of coalition C that pools the members' true inputs t_C : ∀ j : C, T j.1 to choose a joint report to the mediator (none = abort / ⊥) and joint output guesses for all members of C ([DR07], Section 8.5.1, "Collusions", p. 199).

  • report : ((j : ↥C) → T ↑j) → Option ((j : ↥C) → T ↑j)

    Joint report to the mediator (none triggers the mediator's error broadcast).

  • interpret : ((j : ↥C) → T ↑j) → Option O → ↥C → O

    Joint output guesses for all members of C given pooled inputs and the mediator reply.

def Cslib.GameTheory.RationalCrypto.coalitionPayoff {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) (fallback : (i : ι) → T i → O) (C : Finset ι) (dev : CoalitionDev T O C) (i : ι) :

Expected utility of player i over t ∼ D when coalition C runs dev and outsiders follow honestProfile fallback.

def Cslib.GameTheory.RationalCrypto.IsKNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (k : ℕ) (u : ι → (ι → Bool) → ℝ) (D : ((i : ι) → T i) → ℝ) (fallback : (i : ι) → T i → O) :

k-Non-Cooperatively Computable (k-NCC) functions ([DR07], Section 8.5.1, "Collusions", p. 199): no coalition C of size at most k has a Pareto-beneficial pooled-input deviation (where every member i ∈ C weakly improves and some member strictly improves over the canonical honest profile).

def Cslib.GameTheory.RationalCrypto.IsKDominated {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} (f : ((i : ι) → T i) → O) (k : ℕ) :

A function f is k-dominated if some nonempty coalition C of size at most k has a joint input tC that fixes f t = c independently of all outsiders' inputs.

def Cslib.GameTheory.RationalCrypto.IsKReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] (f : ((i : ι) → T i) → O) (k : ℕ) :

A function f is k-reversible if some nonempty coalition C of size at most k has pooled inputs tC, alternate reports rC, and a recovery map g : O → O such that g (f (patchProfile C rC t)) = f t on the entire tC-fiber while f (patchProfile C rC t) ≠ f t on at least one profile t in the tC-fiber.

Core Theorems: Footnote 8, k-NCC Characterization, and Theorem 8.6 #

theorem Cslib.GameTheory.RationalCrypto.IsKNCC.mono {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {k₁ k₂ : ℕ} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (h : IsKNCC f k₂ u D fallback) (hle : k₁ ≤ k₂) :
IsKNCC f k₁ u D fallback

IsKNCC is antitone in the coalition bound k.

theorem Cslib.GameTheory.RationalCrypto.IsKDominated.isKReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] {f : ((i : ι) → T i) → O} {k : ℕ} (hdom : IsKDominated f k) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) :

Coalitional Footnote 8: every k-dominated non-constant function is k-reversible.

theorem Cslib.GameTheory.RationalCrypto.isKDominated_one_iff_isDominated {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} {f : ((i : ι) → T i) → O} :

1-domination coincides with IsDominated.

theorem Cslib.GameTheory.RationalCrypto.isKReversible_one_iff_isReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] {f : ((i : ι) → T i) → O} :

1-reversibility coincides with IsReversible.

theorem Cslib.GameTheory.RationalCrypto.IsDominated.isReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [DecidableEq ι] {f : ((i : ι) → T i) → O} (hdom : IsDominated f) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) :

Footnote 8 ([DR07], Section 8.5.1, p. 199): every dominated non-constant function (in particular under EveryInputMatters) is reversible.

@[simp]
theorem Cslib.GameTheory.RationalCrypto.mediatorReply_honest {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] (f : ((i : ι) → T i) → O) (fallback : (i : ι) → T i → O) (t : (i : ι) → T i) :
mediatorReply f (honestProfile fallback) t = some (f t)

Under honestProfile, the canonical mediator always broadcasts some (f t).

theorem Cslib.GameTheory.RationalCrypto.mediatorReply_update_honest {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] (f : ((i : ι) → T i) → O) (fallback : (i : ι) → T i → O) (i : ι) (dev : UnilateralDev T O i) (t : (j : ι) → T j) :
mediatorReply f (Function.update (honestProfile fallback) i dev) t = match dev.report (t i) with | some a => some (f (Function.update t i a)) | none => none

Under a unilateral deviation dev of player i from honestProfile, the canonical mediator returns some (f (update t i a)) if dev.report (t i) = some a and none if dev aborts.

theorem Cslib.GameTheory.RationalCrypto.payoff_mediatedGame_honest_eq {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] (f : ((i : ι) → T i) → O) (u : ι → (ι → Bool) → ℝ) {D : ((i : ι) → T i) → ℝ} (hD : IsMixedStrategy D) (fallback : (i : ι) → T i → O) (i : ι) :
(mediatedGame f u D).payoff i (honestProfile fallback) = u i fun (x : ι) => true

When D is a probability distribution (IsMixedStrategy D), the honest expected payoff equals u i (fun _ => true).

theorem Cslib.GameTheory.RationalCrypto.isKNCC_one_iff_isNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} :
IsKNCC f 1 u D fallback ↔ IsNCC f u D fallback

1-NCC coincides exactly with IsNCC (Definition 8.5).

theorem Cslib.GameTheory.RationalCrypto.isKNCC_of_not_kDominated_and_not_kReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {k : ℕ} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hu : CorrectnessExclusivity u) (hD : IsMixedStrategy D) (hprio : HighCorrectnessPriority u D) (hndom : ¬IsKDominated f k) (hnrev : ¬IsKReversible f k) :
IsKNCC f k u D fallback

Sufficiency direction of the k-NCC characterization: under correctness, exclusivity, and high-correctness priority, any function that is neither k-dominated nor k-reversible is k-NCC (for every honest fallback rule).

theorem Cslib.GameTheory.RationalCrypto.IsKReversible.not_isKNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {k : ℕ} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hrev : IsKReversible f k) (hk : k < Fintype.card ι) (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : (i : ι) → T i), 0 < D t) :
¬IsKNCC f k u D fallback

Necessity direction for k-reversibility: if k < |ι|, D has full support, and utilities satisfy exclusivity, then no k-reversible function is k-NCC.

theorem Cslib.GameTheory.RationalCrypto.IsKDominated.not_isKNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {k : ℕ} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hdom : IsKDominated f k) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) (hk : k < Fintype.card ι) (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : (i : ι) → T i), 0 < D t) :
¬IsKNCC f k u D fallback

Necessity direction for k-domination: no k-dominated non-constant function is k-NCC for k < |ι|.

theorem Cslib.GameTheory.RationalCrypto.isKNCC_iff_not_kDominated_and_not_kReversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {k : ℕ} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hk : k < Fintype.card ι) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) (hu : CorrectnessExclusivity u) (hD : IsMixedStrategy D) (hprio : HighCorrectnessPriority u D) :
IsKNCC f k u D fallback ↔ ¬IsKDominated f k ∧ ¬IsKReversible f k

Coalitional k-NCC characterization (after [DR07], Section 8.5.1, "Collusions", p. 199): for any k < |ι|, any non-constant function f, prior D, and utilities satisfying correctness, exclusivity, and high-correctness priority (which implies full support ∀ t, 0 < D t by HighCorrectnessPriority.pos), f is k-NCC if and only if f is neither k-dominated nor k-reversible (uniformly in fallback).

theorem Cslib.GameTheory.RationalCrypto.IsReversible.not_isNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hrev : IsReversible f) (hcard : 2 ≤ Fintype.card ι) (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : (i : ι) → T i), 0 < D t) :
¬IsNCC f u D fallback

Every reversible function fails to be NCC when 2 ≤ |ι|, D has full support, and utilities satisfy exclusivity ([DR07], Section 8.5.1, pp. 198–199).

theorem Cslib.GameTheory.RationalCrypto.IsDominated.not_isNCC {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hdom : IsDominated f) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) (hcard : 2 ≤ Fintype.card ι) (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : (i : ι) → T i), 0 < D t) :
¬IsNCC f u D fallback

Every dominated non-constant function fails to be NCC when 2 ≤ |ι|, D has full support, and utilities satisfy exclusivity ([DR07], Section 8.5.1, pp. 198–199).

theorem Cslib.GameTheory.RationalCrypto.isNCC_iff_not_dominated_and_not_reversible {ι : Type u_1} {T : ι → Type u_2} {O : Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [DecidableEq O] {f : ((i : ι) → T i) → O} {u : ι → (ι → Bool) → ℝ} {D : ((i : ι) → T i) → ℝ} {fallback : (i : ι) → T i → O} (hcard : 2 ≤ Fintype.card ι) (hne : ∃ (t₁ : (j : ι) → T j) (t₂ : (j : ι) → T j), f t₁ ≠ f t₂) (hu : CorrectnessExclusivity u) (hD : IsMixedStrategy D) (hprio : HighCorrectnessPriority u D) :

Theorem 8.6 ([DR07], Section 8.5.1, p. 199): under correctness, exclusivity, high-correctness priority (which implies full support ∀ t, 0 < D t via HighCorrectnessPriority.pos), input prior D, at least two players (2 ≤ |ι|), and non-constancy of f (implied by the source's p. 197 standing assumption EveryInputMatters f), f is non-cooperatively computable (IsNCC) if and only if f is neither dominated nor reversible, uniformly in the honest error-fallback rule fallback.

Canonical Boolean Function Witnesses ([DR07], Section 8.5.1, p. 199) #

Cslib.parity n is reversible for every n ≥ 1: negating one's input negates the parity, which is recovered by negating the mediator's reply ([DR07], p. 199).

theorem Cslib.GameTheory.RationalCrypto.not_isNCC_parity {n : ℕ} (hn : 2 ≤ n) {u : Fin n → (Fin n → Bool) → ℝ} {D : BitString n → ℝ} {fallback : Fin n → Bool → Bool} (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : BitString n), 0 < D t) :
¬IsNCC (parity n) u D fallback

Cslib.parity n (n ≥ 2) is not NCC ([DR07], p. 199).

theorem Cslib.GameTheory.RationalCrypto.not_isNCC_or {n : ℕ} (hn : 2 ≤ n) {u : Fin n → (Fin n → Bool) → ℝ} {D : BitString n → ℝ} {fallback : Fin n → Bool → Bool} (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : BitString n), 0 < D t) :
¬IsNCC (threshold n 1) u D fallback

n-bit disjunction (Cslib.threshold n 1, n ≥ 2) is dominated and hence not NCC: a concrete Boolean corollary of the domination rule in [DR07], Section 8.5.1, p. 198.

theorem Cslib.GameTheory.RationalCrypto.not_isNCC_and {n : ℕ} (hn : 2 ≤ n) {u : Fin n → (Fin n → Bool) → ℝ} {D : BitString n → ℝ} {fallback : Fin n → Bool → Bool} (hu : CorrectnessExclusivity u) (hDpos : ∀ (t : BitString n), 0 < D t) :
¬IsNCC (threshold n n) u D fallback

n-bit conjunction (Cslib.threshold n n, n ≥ 2) is dominated and hence not NCC: a concrete Boolean corollary of the domination rule in [DR07], Section 8.5.1, p. 198.

theorem Cslib.GameTheory.RationalCrypto.isKNCC_majority_iff {m k : ℕ} (hm : 1 ≤ m) {u : Fin (2 * m + 1) → (Fin (2 * m + 1) → Bool) → ℝ} {D : BitString (2 * m + 1) → ℝ} {fallback : Fin (2 * m + 1) → Bool → Bool} (hu : CorrectnessExclusivity u) (hD : IsMixedStrategy D) (hprio : HighCorrectnessPriority u D) :
IsKNCC (majority (2 * m + 1)) k u D fallback ↔ k ≤ m

Exact k-NCC threshold for odd-player majority (Cslib.majority (2 * m + 1), m ≥ 1): under correctness, exclusivity, and high-correctness priority (which implies full support of D by HighCorrectnessPriority.pos), majority on 2 * m + 1 parties is k-NCC if and only if k ≤ m (no coalition of size ≤ m dominates or reverses majority, whereas m + 1 parties dominate it).

theorem Cslib.GameTheory.RationalCrypto.isNCC_majority {m : ℕ} (hm : 1 ≤ m) {u : Fin (2 * m + 1) → (Fin (2 * m + 1) → Bool) → ℝ} {D : BitString (2 * m + 1) → ℝ} {fallback : Fin (2 * m + 1) → Bool → Bool} (hu : CorrectnessExclusivity u) (hD : IsMixedStrategy D) (hprio : HighCorrectnessPriority u D) :
IsNCC (majority (2 * m + 1)) u D fallback

Odd-player majority Cslib.majority (2 * m + 1) (m ≥ 1, i.e., n ≥ 3 odd) is NCC ([DR07], Section 8.5.1, p. 199).