Documentation

Complexitylib.DescriptiveComplexity.Reduction.Encoding

Structural first-order reductions give polynomial-time many-one reductions #

The computable interpretation agrees exactly with the original structure map. Its encoded map belongs to FP, outputs the complete target truth tables and constant blocks, and sends malformed source strings to the non-encoding []. Consequently FOReduces induces the library's existing MapReducesPoly relation on binary query languages, with no promise restricting the input strings.

Combining this bridge with Fagin's upper direction gives a completeness criterion: an existential-SO target query is NP-complete if an NP-hard encoded query reduces to it by an existing universe-preserving FO interpretation. This implements the structural reduction method of Immerman's Descriptive Complexity, Chapter 3. The tagged tuple encoding bridge and exact first-order projections remain separate.

@[simp]

Computable interpretation represents the original propositional structure map exactly.

Arithmetic generation yields precisely the interpreted structure's encoding.

@[simp]

The raw output includes the header, every target relation table, and every constant block.

theorem Complexity.DescriptiveComplexity.FOInterpretation.rawEncoding_mem_FP {V W : Vocabulary} (I : FOInterpretation V W) {input : List Bool → List Bool} {card : List Bool → ℕ} (hinput : input ∈ FP) (hcard : UnaryFn card) :
(fun (z : List Bool) => I.rawEncoding (card z) (input z)) ∈ FP

Arithmetic table generation is polynomial-time on polynomial-time supplied input and size.

@[simp]

On valid encodings, the binary map applies the interpretation and re-encodes its output.

Every malformed source encoding maps to the empty string.

@[simp]

In particular, an interpretation's binary map preserves the fixed malformed input [].

A valid input produces the full encoded target length at the same universe cardinality.

The full output length is bounded by the target encoding polynomial in input length.

Every fixed universe-preserving FO interpretation gives an actual polynomial-time string map.

The binary map pulls query languages back exactly, including every malformed input.

Structural FO reducibility induces polynomial-time many-one reducibility on binary languages.

The legacy quantifier-free interpretation reductions also induce polynomial-time reductions.

Machine P membership transports backward along structural FO reductions.

Machine NP membership transports backward along structural FO reductions.

An ESO target is NP-complete when an NP-hard encoded query FO-reduces to it.