Documentation

DescriptiveComplexity.Problems.Machine.HaltHard.Tags

The alphabet of the machine simulating a ToPartrec code #

The static data of the RE-hardness of DescriptiveComplexity.HALT (PCP-HARDNESS.md §2): the machine M(c) that the reduction draws simulates the sequential semantics Turing.ToPartrec.step of a fixed code c, so its states and symbols are indexed by the positions of the syntax tree of c – a finite type built by recursion on c, the SubPos pattern of the CODEHALT reduction – and by nothing else. This file carries those positions (DescriptiveComplexity.HaltHard.CPos), the continuations restricted to subcodes (DescriptiveComplexity.HaltHard.PCont), the tape alphabet (DescriptiveComplexity.HaltHard.SimSym) and the encoding of a configuration as a tape word:

bkbk endL ⟦TOP⟧ gap ⟦…⟧ gap ⟦BASE⟧ gap mid gap ⟦value, mirrored⟧ endR bk

Every code in a continuation frame reached from stepNormal c … /stepRet is a subcode of c, so the positioned continuations PCont mirror Turing.ToPartrec.Cont with positions for codes; DescriptiveComplexity.HaltHard.PCont.toCont projects back, and the simulation is stated over PCont throughout.

The positions of the syntax tree of a code #

Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph

The positions of the immediate subterms: the first child of a binary node.

Equations
Instances For
    Dependency graph

    The positions of the immediate subterms: the second child of a binary node.

    Equations
    Instances For
      Dependency graph

      The codes at the children #

      The step function dispatches on the code at a position and moves to its children, so the simulation needs to read the child positions' codes off the parent's. The two functions below are the code-level shadows of DescriptiveComplexity.HaltHard.child₁/child₂, and the lemmas identify the two readings.

      Dependency graph
      Dependency graph

      The code at the first child is the first subterm of the code at the position.

      Dependency graph

      The code at the second child is the second subterm of the code at the position.

      Dependency graph

      The first child of the code at p, defaulting to the root – the default is never taken at the positions the machine visits.

      Equations
      Instances For
        Dependency graph
        Dependency graph

        The code at the first child, when the position holds a code with a first subterm.

        Dependency graph

        The code at the second child, when the position holds a code with a second subterm.

        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph

        Continuations over positions #

        Every code stored in a continuation reached from stepNormal c/stepRet is a subcode of c, so the simulation works with continuations carrying positions and projects back to Turing.ToPartrec.Cont when it meets the library semantics.

        A continuation whose codes are positions of the syntax tree of c.

        Instances For
          Dependency graph
          Dependency graph

          The tape alphabet #

          The tape alphabet of the simulating machine: the blank, the unary digit and the block separator (each with a primed copy for the one non-destructive copy loop), the three markers – the movable endL and endR and the fixed mid – and one header letter per continuation frame shape, the ones carrying a code carrying its position.

          Instances For
            Dependency graph
            Dependency graph

            Words #

            Dependency graph

            The word of a value, head block leftmost. The value region of the tape holds (encVal v).reverse – blocks in reverse order, each separator before its digits – so that the head block ends at the movable marker endR and every operation on it has the blank half-tape to grow into.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph