Why System 4 always halts

Wolfram Institute • 2026
Every step of System 4 either deletes a star, turns the head round at a star or at the left end, or moves the head one element in its current direction. A measure built from the number of stars and the head position drops at every step, so a tape of length L halts within (2L + 2)(L + 1) steps.
The functions come from the paclet WolframInstitute/TuringMachine.

The measure

In state A the head moves left, in states B and C right. A leftward walk ends at a star, which is deleted, or at the left end, where the head turns round; a rightward sweep ends at a star in state B, which is deleted, or at the right end. So the phase, twice the number of stars plus one while the head moves left, never increases and drops whenever the direction changes, and within a phase the head only moves one way. Counting phases times positions gives a number below
(2L+2)(L+1)
that drops at every step.

Against real runs

The System 4 tapes of Smith's p. 33 program for
f
from 1 to 4:
In[1]:=
tapes=Table[System5ToSystem4[System5[{2},{{1,4},{1,6},{},{}}],f],{f,4}]
Out[1]=
System4
,System4
,System4
,System4

Their runs, one below the other; every run halts:
In[2]:=
System4EvolutionPlot[#,10^5,ImageSize->200]&/@Take[tapes,2]
Out[2]=

0
{2}
★
{}
★
{12,6,0,1,2,3}
★
{}
★
{}
★
{0,1,2,3}
★
{16,6,0,1,2,3}
★
{}
★
{}
★
{0,1,2,3}
★
{0,1,2,3}
★
{}
★
{}
★
{0,1,2,3}
★
{0,1,2,3}
★
{}
★
{}
★
{0,1,2,3}
,

The run lengths against the bound:
In[3]:=
ListLogPlot[{Length[System4Evolution[#,10^6]]-1&/@tapes,With[{l=Length[#["Elements"]]},(2l+2)(l+1)]&/@tapes},​​Joined->True,PlotMarkers->Automatic,PlotLegends->{"run length","bound"},AxesLabel->{"f",None},ImageSize->420]
Out[3]=
run length
bound