Why System 5 halts, and how soon
Why System 5 halts, and how soon
Wolfram Institute • 2026
Every bag element counts down, so within B steps some element reaches 0 and a rule is used up; each pop can at most double the largest integer. With r rules and integers at most B the run is over within B 2^r steps. The bound is what lets the proof size its tape without running System 5.
The argument
The argument
Take a program whose bag has no repeated elements, all positive, and whose rule entries are not negative (the encoder's output is such). If every integer is at most , the smallest bag element reaches 0 within steps and pops a rule, after which every integer is at most . There are rules, so after at most steps they are all used and the run halts: at most steps.
B
B
2B
r
B+2B+4B+...
B(2^r-1)
Against real runs
Against real runs
The programs of Smith's example with the appendants and on for one to six cycles of its appendants:
1
10
01
In[1]:=
programs=Table[CyclicTagSystemToSystem5[CyclicTagSystem[{{1},{1,0}},{0,1}],n],{n,6}]
Out[1]=
System5
,System5
,System5
,System5
,System5
,System5
The largest integer and the number of rules of each:
B
r
In[2]:=
{Max[Flatten[{#["Bag"],#["Rules"]}]],Length[#["Rules"]]}&/@programs
Out[2]=
{{28,8},{44,16},{60,24},{76,32},{92,40},{108,48}}
The run lengths against ; the bound is far above the runs but grows only through :
B2^r
r
In[3]:=
ListLogPlot[{System5Evolution[#,Infinity,"Length"]&/@programs,Max[Flatten[{#["Bag"],#["Rules"]}]]2^Length[#["Rules"]]&/@programs},Joined->True,PlotMarkers->Automatic,PlotLegends->{"run length","bound"},AxesLabel->{"cycles",None},ImageSize->420]