Documentation

Complexity.Logics.FirstOrder.Ordered.DomainInterpretation

Ordered interpretations with a domain formula #

An ordered interpretation of dimension k supplies a domain formula and formulas for the target input relations, all over the canonically ordered source language. In a source structure the universe of the image is the set of k-tuples satisfying the domain formula, ordered lexicographically with the first coordinate most significant. Up to the rank isomorphism, this is the image of [Immerman1999, Definition 1.26]: here the domain tuples are renumbered by rank onto Fin m, where m is their number, and the target relations are evaluated at the unranked tuples.

The canonical numerics of the image are those of Fin m; nothing about their definability is assumed at this level. A first-order query on ordered structures must include first-order definitions of the target numerics [Immerman1999, Remark 1.32], and without the assumption that the domain formula is true, target BIT need not be first-order definable in the image [Immerman1999, the paragraph after Exercise 1.33]. These semantic maps are therefore more general than Immerman's first-order queries: his parity example shows that an image whose numerics are not certified need not be a first-order query. The example is cited, not formalized. His numeric definitions are the certificates of Ordered.DomainInterpretation.Certificate, which first-order reductions (Ordered.Reduces) require.

An ordered target structure needs at least two elements [Immerman1999, Proviso 1.15]. An interpretation is admissible when its domain has at least two tuples in every source. This is the library's convention, motivated by that proviso; Immerman's definition does not discuss smaller domains.

Main definitions #

Main results #

References #

An ordered interpretation of dimension k of L' in L: a domain formula on k-tuples, and for each relation symbol of L' a formula with a block of k variables per argument. All formulas are over the canonically ordered source language.

Instances For

    The same formulas, as an order-free interpretation of L' in the canonically ordered source language, with tuples of Fin k as domain elements.

    Instances For

      The lexicographic ranks, among all k-tuples, of the domain tuples.

      Instances For

        The number of domain tuples: the size of the image.

        Instances For

          The domain tuple of a given rank, in lexicographic order.

          Instances For

            The domain tuples are counted by card.

            The tuple of every rank satisfies the domain formula.

            Ranks number the domain tuples in lexicographic order.

            theorem Cslib.Logic.FO.Ordered.DomainInterpretation.exists_unrank_eq {L : FirstOrder.Language} {L' : FirstOrder.Language} {k : ℕ} {I : DomainInterpretation L L' k} {M : Structure L} {x : Fin k → Fin M.size} (hx : I.domain.Realize x) :
            ∃ (i : Fin (I.card M)), I.unrank M i = x

            Every domain tuple has a rank.

            noncomputable def Cslib.Logic.FO.Ordered.DomainInterpretation.rank {L : FirstOrder.Language} {L' : FirstOrder.Language} {k : ℕ} (I : DomainInterpretation L L' k) (M : Structure L) (x : Fin k → Fin M.size) (hx : I.domain.Realize x) :
            Fin (I.card M)

            The rank of a domain tuple.

            Instances For
              @[simp]

              The rank of a domain tuple counts the domain tuples before it in lexicographic order.

              theorem Cslib.Logic.FO.Ordered.DomainInterpretation.val_rank {L : FirstOrder.Language} {L' : FirstOrder.Language} {k : ℕ} {I : DomainInterpretation L L' k} {M : Structure L} [DecidablePred fun (x : Fin k → Fin M.size) => I.domain.Realize x] {x : Fin k → Fin M.size} (hx : I.domain.Realize x) :
              ↑(I.rank M x hx) = {y : Fin k → Fin M.size | I.domain.Realize y ∧ lexRank y < lexRank x}.card

              The rank of a domain tuple, as a count of the domain tuples before it.

              theorem Cslib.Logic.FO.Ordered.DomainInterpretation.unrank_eq_of_strictMono {L : FirstOrder.Language} {L' : FirstOrder.Language} {k : ℕ} {I : DomainInterpretation L L' k} {M : Structure L} {m : ℕ} (g : Fin m → Fin k → Fin M.size) (hdom : ∀ (i : Fin m), I.domain.Realize (g i)) (hsurj : ∀ (x : Fin k → Fin M.size), I.domain.Realize x → ∃ (i : Fin m), g i = x) (hmono : StrictMono fun (i : Fin m) => lexRank (g i)) :
              ∃ (h : I.card M = m), ∀ (i : Fin (I.card M)), I.unrank M i = g (Fin.cast h i)

              Characterization of ranks. An enumeration of exactly the domain tuples that increases in lexicographic order is unrank, up to the size cast.

              When every tuple is in the domain, there are M.size ^ k of them.

              When every tuple is in the domain, ranks are lexicographic ranks among all tuples.

              The image #

              An interpretation is admissible when every source has at least two domain tuples, so that its image carries distinct canonical constants 0 and 1.

              Instances For
                @[instance_reducible]

                The target input relations on the ranks of the domain tuples. Numeric symbols are the canonical ones of Fin (I.card M).

                Instances For

                  The image of a source structure under an admissible interpretation.

                  Instances For
                    theorem Cslib.Logic.FO.Ordered.DomainInterpretation.relMap_map {L : FirstOrder.Language} {L' : FirstOrder.Language} {k : ℕ} {I : DomainInterpretation L L' k} {M : Structure L} [L'.IsRelational] (hI : I.Admissible) {r : ℕ} (R : L'.Relations r) (x : Fin r → Fin (I.map hI M).size) :
                    FirstOrder.Language.Structure.RelMap R x ↔ (I.rel R).Realize fun (p : Fin r × Fin k) => I.unrank M (x p.1) p.2

                    A target relation holds of some ranks when its formula holds of the unranked tuples.

                    The maps between ordered structures given by admissible ordered interpretations with a domain formula, with no numeric certificate.

                    Instances For

                      The image of an admissible interpretation is a domain map.