Documentation

Complexitylib.Classes.P.Bridge

Small polynomial-time string functions #

A few string functions that polynomial-time constructions throughout the library build on: a ruler of polynomial length, an emptiness flag, and dropping the leading bit. Each is one application of the FP closure rules of Complexitylib.Classes.Containments.Internal.FPBridge, which this module re-exports.

Main definitions #

Main results #

Rulers of polynomial length #

A ruler whose length is a polynomial in the input length.

Equations
Instances For
    theorem Complexity.polyRulerFn_mem_FP (q : Polynomial ℕ) {a : List Bool → List Bool} (ha : a ∈ FP) :
    (fun (z : List Bool) => polyRuler q (a z)) ∈ FP

    Emptiness and the leading bit #

    Is the string empty, as a flag.

    Equations
    Instances For
      theorem Complexity.emptyFlagFn_mem_FP {a : List Bool → List Bool} (ha : a ∈ FP) :
      (fun (z : List Bool) => emptyFlag (a z)) ∈ FP

      Drop the leading bit.

      Equations
      Instances For
        theorem Complexity.dropOneFn_mem_FP {a : List Bool → List Bool} (ha : a ∈ FP) :
        (fun (z : List Bool) => dropOne (a z)) ∈ FP