Documentation

CslibFrontier.Computability.PolyTime.CSP.Table

Native polynomial-time explicit relation tables #

The alphabet is the infinite type CSP.Table: every active relation is supplied as an explicit list of rows. No finite-alphabet lookup or assumed solver appears in these certificates. encTable frames the binary arity before the doubly framed Boolean rows. Indices and variable names are binary; list traversal counters are unary. Contraction ranges over the explicit reference row, so malformed huge binary arities do not cause huge loops.

Exactly-one generation takes a scope list, whose length pays for its quadratic output. This is polynomial in that list's framed encoding, not in a binary arity supplied alone. The bounds below charge actual framing, binary arity and binary names. They are explicit encoding calculations for the Section 5.3 update in [KKR18]; they do not assert the paper's full solver or its combinatorial instance-size estimate.

@[reducible, inline]

The tuple of the fields of encTable.

Instances For

    A table's binary arity, framed, followed by its framed list of framed Boolean rows. Each Boolean row bit uses three bits under encList encBool; each row is framed again.

    Instances For
      theorem Cslib.Complexity.CSP.encTable_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → List (List Bool)} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encNat T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBool)) T1 S1) :
      Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { arity := x0 x, rows := x1 x }) encIn encTable (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
      theorem Cslib.Complexity.CSP.encTable_arity_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Logic.PL.CSP.Table} :
      @[reducible, inline]

      Contraction input: table, then feasible reference row, then binary internal positions; the table and the reference row are framed by the enclosing pairs.

      Instances For

        Local contraction, including malformed cases, is native polynomial-time in actual input bits.

        Exact full encoded table size, including binary arity, bit framing and row framing.

        theorem Cslib.Complexity.CSP.length_encTable_contract_le {table : Logic.PL.CSP.Table} {reference : List Bool} {positions : List ℕ} (h : table.canContract reference positions = true) (htwo : 2 ≤ positions.length) :
        (encTable (table.contract reference positions)).length ≤ (encTable table).length

        At least two distinct internal coordinates make the full encoded local table no larger, including its binary arity. This is a local bound, not a whole-solver complexity theorem.

        theorem Cslib.Complexity.CSP.length_encConstraint_tableContract_le {table : Logic.PL.CSP.Table} {reference : List Bool} {positions scope outsideScope : List ℕ} (connector : ℕ) (h : table.canContract reference positions = true) (htwo : 2 ≤ positions.length) (hscope : outsideScope.Sublist scope) :

        Replacing any sublist of old names by that sublist followed by one binary connector name costs at most the connector's full framed name. Table framing is included twice by the enclosing constraint encoding. The caller supplies the outside scope and proves its sublist property.

        Exactly-one's full encoded size is quadratic in the connector count, with binary arity.

        Actual binary constraint size includes every supplied variable name, in addition to the quadratic exactly-one table.

        A concrete quadratic bound in the actual framed binary scope encoding. This resource pays for both the quadratic table and the binary names; binary arity alone would not suffice.