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 DescriptiveComplexity.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
    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
        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
            theorem DescriptiveComplexity.HaltHard.tag_eq_of_idx {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {t t' : HTag V cF cP} (hb : blockIdx V cF cP t = blockIdx V cF cP t') (hs : subIdx V cF cP t = subIdx V cF cP t') :
            t = t'

            The pair of indices determines the tag.

            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 DescriptiveComplexity.tupleIdx, this is comparison of tuple numbers.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              theorem DescriptiveComplexity.HaltHard.RevLexLt.asymm {A : Type} [LinearOrder A] {D : } {u w : Fin DA} (h : RevLexLt u w) (h' : RevLexLt w u) :
              Dependency graph
              theorem DescriptiveComplexity.HaltHard.RevLexLt.trans {A : Type} [LinearOrder A] {D : } {u w x : Fin DA} (h : RevLexLt u w) (h' : RevLexLt w x) :
              Dependency graph
              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
                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
                                  theorem DescriptiveComplexity.HaltHard.hLe_def {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [LinearOrder A] (t t' : HTag V cF cP) (w w' : Fin (dimOf V)A) :
                                  HLe V cF cP (t, w) (t', w') blockIdx V cF cP t < blockIdx V cF cP t' blockIdx V cF cP t = blockIdx V cF cP t' (RevLexLt w' w w = w' subIdx V cF cP t subIdx V cF cP t')

                                  The order, with the projections of the point reduced.

                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.realize_revLexLtF {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [L.Structure A] [LinearOrder A] {γ : Type} {p q : Fin (dimOf V)γ} {v : γA} :
                                  (revLexLtF V p q).Realize v RevLexLt (fun (j : Fin (dimOf V)) => v (p j)) fun (j : Fin (dimOf V)) => v (q j)
                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.relMap_posn {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t : HTag V cF cP) (w : Fin (dimOf V)A) :
                                  TMPosn (hPt t w) ∃ (c : CellTag V), t = Sum.inr c Canon (CellTag.used V c) w
                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.relMap_unary {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (Q : SimU (allCode cF cP)Prop) (R : FirstOrder.Language.turingRel 1) (hR : ∀ (ts : Fin 1HTag V cF cP), (haltTuringInterp V cF cP).relFormula R ts = mUnaryF V cF cP Q (ts 0)) (t : HTag V cF cP) (w : Fin (dimOf V)A) :
                                  FirstOrder.Language.Structure.RelMap (have this := R; this) ![hPt t w] (∃ (u : SimU (allCode cF cP)), t = Sum.inl u Q u) Canon 0 w
                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.relMap_binary {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (Q : SimU (allCode cF cP)SimU (allCode cF cP)Prop) (R : FirstOrder.Language.turingRel 2) (hR : ∀ (ts : Fin 2HTag V cF cP), (haltTuringInterp V cF cP).relFormula R ts = mBinaryF V cF cP Q (ts 0) (ts 1)) (t t' : HTag V cF cP) (w w' : Fin (dimOf V)A) :
                                  FirstOrder.Language.Structure.RelMap (have this := R; this) ![hPt t w, hPt t' w'] (∃ (u : SimU (allCode cF cP)) (u' : SimU (allCode cF cP)), t = Sum.inl u t' = Sum.inl u' Q u u') Canon 0 w Canon 0 w'
                                  Dependency graph
                                  theorem DescriptiveComplexity.HaltHard.relMap_le {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : HTag V cF cP) (w w' : Fin (dimOf V)A) :
                                  TMLe (hPt t w) (hPt t' w') HLe V cF cP (t, w) (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
                                  theorem DescriptiveComplexity.HaltHard.relMap_inp {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : HTag V cF cP) (w w' : Fin (dimOf V)A) :
                                  TMInp (hPt t w) (hPt t' w') ∃ (c : CellTag V) (u : SimU (allCode cF cP)), t = Sum.inr c t' = Sum.inl u Canon (CellTag.used V c) w Canon 0 w' InpOn V cF cP c u w
                                  Dependency graph