Documentation

CslibFrontier.Computability.Complexity.Classes.TFNP.Subclasses.Sperner

Circuit 2D-SPERNER is in PPAD #

An instance inst : Sperner2DInstance of Sperner2D consists of a unary size parameter inst.gridExp (m) and a Boolean circuit code inst.circuit (C). It colours the points of the 2 ^ m × 2 ^ m grid (Sperner2D.color): boundary points receive the Sperner boundary colour Cslib.Sperner.boundaryColor, and an interior point (x, y) receives the colour read off the outputs of C on the m-bit codes of x and y (Sperner2D.outputColor). A solution is the 2m + 1-bit code of a trichromatic triangle (Sperner2D.encodeTriangle). Every instance colours the grid by a Sperner colouring, so every instance has a solution by Sperner's lemma (Cslib.Sperner.IsSpernerColoring.exists_trichromatic).

The proof of Sperner's lemma by following doors is the PPAD argument. Transported to triangle codes, the door graph Cslib.Sperner.next, Cslib.Sperner.prev is computed in polynomial time (Sperner2D.succ, Sperner2D.pred), its distinguished source Cslib.Sperner.start has code zeroVertex (2m + 1), and Sperner2D is equal to the end-of-line relation of this graph (Sperner2D.eq_endOfLineRel). Membership in PPAD and the search reduction to EndOfLine follow from the general results for endOfLineRel.

Sperner2D is the two-dimensional discrete Brouwer problem of Chen, Deng and Teng [CDT09] (Section 4.1, Definitions 4.2, 4.4 and 4.5 with d = 2), up to the following presentation choices.

Because of the different grid size and input encoding, an instance of Sperner2D is not literally an instance of their problem.

The membership in PPAD is due to Papadimitriou [Pap94b]; this file formalizes the door-following reduction to EndOfLine for this presentation.

Main definitions #

Main results #

References #

An instance of circuit 2D-SPERNER: the unary grid exponent gridExp (m, for the 2 ^ m × 2 ^ m grid) and the Boolean colouring circuit circuit.

  • gridExp : ℕ

    Binary logarithm m of the 2 ^ m × 2 ^ m grid side length, encoded in unary.

  • circuit : CircuitCode

    Boolean circuit code computing interior grid colours from m-bit coordinates.

Instances For
    theorem Cslib.Complexity.encSperner2D_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → List (Circuits.Boolean.Op × List ℕ) × List ℕ} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encUnary T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Circuits.Boolean.encCode T1 S1) :
    Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { gridExp := x0 x, circuit := x1 x }) encIn encSperner2D (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x

    Encoding of a Sperner2DInstance: the grid exponent gridExp in unary (framed), followed by the Boolean circuit code circuit.

    theorem Cslib.Complexity.encSperner2D_gridExp_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Sperner2DInstance} :
    theorem Cslib.Complexity.encSperner2D_circuit_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Sperner2DInstance} :
    theorem Cslib.Complexity.encSperner2D_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 : γ → ℕ} {x1 : γ → List (Circuits.Boolean.Op × List ℕ) × List ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encUnary budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Circuits.Boolean.encCode budget) :
    Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { gridExp := x0 x, circuit := x1 x }) encIn encSperner2D budget

    The colour read off the output bits of a colouring circuit: colour 1 if output bit 0 is set, otherwise colour 2 if output bit 2 is set, otherwise colour 0. On outputs in the case encoding Δ₁⁺, Δ₁⁻, Δ₂⁺, Δ₂⁻ of Chen, Deng and Teng, Case i decodes to colour i (Case 3 to 0).

    The colouring of the 2 ^ inst.gridExp × 2 ^ inst.gridExp grid presented by inst: the boundary colour on the boundary, and the colour computed by inst.circuit from the inst.gridExp-bit codes of the coordinates (least significant bit first) elsewhere.

    The 2m + 1-bit code of a triangle: its orientation bit, then the m-bit codes of x and y (least significant bit first).

    Decode a 2m + 1-bit word as a triangle; inverse to encodeTriangle on the grid.

    The successor function of the door graph on triangle codes.

    The predecessor function of the door graph on triangle codes.

    Circuit 2D-SPERNER. A solution of inst : Sperner2DInstance is the 2 * inst.gridExp + 1-bit code of a trichromatic triangle of Sperner2D.color inst on the 2 ^ inst.gridExp × 2 ^ inst.gridExp grid.

    Instances For
      @[instance_reducible]

      Decoding inverts encoding on the triangles of the grid.

      Every word of length 2m + 1 is the code of its decoding.

      Every word of length 2m + 1 decodes to a triangle of the grid.

      The distinguished source start has the all-zero code.

      Every instance presents a Sperner colouring.

      A triangle code has an outgoing edge exactly when the triangle has an exit door.

      A triangle code has an incoming edge exactly when the triangle has an entry door and is not start.

      Sperner2D is the end-of-line problem of the door graph on triangle codes.

      Polynomial-time door graph #

      The length 2m + 1 of triangle codes is computable in polynomial time, in unary.

      Circuit 2D-SPERNER is a total search problem in FNP.

      Circuit 2D-SPERNER reduces to EndOfLine, mapping the colouring circuit to circuits for the door graph and returning the vertex found.