Documentation

DescriptiveComplexity.Exponential.AddrExp

Reading a structure over its subsets: the address expansion #

The construction that puts a problem one exponential up without saying anything about resources: an DescriptiveComplexity.ExpExpansion whose block is a single unary relation variable, so that an assignment is a subset of the instance and the expanded universe is its power set.

It is written once here, for an arbitrary relational vocabulary with a designated binary symbol read as the order on the elements, because two problems of this library are drawn on it – the wide machine (DescriptiveComplexity.Problems.Wide.Expansion) and the wide tiling (DescriptiveComplexity.Problems.Wide.Tiling). What a particular problem supplies is only its tags and the choice of sentence at each symbol; what is here is everything else:

Every quantifier in them ranges over the base – an element, never an address – which is what keeps them first-order there.

The order on addresses is the binary-number order (DescriptiveComplexity.WMSetLe): one subset is below another when, at the least element where they differ, the second contains it and the first does not. That relation and the initial segment an element cuts (DescriptiveComplexity.WMDown) are stated here for an arbitrary relation on an arbitrary type, since both the problems and their expansions read them.

Addresses #

The two things said about an address – how it compares with another, and which initial segment it is – stated for an arbitrary order relation, so that they transport along an equivalence without mentioning a structure.

def DescriptiveComplexity.WMSetLe {α : Type} (Le : α → α → Prop) (s t : α → Prop) :

The binary-number order on addresses: the two subsets agree, or, at some element where the first is out and the second in, they agree at every strictly smaller element. Written with the strict order spelled out as Le y x ∧ ¬ Le x y, which is the shape the defining sentence of the expansion realizes to.

Equations
Instances For
    Dependency graph
    def DescriptiveComplexity.WMDown {α : Type} (Le : α → α → Prop) (s : α → Prop) (x : α) :

    The address of an element: the initial segment it cuts, which is where the element's input symbol is written.

    Equations
    Instances For
      Dependency graph
      def DescriptiveComplexity.WMFileSeg {α : Type} (Le : α → α → Prop) (Has s : α → Prop) (x : α) :

      The cell of an element on a file: the initial segment it cuts among the elements the file has a register for. The wide machine's register channel and the wide tiling's bottom row are both described at these addresses – a file of cells rather than the ruler of all the segments.

      Equations
      Instances For
        Dependency graph

        The vocabularies #

        @[reducible, inline]

        The ordered vocabulary of wide-machine instances: what an expansion's sentences may read besides the block.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The block whose assignments are the addresses: a single unary relation variable, so an assignment is a subset of the instance.

          Equations
          Instances For
            Dependency graph
            Dependency graph
            Dependency graph
            @[reducible, inline]

            A unary symbol of the instance, in the ordered vocabulary: a raw Sum.inl does not elaborate at that type.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              A binary symbol of the instance, in the ordered vocabulary.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The relation variable of the block, at one copy.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The relation variable of the first of two copies.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The relation variable of the second of two copies.

                    Equations
                    Instances For
                      Dependency graph

                      Addresses, as assignments of the block #

                      The address an assignment is: the elements its relation variable holds of.

                      Equations
                      Instances For
                        Dependency graph

                        The assignment an address is, the inverse of DescriptiveComplexity.AddrExp.aeBits.

                        Equations
                        Instances For
                          Dependency graph
                          Dependency graph
                          @[simp]

                          An assignment of the block is the assignment of its address: the single variable being unary, nothing else is stored.

                          Dependency graph

                          The base's own relations, read semantically #

                          A unary relation of the base, at an element.

                          Equations
                          Instances For
                            Dependency graph

                            A binary relation of the base, at two elements.

                            Equations
                            Instances For
                              Dependency graph

                              The guards of the base vocabulary #

                              noncomputable def DescriptiveComplexity.AddrExp.markG {L : FirstOrder.Language} {γ : Type} (r : L.Relations 1) (x : γ) :
                              (aeOrd L).Formula γ

                              A unary mark of the instance.

                              Equations
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.AddrExp.attrG {L : FirstOrder.Language} {γ : Type} (r : L.Relations 2) (x y : γ) :
                                (aeOrd L).Formula γ

                                A binary attribute of the instance.

                                Equations
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.AddrExp.eqG {L : FirstOrder.Language} {γ : Type} (x y : γ) :
                                  (aeOrd L).Formula γ

                                  x and y are the same element.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.AddrExp.ltG {L : FirstOrder.Language} {γ : Type} (leSym : L.Relations 2) (x y : γ) :
                                    (aeOrd L).Formula γ

                                    x is strictly below y in the order the instance carries.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      Dependency graph
                                      @[simp]
                                      Dependency graph
                                      @[simp]
                                      theorem DescriptiveComplexity.AddrExp.realize_eqG {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (x y : γ) :
                                      (eqG x y).Realize v ↔ v x = v y
                                      Dependency graph
                                      @[simp]
                                      theorem DescriptiveComplexity.AddrExp.realize_ltG {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (leSym : L.Relations 2) (x y : γ) :
                                      (ltG leSym x y).Realize v ↔ aeRel₂ leSym (v x) (v y) ∧ ¬aeRel₂ leSym (v y) (v x)
                                      Dependency graph

                                      The atoms of the block, and the lifts #

                                      noncomputable def DescriptiveComplexity.AddrExp.bit1F {L : FirstOrder.Language} {γ : Type} (x : γ) :

                                      The address of the single copy holds x.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.AddrExp.bitAF {L : FirstOrder.Language} {γ : Type} (x : γ) :

                                        The address of the first of two copies holds x.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.AddrExp.bitBF {L : FirstOrder.Language} {γ : Type} (x : γ) :

                                          The address of the second of two copies holds x.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            noncomputable def DescriptiveComplexity.AddrExp.lift1 {L : FirstOrder.Language} {γ : Type} (φ : (aeOrd L).Formula γ) :

                                            A base guard, read at one copy of the block.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              noncomputable def DescriptiveComplexity.AddrExp.lift2 {L : FirstOrder.Language} {γ : Type} (φ : (aeOrd L).Formula γ) :

                                              A base guard, read at two copies of the block.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.AddrExp.realize_bit1F {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (ρ : addrBlock.Assignment A) (x : γ) :
                                                (bit1F x).Realize v ↔ aeBits ρ (v x)
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.AddrExp.realize_bitAF {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (ρ σ : addrBlock.Assignment A) (x : γ) :
                                                (bitAF x).Realize v ↔ aeBits ρ (v x)
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.AddrExp.realize_bitBF {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (ρ σ : addrBlock.Assignment A) (x : γ) :
                                                (bitBF x).Realize v ↔ aeBits σ (v x)
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.AddrExp.realize_lift1 {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (ρ : addrBlock.Assignment A) (φ : (aeOrd L).Formula γ) :
                                                (lift1 φ).Realize v ↔ φ.Realize v
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.AddrExp.realize_lift2 {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γ → A} (ρ σ : addrBlock.Assignment A) (φ : (aeOrd L).Formula γ) :
                                                (lift2 φ).Realize v ↔ φ.Realize v
                                                Dependency graph

                                                The five sentences #

                                                Everything an expansion of FirstOrder.L has to say, once each.

                                                A mark of the control: the point is the element x, and x carries the mark r.

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

                                                  A binary attribute of the control: the two points are the elements x and y, and r holds of them.

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

                                                    The domain sentence of the control tag: the address is a singleton, so the point is an element of the instance.

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

                                                      The order on addresses: the two addresses agree, or, at some element the first is out of and the second in, they agree at every strictly smaller element.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Dependency graph
                                                        noncomputable def DescriptiveComplexity.AddrExp.inpS {L : FirstOrder.Language} (leSym inpSym : L.Relations 2) :

                                                        The initial tape: the first address is the initial segment cut by some element x, the second point is a symbol y, and y is the input at x.

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

                                                          The address lies inside a marked part of the instance: every element it holds carries the mark. This is what makes a sub-power-set the universe a problem's grid is indexed by, when the expansion's own universe has to be bigger than the instance to hold the problem's other objects.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            Dependency graph
                                                            noncomputable def DescriptiveComplexity.AddrExp.hasRelG {L : FirstOrder.Language} {γ : Type} (r : L.Relations 2) (x : γ) :
                                                            (aeOrd L).Formula γ

                                                            An element the file has a register for, as a guard: it carries the relation the file is described by.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              noncomputable def DescriptiveComplexity.AddrExp.regS {L : FirstOrder.Language} (leSym inpSym : L.Relations 2) :

                                                              A relation read at the cells of a file: the first address is the segment some element x cuts among the elements carrying inpSym, the second point is a y, and inpSym holds of x and y. This is AddrExp.inpS with the ruler of all the segments replaced by the file.

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

                                                                What the five sentences say #

                                                                @[simp]
                                                                theorem DescriptiveComplexity.AddrExp.realize_hasRelG {L : FirstOrder.Language} {A : Type} [L.Structure A] [LinearOrder A] {γ : Type} {v : γ → A} (r : L.Relations 2) (x : γ) :
                                                                (hasRelG r x).Realize v ↔ ∃ (z : A), aeRel₂ r (v x) z
                                                                Dependency graph

                                                                The universe, the tags and the expansion skeleton #

                                                                @[reducible, inline]

                                                                The universe a problem at this expansion runs over: the addresses – the subsets of the instance – together with the elements of the instance. An abbrev, so that the sum structure stays visible to rw and to the elaborator.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph

                                                                  The two tags of the expansion: the addresses, and the elements of the instance.

                                                                  • addr : WTag

                                                                    An address: any assignment of the block.

                                                                  • ctrl : WTag

                                                                    A control element: a singleton assignment of the block.

                                                                  Instances For
                                                                    Dependency graph
                                                                    Dependency graph
                                                                    @[instance_reducible]
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Dependency graph
                                                                    Dependency graph
                                                                    Dependency graph
                                                                    Dependency graph
                                                                    noncomputable def DescriptiveComplexity.AddrExp.addrExp (L E : FirstOrder.Language) [E.IsRelational] (relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence) :

                                                                    The expansion whose points are the subsets of the instance: two tags, the one-variable block, and whatever defining sentences the problem supplies. Everything below is proved of this expansion, so a problem drawn on it has only to say what each of its symbols means.

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

                                                                      The universe of the problem is the universe of the expansion #

                                                                      An address satisfies the domain sentence of its tag, which is ⊤.

                                                                      Dependency graph
                                                                      theorem DescriptiveComplexity.AddrExp.domHolds_ctrl {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] (x : A) :

                                                                      The singleton address of an element satisfies the domain sentence of the control tag.

                                                                      Dependency graph
                                                                      noncomputable def DescriptiveComplexity.AddrExp.addrEmbed {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] :
                                                                      WPoint A → (addrExp L E fun {n : ℕ} => relS).Map A

                                                                      The universe of the problem sits inside the expansion: an address becomes the point tagged addr carrying it, a control element the point tagged ctrl carrying its singleton.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph
                                                                        @[simp]
                                                                        theorem DescriptiveComplexity.AddrExp.addrEmbed_addr_tag {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] (s : A → Prop) :
                                                                        Dependency graph
                                                                        @[simp]
                                                                        theorem DescriptiveComplexity.AddrExp.addrEmbed_ctrl_tag {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] (x : A) :
                                                                        Dependency graph

                                                                        The embedding is onto the whole expanded universe: every point tagged addr is an address, and every point tagged ctrl is a control element, because its domain sentence made its assignment a singleton.

                                                                        Dependency graph
                                                                        noncomputable def DescriptiveComplexity.AddrExp.addrEquiv {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] :
                                                                        WPoint A ≃ (addrExp L E fun {n : ℕ} => relS).Map A

                                                                        The points of the expansion are the universe of the problem.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph
                                                                          Dependency graph

                                                                          Reading a defining sentence at the points #

                                                                          @[instance_reducible]
                                                                          noncomputable def DescriptiveComplexity.AddrExp.addrStructure {L E : FirstOrder.Language} [E.IsRelational] {relS : {n : ℕ} → E.Relations n → (Fin n → WTag) → ((aeOrd L).sum (addrBlock.replicate n).lang).Sentence} (A : Type) [L.Structure A] [LinearOrder A] :
                                                                          E.Structure ((addrExp L E fun {n : ℕ} => relS).Map A)

                                                                          The expanded structure, at the vocabulary the problem is written in – equal to the expansion's own by definition, but not syntactically, so instance search has to be handed it.

                                                                          Equations
                                                                          Instances For
                                                                            Dependency graph