Documentation

DescriptiveComplexity.Problems.Machine.HaltHard.Correct

The drawn instance is a well-formed machine embedding the simulator #

The semantic half of the correctness of the drawing: the drawn structure's machine data is well-formed (DescriptiveComplexity.HaltHard.wellFormed_halt), and its machine predicates are exactly the images of DescriptiveComplexity.HaltHard.simTM's along the embedding that places each machine element on the canonically padded bottom tuple (DescriptiveComplexity.HaltHard.tmEmbed_halt). The enumeration of the cells and the initial tape are the next file's business; this one only speaks about tags and tuples.

Canonical tuples #

theorem DescriptiveComplexity.HaltHard.eq_botTup_of_canon0 {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {w : Fin (dimOf V)A} (h : Canon 0 w) :
w = botTup V A

A tuple canonical at 0 is the bottom tuple.

Dependency graph
noncomputable def DescriptiveComplexity.HaltHard.mEl {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (u : SimU (allCode cF cP)) :
(haltTuringInterp V cF cP).Map A

The machine element u, as the point of the drawn instance with the bottom tuple.

Equations
Instances For
    Dependency graph

    The embedding of the simulating machine #

    theorem DescriptiveComplexity.HaltHard.unary_embed_iff {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty 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)) (b : (haltTuringInterp V cF cP).Map A) :
    FirstOrder.Language.Structure.RelMap (have this := R; this) ![b] ∃ (u : SimU (allCode cF cP)), b = mEl u Q u
    Dependency graph
    theorem DescriptiveComplexity.HaltHard.binary_embed_iff {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty 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)) (b b' : (haltTuringInterp V cF cP).Map A) :
    FirstOrder.Language.Structure.RelMap (have this := R; this) ![b, b'] ∃ (u : SimU (allCode cF cP)) (u' : SimU (allCode cF cP)), b = mEl u b' = mEl u' Q u u'
    Dependency graph

    The drawn machine embeds the simulating machine: every machine predicate of the drawn structure is the image of simTM's along mEl.

    Dependency graph

    The letter of a cell is unique #

    theorem DescriptiveComplexity.HaltHard.inpOn_functional {L : FirstOrder.Language} {V : L.FinVocab} {cF cP : Turing.ToPartrec.Code} {A : Type} [L.Structure A] [LinearOrder A] {c : CellTag V} {u u' : SimU (allCode cF cP)} {w : Fin (dimOf V)A} (h : InpOn V cF cP c u w) (h' : InpOn V cF cP c u' w) :
    u = u'

    The letter DescriptiveComplexity.HaltHard.InpOn relates to a cell is unique.

    Dependency graph

    The drawn machine is well-formed #

    The drawn machine data is well-formed.

    Dependency graph

    Tuple numbers #

    The reversed lexicographic order on tuples is comparison of their numbers – the little-endian DescriptiveComplexity.tupleIdx of the coordinates read through the numbering. One direction is proved arithmetically; the other falls out of trichotomy and injectivity.

    Splitting the number of a concatenation.

    Dependency graph
    noncomputable def DescriptiveComplexity.HaltHard.tupN {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) (w : Fin (dimOf V)A) :

    The number of a tuple, read through the numbering.

    Equations
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.HaltHard.tupN_lt {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) (w : Fin (dimOf V)A) :
      tupN k e w < (k + 1) ^ dimOf V
      Dependency graph
      theorem DescriptiveComplexity.HaltHard.tupN_lt_of_revLexLt {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) {u w : Fin (dimOf V)A} (h : RevLexLt u w) :
      tupN k e u < tupN k e w

      Reversed lexicographic comparison is comparison of the numbers.

      Dependency graph
      theorem DescriptiveComplexity.HaltHard.tupN_inj {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) {u w : Fin (dimOf V)A} (h : tupN k e u = tupN k e w) :
      u = w
      Dependency graph
      theorem DescriptiveComplexity.HaltHard.revLexLt_of_tupN_lt {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) {u w : Fin (dimOf V)A} (h : tupN k e u < tupN k e w) :
      Dependency graph

      The cells of the input page #

      Dependency graph
      noncomputable def DescriptiveComplexity.HaltHard.tupOf {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) (i : Fin V.numSyms) (t : ) :
      Fin (dimOf V)A

      The tuple of the bit cell numbered t in the block of symbol i.

      Equations
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.HaltHard.canon_tupOf {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) (i : Fin V.numSyms) (t : ) :
        Canon (V.arity i) (tupOf V k e i t)
        Dependency graph
        theorem DescriptiveComplexity.HaltHard.tupN_tupOf {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) (i : Fin V.numSyms) {t : } (ht : t < (k + 1) ^ V.arity i) :
        tupN k e (tupOf V k e i t) = t

        The number of a bit cell's tuple is its index.

        Dependency graph
        Dependency graph
        theorem DescriptiveComplexity.HaltHard.tupN_lt_cap_of_canon {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {i : Fin V.numSyms} {w : Fin (dimOf V)A} (hcan : Canon (V.arity i) w) :
        tupN k e w < (k + 1) ^ V.arity i

        The number of a tuple canonical at an arity stays below the block cap.

        Dependency graph
        theorem DescriptiveComplexity.HaltHard.eq_tupOf_of_canon {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {i : Fin V.numSyms} {w : Fin (dimOf V)A} (hcan : Canon (V.arity i) w) :
        w = tupOf V k e i (tupN k e w)

        A tuple canonical at an arity is the tuple of its number's bit cell.

        Dependency graph

        The chain indices, in tape order: symbols descending, tuple numbers descending inside each block.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          Dependency graph
          noncomputable def DescriptiveComplexity.HaltHard.pairCells {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) (p : Fin V.numSyms × ) :
          List ((haltTuringInterp V cF cP).Map A)

          The two chain cells of a bit.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.HaltHard.chainCells {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) :
            List ((haltTuringInterp V cF cP).Map A)

            The chain cells, in tape order.

            Equations
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.HaltHard.oneCells {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) :
              List ((haltTuringInterp V cF cP).Map A)

              The digit cells of the spelled size, in tape order – elements descending.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.HaltHard.psH {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) :
                List ((haltTuringInterp V cF cP).Map A)

                The cells of the drawn instance, in tape order.

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

                  Membership: the cells are exactly the positions #

                  theorem DescriptiveComplexity.HaltHard.posn_of_mem_psH {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {p : (haltTuringInterp V cF cP).Map A} (hp : p psH V cF cP k e) :
                  (tmData ((haltTuringInterp V cF cP).Map A)).Posn p

                  Every listed cell is a position.

                  Dependency graph
                  theorem DescriptiveComplexity.HaltHard.mem_psH_of_posn {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {p : (haltTuringInterp V cF cP).Map A} (hp : (tmData ((haltTuringInterp V cF cP).Map A)).Posn p) :
                  p psH V cF cP k e

                  Every position is a listed cell.

                  Dependency graph

                  The initial letters #

                  noncomputable def DescriptiveComplexity.HaltHard.bitAt {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [L.Structure A] [LinearOrder A] (k : ) (e : Fin (k + 1) ≃o A) [(n : ) → (R : L.Relations n) → (x : Fin nA) → Decidable (FirstOrder.Language.Structure.RelMap R x)] (i : Fin V.numSyms) (t : ) :

                  The bit drawn at a bit cell: the table entry of the presentation.

                  Equations
                  Instances For
                    Dependency graph
                    theorem DescriptiveComplexity.HaltHard.bitAt_iff_bitOf {L : FirstOrder.Language} (V : L.FinVocab) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) [(n : ) → (R : L.Relations n) → (x : Fin nA) → Decidable (FirstOrder.Language.Structure.RelMap R x)] (i : Fin V.numSyms) (t : ) :
                    bitAt V k e i t = true bitOf V i (tupOf V k e i t)

                    The drawn bit reads the source relation at the cell's tuple.

                    Dependency graph
                    noncomputable def DescriptiveComplexity.HaltHard.inpH {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) [(n : ) → (R : L.Relations n) → (x : Fin nA) → Decidable (FirstOrder.Language.Structure.RelMap R x)] :
                    List ((haltTuringInterp V cF cP).Map A)

                    The initial letters, cell by cell.

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

                      The enumeration is strictly ordered #

                      The strict order of the drawn machine.

                      Equations
                      Instances For
                        Dependency graph
                        theorem DescriptiveComplexity.HaltHard.sLt_intro {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} (hle : HLe V cF cP (t, w) (t', w')) (hne : t t' w w') :
                        SLt V cF cP (hPt t w) (hPt t' w')
                        Dependency graph
                        theorem DescriptiveComplexity.HaltHard.sLt_of_blockLt {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] {t t' : HTag V cF cP} (h : blockIdx V cF cP t < blockIdx V cF cP t') (w w' : Fin (dimOf V)A) :
                        SLt V cF cP (hPt t w) (hPt t' w')
                        Dependency graph
                        theorem DescriptiveComplexity.HaltHard.sLt_of_revLex {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] {t t' : HTag V cF cP} (hb : blockIdx V cF cP t = blockIdx V cF cP t') {w w' : Fin (dimOf V)A} (h : RevLexLt w' w) :
                        SLt V cF cP (hPt t w) (hPt t' w')
                        Dependency graph
                        Dependency graph
                        theorem DescriptiveComplexity.HaltHard.sLt_one {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {a a' : Fin (k + 1)} (h : a' < a) :
                        SLt V cF cP (hPt (Sum.inr CellTag.cOne) (pad (botOrd A) fun (x : Fin 1) => e a)) (hPt (Sum.inr CellTag.cOne) (pad (botOrd A) fun (x : Fin 1) => e a'))
                        Dependency graph
                        theorem DescriptiveComplexity.HaltHard.pairwise_flatMap {α β : Type} {R : ββProp} {f : αList β} {l : List α} :
                        (∀ al, List.Pairwise R (f a))List.Pairwise (fun (a b : α) => xf a, yf b, R x y) lList.Pairwise R (List.flatMap f l)

                        Pairwise over a flatMap, from pairwise inside each image and pairwise across the images.

                        Dependency graph

                        Later chain indices are smaller: symbols descending, tuple numbers descending inside a symbol.

                        Equations
                        Instances For
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.tag_of_mem_chainCells {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {x : (haltTuringInterp V cF cP).Map A} (hx : x chainCells V cF cP k e) :
                          ∃ (i : Fin V.numSyms) (w : Fin (dimOf V)A), x = hPt (Sum.inr (CellTag.cBit i)) w x = hPt (Sum.inr (CellTag.cFold i)) w
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.tag_of_mem_oneCells {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) {x : (haltTuringInterp V cF cP).Map A} (hx : x oneCells V cF cP k e) :
                          ∃ (w : Fin (dimOf V)A), x = hPt (Sum.inr CellTag.cOne) w
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.pairwise_psH {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) :
                          List.Pairwise (SLt V cF cP) (psH V cF cP k e)

                          The cells are strictly ordered as listed.

                          Dependency graph

                          The enumeration and the initial tape #

                          theorem DescriptiveComplexity.HaltHard.isPosEnum_psH {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (k : ) (e : Fin (k + 1) ≃o A) :
                          HaltPcp.IsPosEnum (tmData ((haltTuringInterp V cF cP).Map A)) (psH V cF cP k e)

                          The listed cells enumerate the positions in the machine's order.

                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.forall₂_flatMap {α β γ : Type} {R : βγProp} {f : αList β} {g : αList γ} {l : List α} :
                          (∀ al, List.Forall₂ R (f a) (g a))List.Forall₂ R (List.flatMap f l) (List.flatMap g l)
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.forall₂_map_replicate {α β γ : Type} {R : βγProp} {F : αβ} {c : γ} {l : List α} :
                          (∀ al, R (F a) c)List.Forall₂ R (List.map F l) (List.replicate l.length c)
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.forall₂_initTape {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] [(n : ) → (R : L.Relations n) → (x : Fin nA) → Decidable (FirstOrder.Language.Structure.RelMap R x)] (k : ) (e : Fin (k + 1) ≃o A) :
                          List.Forall₂ (tmData ((haltTuringInterp V cF cP).Map A)).InitTape (psH V cF cP k e) (inpH V cF cP k e)

                          The listed letters are the initial tape of the listed cells.

                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.reverse_flatMap {α β : Type} (f : αList β) (l : List α) :
                          (List.flatMap f l).reverse = List.flatMap (fun (a : α) => (f a).reverse) l.reverse
                          Dependency graph

                          The reversed flattened table is the drawn bit sequence.

                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.replicate_rotate {α : Type} (a : α) (n : ) (l : List α) :
                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.inpH_eq {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] [(n : ) → (R : L.Relations n) → (x : Fin nA) → Decidable (FirstOrder.Language.Structure.RelMap R x)] (k : ) (e : Fin (k + 1) ≃o A) :
                          inpH V cF cP k e = List.map mEl (List.map sts (SimSym.endL :: (List.flatMap (fun (b : Bool) => [SimSym.hComp (posBit cF cP b), SimSym.hComp (posFold cF cP)]) (List.map (fun (p : Fin V.numSyms × ) => bitAt V k e p.1 p.2) (bitIdx V k)) ++ [SimSym.hComp (posProc cF cP)] ++ SimSym.mid :: valR [0, k + 1] 0 0)))

                          The listed letters are the image of the spelled initial word.

                          Dependency graph
                          theorem DescriptiveComplexity.HaltHard.holds_haltMap_iff {L : FirstOrder.Language} (V : L.FinVocab) (cF cP : Turing.ToPartrec.Code) {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] [L.IsRelational] (k : ) (e : Fin (k + 1) ≃o A) {P : DecisionProblem L} (hF : ∀ (v : List.Vector 3), cF.eval v = pure <$> foldSpec v) (hP : ∀ (N n : ), (cP.eval [N, n]).Dom P.toPred V (structOfBits V (n - 1) N)) :

                          Correctness of the drawing: the drawn instance is a yes-instance of the halting problem exactly when the source structure is one.

                          Dependency graph