Compound Prediction Market Order Matching and coNP-Completeness #
This module formalizes compound conditional securities, indivisible and divisible order matching,
the linear-programming and small-support Farkas dual characterizations, and the native
coNP-completeness of divisible compound order matching from
[PennockSami2007, §26.3–§26.3.1, pp. 658–661].
Model and conventions #
Base events are indexed by natural numbers (ℕ), so a state of the world is a Boolean assignment
ω : ℕ → Bool. Following the library's canonical SAT representation (Cslib.Logic.PL.CNF ℕ,
Cslib.Complexity.encCNF), each conditional security S_{φ|ψ} in a CompoundOrder specifies
an event formula φ : CNF ℕ and a conditioning formula ψ : CNF ℕ (with [] : CNF ℕ representing
the unconditional tautology ⊤), together with rational quantity q : ℚ (q > 0 for a buy order,
q < 0 for a sell order) and rational unit limit price p : ℚ.
- Order payoff (
orderPayoff, §26.3.1.1, p. 659):ϒ(ω) = q * 1_{ω ∈ ψ} * (1_{ω ∈ φ} - p). - Auctioneer surplus (
auctioneerPayoff, §26.3.1.2, p. 659): for acceptance fractionsα : Fin O.length → ℝ,ϒ_auc(ω) = ∑ i, -(α i) * orderPayoff O[i] ω. - Indivisible and divisible matching (
HasIndivisibleMatch, Definition 26.3, p. 659;HasDivisibleMatch, Definition 26.5, p. 660): whether there exist acceptance fractionsαin{0, 1}(resp.[0, 1]) with at least oneα i > 0and∀ ω, 0 ≤ auctioneerPayoff O α ω.
Theorem 26.6(i) and Theorem 26.6(ii) #
- Theorem 26.6(i) LP equivalence (
hasDivisibleMatch_iff_exists_pos_sum,hasDivisibleMatch_iff_exists_unit_sum):HasDivisibleMatch Oholds iff the finite-variable linear program0 ≤ α i ≤ 1,∀ ω, 0 ≤ auctioneerPayoff O α ωadmits a solution with strictly positive objective0 < ∑ i, α i(equivalently0 ≤ α,∑ i, α i = 1,∀ ω, ...), where only assignments to the base variables occurring inOmatter. Polynomial-time LP solving on Turing machines (forO(log n)base events) is not formalized here (open under#7789). - Small-support Farkas / Carathéodory characterization
(
not_hasDivisibleMatch_iff_exists_small_farkas,not_hasDivisibleMatch_iff_exists_small_subset): by Farkas' lemma (Matrix.not_exists_mulVec_le_iff) and basic solutions (Matrix.exists_nonneg_mulVec_eq_forall_mulVec_eq_zero),¬ HasDivisibleMatch Oholds iff there exists a setSof at mostO.lengthstates (a fortiori≤ O.length + 1, [PennockSami2007, p. 661]) admitting a nonnegative rational Farkas dual certificatew : (ℕ → Bool) → ℚwith∀ i, 0 < ∑ ω ∈ S, w ω * orderPayoff O[i] ω(and equivalently¬ HasDivisibleMatchOn O S). - Theorem 26.6(ii) native
coNP-completeness (DivisibleOrderMatching_coNPComplete):- Upper bound (
DivisibleOrderMatching_mem_coNP): clearing rational denominators order by order and applyingMatrix.exists_int_nonneg_mulVec_eqyields a polynomial-bit-size integer Farkas certificate on at mostO.lengthstates, verified natively in polynomial time on multi-tape Turing machines viaCslib.Complexity.mem_NP_of_check. - Lower bound (
DivisibleOrderMatching_coNPHard): the single-order polynomial-time reductionφ ↦ [⟨1, 1 / 2, φ, []⟩]reducesUNSATtoDivisibleOrderMatching[PennockSami2007, p. 661].
- Upper bound (
Main definitions #
Cslib.GameTheory.PredictionMarket.CompoundOrder,Cslib.GameTheory.PredictionMarket.encCompoundOrder,Cslib.GameTheory.PredictionMarket.encOrderList: compound conditional orders and their multi-tape TM binary encoding.Cslib.GameTheory.PredictionMarket.orderPayoff,Cslib.GameTheory.PredictionMarket.auctioneerPayoff: trader payoff and auctioneer surplus.Cslib.GameTheory.PredictionMarket.HasIndivisibleMatch,Cslib.GameTheory.PredictionMarket.HasDivisibleMatch,Cslib.GameTheory.PredictionMarket.HasDivisibleMatchOn,Cslib.GameTheory.PredictionMarket.DivisibleOrderMatching: indivisible and divisible matching decision problems [PennockSami2007, Definitions 26.3 and 26.5, pp. 659–660].
Main results #
Cslib.GameTheory.PredictionMarket.hasDivisibleMatch_of_hasIndivisibleMatch: every indivisible match is a divisible match.Cslib.GameTheory.PredictionMarket.hasDivisibleMatch_iff_exists_pos_sum,Cslib.GameTheory.PredictionMarket.hasDivisibleMatch_iff_exists_unit_sum: LP objective and simplex-normalized feasibility characterizations [PennockSami2007, Theorem 26.6(i), pp. 660–661].Cslib.GameTheory.PredictionMarket.not_hasDivisibleMatch_iff_exists_small_farkas,Cslib.GameTheory.PredictionMarket.not_hasDivisibleMatch_iff_exists_small_subset: at mostO.length(hence≤ O.length + 1) states certify infeasibility via a rational Farkas dual [PennockSami2007, Theorem 26.6(ii), p. 661].Cslib.GameTheory.PredictionMarket.polyTimeReducible_UNSAT_DivisibleOrderMatching,Cslib.GameTheory.PredictionMarket.DivisibleOrderMatching_coNPHard,Cslib.GameTheory.PredictionMarket.DivisibleOrderMatching_mem_coNP,Cslib.GameTheory.PredictionMarket.DivisibleOrderMatching_coNPComplete: nativecoNP-completeness of divisible compound order matching [PennockSami2007, Theorem 26.6(ii), pp. 660–661].
References #
Compound conditional orders and payoffs (§26.3.1.1–26.3.1.2, pp. 659–660) #
A compound conditional order "quantity units of security S_{event | condition} at unit
limit price price" [PennockSami2007, §26.3.1.1, p. 659]. Positive quantity represents a buy
order and negative quantity represents a sell order; condition = [] represents the
unconditional tautology ⊤.
- quantity : ℚ
Signed order quantity
q(q > 0buy,q < 0sell). - price : ℚ
Unit limit price
p. - event : Logic.PL.CNF ℕ
Event formula
φpaying$1when satisfied undercondition. - condition : Logic.PL.CNF ℕ
Conditioning formula
ψ(the order is cancelled and refunded ifψis false).
Instances For
The tuple of the fields of encCompoundOrder.
Framed encRat (quantity), framed encRat (price), framed encCNF (event), and encCNF
(condition), encoding CompoundOrder.
Encoded list of compound orders: encList encCompoundOrder.
Trader payoff ϒ^ω = q · 1_{ω ∈ ψ} · (1_{ω ∈ φ} - p) of compound order o in state ω
[PennockSami2007, §26.3.1.1, p. 659].
Auctioneer payoff (surplus) ϒ_auc^ω = ∑ i, -(α i) * ϒ_i^ω under acceptance vector α in
state ω [PennockSami2007, §26.3.1.2, p. 659].
Indivisible matching problem [PennockSami2007, Definition 26.3, p. 659]: there exist
α_i ∈ {0, 1}, not all zero, such that the auctioneer never loses money in any state ω.
Divisible matching problem [PennockSami2007, Definition 26.5, p. 660]: there exist
α_i ∈ [0, 1], not all zero, such that the auctioneer never loses money in any state ω.
Divisible matching restricted to a finite set S of states: the auctioneer breaks even on
every state ω ∈ S.
Decision problem Divisible Compound Order Matching [PennockSami2007, Definition 26.5 & Theorem 26.6, pp. 660–661]: lists of compound orders admitting a divisible match.
Every indivisible match is in particular a divisible match.
Linear-programming characterizations (Theorem 26.6(i), pp. 660–661) #
LP objective equivalence [PennockSami2007, Theorem 26.6(i) proof, pp. 660–661]:
HasDivisibleMatch O holds if and only if the linear program 0 ≤ α i ≤ 1,
∀ ω, 0 ≤ auctioneerPayoff O α ω attains a strictly positive total volume 0 < ∑ i, α i.
Simplex-normalized LP feasibility equivalence: by homogeneity of auctioneerPayoff,
HasDivisibleMatch O holds if and only if there exists a probability vector α ≥ 0 with
∑ i, α i = 1 and ∀ ω, 0 ≤ auctioneerPayoff O α ω.
Finite-variable projection, Farkas duality, and small integer certificates #
All variable occurrences across all event and conditioning formulas of O.
Assignment described by a certificate bit-list bits along the variable occurrences
orderVars O (analogous to SAT.assignment).
Integer-scaled trader payoff (q.den * p.den) * orderPayoff o ω, avoiding rational division
during certificate verification.
Small-support Farkas & subset-infeasibility characterizations (p. 661) #
Small-support rational Farkas certificate [PennockSami2007, Theorem 26.6(ii) proof,
p. 661]: a list of m = O.length compound orders admits no divisible match if and only if there
exist at most m states S (hence S.card ≤ m + 1) and nonnegative rational weights
w : (ℕ → Bool) → ℚ such that every order has strictly positive weighted payoff on S.
Small-constraint infeasibility characterization [PennockSami2007, Theorem 26.6(ii) proof,
p. 661]: no divisible match exists for m = O.length orders if and only if there exists a subset
S of at most m states (hence at most m + 1 state constraints) that already forbids every
divisible match (¬ HasDivisibleMatchOn O S).
Native coNP-membership of DivisibleOrderMatching (Theorem 26.6(ii) upper bound) #
Divisible compound order matching belongs to coNP
[PennockSami2007, Theorem 26.6(ii), pp. 660–661]: every non-matchable order list has a
polynomial-size integer Farkas certificate supported on at most O.length states, verified
natively in polynomial time on multi-tape Turing machines.
Native coNP-hardness and coNP-completeness (Theorem 26.6(ii), p. 661) #
Polynomial-time many-one reduction UNSAT ≤ₚ DivisibleOrderMatching
[PennockSami2007, Theorem 26.6(ii) proof, p. 661].
Divisible compound order matching is coNP-hard
[PennockSami2007, Theorem 26.6(ii), pp. 660–661].
Theorem 26.6(ii) ([PennockSami2007, pp. 660–661]): the divisible order-matching problem
for compound conditional securities with unlimited base events is coNP-complete.