Documentation

DescriptiveComplexity.OrderedComposition

Composition of ordered first-order reductions #

Transitivity of P ≤ᶠᵒ[≤] Q (DescriptiveComplexity.OrderedFOReduction.trans), and the mixed variants with plain FO reductions.

The obstacle to composing two ordered reductions with the plain composition of DescriptiveComplexity.Composition is that the outer reduction's formulas mention the order of the intermediate structure, which is not part of the inner interpretation's output. The fix is classical: the interpreted universe Tag × A^dim carries a linear order that is first-order definable from the order of A – the lexicographic order comparing tags first (by an arbitrary fixed linear order on the finite tag type; tag comparisons are static, i.e., resolved at formula-construction time), then the tuple coordinates in order.

Concretely:

A linear order on any finite type #

@[instance_reducible]

An arbitrary linear order on a finite type, obtained by pulling back the order of Fin n along an arbitrary enumeration. Used to order tags.

Equations
Instances For

    The lexicographic order on tagged tuples #

    def DescriptiveComplexity.tupLeLex {d : } {A : Type} [LinearOrder A] (x y : Fin dA) :

    Lexicographic comparison of tuples: equality, or agreement up to a position where the left tuple is smaller.

    Equations
    Instances For
      def DescriptiveComplexity.tagTupleLe {Tag : Type} [LinearOrder Tag] {d : } {A : Type} [LinearOrder A] (p q : Tag × (Fin dA)) :

      The lexicographic order on tagged tuples: tags first, then the coordinates in order.

      Equations
      Instances For
        @[instance_reducible]
        noncomputable def DescriptiveComplexity.tagTupleOrder {Tag : Type} [LinearOrder Tag] {d : } {A : Type} [LinearOrder A] :
        LinearOrder (Tag × (Fin dA))

        The lexicographic linear order on tagged tuples, lifted along lexEmbed; its is characterized by tagTupleLe_iff.

        Equations
        Instances For
          theorem DescriptiveComplexity.tagTupleLe_iff_le {Tag : Type} [LinearOrder Tag] {d : } {A : Type} [LinearOrder A] (p q : Tag × (Fin dA)) :

          The relation tagTupleLe is the of tagTupleOrder. (Public companion to the private tagTupleLe_iff, for use in relativized composition.)

          First-order formulas for the lexicographic order #

          Lexicographic comparison of two d-tuples (the two arguments of a binary relation), as a formula over the ordered expansion.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem DescriptiveComplexity.realize_lexTupleLeF {L : FirstOrder.Language} {A : Type} [L.Structure A] [LinearOrder A] {d : } {v : Fin 2 × Fin dA} :
            (lexTupleLeF L d).Realize v tupLeLex (fun (i : Fin d) => v (0, i)) fun (i : Fin d) => v (1, i)
            noncomputable def DescriptiveComplexity.lexLeF (L : FirstOrder.Language) {Tag : Type} [LinearOrder Tag] (d : ) (t₁ t₂ : Tag) :

            The full lexicographic comparison of tagged tuples, as a formula over the ordered expansion: the tags are compared statically.

            Equations
            Instances For
              theorem DescriptiveComplexity.realize_lexLeF {L : FirstOrder.Language} {A : Type} [L.Structure A] [LinearOrder A] {Tag : Type} [LinearOrder Tag] {d : } {t₁ t₂ : Tag} {v : Fin 2 × Fin dA} :
              (lexLeF L d t₁ t₂).Realize v tagTupleLe (t₁, fun (i : Fin d) => v (0, i)) (t₂, fun (i : Fin d) => v (1, i))

              Extending an interpretation with the lexicographic order #

              Extension of an interpretation over an ordered base to one whose target carries the order vocabulary, interpreted by the lexicographic order on tagged tuples.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[instance_reducible]

                The lexicographic linear order on the interpreted universe.

                Equations
                Instances For

                  The extended interpretation produces exactly the original interpreted structure equipped with the lexicographic order: the identity map is an isomorphism over the ordered expansion of the target language.

                  Equations
                  Instances For

                    Transitivity #

                    Transitivity of ordered FO reductions: if P ≤ᶠᵒ[≤] Q and Q ≤ᶠᵒ[≤] R, then P ≤ᶠᵒ[≤] R. The intermediate structure is ordered by the lexicographic order on tagged tuples, which is first-order definable from the order of the input.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      A plain FO reduction is in particular an ordered FO reduction: lift its defining formulas to the ordered expansion (they simply ignore the order).

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Mixed transitivity: an ordered FO reduction followed by a plain one.

                        Equations
                        Instances For

                          Mixed transitivity: a plain FO reduction followed by an ordered one.

                          Equations
                          Instances For
                            @[instance_reducible]

                            Trans instance for ordered FO reductions, enabling calc chains.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            @[instance_reducible]

                            Mixed transitivity: an ordered FO reduction followed by a plain one.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            @[instance_reducible]

                            Mixed transitivity: a plain FO reduction followed by an ordered one.

                            Equations
                            • One or more equations did not get rendered due to their size.