Documentation

CslibFrontier.Logics.FirstOrder.Encoding.Power

The power interpretation on k-tuples #

Given a finite relational vocabulary v : Vocabulary L and a tuple width k ≥ 1 bounding all arities of v, a k-tuple x : Fin k → M over a finite structure M numbered by e : M ≃ Fin n represents the natural number tupleIndex (e ∘ x) < n ^ k in base n (little-endian).

The relational language v.powerLanguage describes the numbers below n ^ k together with the input tables:

We construct a first-order interpretation v.powerInterpretation k har of dimension Fin k from L.sum ESO.orderLanguage to v.powerLanguage and prove (v.powerEquiv) that on (M, e) the interpreted structure is isomorphic to (Fin (n ^ k), v.powerStructure (v.encode M e) (n ^ k)). Pulling back along this interpretation via FO.Interpretation.onESOSentence therefore turns an existential second-order sentence about the numeric structure Fin (n ^ k) into one about M (v.realize_onESOSentence_powerInterpretation). Machine simulations in descriptive complexity (Fagin, Immerman–Vardi, Grädel, NL ⊆ FO(TC)) run on this numeric structure.

Main definitions #

Main results #

References #

The power language and canonical numeric structure #

The relational language of a power structure over a vocabulary v:

  • unary relation .inl () (powerIsElem) testing < n,
  • unary relation .inr (.inl i) (powerInTable i) testing < n ^ v.arity i,
  • unary relation .inr (.inr i) (powerTableBit i) testing the i-th relation table of v, and
  • binary relation () (powerLt) for the strict linear order <.
Instances For

    The binary relation symbol < of v.powerLanguage.

    Instances For

      The unary relation symbol < n of v.powerLanguage.

      Instances For

        The unary relation symbol < n ^ v.arity i of v.powerLanguage.

        Instances For

          The unary relation symbol for the i-th relation table of v in v.powerLanguage.

          Instances For
            @[instance_reducible]

            The canonical v.powerLanguage-structure on Fin B induced by an EncodedStructure a: powerLt is < on Fin B, powerIsElem is < a.1, powerInTable i is < a.1 ^ v.arity i, and powerTableBit i holds of m when m < a.1 ^ v.arity i and bit m of the i-th table of a is true.

            Instances For

              The first-order interpretation of v.powerLanguage on k-tuples #

              @[reducible, inline]

              The binary relation symbol < of ESO.orderLanguage, inside L.sum ESO.orderLanguage.

              Instances For

                The formula x < y in L.sum ESO.orderLanguage for free variables p, q : α.

                Instances For

                  The formula ∀ z, ¬ (z < x_p) in L.sum ESO.orderLanguage, saying that x_p is the minimum element of the linear order.

                  Instances For

                    The colexicographic < formula on two k-tuples in L.sum ESO.orderLanguage.

                    Instances For

                      The formula testing that all coordinates at indices ≥ a are the minimum element.

                      Instances For
                        noncomputable def Cslib.Logic.Vocabulary.powerTableBitFormula {L : FirstOrder.Language} (v : Vocabulary L) (k : ℕ) (har : ∀ (i : Fin v.count), v.arity i ≤ k) (idx : Fin v.count) :

                        The formula defining powerTableBit idx on a k-tuple.

                        Instances For

                          The first-order interpretation of v.powerLanguage in L.sum ESO.orderLanguage of dimension Fin k.

                          Instances For
                            def Cslib.Logic.Vocabulary.powerEquiv {L : FirstOrder.Language} (v : Vocabulary L) (k : ℕ) (hk : 1 ≤ k) (har : ∀ (i : Fin v.count), v.arity i ≤ k) (M : Type) [L.Structure M] {n : ℕ} (e : M ≃ Fin n) :

                            The power isomorphism: when M is expanded by the strict linear order of e : M ≃ Fin n, the structure interpreted by v.powerInterpretation k har is isomorphic to Fin (n ^ k) with v.powerStructure (v.encode M e) (n ^ k).

                            Instances For
                              theorem Cslib.Logic.Vocabulary.realize_onESOSentence_powerInterpretation {L : FirstOrder.Language} (v : Vocabulary L) (k : ℕ) (hk : 1 ≤ k) (har : ∀ (i : Fin v.count), v.arity i ≤ k) (M : Type) [L.Structure M] {n : ℕ} (e : M ≃ Fin n) (Ψ : ESO.Sentence v.powerLanguage) :

                              Pulling back an existential second-order sentence Ψ over v.powerLanguage along v.powerInterpretation k har holds in (M, orderRelOfEquiv e) iff Ψ holds in Fin (n ^ k) with v.powerStructure (v.encode M e) (n ^ k).