Documentation

Complexity.Logics.FirstOrder.Interpretation.Encoding

Encoding order-free interpreted structures #

An interpretation maps a well-formed structure instance to its interpreted structure, numbered by increasing tuple-index rank. An instance (n, tables) with invalid table shapes maps to a fixed malformed target instance, outside every target query language. This is a map between parsed instances; no claim about decoding arbitrary bit strings is made.

Main definitions #

Main results #

References #

Encode the structure interpreted in a well-formed input, numbering its elements by ranks. Malformed inputs map to a fixed malformed structure encoding. This includes empty structures, empty interpreted domains, nullary relations, and interpretations of dimension zero.

Instances For
    theorem Cslib.Logic.FO.Interpretation.encodedMap_of_wellFormed {L : FirstOrder.Language} {L' : FirstOrder.Language} [L.IsRelational] [L'.IsRelational] {ι : Type} {d : ℕ} (I : Interpretation L L' ι) (v : Vocabulary L) (v' : Vocabulary L') (e : ι ≃ Fin d) {a : EncodedStructure} (ha : v.WellFormed a) :
    I.encodedMap v v' e a = v'.encode (I.Model (Fin a.1)) (I.rankEquiv e a.1)
    @[simp]

    The encoded interpreted structure is well formed exactly when the input is.

    For an isomorphism-closed target class, target query membership is exactly source validity and membership of the interpreted structure in that class.