Documentation

Complexitylib.DescriptiveComplexity.Reduction.Encoding.Internal

Correctness and polynomial time of encoded interpretations #

Generate each defining formula's truth table in the canonical tuple order and copy each designated constant's one-hot block. The resulting string is exactly the encoding of the interpreted structure. Polynomial-time validation guards this table generator and maps every malformed input to the empty string.

theorem Complexity.DescriptiveComplexity.rawEncoding_mem_FP_internal {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