Documentation

Complexity.Computability.Complexity.Classes.LogSpace.FirstOrder.Ordered.Reduction

Ordered interpretations in logarithmic space #

The encoded map of a fixed ordered interpretation with a domain formula is computed by the domain-counting transducer of Cslib.Logic.FO.Interpretation.computableInLogSpace_encodedMapWith, instantiated with the ordered formula compiler: canonical numeric atoms (order, BIT, 0, 1, max) are computed from cardinality and indices, and no numeric tables are supplied. The coordinates are enumerated by Fin.revPerm, so that tuple indices are lexicographic ranks. The transducer checks the source shape and size before emitting output, then writes the unary count of the domain tuples and each target relation table over their ranks.

A full-tuple interpretation is the instance with domain ⊤, through FullTupleInterpretation.encodedMap_toDomainInterpretation; it has no separate program.

Main definitions #

Main results #

References #

The ordered formula compiler: canonical numeric atoms are computed natively, input atoms read from the input tables, and inputs of size below two are inadmissible.

Instances For

    The encoded image is the output of the domain-counting transducer with the ordered formula compiler, numbering coordinates in reverse so that tuple indices are lexicographic ranks.

    Ordered interpretations with a domain formula are computed in logarithmic space. For a fixed interpretation and fixed vocabularies, the encoded image, numbered by lexicographic rank of the domain tuples, is computed by a native transducer whose work space is logarithmic in the full encoded input length. The domain may have fewer than two tuples.

    Domain maps are simulated in logarithmic space. Every image map of an admissible ordered interpretation with a domain formula is simulated, through partial decoding, by a map of encodings computable in logarithmic space: its encoded map.

    Ordered interpretations are logspace reductions. An admissible ordered interpretation with a domain formula whose image map reduces the query K to K' induces a logspace many-one reduction between their encoded query languages.

    First-order reductions are logspace reductions [Immerman1999, Theorem 3.1 and the remark after Definition 2.14]: a first-order reduction of the ordered query K to K' induces a logspace many-one reduction between their encoded query languages. The numeric certificate of the reduction is not used; the transducer computes ranks by counting. The closure of L and P under first-order reductions, encodedLanguage_mem_L and encodedLanguage_mem_P, are the corollaries of [Immerman1999, Proposition 3.10].

    Encoded ordered queries in L are closed under first-order reductions.

    Encoded ordered queries in P are closed under first-order reductions.

    The actual canonical full-tuple encoded map is computed by a native logspace transducer. The dimension, formulas and vocabularies are fixed. Space is logarithmic in full encoded input length; the unary target size and relation tables are streamed through the write-only output. It is the domain-counting transducer for the full domain.

    For positive tuple dimension, the encoded map belongs to the target ordered query language if and only if the source belongs to the pulled-back ordered query language.

    For positive tuple dimension, the canonical full-tuple encoded map is a logspace many-one reduction from the pulled-back ordered query language to the target ordered query language.