Documentation

DescriptiveComplexity.Problems.Machine.HaltHard.Interp

Drawing the simulating machine and its input page #

The interpretation of the reduction P ≤ᶠᵒ[≤] HALT: the states, symbols and transitions of the simulating machine are tags – constant at every instance size – and the cells of its initial tape are tagged tuples of the source structure: one bit cell and one fold cell per tuple of each source relation (the chain of DescriptiveComplexity.HaltHard.inputChain), and a handful of constant cells for the markers and the spelled initial value [0, n].

The one order key of the whole universe, junk included: the block index of the tag, then the tuple in descending lexicographic order with the last coordinate most significant – matching the little-endian significance of FirstOrder.Language.tupleIdx, so that position-ascending order reads the flattened relation table reversed, which is the order the chain folds – and a static sub-index that interleaves each bit cell with its fold cell. Unused coordinates are pinned to the minimum (DescriptiveComplexity.Canon), so cells enumerate exactly once.

The cell tags #

The tags of the input cells: the left marker, one bit cell and one fold cell per source symbol (carrying a tuple of its arity), the procedure cell, the middle marker, the inner blank, and the spelled initial value [0, n] – a separator, one digit cell per element, a separator, and the right marker.

Instances For
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph

    The tags of the drawn instance #

    @[reducible, inline]

    The tags of the drawn instance: a machine element – a state, a symbol or a transition of the simulating machine – or an input cell.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph

      A chosen injective numbering of the machine elements, for the order on the junk.

      Equations
      Instances For
        Dependency graph

        The block index of a tag – the primary component of the one order key. The chain blocks descend along the symbols, each shared by the bit and fold tags; the machine elements sit above everything, ordered by the chosen numbering.

        Equations
        Instances For
          Dependency graph

          The sub-index breaking the tie inside a chain block: the fold cell sits right of its bit cell.

          Equations
          Instances For
            Dependency graph

            The reversed lexicographic order on tuples #

            u is below w in the reversed lexicographic order: they differ, and at the highest differing coordinate u is smaller. Matching the little-endian significance of FirstOrder.Language.tupleIdx, this is comparison of tuple numbers.

            Equations
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.HaltHard.RevLexLt.trans {A : Type} [LinearOrder A] {D : ℕ} {u w x : Fin D → A} (h : RevLexLt u w) (h' : RevLexLt w x) :
              Dependency graph

              The one order of the whole universe #

              noncomputable def DescriptiveComplexity.HaltHard.HLe {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] (x y : HTag V cF cP × (Fin (dimOf V) → A)) :

              The order of the drawn universe, junk included: block index of the tag, then the tuple – descending along the reversed lexicographic order, so that ascending positions read descending tuple numbers – then the sub-index.

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

                The defining formulas #

                The reversed lexicographic comparison, as a formula: p is below q.

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

                  A unary machine predicate: the tag is a machine element satisfying it, canonically padded.

                  Equations
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.HaltHard.mBinaryF {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) (Q : SimU (allCode cF cP) → SimU (allCode cF cP) → Prop) (t t' : HTag V cF cP) :

                    A binary machine predicate: two machine elements satisfying it, canonically padded.

                    Equations
                    Instances For
                      Dependency graph

                      The order, by the one key: block index, then the reversed lexicographic order descending, then the sub-index.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.HaltHard.InpOn {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] (c : CellTag V) (u : SimU (allCode cF cP)) (w : Fin (dimOf V) → A) :

                        The letter a cell initially holds, semantically: the marker of its tag, and on a bit cell the pushed bit reads the source relation.

                        Equations
                        Instances For
                          Dependency graph

                          The body of the initial-tape relation, per cell tag and letter.

                          Equations
                          Instances For
                            Dependency graph

                            The initial-tape relation: a cell and a canonically padded symbol element, related by the body.

                            Equations
                            Instances For
                              Dependency graph

                              The interpretation: machine elements and input cells as tagged tuples, the machine relations read off DescriptiveComplexity.HaltHard.simTM at the tags, the input page reading the source relations.

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

                                Characterization of the interpreted relations #

                                def DescriptiveComplexity.HaltHard.hPt {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} (t : HTag V cF cP) (w : Fin (dimOf V) → A) :
                                (haltTuringInterp V cF cP).Map A

                                The element of the drawn instance with a given tag and tuple.

                                Equations
                                Instances For
                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.exists_hPt {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} (x : (haltTuringInterp V cF cP).Map A) :
                                  ∃ (t : HTag V cF cP) (w : Fin (dimOf V) → A), x = hPt t w
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.HaltHard.val_sel₀ {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} (t : HTag V cF cP) (w : Fin (dimOf V) → A) (j : Fin (dimOf V)) :
                                  (![hPt t w] (CodeProgRed.sel₀ V j).1).2 (CodeProgRed.sel₀ V j).2 = w j
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.HaltHard.val_selA {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} (t t' : HTag V cF cP) (w w' : Fin (dimOf V) → A) (j : Fin (dimOf V)) :
                                  (![hPt t w, hPt t' w'] (CodeProgRed.selA V j).1).2 (CodeProgRed.selA V j).2 = w j
                                  Dependency graph
                                  @[simp]
                                  theorem DescriptiveComplexity.HaltHard.val_selB {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} (t t' : HTag V cF cP) (w w' : Fin (dimOf V) → A) (j : Fin (dimOf V)) :
                                  (![hPt t w, hPt t' w'] (CodeProgRed.selB V j).1).2 (CodeProgRed.selB V j).2 = w' j
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph