Documentation

Complexitylib.Classes.PCP.Internal.LengthMod

Counting an input's length modulo four #

A single polynomial-time language, built because the analysis of the PCP statement needs one concrete verdict that depends on the length of its input: the strings whose length is divisible by four.

The construction is the obvious one, assembled from the existing toolkit rather than from a machine. A counter with four states is a finite function, so ite_mem_finset_mem_FP puts one step of it in FP; unaryLength_mem_FP supplies one tick per input bit; and iterate_mem_FP runs the ticks.

Main definitions #

Main results #

The four states of the counter, as unary strings.

Equations
Instances For

    One step of a counter modulo four. Outside the four states it resets, which keeps the function total without leaving the finite table.

    Equations
    Instances For

      The counter counts.

      The counter, run once per input bit.

      Equations
      Instances For

        Reading the counter: it is zero exactly on the multiples of four.

        Equations
        Instances For

          The language of lengths divisible by four.

          Equations
          Instances For