Documentation

DescriptiveComplexity.SecondOrderNewExp

The expansion a bounded invention lives in #

DescriptiveComplexity.SigmaSONewExpDefinable guesses an extension A ⊕ Fin m with m ≤ 2 ^ Nat.card (Fin d → A) – as many invented values as the instance has d-ary relations. To read such a definition as one over an exponential expansion, the expansion has to be big enough to hold them, and it has to carry the instance too, since an expansion is all a sentence over it can see.

This file builds that expansion. It has two tags:

Its vocabulary is DescriptiveComplexity.newLang L: the relations of the instance, holding of original points exactly where they hold of the elements they name, and the marker old. What the expanded structure is, then, is the extended structure A ⊕ Fin (2 ^ nᵈ) with every invented value present; a sentence that wants fewer of them marks the ones it uses, which is a guess and so stays inside Σ₁.

The block #

@[reducible, inline]

The block whose assignments are the points of the expansion: one d-ary variable carrying an invented value and one unary variable carrying an original element.

Equations
Instances For
    Dependency graph

    The i-th d-ary variable: one coordinate of an invented value.

    Equations
    Instances For
      Dependency graph

      The unary variable: an original element.

      Equations
      Instances For
        Dependency graph

        The unary variable of the k-th copy.

        Equations
        Instances For
          Dependency graph

          The sentences #

          noncomputable def DescriptiveComplexity.eltAtom (L : FirstOrder.Language) (c d : ℕ) {α : Type} (x : α) :
          (L.sum (powBlock c d).lang).Formula α

          The atom elt x, over the vocabulary of the block.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.eltAtomAt (L : FirstOrder.Language) (c d : ℕ) {n : ℕ} (k : Fin n) {α : Type} (x : α) :
            (L.sum ((powBlock c d).replicate n).lang).Formula α

            The atom eltₖ x, over the vocabulary of n copies of the block.

            Equations
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.valAtom (L : FirstOrder.Language) (c d : ℕ) (i : Fin c) {α : Type} (w : Fin d → α) :
              (L.sum (powBlock c d).lang).Formula α

              The atom valᵢ w, over the vocabulary of the block.

              Equations
              Instances For
                Dependency graph

                elt holds of exactly one element.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph

                  No coordinate of the invented value holds of anything.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.powDom (L : FirstOrder.Language) (c d : ℕ) :
                    Bool → (L.sum (powBlock c d).lang).Sentence

                    The domain sentence of each tag: an original point names one element and invents nothing; a new point names no element.

                    Equations
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.powRelSentence (L : FirstOrder.Language) (c d : ℕ) {n : ℕ} :
                      (newLang L).Relations n → (Fin n → Bool) → (L.sum ((powBlock c d).replicate n).lang).Sentence

                      The defining sentence of each symbol: a relation of the instance holds of original points exactly when it holds of the elements they name, and never of a new point; old marks the original points.

                      Equations
                      Instances For
                        Dependency graph

                        The sentences, realized #

                        def DescriptiveComplexity.eltOf {c d : ℕ} {A : Type} (ρ : (powBlock c d).Assignment A) :
                        A → Prop

                        The unary variable, read off the assignment.

                        Equations
                        Instances For
                          Dependency graph
                          def DescriptiveComplexity.valOf {c d : ℕ} {A : Type} (ρ : (powBlock c d).Assignment A) :
                          Fin c → (Fin d → A) → Prop

                          The d-ary variables, read off the assignment.

                          Equations
                          Instances For
                            Dependency graph
                            theorem DescriptiveComplexity.realize_eltEmpty {L : FirstOrder.Language} {c d : ℕ} {A : Type} [L.Structure A] (ρ : (powBlock c d).Assignment A) :
                            A ⊨ eltEmpty L c d ↔ ∀ (x : A), ¬eltOf ρ x
                            Dependency graph

                            The expansion #

                            @[reducible]

                            The expansion: two tags, the instance's elements and its d-ary relations, over the extended vocabulary.

                            Reducible: its block and its vocabulary have to reduce for instance search, or the structure a domain sentence is read in is not the one the realization lemmas are stated at.

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

                              The points of the expansion #

                              Dependency graph
                              def DescriptiveComplexity.eltAssign {c d : ℕ} {A : Type} (x : A) :

                              The assignment naming an original element: its unary variable holds of that element alone, and it invents nothing.

                              Equations
                              Instances For
                                Dependency graph
                                def DescriptiveComplexity.valAssign {c d : ℕ} {A : Type} (S : Fin c → (Fin d → A) → Prop) :

                                The assignment naming an invented value: its unary variable holds of nothing, and its d-ary ones are the value's coordinates.

                                Equations
                                Instances For
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.eltOf_eltAssign {c d : ℕ} {A : Type} (x y : A) :
                                  eltOf (eltAssign x) y ↔ y = x
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.valOf_eltAssign {c d : ℕ} {A : Type} (x : A) (i : Fin c) (w : Fin d → A) :
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.eltOf_valAssign {c d : ℕ} {A : Type} (S : Fin c → (Fin d → A) → Prop) (y : A) :
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.valOf_valAssign {c d : ℕ} {A : Type} (S : Fin c → (Fin d → A) → Prop) (i : Fin c) (w : Fin d → A) :
                                  valOf (valAssign S) i w ↔ S i w
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph

                                  The points, counted #

                                  Dependency graph
                                  def DescriptiveComplexity.powPoint {L : FirstOrder.Language} [L.IsRelational] {c d : ℕ} {A : Type} [L.Structure A] :
                                  A ⊕ (Fin c → (Fin d → A) → Prop) → (powExpFree L c d).Map A

                                  The point of the expansion carried by an element or by a tuple of d-ary relations.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    Dependency graph
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.powPointEquiv {L : FirstOrder.Language} [L.IsRelational] {c d : ℕ} {A : Type} [L.Structure A] :
                                    A ⊕ (Fin c → (Fin d → A) → Prop) ≃ (powExpFree L c d).Map A

                                    The points of the expansion are the instance's elements and its d-ary relations, so there are n + 2 ^ nᵈ of them: enough to hold any extension the bound of DescriptiveComplexity.SigmaSONewExpDefinable allows.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      The defining sentences, realized #

                                      theorem DescriptiveComplexity.realize_eltAtomAt {L : FirstOrder.Language} {c d n : ℕ} {A : Type} [L.Structure A] (ρs : Fin n → (powBlock c d).Assignment A) (k : Fin n) {α : Type} (x : α) (v : α → A) :
                                      (eltAtomAt L c d k x).Realize v ↔ eltOf (ρs k) (v x)
                                      Dependency graph
                                      theorem DescriptiveComplexity.realize_powRelSentence_base {L : FirstOrder.Language} {c d n : ℕ} {A : Type} [L.Structure A] (ρs : Fin n → (powBlock c d).Assignment A) (R : L.Relations n) (τ : Fin n → Bool) (hτ : ∀ (i : Fin n), τ i = false) :
                                      A ⊨ powRelSentence L c d (Sum.inl R) τ ↔ ∃ (x : Fin n → A), (∀ (i : Fin n), eltOf (ρs i) (x i)) ∧ FirstOrder.Language.Structure.RelMap R x

                                      A relation of the instance, at original points: it holds exactly when it holds of the elements they name.

                                      Dependency graph
                                      theorem DescriptiveComplexity.powRelSentence_base_eq_bot {L : FirstOrder.Language} {c d n : ℕ} (R : L.Relations n) (τ : Fin n → Bool) (hτ : ¬∀ (i : Fin n), τ i = false) :

                                      A relation of the instance never holds of an invented point.

                                      Dependency graph

                                      The marker old holds exactly of the original points.

                                      Dependency graph

                                      The expanded structure is the extended structure #

                                      @[instance_reducible]

                                      The extended structure over an arbitrary set of invented values: the relations of the instance hold of original elements only, and old marks them. DescriptiveComplexity.extStructure is the case N = Fin m.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        theorem DescriptiveComplexity.relMap_extOn_base {L : FirstOrder.Language} [L.IsRelational] {A : Type} [L.Structure A] {N : Type} {k : ℕ} (R : L.Relations k) (x : Fin k → A ⊕ N) :
                                        Dependency graph
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.powExtEquiv {L : FirstOrder.Language} [L.IsRelational] {c d : ℕ} {A : Type} [L.Structure A] :
                                        (newLang L).Equiv (A ⊕ (Fin c → (Fin d → A) → Prop)) ((powExpFree L c d).Map A)

                                        The expanded structure is the extended one: the map sending an element to its original point and a d-ary relation to its new point is an isomorphism over DescriptiveComplexity.newLang.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          The marked part of an extended universe #

                                          The original elements together with the marked invented values: a substructure, there being nothing to be closed under in a relational vocabulary.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            def DescriptiveComplexity.usedPoint {A N : Type} (U : N → Prop) :
                                            A ⊕ { y : N // U y } → A ⊕ N

                                            The inclusion of the extension by the marked values into the whole one.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              theorem DescriptiveComplexity.usedPoint_mem {L : FirstOrder.Language} [L.IsRelational] {A N : Type} [L.Structure A] (U : N → Prop) (x : A ⊕ { y : N // U y }) :
                                              Dependency graph
                                              theorem DescriptiveComplexity.usedPoint_isOld {A N : Type} (U : N → Prop) (x : A ⊕ { y : N // U y }) :
                                              Dependency graph
                                              theorem DescriptiveComplexity.usedPoint_eq_inl {A N : Type} (U : N → Prop) (x : A ⊕ { y : N // U y }) (a : A) :
                                              Dependency graph
                                              def DescriptiveComplexity.usedSubEquiv {L : FirstOrder.Language} [L.IsRelational] {A N : Type} [L.Structure A] (U : N → Prop) :
                                              (newLang L).Equiv (A ⊕ { y : N // U y }) ↥(usedSub U)

                                              The marked part is the extended universe over the marked values: the invented values a sentence uses are the ones it marks, and what it says of them it says of the extension by those alone.

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

                                                The sentence read over the expansion #

                                                @[reducible, inline]

                                                The unary marker a sentence over the expansion guesses: which invented values it uses.

                                                Equations
                                                Instances For
                                                  Dependency graph
                                                  @[reducible, inline]

                                                  The block guessed over the expansion: the kernel's own variables together with the marker.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    @[reducible, inline]

                                                    The marker, as a symbol of the guessed vocabulary.

                                                    Equations
                                                    Instances For
                                                      Dependency graph
                                                      @[reducible, inline]

                                                      The marker, as a symbol over the extended vocabulary.

                                                      Equations
                                                      Instances For
                                                        Dependency graph
                                                        @[reducible, inline]

                                                        old, as a symbol over the same vocabulary.

                                                        Equations
                                                        Instances For
                                                          Dependency graph

                                                          Every original element is marked: the guess adds invented values to the instance, it does not take elements away.

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

                                                            The sentence read over the expansion: mark the invented values it uses, mark every original element, and read the kernel among the marked ones.

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

                                                              The marked part, with the kernel's block #

                                                              The sentence over the expansion, realized #

                                                              def DescriptiveComplexity.usedExtend {A N : Type} {B : SOBlock} (U : N → Prop) (ρ : B.Assignment (A ⊕ { y : N // U y })) :
                                                              B.Assignment (A ⊕ N)

                                                              The assignment on the whole extension reproducing one on the extension by the marked values: a tuple is related exactly when it is the image of a related tuple.

                                                              Equations
                                                              Instances For
                                                                Dependency graph
                                                                def DescriptiveComplexity.markerOf {A N : Type} {B : SOBlock} (ρ' : (usedBlock B).Assignment (A ⊕ N)) :
                                                                A ⊕ N → Prop

                                                                The marker, read off a guessed assignment.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  Dependency graph
                                                                  def DescriptiveComplexity.kernelOf {A N : Type} {B : SOBlock} (ρ' : (usedBlock B).Assignment (A ⊕ N)) :
                                                                  B.Assignment (A ⊕ N)

                                                                  The kernel's part of a guessed assignment.

                                                                  Equations
                                                                  Instances For
                                                                    Dependency graph
                                                                    def DescriptiveComplexity.usedJoin {A N : Type} {B : SOBlock} (U : N → Prop) (ρ : B.Assignment (A ⊕ { y : N // U y })) :

                                                                    A guessed assignment, from its two parts.

                                                                    Equations
                                                                    Instances For
                                                                      Dependency graph
                                                                      @[simp]
                                                                      theorem DescriptiveComplexity.markOf_usedJoin {A N : Type} {B : SOBlock} (U : N → Prop) (ρ : B.Assignment (A ⊕ { y : N // U y })) (x : A ⊕ N) :
                                                                      markerOf (usedJoin U ρ) x ↔ Sum.elim (fun (x : A) => True) U x
                                                                      Dependency graph
                                                                      @[simp]
                                                                      theorem DescriptiveComplexity.blockOf_usedJoin {A N : Type} {B : SOBlock} (U : N → Prop) (ρ : B.Assignment (A ⊕ { y : N // U y })) :
                                                                      Dependency graph

                                                                      Bounded invention is definability over the expansion #

                                                                      theorem DescriptiveComplexity.sumCongr_eq_inl {A N N' : Type} (e : N ≃ N') (x : A ⊕ N) (a : A) :
                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.sumCongr_isOld {A N N' : Type} (e : N ≃ N') (x : A ⊕ N) :
                                                                      Dependency graph
                                                                      def DescriptiveComplexity.extOnCongr {L : FirstOrder.Language} [L.IsRelational] {A N N' : Type} [L.Structure A] (e : N ≃ N') :
                                                                      (newLang L).Equiv (A ⊕ N) (A ⊕ N')

                                                                      Renaming the invented values: the extended structure depends on them only through their number.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph

                                                                        The problem the expansion decides: the kernel, read over the extension by the invented values a guess marks.

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

                                                                          Bounded invention is definability over the expansion: an ∃SO[new, exp c d] definition is an ∃SO definition over DescriptiveComplexity.powExpFree, which is ∃SO[new, exp c d] ⊆ NEXPTIME.

                                                                          Dependency graph