Documentation

CslibFrontier.Computability.Complexity.Classes.TFNP.Subclasses

Total search subclasses: PLS, PPP, PPAD and PPA #

The subclasses PLS Johnson, Papadimitriou and Yannakakis and PPP, PPAD, PPA Papadimitriou, Beame, Cook, Edmonds, Impagliazzo and Pitassi classify total FNP search problems by the finite combinatorial principle that witnesses totality on the hypercube {0, 1} ^ (n a):

Uniform polynomial-time families and canonical circuit problems #

Each class is defined via uniform polynomial-time families on the instance type α: the vertex bit-length n : α → ℕ is computable in polynomial time in unary (encUnary), and the neighbor, successor, predecessor or cost maps are computable in polynomial time on pairs encPair enc encBits (with costs in binary encNat), in the sense of Turing.MultiTapeTM.ComputableInPolyTime. By pulling a family back along the instance map of a search reduction, each class is closed under SearchReducible across arbitrary encoded instance types (SearchReducible.mem_PLS, .mem_PPP, .mem_PPAD, .mem_PPA).

The canonical circuit-presented problems LocalOpt, Pigeon, EndOfLine and Leaf, whose instances supply n in unary together with raw De Morgan circuit codes (Cslib.Circuits.Boolean.encCode) evaluated via evalCode (CslibFrontier.Computability.Circuit.Boolean.EvaluationTime), are instances of these uniform families (LocalOpt_mem_PLS, Pigeon_mem_PPP, EndOfLine_mem_PPAD, Leaf_mem_PPA) and therefore belong to TFNP. The companion module CslibFrontier/Computability/Complexity/Classes/TFNP/Subclasses/Completeness.lean compiles uniform polynomial-time family evaluations into circuit codes, proving SearchComplete for LocalOpt, Pigeon, EndOfLine and Leaf. These reductions preserve vertex witnesses and, for local search, the numerical cost values through fixed-width binary words with leading zeros.

Main definitions #

Main results #

References #

Polynomial-time bit-string and binary-number primitives #

A polynomial-time number-valued function C on a family of cubes {0, 1} ^ (n a) has a polynomial-time width: some m, computed in unary, bounds the binary length of C (a, u) for every u of length n a.

FNP and TFNP membership of the family relations #

A polynomial-time length-preserving pigeonhole family defines a TFNP relation.

A polynomial-time length-preserving undirected parity family defines a TFNP relation.

The subclasses PLS, PPP, PPAD and PPA #

def Cslib.Complexity.PLS {α : Type} (enc : α ↪ List Bool) :
Set (α → List Bool → Prop)

Polynomial Local Search (PLS) Johnson, Papadimitriou and Yannakakis: FNP search problems search-reducible to finding a local minimum of a uniform polynomial-time local-search family localOptRel n N C.

def Cslib.Complexity.PPP {α : Type} (enc : α ↪ List Bool) :
Set (α → List Bool → Prop)

Polynomial Pigeonhole Principle (PPP) Papadimitriou: FNP search problems search-reducible to finding a preimage of 0 ^ (n a) or a collision of a uniform polynomial-time pigeonhole family pigeonRel n F.

def Cslib.Complexity.PPAD {α : Type} (enc : α ↪ List Bool) :
Set (α → List Bool → Prop)

Polynomial Parity Argument on Directed graphs (PPAD) Papadimitriou: FNP search problems search-reducible to finding an end-of-line vertex of a uniform polynomial-time directed path family endOfLineRel n P S.

def Cslib.Complexity.PPA {α : Type} (enc : α ↪ List Bool) :
Set (α → List Bool → Prop)

Polynomial Parity Argument (PPA) Papadimitriou: FNP search problems search-reducible to finding a leaf of a uniform polynomial-time degree-≤ 2 undirected graph family leafRel n N₁ N₂.

Closure under search reductions #

theorem Cslib.Complexity.SearchReducible.mem_PLS {α β : Type} {enc : α ↪ List Bool} {encB : β ↪ List Bool} {R : α → List Bool → Prop} {T : β → List Bool → Prop} (h : SearchReducible enc encB R T) (hR : R ∈ FNP enc) (hT : T ∈ PLS encB) :
R ∈ PLS enc

PLS is closed under polynomial-time search reductions across arbitrary instance types.

theorem Cslib.Complexity.SearchReducible.mem_PPP {α β : Type} {enc : α ↪ List Bool} {encB : β ↪ List Bool} {R : α → List Bool → Prop} {T : β → List Bool → Prop} (h : SearchReducible enc encB R T) (hR : R ∈ FNP enc) (hT : T ∈ PPP encB) :
R ∈ PPP enc

PPP is closed under polynomial-time search reductions across arbitrary instance types.

theorem Cslib.Complexity.SearchReducible.mem_PPAD {α β : Type} {enc : α ↪ List Bool} {encB : β ↪ List Bool} {R : α → List Bool → Prop} {T : β → List Bool → Prop} (h : SearchReducible enc encB R T) (hR : R ∈ FNP enc) (hT : T ∈ PPAD encB) :
R ∈ PPAD enc

PPAD is closed under polynomial-time search reductions across arbitrary instance types.

theorem Cslib.Complexity.SearchReducible.mem_PPA {α β : Type} {enc : α ↪ List Bool} {encB : β ↪ List Bool} {R : α → List Bool → Prop} {T : β → List Bool → Prop} (h : SearchReducible enc encB R T) (hR : R ∈ FNP enc) (hT : T ∈ PPA encB) :
R ∈ PPA enc

PPA is closed under polynomial-time search reductions across arbitrary instance types.

Inclusions in TFNP and between subclasses #

theorem Cslib.Complexity.PLS_subset_TFNP {α : Type} {enc : α ↪ List Bool} :
PLS enc ⊆ TFNP enc

PLS ⊆ TFNP: every problem in PLS is total and in FNP.

theorem Cslib.Complexity.PPP_subset_TFNP {α : Type} {enc : α ↪ List Bool} :
PPP enc ⊆ TFNP enc

PPP ⊆ TFNP: every problem in PPP is total and in FNP.

theorem Cslib.Complexity.PPAD_subset_TFNP {α : Type} {enc : α ↪ List Bool} :
PPAD enc ⊆ TFNP enc

PPAD ⊆ TFNP: every problem in PPAD is total and in FNP.

theorem Cslib.Complexity.PPA_subset_TFNP {α : Type} {enc : α ↪ List Bool} :
PPA enc ⊆ TFNP enc

PPA ⊆ TFNP: every problem in PPA is total and in FNP.

theorem Cslib.Complexity.endOfLineRel_searchReducible_leafRel {α : Type} {enc : α ↪ List Bool} {n : α → ℕ} {P S : α × List Bool → List Bool} (hP_len : PreservesWidth n P) (hS_len : PreservesWidth n S) :
SearchReducible enc enc (endOfLineRel n P S) (leafRel (fun (a : α) => n a + 1) (ppadToPpaN₁ n P S) (ppadToPpaN₂ n P S))

Every directed end-of-line family search-reduces to its associated bipartite undirected parity family.

theorem Cslib.Complexity.PPAD_subset_PPA {α : Type} {enc : α ↪ List Bool} :
PPAD enc ⊆ PPA enc

PPAD ⊆ PPA Papadimitriou: every problem in PPAD is in PPA.

Evaluating circuit codes into fixed-length bit strings #

Normalize a bit string w to length n by truncating or padding with false.

@[simp]
@[simp]
theorem Cslib.Complexity.padBits_of_length_eq {n : ℕ} {w : List Bool} (h : w.length = n) :
padBits n w = w

Evaluate a circuit code on u and normalize the output to n bits.

On the code of a De Morgan circuit with n inputs and m outputs, evalCircuitCode m computes the m-bit output of the circuit.

Canonical circuit-presented problems #

@[reducible, inline]

Encoding of Pigeon instances (n, cF): the bit-length n in unary and the circuit code cF.

@[reducible, inline]

Encoding of LocalOpt instances (n, cN, cC): n in unary, neighbor circuit cN, and cost circuit cC.

@[reducible, inline]

Encoding of EndOfLine instances (n, cP, cS): n in unary, predecessor circuit cP, and successor circuit cS.

@[reducible, inline]

Encoding of Leaf instances (n, cN₁, cN₂): n in unary and the two neighbor circuits cN₁, cN₂.

Circuit LocalOpt (PLS): given (n, cN, cC), find an n-bit string u whose neighbor evalCircuitCode n cN u does not have strictly smaller cost binaryValue (evalCircuitOutputs cC ·).

Circuit Pigeon (PPP): given (n, cF), find a 2n-bit string encoding a preimage of 0 ^ n or a collision of evalCircuitCode n cF.

Circuit EndOfLine (PPAD): given (n, cP, cS), find an n-bit end-of-line vertex of the directed graph presented by evalCircuitCode n cP and evalCircuitCode n cS.

Circuit Leaf (PPA): given (n, cN₁, cN₂), find an n-bit leaf vertex of the degree-≤ 2 undirected graph presented by evalCircuitCode n cN₁ and evalCircuitCode n cN₂.