Documentation

Complexity.Logics.FirstOrder.Encoding.Layout

The positions of the bits of an encoded structure #

The encoding encStructure (n, tables) of an input is the framed cardinality in unary followed by the framed truth tables (Cslib.Logic.encStructure_eq). This file locates its bits: the markers of the unary cardinality, and for each table its start (Cslib.Logic.tableStart), its markers, its bits and its terminator. Past the last table there is nothing to read. These are the facts an algorithm with random access to the encoding needs, such as the logarithmic-space model checker Cslib.Logic.Vocabulary.modelChecker.

Main definitions #

Main results #

References #

The encoding of an input: its framed cardinality in unary, then its framed tables.

The position of the i-th truth table in the encoding of an input; past the last table, the length of the encoding.

Instances For
    theorem Cslib.Logic.tableStart_succ {a : EncodedStructure} {i : ℕ} (hi : i < a.2.length) :
    tableStart a (i + 1) = tableStart a i + 2 * a.2[i].length + 1

    The bits #

    The markers of the cardinality.

    The terminator of the cardinality.

    The markers of a table.

    The bits of a table.

    There is a bit at the start of every table.