Documentation

DescriptiveComplexity.Relationalize

Relationalizing an ∃SO[new] definition #

Hardness proofs whose target reads the source structure through the defining formulas of an interpretation cope with function symbols for free; one whose target has to name what a function does – as the encoded sentence of DescriptiveComplexity.FINSAT must, since it carries its own quantifiers – does not. This file removes function symbols from the source once and for all:

every ∃SO[new]-definable problem admits a first-order reduction to an ∃SO[new]-definable problem over a relational vocabulary (DescriptiveComplexity.exists_relational_of_sigmaSONewDefinable).

Composed with a hardness result proved for relational sources, it gives the hardness result for all of them, which is what DescriptiveComplexity.CofinalHard asks for.

The two obstacles, and how they are removed #

The junk value. An extended universe A ⊕ Fin m interprets a function symbol on a tuple with an invented argument by applying f^A to DescriptiveComplexity.oldPart, which sends every invented value to Classical.arbitrary A. That element depends on the carrier type only, so no formula can name it, and a translation that has to mention it is stuck. The way out is that the definability equivalence quantifies over every L-structure instance on the carrier: transporting the structure along a transposition gives a second instance, isomorphic to the first, whose junk element is whatever we like. Hence DescriptiveComplexity.sigmaSONewDefinable_junk: an ∃SO[new] definition may be read with any junk element.

The terms. The relational vocabulary is the atomic diagram language DescriptiveComplexity.atomLang: one relation symbol of arity n per atomic formula of L in n variables. An L-structure carries one canonically, and the map is a one-dimensional first-order interpretation, since “this atomic formula holds of this tuple” is a first-order property of the tuple. The kernel is then translated atom by atom, in place: an atom at context length n becomes an existential block of n + 1 variables – the coerced arguments, and the junk element the block guesses – followed by the corresponding symbol of the atomic diagram language. Nothing else in the kernel changes, so no de Bruijn index is ever shifted.

An extended universe with a chosen junk value #

def DescriptiveComplexity.oldPartAt (A : Type) (m : ) (z : A) :
A Fin mA

The original-element part of an extended universe, reading an invented value as a given element rather than Classical.arbitrary.

Equations
Instances For
    Dependency graph
    @[instance_reducible]

    The base structure carried by an extended universe with a chosen junk value.

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

      The extended structure with a chosen junk value.

      Equations
      Instances For
        Dependency graph

        At the arbitrary element it is the extended structure of DescriptiveComplexity.extStructure.

        Dependency graph

        The three defining equations of the extended structure, stated with the instance explicit: two structures on one carrier are in play below, so no occurrence of funMap or RelMap may be left to instance synthesis.

        theorem DescriptiveComplexity.funMap_extAt {L : FirstOrder.Language} {A : Type} {m : } (z : A) (inst : L.Structure A) {n : } (g : L.Functions n) (x : Fin nA Fin m) :
        Dependency graph
        theorem DescriptiveComplexity.relMap_extAt {L : FirstOrder.Language} {A : Type} {m : } (z : A) (inst : L.Structure A) {n : } (s : L.Relations n) (x : Fin nA Fin m) :
        Dependency graph
        Dependency graph
        @[instance_reducible]

        Transporting a structure along a permutation of its carrier: a second structure on the same type, isomorphic to the first.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.funMap_transport {L : FirstOrder.Language} {A : Type} (π : A A) (inst : L.Structure A) {n : } (g : L.Functions n) (x : Fin nA) :
          Dependency graph
          theorem DescriptiveComplexity.relMap_transport {L : FirstOrder.Language} {A : Type} (π : A A) (inst : L.Structure A) {n : } (s : L.Relations n) (x : Fin nA) :
          Dependency graph
          def DescriptiveComplexity.transportEquiv {L : FirstOrder.Language} {A : Type} (π : A A) (inst : L.Structure A) :
          L.Equiv A A

          The permutation is that isomorphism.

          Equations
          Instances For
            Dependency graph
            def DescriptiveComplexity.extIsoTransport {L : FirstOrder.Language} {A : Type} (π : A A) (inst : L.Structure A) (m : ) (z : A) :
            (newLang L).Equiv (A Fin m) (A Fin m)

            The junk value moves with the permutation: the extended structure of the transported instance, with junk z, is the extended structure of the original instance with junk π z. This is what lets a definition be read at any junk value at all.

            Equations
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.sigmaSONewDefinable_junk {L : FirstOrder.Language} {P : DecisionProblem L} (h : SigmaSONewDefinable P) :
              ∃ (B : SOBlock) (φ : (soLang (newLang L) [B]).Sentence), ∀ (A : Type) [_inst : L.Structure A] [Finite A] [Nonempty A] (z : A), P.Holds A ∃ (m : ), SORealize (newLang L) (A Fin m) [B] φ true

              An ∃SO[new] definition may be read with any junk value: the extended universe interpreting a function symbol on an invented argument through the given element z rather than through Classical.arbitrary.

              This is what makes the undefinability of Classical.arbitrary A harmless: the junk element is not a feature of the problem, only of one presentation of the extended universe.

              Dependency graph

              The atomic diagram language #

              The relational vocabulary the source is moved to: one relation symbol of arity n per atomic formula of L in n variables. Every structure carries one canonically, and “this atomic formula holds of this tuple” is a first-order property of the tuple, so the map is a one-dimensional interpretation.

              The atomic diagram language: a relation symbol of arity n for each atom r(t₁, …, t_l) and each equality t₁ = t₂ of L in n variables.

              Equations
              Instances For
                Dependency graph
                Dependency graph
                @[instance_reducible]

                The atomic diagram of a structure: each symbol holds of the tuples satisfying the atomic formula it names.

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

                  The defining formula of a symbol of the atomic diagram language: the atomic formula it names, read at the one-dimensional tuple.

                  Equations
                  Instances For
                    Dependency graph

                    The atomic diagram, as a one-dimensional first-order interpretation.

                    Equations
                    Instances For
                      Dependency graph
                      theorem DescriptiveComplexity.realize_atomFml {L : FirstOrder.Language} {n : } (R : (atomLang L).Relations n) {A : Type} [L.Structure A] (v : Fin n × Fin 1A) :

                      What the defining formula of an atomic-diagram symbol says: the symbol holds of the tuple.

                      Dependency graph

                      The interpreted structure is the atomic diagram, through the equivalence of a one-dimensional single-tag universe with its own carrier.

                      Equations
                      Instances For
                        Dependency graph

                        The relationalizing reduction: any problem reduces, first-order, to a problem over the atomic diagram language that agrees with it on the atomic diagrams of finite structures.

                        Equations
                        Instances For
                          Dependency graph

                          Blocks of existential quantifiers #

                          The translation of an atom introduces a fixed number of fresh variables at the end of the context, which is what makes it a purely local rewriting: nothing already in the kernel is shifted.

                          def DescriptiveComplexity.exs {L : FirstOrder.Language} {α : Type} {n : } (k : ) :
                          L.BoundedFormula α (n + k)L.BoundedFormula α n

                          A block of k existential quantifiers.

                          Equations
                          Instances For
                            Dependency graph
                            theorem DescriptiveComplexity.realize_exs {L : FirstOrder.Language} {α M : Type} [L.Structure M] {n : } (k : ) (ψ : L.BoundedFormula α (n + k)) (v : αM) (xs : Fin nM) :
                            (exs k ψ).Realize v xs ∃ (ys : Fin (n + k)M), (∀ (i : Fin n), ys (Fin.castAdd k i) = xs i) ψ.Realize v ys

                            What a block of existential quantifiers says: the context is extended by k values, the ones already there being kept.

                            Dependency graph

                            The shadow of a term #

                            The translation replaces a term by the value it takes; the point of the construction is that this value is computed in the instance, on the tuple the junk convention leaves behind.

                            @[reducible, inline]

                            The kernel language of an ∃SO[new] definition.

                            Equations
                            Instances For
                              Dependency graph

                              The block, extended by the unary relation variable naming the junk element.

                              Equations
                              Instances For
                                Dependency graph
                                @[reducible, inline]

                                The kernel language the translation lands in: the atomic diagram language, extended and expanded by the enlarged block.

                                Equations
                                Instances For
                                  Dependency graph

                                  The L-term a term of the kernel language shadows: neither the marker nor the vocabulary of a block has function symbols, so every function application is one of L.

                                  Equations
                                  Instances For
                                    Dependency graph

                                    The shadow of a term of the kernel, as an L-term in the context variables: the index of a symbol of the atomic diagram language.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      Dependency graph
                                      @[instance_reducible]
                                      noncomputable def DescriptiveComplexity.srcStruct {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) :
                                      (srcLang L B).Structure (A Fin m)

                                      The structure a certificate puts on an extended universe: the instance with its junk convention, expanded by the assignment of the block.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        theorem DescriptiveComplexity.oldPartAt_realize {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {α : Type} (t : (srcLang L B).Term α) (w : αA Fin m) :

                                        The value of a term, up to the junk convention: forgetting which invented values a term's value came from is computing its shadow in the instance, on the context with the same forgetting applied.

                                        Dependency graph
                                        theorem DescriptiveComplexity.realize_func_eq_inl {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {α : Type} {l : } (g : L.Functions l) (ts : Fin l(srcLang L B).Term α) (w : αA Fin m) :

                                        The value of a term that is a function application is an original element: only a variable can take an invented value.

                                        Dependency graph

                                        Finite conjunctions #

                                        def DescriptiveComplexity.finConj {L : FirstOrder.Language} {α : Type} {N p : } :
                                        (Fin pL.BoundedFormula α N)L.BoundedFormula α N

                                        The conjunction of finitely many bounded formulas.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          theorem DescriptiveComplexity.realize_finConj {L : FirstOrder.Language} {α M : Type} [L.Structure M] {N p : } (f : Fin pL.BoundedFormula α N) (v : αM) (xs : Fin NM) :
                                          (finConj f).Realize v xs ∀ (j : Fin p), (f j).Realize v xs
                                          Dependency graph

                                          The translation #

                                          Each atom is rewritten in place: a block of n + 1 + l existentials at the end of the context holds the coerced context, the guessed junk element and the values of the l arguments, and the atom itself is then a symbol of the atomic diagram language – or of the marker, or of the block – applied to those values. , and are structural, so no de Bruijn index of the kernel moves.

                                          A variable of the body of a translated atom.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            def DescriptiveComplexity.xIdx (n l : ) (i : Fin n) :
                                            Fin (n + (n + 1 + l))

                                            The i-th variable of the original context.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              def DescriptiveComplexity.uIdx (n l : ) (i : Fin n) :
                                              Fin (n + (n + 1 + l))

                                              The i-th variable of the context, coerced to an original element.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                def DescriptiveComplexity.zIdx (n l : ) :
                                                Fin (n + (n + 1 + l))

                                                The guessed junk element.

                                                Equations
                                                Instances For
                                                  Dependency graph
                                                  def DescriptiveComplexity.yIdx (n l : ) (j : Fin l) :
                                                  Fin (n + (n + 1 + l))

                                                  The value of the j-th argument of the atom.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    Dependency graph

                                                    The relation variable naming the junk element, applied to one variable.

                                                    Equations
                                                    Instances For
                                                      Dependency graph
                                                      Dependency graph

                                                      The graph of a term, as a symbol of the atomic diagram language: the equality t(x̄) = xₙ in n + 1 variables.

                                                      Equations
                                                      Instances For
                                                        Dependency graph
                                                        def DescriptiveComplexity.argCl {L : FirstOrder.Language} {B : SOBlock} (n l : ) :
                                                        (srcLang L B).Term (Empty Fin n)Fin l(tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))

                                                        What pins the value of one argument: a variable takes the value the context gives it – which may be an invented one – and a function application the value its graph gives on the coerced context.

                                                        Equations
                                                        Instances For
                                                          Dependency graph
                                                          def DescriptiveComplexity.atomBody {L : FirstOrder.Language} {B : SOBlock} (n l : ) (ts : Fin l(srcLang L B).Term (Empty Fin n)) (core : (tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))) :
                                                          (tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))

                                                          The body of a translated atom.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            Dependency graph
                                                            def DescriptiveComplexity.flatAtom {L : FirstOrder.Language} {B : SOBlock} (n l : ) (ts : Fin l(srcLang L B).Term (Empty Fin n)) (core : (tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))) :

                                                            A translated atom.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              Dependency graph

                                                              The intended values of the fresh variables #

                                                              @[instance_reducible]
                                                              noncomputable def DescriptiveComplexity.tgtStruct {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (μ' : (jBlock B).Assignment (A Fin m)) :
                                                              (tgtLang L B).Structure (A Fin m)

                                                              The structure the translated kernel is read in: the atomic diagram, extended, and expanded by the enlarged block.

                                                              Equations
                                                              Instances For
                                                                Dependency graph
                                                                def DescriptiveComplexity.jAssign {B : SOBlock} {A : Type} {m : } (z : A) (μ : B.Assignment (A Fin m)) :

                                                                The enlarged assignment: the given one, plus the singleton naming the junk element.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  noncomputable def DescriptiveComplexity.canonYs {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) :
                                                                  Fin (n + (n + 1 + l))A Fin m

                                                                  The values the body of a translated atom forces on its fresh variables: the context is kept, the coerced context is the context with the invented values replaced by the junk, and each argument variable holds the value of its term.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.canonYs_x {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (i : Fin n) :
                                                                    canonYs z μ ts w (xIdx n l i) = w i
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.canonYs_u {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (i : Fin n) :
                                                                    canonYs z μ ts w (uIdx n l i) = Sum.inl (oldPartAt A m z (w i))
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.canonYs_z {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) :
                                                                    canonYs z μ ts w (zIdx n l) = Sum.inl z
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.canonYs_y {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (j : Fin l) :
                                                                    canonYs z μ ts w (yIdx n l j) = FirstOrder.Language.Term.realize (Sum.elim (fun (a : Empty) => isEmptyElim a) w) (ts j)
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.idx_cases {n l : } (p : Fin (n + (n + 1 + l))) :
                                                                    (∃ (i : Fin n), p = xIdx n l i) (∃ (i : Fin n), p = uIdx n l i) p = zIdx n l ∃ (j : Fin l), p = yIdx n l j

                                                                    The four families of indices exhaust the body's context.

                                                                    Dependency graph

                                                                    What the body of a translated atom says #

                                                                    theorem DescriptiveComplexity.realize_zOf' {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m N : } (i : Fin N) (ys : Fin NA Fin m) (μ' : (jBlock B).Assignment (A Fin m)) :
                                                                    (zOf i).Realize (fun (a : Empty) => isEmptyElim a) ys μ' (Sum.inr ()) fun (x : Fin ((jBlock B).arity (Sum.inr ()))) => ys i
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.realize_zOf {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {N : } (i : Fin N) (ys : Fin NA Fin m) :
                                                                    (zOf i).Realize (fun (a : Empty) => isEmptyElim a) ys ys i = Sum.inl z
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.realize_oldOf {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m N : } (i : Fin N) (ys : Fin NA Fin m) (μ' : (jBlock B).Assignment (A Fin m)) :
                                                                    (oldOf i).Realize (fun (a : Empty) => isEmptyElim a) ys IsOld (ys i)
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.realize_eqOf {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m N : } (a b : Fin N) (ys : Fin NA Fin m) (μ' : (jBlock B).Assignment (A Fin m)) :
                                                                    (eqOf a b).Realize (fun (a : Empty) => isEmptyElim a) ys ys a = ys b
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.realize_argCl_var {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (i : Fin n) (j : Fin l) (ys : Fin (n + (n + 1 + l))A Fin m) :
                                                                    (argCl n l (FirstOrder.Language.var (Sum.inr i)) j).Realize (fun (a : Empty) => isEmptyElim a) ys ys (yIdx n l j) = ys (xIdx n l i)
                                                                    Dependency graph
                                                                    theorem DescriptiveComplexity.realize_argCl_func {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l k : } (g : L.Functions k) (ts' : Fin k(srcLang L B).Term (Empty Fin n)) (j : Fin l) (ys : Fin (n + (n + 1 + l))A Fin m) :
                                                                    (argCl n l (FirstOrder.Language.func (Sum.inl (Sum.inl g)) ts') j).Realize (fun (a : Empty) => isEmptyElim a) ys ∃ (y : Fin (n + 1)A), (∀ (i : Fin n), ys (uIdx n l i) = Sum.inl (y i.castSucc)) ys (yIdx n l j) = Sum.inl (y (Fin.last n)) FirstOrder.Language.Term.realize (fun (i : Fin n) => y i.castSucc) (termShadow (FirstOrder.Language.func (Sum.inl (Sum.inl g)) ts')) = y (Fin.last n)
                                                                    Dependency graph
                                                                    def DescriptiveComplexity.ubar {A : Type} {m : } (z : A) {n : } (w : Fin nA Fin m) :
                                                                    Fin nA

                                                                    The coerced context, as a tuple of the instance.

                                                                    Equations
                                                                    Instances For
                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.elim_ubar {A : Type} {m : } (z : A) {n : } (w : Fin nA Fin m) :
                                                                      (fun (x : Empty Fin n) => oldPartAt A m z (Sum.elim (fun (a : Empty) => isEmptyElim a) w x)) = Sum.elim (fun (a : Empty) => isEmptyElim a) (ubar z w)
                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_termShadow_ubar {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n : } (w : Fin nA Fin m) (t : (srcLang L B).Term (Empty Fin n)) :

                                                                      The value of a term is its shadow's, on the coerced context.

                                                                      Dependency graph

                                                                      A term that is a function application takes the value its shadow names.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_argCl_iff {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (w : Fin nA Fin m) (t : (srcLang L B).Term (Empty Fin n)) (j : Fin l) (ys : Fin (n + (n + 1 + l))A Fin m) (hys : ∀ (i : Fin n), ys (xIdx n l i) = w i) (hu : ∀ (i : Fin n), ys (uIdx n l i) = Sum.inl (ubar z w i)) :
                                                                      (argCl n l t j).Realize (fun (a : Empty) => isEmptyElim a) ys ys (yIdx n l j) = FirstOrder.Language.Term.realize (Sum.elim (fun (a : Empty) => isEmptyElim a) w) t

                                                                      What an argument clause says, once the coerced context is known: the argument variable holds the value of its term.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.inl_oldPartAt_of_isOld {A : Type} {m : } (z : A) {x : A Fin m} (h : IsOld x) :
                                                                      Sum.inl (oldPartAt A m z x) = x
                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.inl_oldPartAt_of_not {A : Type} {m : } (z : A) {x : A Fin m} (h : ¬IsOld x) :
                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_atomBody {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (core : (tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))) (ys : Fin (n + (n + 1 + l))A Fin m) :
                                                                      (atomBody n l ts core).Realize (fun (a : Empty) => isEmptyElim a) ys ys (zIdx n l) = Sum.inl z (∀ (i : Fin n), (IsOld (ys (xIdx n l i))ys (uIdx n l i) = ys (xIdx n l i)) (¬IsOld (ys (xIdx n l i))ys (uIdx n l i) = ys (zIdx n l))) (∀ (j : Fin l), (argCl n l (ts j) j).Realize (fun (a : Empty) => isEmptyElim a) ys) core.Realize (fun (a : Empty) => isEmptyElim a) ys

                                                                      What the body of a translated atom says, conjunct by conjunct.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_flatAtom {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (core : (tgtLang L B).BoundedFormula Empty (n + (n + 1 + l))) :
                                                                      (flatAtom n l ts core).Realize (fun (a : Empty) => isEmptyElim a) w core.Realize (fun (a : Empty) => isEmptyElim a) (canonYs z μ ts w)

                                                                      A translated atom is its core, read at the values the body forces: the existential block is determined, so nothing is really guessed.

                                                                      Dependency graph

                                                                      The translation is correct #

                                                                      theorem DescriptiveComplexity.realize_core_input {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (r : L.Relations l) :

                                                                      The core of a translated atom of the instance's vocabulary: the symbol of the atomic diagram language naming that atom, at the values of the arguments.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_core_block {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (z : A) (μ : B.Assignment (A Fin m)) {n l : } (ts : Fin l(srcLang L B).Term (Empty Fin n)) (w : Fin nA Fin m) (b : B.lang.Relations l) :

                                                                      The core of a translated atom of a relation variable: the same variable of the enlarged block, at the values of the arguments.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.realize_flat {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } {z : A} {μ : B.Assignment (A Fin m)} {n : } (f : (srcLang L B).BoundedFormula Empty n) (w : Fin nA Fin m) :
                                                                      (flat f).Realize (fun (a : Empty) => isEmptyElim a) w f.Realize (fun (a : Empty) => isEmptyElim a) w

                                                                      The translated kernel says of the atomic diagram what the kernel says of the instance: the two structures share a carrier, and the translation only replaces each atom by the symbol of the atomic diagram language that names it.

                                                                      Dependency graph

                                                                      The relational problem, and the reduction to it #

                                                                      The junk element is a single original element: what makes the guesses of the individual atoms agree.

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

                                                                        The translated kernel: the junk element, and the translation of the original kernel.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph
                                                                          theorem DescriptiveComplexity.realize_zSingle {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {m : } (μ' : (jBlock B).Assignment (A Fin m)) (xs : Fin 0A Fin m) :
                                                                          FirstOrder.Language.BoundedFormula.Realize (zSingle B) (fun (a : Empty) => isEmptyElim a) xs ∃ (z : A), ∀ (u : A Fin m), (μ' (Sum.inr ()) fun (x : Fin ((jBlock B).arity (Sum.inr ()))) => u) u = Sum.inl z
                                                                          Dependency graph

                                                                          The relational problem, and the reduction to it #

                                                                          theorem DescriptiveComplexity.funs_one {B : SOBlock} {M : Type} (u : Fin ((jBlock B).arity (Sum.inr ()))M) :
                                                                          u = fun (x : Fin ((jBlock B).arity (Sum.inr ()))) => u 0, Nat.zero_lt_one
                                                                          Dependency graph
                                                                          Dependency graph
                                                                          Dependency graph

                                                                          The relational reading of an ∃SO[new] definition: the same definition over the atomic diagram language, with the junk element guessed by one more relation variable.

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

                                                                            It is a decision problem: ∃SO[new] sentences are isomorphism-invariant.

                                                                            Equations
                                                                            Instances For
                                                                              Dependency graph
                                                                              Dependency graph
                                                                              theorem DescriptiveComplexity.relProblem_iff {L : FirstOrder.Language} {B : SOBlock} {A : Type} [instA : L.Structure A] [Nonempty A] {P : DecisionProblem L} (φ : (srcLang L B).Sentence) ( : ∀ (A : Type) [inst : L.Structure A] [Finite A] [Nonempty A] (z : A), P.Holds A ∃ (m : ), SORealize (newLang L) (A Fin m) [B] φ true) [Finite A] :
                                                                              P.Holds A (relProblem B φ).Holds A

                                                                              The relational reading agrees with the original on atomic diagrams.

                                                                              Dependency graph

                                                                              The theorem #

                                                                              Every ∃SO[new]-definable problem admits a first-order reduction to an ∃SO[new]-definable problem over a relational vocabulary.

                                                                              The relational vocabulary is the atomic diagram language DescriptiveComplexity.atomLang, and the reduction is the identity on the carrier: only the vocabulary changes, an atomic formula of the source becoming a relation symbol of the target. The kernel of the definition is carried across by DescriptiveComplexity.flat, and what makes that possible is that the junk element of the extended universe may be guessed (DescriptiveComplexity.sigmaSONewDefinable_junk).

                                                                              Composed with a hardness result proved for relational sources, this gives the hardness result for all of them, which is what DescriptiveComplexity.CofinalHard asks for.

                                                                              Dependency graph