OctoInform Beta

OpenAI preprint, September 2026 · §7. One witness for a halting computation · §7

The constant CC and the arcs: Numeration base CC with arc weights on a halting witness, and the bound dj+td_j + t after tt steps from initial counters dd

Transition arcs and counter bounds for counter machines.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

Consider a deterministic counter machine with state set QQ and counters indexed by JJ, initialized with counter values dj∈ℕd_j \in \mathbb{N}. Compiling a halting computation into a single-fold tuple of natural numbers, one in which every auxiliary variable is determined by the arguments, pairs a numeration base CC with directed transition arcs carrying witness weights between states, and tracks how large any counter can grow after a number tt of steps.

Counter machines

A counter machine instruction over a state set QQ and a counter index set JJ is one of three forms: halt\operatorname{halt}; an increment instruction inc⁡(j,p)\operatorname{inc}(j, p) for a counter j∈Jj \in J and a target state p∈Qp \in Q; or a test-and-decrement instruction test⁡(j,p0,pd)\operatorname{test}(j, p_0, p_d) for a counter j∈Jj \in J and target states p0,pd∈Qp_0, p_d \in Q.✦ A counter machine MM over a state set QQ and a counter index set JJ consists of an instruction map σM\sigma_M assigning a counter machine instruction over QQ and JJ to each state q∈Qq \in Q, a start state q*∈Qq_* \in Q, and a halting state h∈Qh \in Q, such that σM(q)=halt\sigma_M(q) = \operatorname{halt} if and only if q=hq = h.✦

A machine configuration c=(q,u)c = (q, u) over a state set QQ and a counter index set JJ consists of a state st⁡(c)=q∈Q\operatorname{st}(c) = q \in Q and a counter valuation val⁡(c)=u:J→ℕ\operatorname{val}(c) = u \colon J \to \mathbb{N}.✦ For a counter machine MM over QQ and JJ, the one-step transition τM\tau_M sends a configuration c=(q,u)c = (q, u) to the successor configuration given by (1): τM(c)={cif σM(q)=halt⁡,(p,u[j↦u(j)+1])if σM(q)=inc⁡(j,p),(p0,u)if σM(q)=test⁡(j,p0,pd) and u(j)=0,(pd,u[j↦u(j)−1])if σM(q)=test⁡(j,p0,pd) and u(j)>0.\tau_M(c) = \begin{cases} c & \text{if } \sigma_M(q) = \operatorname{halt}, \\ \bigl(p, u[j \mapsto u(j) + 1]\bigr) & \text{if } \sigma_M(q) = \operatorname{inc}(j, p), \\ (p_0, u) & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } u(j) = 0, \\ \bigl(p_d, u[j \mapsto u(j) - 1]\bigr) & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } u(j) > 0. \end{cases}(1)✦ In (1), u[j↦n]u[j \mapsto n] denotes the counter valuation agreeing with uu at every k≠jk \neq j and taking the value nn at jj.

For a counter machine MM over QQ and JJ, initial counter values d:J→ℕd \colon J \to \mathbb{N} (writing dj=d(j)d_j = d(j)), and a step count t∈ℕt \in \mathbb{N}, the run ρM(d,t)\rho_M(d, t) of MM for tt steps from dd is the configuration τMt(q*,d)\tau_M^t(q_*, d) obtained by applying τM\tau_M tt times to (q*,d)(q_*, d).✦

Halting witness tuples

A halting witness tuple holds the natural auxiliary variables of the polynomial system that has a unique solution when the machine halts and none when it does not. A halting witness tuple vv over a state set QQ and a counter index set JJ consists of seven natural numbers, four functions Q→ℕQ \to \mathbb{N} (a state record vstv_{\mathrm{st}}, a zero-branch record v0v_0, a decrement-branch record v−v_-, and one further function Q→ℕQ \to \mathbb{N}), and three functions from J⊔{*}J \sqcup \{*\} to ℕ\mathbb{N}, where *∉J* \notin J is an adjoined element.✦

The claim

Definition. The numeration base CC shifts the step count tt to give a common bound C+tC + t for the counter values after tt steps. For a finite state set QQ, a finite counter index set JJ, and initial counter values d:J→ℕd \colon J \to \mathbb{N}, the numeration base CC is defined by (2): C=1+|Q|+∑j∈Jdj.C = 1 + |Q| + \sum_{j \in J} d_j.(2)✦

An increment instruction gives one directed arc and a test-and-decrement instruction gives two, with the arc destination recording each arc’s target state. Given a counter machine MM over a state set QQ and a counter index set JJ, a state q∈Qq \in Q, and a boolean branch index b∈{false,true}b \in \{\mathrm{false}, \mathrm{true}\}, the arc destination δM(q,b)∈Q⊔{⊥}\delta_M(q, b) \in Q \sqcup \{\bot\} (with ⊥∉Q\bot \notin Q) is defined by (3): δM(q,b)={pif σM(q)=inc⁡(j,p) and b=false,p0if σM(q)=test⁡(j,p0,pd) and b=false,pdif σM(q)=test⁡(j,p0,pd) and b=true,⊥otherwise.\delta_M(q, b) = \begin{cases} p & \text{if } \sigma_M(q) = \operatorname{inc}(j, p) \text{ and } b = \mathrm{false}, \\ p_0 & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } b = \mathrm{false}, \\ p_d & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } b = \mathrm{true}, \\ \bot & \text{otherwise.} \end{cases}(3)✦

The arc weight aM(v,q,b)a_M(v, q, b) measures the witness weight assigned by vv to the branch (q,b)(q, b), and 00 when no outgoing arc corresponds to (q,b)(q, b). The arc weight aM(v,q,b)∈ℕa_M(v, q, b) \in \mathbb{N} for a counter machine MM over QQ and JJ, a halting witness tuple vv over QQ and JJ, a state q∈Qq \in Q, and a boolean branch index b∈{false,true}b \in \{\mathrm{false}, \mathrm{true}\} is defined by (4): aM(v,q,b)={vst(q)if σM(q)=inc⁡(j,p) and b=false,v0(q)if σM(q)=test⁡(j,p0,pd) and b=false,v−(q)if σM(q)=test⁡(j,p0,pd) and b=true,0otherwise.a_M(v, q, b) = \begin{cases} v_{\mathrm{st}}(q) & \text{if } \sigma_M(q) = \operatorname{inc}(j, p) \text{ and } b = \mathrm{false}, \\ v_0(q) & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } b = \mathrm{false}, \\ v_-(q) & \text{if } \sigma_M(q) = \operatorname{test}(j, p_0, p_d) \text{ and } b = \mathrm{true}, \\ 0 & \text{otherwise.} \end{cases}(4)✦

Let MM be a counter machine over QQ and JJ with QQ finite, let vv be a halting witness tuple over QQ and JJ, and let p∈Qp \in Q; the incoming weight IM(v,p)∈ℕI_M(v, p) \in \mathbb{N} at pp is defined by (5): IM(v,p)=∑q∈Q∑b∈{false,true}δM(q,b)=paM(v,q,b).I_M(v, p) = \sum_{q \in Q} \sum_{\substack{b \in \{\mathrm{false}, \mathrm{true}\} \\ \delta_M(q, b) = p}} a_M(v, q, b).(5)✦

Theorem. Let MM be a counter machine over a state set QQ and a counter index set JJ, let d:J→ℕd \colon J \to \mathbb{N} be initial counter values, let t∈ℕt \in \mathbb{N}, and let j∈Jj \in J. Then the value of counter jj in the run for tt steps satisfies (6): val⁡(ρM(d,t))(j)≤dj+t.\operatorname{val}\bigl(\rho_M(d, t)\bigr)(j) \le d_j + t.(6)✦

What is checked

The definition and the theorem above are stated over counter machines with counter machine instructions, machine configurations, one-step transitions, tt-step runs, and halting witness tuples, using a finite state set QQ and a finite counter index set JJ for the numeration base and a finite state set QQ for the incoming weights.