Documentation

DescriptiveComplexity.Problems.FinSat.Interp

The sentence a reduction into FINSAT produces #

The interpretation σ_A: given the second-order block B and the first-order kernel φ of an ∃SO[new] definition, the encoded sentence

∃x_{a₁} … ∃x_{aₙ} ( ⋀_{a ≠ b} x_a ≠ x_b  ∧  φ* )

defined inside an ordered input structure. Its vocabulary is B.ι and nothing else: neither the symbols of the input nor the marker old occur in it, because each of their atoms is translated into a disjunction over the tuples where it holds, whose defining formula contains the atom – the Tseitin trick, so that the input structure is read by the interpretation and never by the sentence.

What each tag defines #

The tags are DescriptiveComplexity.FinSat.Tag (DescriptiveComplexity.Problems.FinSat.Nodes), the positions of the kernel are read by DescriptiveComplexity.FinSat.kernelNode and DescriptiveComplexity.FinSat.kidOf (DescriptiveComplexity.Problems.FinSat.Kernel), and this file adds the accessors those two are consumed through together with one defining formula per relation symbol of DescriptiveComplexity.FINSAT:

Every relation but le is guarded by canonicity (DescriptiveComplexity.FinSat.canonG): a tag uses only its first DescriptiveComplexity.FinSat.tagDim coordinates, and a tuple padded otherwise is junk – an element of the encoded sentence that no node binds and no literal reads. le carries no such guard, since it has to be a linear order on the whole universe.

The shape of the reduction #

@[reducible, inline]

The subformula positions of the kernel.

Equations
Instances For
    Dependency graph
    Dependency graph

    The dimension of the reduction: two coordinates for a distinctness literal of the diagram, and one per argument of an atom of the input vocabulary. Nothing needs a context tuple – the encoded sentence quantifies.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph

      The first coordinate of a tuple of the reduction.

      Equations
      Instances For
        Dependency graph

        The second coordinate of a tuple of the reduction.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The tags of the reduction.

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

            Reading a position, through the accessors the formulas dispatch on #

            The size of the subformula at a position: the layer the translation of that position sits in, and what makes the parse DAG of the image descend.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              theorem DescriptiveComplexity.FinSat.posSize_lt_of_kidOf {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {p q : Pos B φ} {b : Bool} (h : kidOf φ p.snd q.snd = some b) :
              posSize B φ q < posSize B φ p
              Dependency graph

              The relation variable of a block atom at a position, if it is one.

              Equations
              Instances For
                Dependency graph

                The de Bruijn level of the j-th argument of a block atom.

                Equations
                Instances For
                  Dependency graph
                  theorem DescriptiveComplexity.FinSat.lt_arity_of_blockArg {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {p : Pos B φ} {i : B.ι} {j l : } (hs : blockSym B φ p = some i) (ha : blockArg B φ p j = some l) :
                  j < B.arity i

                  An argument of a block atom sits below the arity of its symbol.

                  Dependency graph
                  theorem DescriptiveComplexity.FinSat.exists_blockArg {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) [L.IsRelational] {p : Pos B φ} {i : B.ι} {j : } (hs : blockSym B φ p = some i) (hj : j < B.arity i) :
                  ∃ (l : ), blockArg B φ p j = some l l < Tseitin.maxCtx φ

                  A block atom has an argument at every position of its signature, and it is the variable of one of the de Bruijn levels of the kernel. Relational: a function symbol would have no level to give.

                  Dependency graph

                  The two de Bruijn levels of an equality literal at a position.

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

                    The de Bruijn level a quantifier at a position binds.

                    Equations
                    Instances For
                      Dependency graph

                      The arity of an atom the encoded sentence must not mention: one of the input vocabulary, or the marker old.

                      Equations
                      Instances For
                        Dependency graph
                        Dependency graph

                        The de Bruijn level of the j-th argument of such an atom.

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

                          Whether the position carries such an atom.

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

                            Whether the translation turns the position into an n-ary connective: an implication, falsity – the empty one – or an atom translated away.

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

                              Every tag fits in the dimension: the widest is a tuple node of a translated atom, whose arity occurs in the kernel.

                              Dependency graph
                              noncomputable def DescriptiveComplexity.FinSat.fkey {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) (t : FTag B φ) :

                              The sorting key of a tag: its layer, then its place in an arbitrary enumeration.

                              Equations
                              Instances For
                                Dependency graph

                                The layer of a tag, which is what a child of a node descends by everywhere but inside the existential prefix.

                                Equations
                                Instances For
                                  Dependency graph
                                  theorem DescriptiveComplexity.FinSat.fkey_lt_of_frank_lt {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' : FTag B φ} (h : frank B φ t < frank B φ t') :
                                  fkey B φ t < fkey B φ t'
                                  Dependency graph

                                  The defining formulas #

                                  noncomputable def DescriptiveComplexity.FinSat.canonG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {n : } (t : Fin nFTag B φ) :

                                  Every argument holds a canonically padded tuple of its tag's own length.

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

                                    The comparison of the two tuples inside one tag: lexicographic, and reversed inside the prefix, whose chain descends as the input order grows.

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

                                      The order of the syntax: the tags by their key, and within one tag the tuples by DescriptiveComplexity.FinSat.tupLeF. No canonicity guard: this has to be a linear order on the whole universe, junk included.

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

                                        Every relation but le and the child relation is decided by the tags alone, so its defining formula is DescriptiveComplexity.FinSat.tagF of a named tag predicate – never an inline match, whose realization could only be proved by casing on every tag combination at once.

                                        noncomputable def DescriptiveComplexity.FinSat.tagF {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {n : } (t : Fin nFTag B φ) (P : Prop) :

                                        A defining formula decided by the tags: canonically padded tuples, and a condition on the tags alone.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          The tags of a conjunction node: the top conjunction of the sentence, a connective at polarity false, and the tuple node of a positively translated atom.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            Dependency graph

                                            The tags of a disjunction node: a connective at polarity true, and the tuple node of a negatively translated atom.

                                            Equations
                                            Instances For
                                              Dependency graph

                                              The disjunction nodes.

                                              Equations
                                              Instances For
                                                Dependency graph

                                                The tags of a universal quantifier node: a quantifier of the kernel at polarity true.

                                                Equations
                                                Instances For
                                                  Dependency graph

                                                  The universal quantifier nodes.

                                                  Equations
                                                  Instances For
                                                    Dependency graph

                                                    The tags of an existential quantifier node: the prefix, and a quantifier of the kernel at polarity false.

                                                    Equations
                                                    Instances For
                                                      Dependency graph

                                                      The existential quantifier nodes.

                                                      Equations
                                                      Instances For
                                                        Dependency graph

                                                        The one place the input structure is read: the tuple nodes of a translated atom are those where the atom holds, so the atom itself is a defining formula and never a symbol of the encoded sentence. old holds of every original element, so it filters nothing.

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

                                                          What makes one tag a child of another, as a named function of the two tags: the prefix threads along the immediate successors of the input order and hands the top conjunction to its last node, that conjunction takes the distinctness literals and the root of the translated kernel, and inside the kernel the child relation follows DescriptiveComplexity.FinSat.kidOf, with a translated atom taking the tuple nodes where it holds and each of those its equality literals. Named, rather than a match inside DescriptiveComplexity.FinSat.childFml, so that its realization is one lemma and each use cases only on the tags it needs.

                                                          Equations
                                                          Instances For
                                                            Dependency graph

                                                            The child relation of the parse DAG.

                                                            Equations
                                                            Instances For
                                                              Dependency graph

                                                              What a quantifier node binds, as a named function of the two tags: x_a at the prefix node of a, and the variable of its de Bruijn level at a quantifier of the kernel.

                                                              Equations
                                                              Instances For
                                                                Dependency graph

                                                                The variable a quantifier node binds.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  noncomputable def DescriptiveComplexity.FinSat.eqBodyF {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) :
                                                                  FTag B φFTag B φFTag B φ(L.sum FirstOrder.Language.order).Formula (Fin 3 × Fin (finsatDim B φ))

                                                                  The positive equality literals, as a named function of the three tags: those of the kernel, and those of a positively translated atom.

                                                                  Equations
                                                                  Instances For
                                                                    Dependency graph

                                                                    The positive equality literals.

                                                                    Equations
                                                                    Instances For
                                                                      Dependency graph
                                                                      noncomputable def DescriptiveComplexity.FinSat.neqBodyF {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) :
                                                                      FTag B φFTag B φFTag B φ(L.sum FirstOrder.Language.order).Formula (Fin 3 × Fin (finsatDim B φ))

                                                                      The negative equality literals, as a named function of the three tags: those of the kernel, those of a negatively translated atom, and the distinctness literals of the diagram.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph

                                                                        The negative equality literals.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph
                                                                          def DescriptiveComplexity.FinSat.atomTag {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) (pol : Bool) :
                                                                          FTag B φFTag B φProp

                                                                          The tags of an atom of a relation variable at a polarity: a node of the kernel carrying a block atom, and the symbol of its relation variable.

                                                                          Equations
                                                                          Instances For
                                                                            Dependency graph

                                                                            The positive atoms of the relation variables: the only genuine atoms of the encoded sentence.

                                                                            Equations
                                                                            Instances For
                                                                              Dependency graph

                                                                              The negated atoms of the relation variables.

                                                                              Equations
                                                                              Instances For
                                                                                Dependency graph

                                                                                The de Bruijn level the argument of an atom at a given position takes, read off the tags of the node and of the argument position.

                                                                                Equations
                                                                                Instances For
                                                                                  Dependency graph
                                                                                  def DescriptiveComplexity.FinSat.argTag {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) (t t' : FTag B φ) :
                                                                                  FTag B φProp

                                                                                  The tags of an argument of an atom: the node, an argument position, and the variable of the de Bruijn level the corresponding term takes there.

                                                                                  Equations
                                                                                  Instances For
                                                                                    Dependency graph

                                                                                    The arguments of such an atom: at each argument position, the variable of the de Bruijn level of the corresponding term.

                                                                                    Equations
                                                                                    Instances For
                                                                                      Dependency graph

                                                                                      The tags of an argument position of a relation symbol: the symbol of a relation variable, and a position below its arity.

                                                                                      Equations
                                                                                      Instances For
                                                                                        Dependency graph

                                                                                        The signature of the relation symbols: one argument position per argument of the relation variable.

                                                                                        Equations
                                                                                        Instances For
                                                                                          Dependency graph

                                                                                          The root of the encoded sentence, as a named function of the tag: the prefix node of the least element of the instance, the outermost existential.

                                                                                          Equations
                                                                                          Instances For
                                                                                            Dependency graph

                                                                                            The root of the encoded sentence.

                                                                                            Equations
                                                                                            Instances For
                                                                                              Dependency graph

                                                                                              The interpretation: the encoded sentence σ_A, defined inside an ordered input structure.

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

                                                                                                The order of the image #

                                                                                                The four order axioms of DescriptiveComplexity.FinSat.IsWF, which is what the image has to satisfy before it is an encoded sentence at all. Nothing else in this section depends on the shape of the kernel: the order is the lexicographic product of the tag key with the tuples, and is linear because both are.

                                                                                                def DescriptiveComplexity.FinSat.tupLe {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] (t : FTag B φ) (u v : Fin (finsatDim B φ)A) :

                                                                                                The tuple comparison the order uses inside one tag, as a relation: the lexicographic order, reversed inside the prefix.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.tupLe_refl {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] (t : FTag B φ) (u : Fin (finsatDim B φ)A) :
                                                                                                  tupLe B φ t u u
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.tupLe_total {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] (t : FTag B φ) (u v : Fin (finsatDim B φ)A) :
                                                                                                  tupLe B φ t u v tupLe B φ t v u
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.tupLe_antisymm {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] {t : FTag B φ} {u v : Fin (finsatDim B φ)A} (h₁ : tupLe B φ t u v) (h₂ : tupLe B φ t v u) :
                                                                                                  u = v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.tupLe_trans {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] {t : FTag B φ} {u v w : Fin (finsatDim B φ)A} (h₁ : tupLe B φ t u v) (h₂ : tupLe B φ t v w) :
                                                                                                  tupLe B φ t u w
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_tupLeF {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (tupLeF B φ t).Realize v tupLe B φ t (fun (j : Fin (finsatDim B φ)) => v (0, j)) fun (j : Fin (finsatDim B φ)) => v (1, j)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.tag_eq_of_fkey_eq {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' : FTag B φ} (h : fkey B φ t = fkey B φ t') :
                                                                                                  t = t'

                                                                                                  Tags are determined by their key.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_leFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (leFml B φ t).Realize v fkey B φ (t 0) < fkey B φ (t 1) fkey B φ (t 0) = fkey B φ (t 1) tupLe B φ (t 0) (fun (j : Fin (finsatDim B φ)) => v (0, j)) fun (j : Fin (finsatDim B φ)) => v (1, j)

                                                                                                  Reading the order formula: the tags by their key, and within one tag the tuples by DescriptiveComplexity.FinSat.tupLe. Stated at the raw type of tagged tuples – FOInterpretation.Map is a non-reducible definition, so a rewrite inside it is ill-typed at matching transparency.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.ord_map_iff {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x y : (finsatInterp B φ).Map A) :
                                                                                                  Ord x y fkey B φ x.1 < fkey B φ y.1 fkey B φ x.1 = fkey B φ y.1 tupLe B φ x.1 x.2 y.2

                                                                                                  The order of the syntax on the image.

                                                                                                  Dependency graph

                                                                                                  The first four fields of DescriptiveComplexity.FinSat.IsWF: the image is linearly ordered, being the lexicographic product of the tag key with the tuples.

                                                                                                  Dependency graph
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.ord_map_antisymm {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x y : (finsatInterp B φ).Map A) (h₁ : Ord x y) (h₂ : Ord y x) :
                                                                                                  x = y
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.ord_map_trans {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x y z : (finsatInterp B φ).Map A) (h₁ : Ord x y) (h₂ : Ord y z) :
                                                                                                  Ord x z
                                                                                                  Dependency graph

                                                                                                  Canonicity, and the shape of an atom #

                                                                                                  A tag uses only its first DescriptiveComplexity.FinSat.tagDim coordinates, so the tuple of a tag of dimension zero – a node, a symbol, an argument position, a de Bruijn variable – is forced to be all minima, hence unique. That is what makes the shape conditions of DescriptiveComplexity.FinSat.IsWF hold on the image: the objects those conditions compare are determined by their tags.

                                                                                                  theorem DescriptiveComplexity.FinSat.eq_of_canon_zero {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [LinearOrder A] {u v : Fin (finsatDim B φ)A} (hu : Canon 0 u) (hv : Canon 0 v) :
                                                                                                  u = v

                                                                                                  Two tuples all of whose coordinates are minima are equal.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_canonG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] {n : } (t : Fin nFTag B φ) (v : Fin n × Fin (finsatDim B φ)A) :
                                                                                                  (canonG B φ t).Realize v ∀ (i : Fin n), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_canonInf {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] {n : } (t : Fin nFTag B φ) (F : (L.sum FirstOrder.Language.order).Formula (Fin n × Fin (finsatDim B φ))) (v : Fin n × Fin (finsatDim B φ)A) :
                                                                                                  (canonG B φ tF).Realize v (∀ (i : Fin n), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) F.Realize v

                                                                                                  The realization of a defining formula that carries a formula of the input structure: canonicity, and that formula.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_tagF {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] {n : } (t : Fin nFTag B φ) (P : Prop) (v : Fin n × Fin (finsatDim B φ)A) :
                                                                                                  (tagF B φ t P).Realize v (∀ (i : Fin n), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) P

                                                                                                  The realization of a defining formula decided by the tags – one lemma for the eight relations that are, each of whose uses then cases only on the tags it needs.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_andFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 1FTag B φ) (v : Fin 1 × Fin (finsatDim B φ)A) :
                                                                                                  (andFml B φ t).Realize v (∀ (i : Fin 1), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) andTag B φ (t 0)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_orFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 1FTag B φ) (v : Fin 1 × Fin (finsatDim B φ)A) :
                                                                                                  (orFml B φ t).Realize v (∀ (i : Fin 1), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) orTag B φ (t 0)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_allFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 1FTag B φ) (v : Fin 1 × Fin (finsatDim B φ)A) :
                                                                                                  (allFml B φ t).Realize v (∀ (i : Fin 1), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) allTag B φ (t 0)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_exFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 1FTag B φ) (v : Fin 1 × Fin (finsatDim B φ)A) :
                                                                                                  (exFml B φ t).Realize v (∀ (i : Fin 1), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) exTag B φ (t 0)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_bindFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (bindFml B φ t).Realize v (∀ (i : Fin 2), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) (bindBodyF B φ (t 0) (t 1)).Realize v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_eqFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 3FTag B φ) (v : Fin 3 × Fin (finsatDim B φ)A) :
                                                                                                  (eqFml B φ t).Realize v (∀ (i : Fin 3), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) (eqBodyF B φ (t 0) (t 1) (t 2)).Realize v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_neqFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 3FTag B φ) (v : Fin 3 × Fin (finsatDim B φ)A) :
                                                                                                  (neqFml B φ t).Realize v (∀ (i : Fin 3), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) (neqBodyF B φ (t 0) (t 1) (t 2)).Realize v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_rootFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 1FTag B φ) (v : Fin 1 × Fin (finsatDim B φ)A) :
                                                                                                  (rootFml B φ t).Realize v (∀ (i : Fin 1), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) (rootBodyF B φ (t 0)).Realize v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_posFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (posFml B φ t).Realize v (∀ (i : Fin 2), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) atomTag B φ true (t 0) (t 1)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_negFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (negFml B φ t).Realize v (∀ (i : Fin 2), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) atomTag B φ false (t 0) (t 1)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.atomTag_unique {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {pol pol' : Bool} {t t₁ t₂ : FTag B φ} (h₁ : atomTag B φ pol t t₁) (h₂ : atomTag B φ pol' t t₂) :
                                                                                                  t₁ = t₂ tagDim B φ t₁ = 0

                                                                                                  An atom's symbol tag is determined by its node tag – so an atom of the image carries at most one relation symbol.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.atomTag_cases {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {pol : Bool} {t t' : FTag B φ} (h : atomTag B φ pol t t') :
                                                                                                  ∃ (p : Pos B φ) (i : B.ι), t = Tag.nd p pol t' = Tag.sym i blockSym B φ p = some i

                                                                                                  The tags of an atom of a relation variable, read out: a node carrying a block atom of the kernel, and the symbol of that block variable.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.atomTag_dims {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {pol : Bool} {t t' : FTag B φ} (h : atomTag B φ pol t t') :
                                                                                                  tagDim B φ t = 0 tagDim B φ t' = 0

                                                                                                  Both tags of an atom use no coordinate: their tuples are all minima.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_argFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 3FTag B φ) (v : Fin 3 × Fin (finsatDim B φ)A) :
                                                                                                  (argFml B φ t).Realize v (∀ (i : Fin 3), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) argTag B φ (t 0) (t 1) (t 2)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.argTag_unique {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' t₁ t₂ : FTag B φ} (h₁ : argTag B φ t t' t₁) (h₂ : argTag B φ t t' t₂) :
                                                                                                  t₁ = t₂ tagDim B φ t₁ = 0

                                                                                                  An argument of an atom of the image is determined by the node and the argument position – so an atom has at most one argument at each position.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.argTag_cases {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' t₁ : FTag B φ} (h : argTag B φ t t' t₁) :
                                                                                                  ∃ (pos : Pos B φ) (pol : Bool) (j : Fin (finsatDim B φ)) (l : Fin (Tseitin.maxCtx φ)), t = Tag.nd pos pol t' = Tag.apos j t₁ = Tag.dbvar l blockArg B φ pos j = some l

                                                                                                  The tags of an argument of an atom, read out: the node, the argument position and the variable are each of their own kind, and the de Bruijn level is the one the term at that position takes.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.argTag_dims {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' t₁ : FTag B φ} (h : argTag B φ t t' t₁) :
                                                                                                  tagDim B φ t = 0 tagDim B φ t' = 0 tagDim B φ t₁ = 0

                                                                                                  All three tags of an argument use no coordinate.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.sigTag_cases {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' : FTag B φ} (h : sigTag B φ t t') :
                                                                                                  ∃ (i : B.ι) (j : Fin (finsatDim B φ)), t = Tag.sym i t' = Tag.apos j j < B.arity i

                                                                                                  The tags of an argument position of a relation symbol, read out.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.sigTag_dims {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {t t' : FTag B φ} (h : sigTag B φ t t') :
                                                                                                  tagDim B φ t = 0 tagDim B φ t' = 0

                                                                                                  Both tags of a signature entry use no coordinate.

                                                                                                  Dependency graph

                                                                                                  The shape conditions, read on the image #

                                                                                                  The bridge from DescriptiveComplexity.FinSat.PosG and its companions to the tag predicates: FOInterpretation.Map is not reducible, so the arguments of the realization lemma have to be supplied explicitly – unification will not find them – and the tuple of a tag of dimension zero is extracted at the index it sits at.

                                                                                                  theorem DescriptiveComplexity.FinSat.shape_of_posG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g s : (finsatInterp B φ).Map A) (h : PosG g s) :
                                                                                                  Canon 0 g.2 Canon 0 s.2 atomTag B φ true g.1 s.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.shape_of_negG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g s : (finsatInterp B φ).Map A) (h : NegG g s) :
                                                                                                  Canon 0 g.2 Canon 0 s.2 atomTag B φ false g.1 s.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.shape_of_posOrNeg {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g s : (finsatInterp B φ).Map A) (h : PosG g s NegG g s) :
                                                                                                  ∃ (pol : Bool), Canon 0 g.2 Canon 0 s.2 atomTag B φ pol g.1 s.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.shape_of_argG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g p x : (finsatInterp B φ).Map A) (h : ArgG g p x) :
                                                                                                  Canon 0 g.2 Canon 0 p.2 Canon 0 x.2 argTag B φ g.1 p.1 x.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.argG_of {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g p x : (finsatInterp B φ).Map A) (hg : Canon (tagDim B φ g.1) g.2) (hp : Canon (tagDim B φ p.1) p.2) (hx : Canon (tagDim B φ x.1) x.2) (h : argTag B φ g.1 p.1 x.1) :
                                                                                                  ArgG g p x

                                                                                                  Building an argument relation of the image: the tags say what the argument is, and the tuples only have to be canonically padded.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.realize_sigFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (sigFml B φ t).Realize v (∀ (i : Fin 2), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) sigTag B φ (t 0) (t 1)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.shape_of_sigG {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (s p : (finsatInterp B φ).Map A) (h : SigG s p) :
                                                                                                  Canon 0 s.2 Canon 0 p.2 sigTag B φ s.1 p.1

                                                                                                  Building a relation of the image, rather than reading one: the tags say what holds, and the tuples only have to be canonically padded. This is the direction DescriptiveComplexity.FinSat.IsWF.arg_sig and DescriptiveComplexity.FinSat.IsWF.arg_tot need.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.sigG_of {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (s p : (finsatInterp B φ).Map A) (hs : Canon (tagDim B φ s.1) s.2) (hp : Canon (tagDim B φ p.1) p.2) (h : sigTag B φ s.1 p.1) :
                                                                                                  SigG s p
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.atom_sym_map {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g s s' : (finsatInterp B φ).Map A) (h : PosG g s NegG g s) (h' : PosG g s' NegG g s') :
                                                                                                  s = s'

                                                                                                  An atom of the image carries at most one relation symbol (DescriptiveComplexity.FinSat.IsWF.atom_sym).

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.arg_fun_map {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g p x x' : (finsatInterp B φ).Map A) (h : ArgG g p x) (h' : ArgG g p x') :
                                                                                                  x = x'

                                                                                                  An atom of the image has at most one argument at each position (DescriptiveComplexity.FinSat.IsWF.arg_fun).

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.arg_sig_map {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g s p x : (finsatInterp B φ).Map A) (h : PosG g s NegG g s) (h' : ArgG g p x) :
                                                                                                  SigG s p

                                                                                                  An atom of the image only has arguments at the positions of its symbol's signature (DescriptiveComplexity.FinSat.IsWF.arg_sig): an argument of a block atom sits below the arity of its relation variable.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.arg_tot_map {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] [L.IsRelational] [Finite A] [Nonempty A] (g s p : (finsatInterp B φ).Map A) (h : PosG g s NegG g s) (hsig : SigG s p) :
                                                                                                  ∃ (x : (finsatInterp B φ).Map A), ArgG g p x

                                                                                                  An atom of the image has an argument at every position of its symbol's signature (DescriptiveComplexity.FinSat.IsWF.arg_tot): the variable of the de Bruijn level the corresponding term takes, which exists because the source vocabulary is relational – a function symbol would have no level to give (the junk-value hazard).

                                                                                                  Dependency graph

                                                                                                  The parse DAG descends along the order #

                                                                                                  The last field of DescriptiveComplexity.FinSat.IsWF. Everywhere but inside the existential prefix a child sits in a strictly lower layer of the tag order, so its key is smaller; inside the prefix the two tags are equal and the chain descends because the tuple order is reversed there – which is what the prefix case of DescriptiveComplexity.FinSat.tupLeF is for.

                                                                                                  theorem DescriptiveComplexity.FinSat.realize_childFml {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (t : Fin 2FTag B φ) (v : Fin 2 × Fin (finsatDim B φ)A) :
                                                                                                  (childFml B φ t).Realize v (∀ (i : Fin 2), Canon (tagDim B φ (t i)) fun (j : Fin (finsatDim B φ)) => v (i, j)) (childBodyF B φ (t 0) (t 1)).Realize v
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.childBody_tags {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] {t t' : FTag B φ} {v : Fin 2 × Fin (finsatDim B φ)A} (h : (childBodyF B φ t t').Realize v) :
                                                                                                  v (0, c0 B φ) < v (1, c0 B φ) t = Tag.pre t' = Tag.pre frank B φ t' < frank B φ t

                                                                                                  Every child edge descends: a child either sits in a strictly lower layer of the tag order, or the edge is one step of the existential prefix.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.child_lt_map {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (g c : (finsatInterp B φ).Map A) (h : ChildG g c) :
                                                                                                  OrdLt c g

                                                                                                  Children come strictly earlier in the order of the syntax (DescriptiveComplexity.FinSat.IsWF.child_lt), so the parse DAG of the image is acyclic.

                                                                                                  Dependency graph

                                                                                                  The kinds of a node of the image #

                                                                                                  Each of the four kinds, read as a condition on the tag and the tuple: the interface the correctness proof of the reduction works against, and the reason the defining formulas dispatch on named predicates. A junk tuple – one not canonically padded – is a node of no kind at all, so it is read by nothing.

                                                                                                  theorem DescriptiveComplexity.FinSat.andG_map_iff {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x : (finsatInterp B φ).Map A) :
                                                                                                  AndG x Canon (tagDim B φ x.1) x.2 andTag B φ x.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.orG_map_iff {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x : (finsatInterp B φ).Map A) :
                                                                                                  OrG x Canon (tagDim B φ x.1) x.2 orTag B φ x.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.allG_map_iff {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x : (finsatInterp B φ).Map A) :
                                                                                                  AllG x Canon (tagDim B φ x.1) x.2 allTag B φ x.1
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.FinSat.exG_map_iff {L : FirstOrder.Language} (B : SOBlock) (φ : ((newLang L).sum B.lang).Sentence) {A : Type} [L.Structure A] [LinearOrder A] (x : (finsatInterp B φ).Map A) :
                                                                                                  ExG x Canon (tagDim B φ x.1) x.2 exTag B φ x.1
                                                                                                  Dependency graph

                                                                                                  The image of the reduction is a well-formed encoded sentence: the order of its syntax is linear, its parse DAG descends along that order, and its atoms carry one relation symbol and exactly one argument at each position of that symbol's signature. This is what makes σ_A an instance of DescriptiveComplexity.FINSAT at all – junk tags are elements no node reads, and well-formedness asks nothing of them.

                                                                                                  Dependency graph