OctoInform Beta

OpenAI preprint, September 2026 · §2. Episode graphs and affine updates · §2 · Finite Monoid Computations and a Uniform Generalized Star-Height Bound, §2 · Generalized Star Height at Most Four, §2

Prefix codes and graph languages: Prefix-free languages EE of nonempty words over alphabet Σ\Sigma and concatenations from language DD taking state xx to state yy by iterated updates

Prefix codes and graph languages of state transitions.

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 an alphabet Σ\Sigma and a state set SS equipped with a state update map G:Σ*→(S→S)G : \Sigma^* \to (S \to S) assigning a transformation on SS to each word over Σ\Sigma. An episode ee over an alphabet Σ\Sigma is a word used to specify a state update.

Episode sequences

Given an alphabet Σ\Sigma and a language D⊆Σ*D \subseteq \Sigma^*, a finite sequence (e1,…,er)(e_1, \dots, e_r) of words in Σ*\Sigma^* has all episodes in DD if ei∈De_i \in D for every 1≤i≤r1 \le i \le r.✦

For an alphabet Σ\Sigma and a state update map G:Σ*→(S→S)G : \Sigma^* \to (S \to S) on a state set SS, write GeG_e for the transformation that GG assigns to a word e∈Σ*e \in \Sigma^*. For a state x∈Sx \in S and a finite sequence (e1,…,er)(e_1, \dots, e_r) of words in Σ*\Sigma^*, the iterated episode update G(e1,…,er)(x)G_{(e_1, \dots, e_r)}(x) is the state in SS obtained from xx by applying Ge1,…,GerG_{e_1}, \dots, G_{e_r} in reading order.✦ G()(x)=x,G(e1,…,er,e)(x)=Ge(G(e1,…,er)(x)).G_{()}(x) = x, \qquad G_{(e_1, \dots, e_r, e)}(x) = G_e\bigl(G_{(e_1, \dots, e_r)}(x)\bigr).(1)✦

The definition

Definition. A language E⊆Σ*E \subseteq \Sigma^* over an alphabet Σ\Sigma is a prefix code if EE does not contain the empty word ε\varepsilon and no word in EE is a proper prefix of any word in EE: ε∉Eand∀e,f∈E,((∃u∈Σ*,eu=f)⟹e=f).\varepsilon \notin E \quad\text{and}\quad \forall e, f \in E,\; \bigl((\exists u \in \Sigma^*,\; eu = f) \implies e = f\bigr).(2)✦

The graph language LG(D;x,y)⊆Σ*L_G(D; x, y) \subseteq \Sigma^* from xx to yy, for a language D⊆Σ*D \subseteq \Sigma^*, a state update map G:Σ*→(S→S)G : \Sigma^* \to (S \to S) on a state set SS, and states x,y∈Sx, y \in S, consists of all concatenations of finite sequences with all episodes in DD whose iterated episode update (1) sends xx to yy: LG(D;x,y)={w∈Σ*:∃r≥0,∃e1,…,er∈D,e1⋯er=w and G(e1,…,er)(x)=y}.L_G(D; x, y) = \bigl\{ w \in \Sigma^* : \exists r \ge 0,\; \exists e_1, \dots, e_r \in D,\; e_1 \cdots e_r = w \;\text{ and }\; G_{(e_1, \dots, e_r)}(x) = y \bigr\}.(3)✦

What is checked

The definition of a prefix code (2) is stated for a language E⊆Σ*E \subseteq \Sigma^* over an alphabet Σ\Sigma, and the graph language (3) is stated for a language D⊆Σ*D \subseteq \Sigma^*, a state update map G:Σ*→(S→S)G : \Sigma^* \to (S \to S) on a state set SS, and states x,y∈Sx, y \in S, built from the predicate of having all episodes in DD and the iterated episode update (1).