\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb,amsthm,booktabs}
\usepackage{hyperref}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{prediction}[theorem]{Prediction}

\title{P-Programs:\\Explicit Pattern Programs for the Extended Event Space}
\author{Claude and MJC}
\date{February 16, 2026}

\begin{document}
\maketitle

\begin{abstract}
We make the extended event space operational by writing explicit
\emph{P-programs}: compositions of patterns in SN concrete syntax that
implement position tracking, letter accumulation, bag-of-letters
recognition, and word identification.  Each P-program is a small UM
instance whose inner hidden events do not connect outside it---the
self-similarity principle applied at the program level.  We show that
the accumulator is a tiny memory whose states biject onto its memory
traces, formalizing the connection between accumulator events and the
memory-trace framework of January~31.  We give the abductive learning
rule for online vocabulary growth: when surprise exceeds a threshold,
the system abducts a new word event and records it as a memory trace
for later $\omega$-processing.  We state and motivate the
\emph{safe-combination conjecture}: for every unsafe (correlated)
evidence combination identified in~\cite{pattern-space}, there exists
a P-program refinement that makes it safe, with the $E \to N \to Q$
chain as the guide.
\end{abstract}


\section{P-Programs}\label{sec:p-programs}

\begin{definition}[P-program]\label{def:p-program}
A \emph{P-program} is a finite collection of patterns
$\Pi = \{(e_i, e_j, w_{ij})\} \subset E^2 \times T$ that together
implement a deterministic or probabilistic computation.  A P-program
has:
\begin{itemize}
\item \textbf{Interface events}: events in $I$ or $O$ that connect
  the program to the rest of the model.
\item \textbf{Internal events}: events in $H$ that are used only
  within the program (no patterns connect them to events outside $\Pi$).
\item \textbf{Deterministic patterns}: weight 255 (strength $s_{\max}$),
  representing logical implications that hold always.
\item \textbf{Learned patterns}: weight $< 255$, representing
  statistical regularities counted from data.
\end{itemize}
\end{definition}

\begin{proposition}[P-programs are inner UMs]\label{prop:inner-um}
A P-program $\Pi$ with internal events $H_\Pi$ is itself a UM instance
$u_\Pi = (e_\Pi, t_\Pi, p_\Pi, f_\Pi, \omega_\Pi)$ nested inside the
outer model.  By the self-similarity principle~\cite{nested-model},
the internal events of $\Pi$ are part of $H$ from the outer
perspective but form a complete $I_\Pi \times H_\Pi \times O_\Pi$
from the inner perspective.
\end{proposition}

\begin{remark}[Programs compose like procedures]
UM instances compose under the product of their event spaces.
A P-program $\Pi_1$ with output events $O_1$ can feed into a
P-program $\Pi_2$ with input events $I_2 = O_1$.  The composition
$\Pi_2 \circ \Pi_1$ is itself a P-program.  The maximum pattern
depth inside a composed program is visible outside as
\emph{timing}---the circuit depth of the computation.  This
connection between pattern depth and circuit depth is already
explicit in CMP~\cite{cmp}.
\end{remark}


\section{Program 1: The Position Counter}\label{sec:position}

The in-word position counter is the simplest P-program: a
deterministic counter that resets at word boundaries.

\begin{definition}[Position counter P-program]
\label{def:position-counter}
Events:
\begin{itemize}
\item Interface input: byte events $b \in \{0, \ldots, 255\}$.
\item Interface output / internal state: position events
  $\mathrm{pos}_k$ for $k \in \{0, 1, \ldots, L_{\max}\}$.
\item Internal: word-boundary detector $\mathrm{wb}$.
\end{itemize}

Patterns in SN syntax:
\begin{quote}
\begin{tabular}{p{0.75\textwidth}r}
``The input is ` '.'' $\to$ ``Word boundary.'' & 255 \\
``The input is ``.'' $\to$ ``Word boundary.'' & 255 \\
``The input is `,'.'' $\to$ ``Word boundary.'' & 255 \\
``The input is 0x0A.'' $\to$ ``Word boundary.'' & 255 \\
\multicolumn{2}{l}{\quad\emph{(one pattern per boundary character)}} \\[6pt]
``Word boundary.'' $\to$ ``Position is 0.'' & 255 \\
``Position is 0.'' $\to$ ``Position is 1.'' & 255 \\
``Position is 1.'' $\to$ ``Position is 2.'' & 255 \\
\multicolumn{2}{l}{\quad$\vdots$} \\
``Position is $L_{\max}-1$.'' $\to$ ``Position is $L_{\max}$.'' & 255 \\[6pt]
``Word boundary.'' $\to$ ``Position is 1. (reset)'' & 255 \\
\end{tabular}
\end{quote}
\end{definition}

\begin{remark}[Timing: the reset signal]
The position counter needs an external reset signal: a word-boundary
byte arriving on $I$.  The word-boundary detector $\mathrm{wb}$ is
an internal event that fires when the input byte is a boundary
character.  The reset pattern (wb $\to$ pos$_0$) has circuit
depth 2 (byte $\to$ wb $\to$ pos$_0$); the increment
patterns have depth 1 (pos$_k$ $\to$ pos$_{k+1}$).

The counter runs at the tick rate (one increment per byte).
After a reset, it takes one tick to reach pos$_1$, two ticks to
reach pos$_2$, etc.  This is the position counter that the RNN
implements implicitly via $W_h$ rotation~\cite{carrier-signal}.
\end{remark}

\begin{proposition}[The position counter is a P-program with no
learned patterns]
All patterns in the position counter have weight 255.
No counting ($\omega_0$) is required.  The program is pure logic,
derivable from the definition of ``word boundary'' without seeing
any data.  A UM runner is free to short-circuit it.
\end{proposition}


\section{Program 2: The Letter Accumulator}\label{sec:accumulator}

\begin{definition}[Letter accumulator P-program]
\label{def:accumulator}
Events:
\begin{itemize}
\item Interface input: byte events $b \in \{0, \ldots, 255\}$,
  position events $\mathrm{pos}_k$.
\item Internal state / interface output: accumulator events
  $\mathrm{acc}_c$ for each byte value $c$ (``byte $c$ has appeared
  in the current word'').
\end{itemize}

Patterns in SN:
\begin{quote}
\begin{tabular}{p{0.75\textwidth}r}
``The input is `t'.'' $\to$ ``Letter `t' has appeared.'' & 255 \\
``The input is `h'.'' $\to$ ``Letter `h' has appeared.'' & 255 \\
\multicolumn{2}{l}{\quad\emph{(one pattern per byte value: 256 patterns)}} \\[6pt]
``Word boundary.'' $\to$ ``Reset all accumulators.'' & 255 \\
\end{tabular}
\end{quote}

The accumulator event $\mathrm{acc}_c$ is a \emph{latch}: once set by
seeing byte $c$, it remains set until the word-boundary reset.  In the
tropical semiring, a latch is a pattern from $\mathrm{acc}_c$ to itself
with weight 255 (self-sustaining support), gated by the absence of a
reset signal.
\end{definition}

\begin{proposition}[Joint events in the accumulator]
\label{prop:joint-events}
The accumulator naturally produces joint events:
\begin{itemize}
\item ``Letter `t' at position 1'' is the joint event
  $(\mathrm{acc}_{\texttt{t}} = 1) \wedge (\mathrm{pos} = 1)$.
\item ``Letter `t' at any position'' is the marginal event
  $\mathrm{acc}_{\texttt{t}} = 1$ (the accumulator fires regardless of
  position).
\item ``Letters $\{$t, h$\}$ have appeared'' is the conjunction
  $\mathrm{acc}_{\texttt{t}} \wedge \mathrm{acc}_{\texttt{h}}$.
\end{itemize}
These accumulate into a joint event space: the product
$\{0,1\}^{256} \times \{0, \ldots, L_{\max}\}$ of accumulator state
and position.
\end{proposition}


\section{The Accumulator as Memory}\label{sec:memory}

\begin{theorem}[Accumulator states biject onto memory traces]
\label{thm:memory-traces}
Let $M_t = (b_{t_0}, b_{t_0+1}, \ldots, b_t)$ be the memory trace
of the current word (from the last word boundary $t_0$ to the current
position $t$).  The accumulator state
$A(t) = (\mathrm{acc}(t), \mathrm{pos}(t))$ is a lossy compression
of $M_t$:
\begin{equation}
A(t) = \phi(M_t), \qquad
\phi(b_{t_0}, \ldots, b_t) =
\left(\bigcup_{s=t_0}^{t} \{b_s\}, \; t - t_0\right).
\end{equation}
The map $\phi$ is surjective but not injective: it discards letter
order and letter multiplicity, retaining only the letter set and the
position (word length so far).

However, within the set of memory traces that produce the same
accumulator state $A$, the traces biject onto the permutations of the
multiset of letters.  Formally:
\begin{equation}
\phi^{-1}(A) \cong \frac{(\mathrm{pos}+1)!}{\prod_{c \in A} n_c!},
\end{equation}
where $n_c$ is the multiplicity of byte $c$ in the word prefix.
The accumulator's ``memory'' is the letter set; the ``forgotten''
information is the letter order.
\end{theorem}

\begin{proof}
The accumulator records which bytes have appeared (the set
$\bigcup_s \{b_s\}$) and how many bytes have been seen
(the position $t - t_0$).  Two memory traces
$M_t$ and $M_t'$ with the same letter set and same length are
indistinguishable to the accumulator.  The number of such traces is the
multinomial coefficient, counting the arrangements of the multiset.
\end{proof}

\begin{remark}[Connection to the January 31 framework]
The memory-trace paper~\cite{memory-traces} defined memory traces as
complete histories $M_t$ with compressed representations
$h_t = \phi(M_t)$.  The accumulator is exactly such a compressed
representation: $A(t) = \phi(M_t)$ where $\phi$ retains the letter set
and discards order.  The factored memory traces (one per hidden unit)
from that paper correspond to the individual $\mathrm{acc}_c$ events---each
is a single-bit memory trace recording whether byte $c$ has been seen.

This makes the accumulator a ``tiny memory''~\cite{MJC_comments_20260216}:
its states biject (modulo order) onto the memory traces it has seen,
and the state at time $t$ is a sufficient statistic for the letter-set
information in the word-so-far.
\end{remark}


\section{Program 3: Bag-of-Letters Recognition}\label{sec:bol}

\begin{definition}[Bag-of-letters P-program for word $w$]
\label{def:bol-program}
Given a word $w$ with letter set $L(w) = \{c_1, \ldots, c_k\}$
and length $\ell(w)$, the BoL recognition program is:

Events:
\begin{itemize}
\item Interface input: accumulator events $\mathrm{acc}_{c_i}$,
  position event $\mathrm{pos}_k$.
\item Internal: partial-match events $\mathrm{match}_{w,j}$ for
  $j = 1, \ldots, k$ (``$j$ of $k$ required letters have appeared'').
\item Interface output: $\mathrm{bol}_w$ (``all letters of $w$ have
  appeared'').
\end{itemize}

Patterns in SN:
\begin{quote}
\begin{tabular}{p{0.75\textwidth}r}
``Letter `t' has appeared.'' $\to$ ``Match `the': 1 of 3.'' & 255 \\
``Letter `h' has appeared.'' $\to$ ``Match `the': 1 of 3.'' & 255 \\
``Letter `e' has appeared.'' $\to$ ``Match `the': 1 of 3.'' & 255 \\[6pt]
``Match `the': 1 of 3.'' $\wedge$ ``Match `the': 1 of 3.''
  $\wedge$ ``Match `the': 1 of 3.''
  $\to$ ``All letters of `the' present.'' & 255 \\[6pt]
``All letters of `the' present.'' $\wedge$
  ``Position $\leq$ 3.''
  $\to$ ``BoL match: `the'.'' & 255 \\
\end{tabular}
\end{quote}

In the forward pass, the conjunction is computed by $\min$: the
BoL event fires only when all accumulator events for the required
letters have support 255 (all letters present) AND the position is
consistent with the word length.
\end{definition}

\begin{proposition}[Circuit depth of BoL recognition]
\label{prop:bol-depth}
The BoL program for a word of $k$ distinct letters has circuit depth 3:
\begin{enumerate}
\item Depth 1: byte $\to$ accumulator (Program 2).
\item Depth 2: accumulator $\to$ partial match (conjunction of
  individual letter events).
\item Depth 3: partial match $\wedge$ position $\to$ BoL event.
\end{enumerate}
The total depth from byte input to BoL output is 3 ticks (the position
counter adds depth 2 but runs in parallel, not sequentially).
This depth is visible outside the program as timing: the BoL event
fires 3 ticks after the last required letter is seen.
\end{proposition}

\begin{remark}[Internal events that don't connect outside]
The partial-match events $\mathrm{match}_{w,j}$ are internal to the
BoL program: no pattern connects them to events outside the program.
From the outer model's perspective, only the BoL output event
$\mathrm{bol}_w$ is visible.  This is the self-similarity
principle at the program level: the BoL program is a UM instance
nested inside $H$, with its internal state invisible to the outer
model.  The partial-match events are $H_\Pi$ of the inner UM.
\end{remark}


\section{Program 4: Graded Word Support}\label{sec:graded}

\begin{definition}[Graded support P-program]
\label{def:graded-support}
The graded word support $\sigma_w(t) \in [0, 1]$ is computed by a
P-program with \emph{learned} patterns (not purely deterministic):

Events:
\begin{itemize}
\item Interface input: BoL event $\mathrm{bol}_w$, position
  $\mathrm{pos}_k$, accumulator state.
\item Interface output: graded support event $\sigma_w$ with
  continuous strength.
\end{itemize}

Patterns in SN (learned from data):
\begin{quote}
\begin{tabular}{p{0.75\textwidth}r}
``BoL match: `the'.'' $\wedge$ ``Position is 3.''
  $\to$ ``Word is `the'.'' & 200 \\
``BoL match: `the'.'' $\wedge$ ``Position is 4.''
  $\to$ ``Word is `the'.'' & 120 \\
``BoL match: `the'.'' $\wedge$ ``Position is 5.''
  $\to$ ``Word is `the'.'' & 60 \\
``BoL match: `there'.'' $\wedge$ ``Position is 5.''
  $\to$ ``Word is `there'.'' & 190 \\
\end{tabular}
\end{quote}

The weight is $w = \lfloor \log_2 c(\mathrm{bol}_w, \mathrm{pos}_k,
\text{word is } w) \rfloor$: the log count of times this combination
was observed.  The weight decreases for longer positions because
longer words are less frequent at any given BoL state (``the'' at
position 5 is less likely than ``there'' at position 5, even though
both have `t', `h', `e' in their letter sets).
\end{definition}

\begin{remark}[This is where $\omega$ enters]
Programs 1--3 are pure logic (weight 255, no data needed).
Program 4 is the first that requires counting: the weight of
each pattern comes from $\omega_0$ applied to the joint event
$(\mathrm{bol}_w, \mathrm{pos}_k, \text{word identity})$.
This is the transition from the deterministic infrastructure
(P-programs 1--3) to the statistical patterns (Program 4 and
beyond) that give the model its predictive power.
\end{remark}


\section{Abductive Learning: Online Vocabulary Growth}\label{sec:abduction}

\begin{definition}[Surprise event]
\label{def:surprise}
A \emph{surprise event} at position $t$ occurs when the observed byte
$b_t$ has low support under the current model's prediction:
\begin{equation}
\mathrm{surprise}(t) = -\log_2 P(b_t \mid \text{context})
= \lambda(b_t \mid \text{context}).
\end{equation}
If the model strongly predicts a different byte, the surprise is high
(the luck $\lambda$ of the observed event is large).
\end{definition}

\begin{example}[Encountering ``teh'']
Suppose the model has word event ``the'' strongly active
($\sigma_{\text{the}} = 0.92$) and predicts byte sequence
$\texttt{t}, \texttt{h}, \texttt{e}$ with high confidence.
At position 2, the model predicts `e' (from
``word is `the' $\wedge$ position is 2 $\to$ next byte is `e'\thinspace''
with weight 200).

But the data contains `h' at position 2 (spelling: ``teh'').
The surprise is:
\begin{equation}
\lambda = -\log_2 P(\texttt{h} \mid \text{word=the, pos=2})
\approx -\log_2(0.001) \approx 10 \text{ bits}.
\end{equation}
\end{example}

\begin{definition}[Abductive response]
\label{def:abduction}
Upon detecting surprise above threshold $\lambda_{\min}$, the model
may perform an \emph{abductive tock step}:
\begin{enumerate}
\item \textbf{Hypothesize}: This is a ``the''-typo, not a novel word.
  The abductive hypothesis $H_{\mathrm{abd}}$ is: ``the observed
  sequence is a misspelling of a known word.''

\item \textbf{Record}: Create a memory trace for the event:
  \begin{equation}
  m = (\text{context}, \text{word}=\texttt{the}, \text{pos}=2,
  \text{observed}=\texttt{h}, \text{expected}=\texttt{e}).
  \end{equation}
  This memory trace is a joint event in the extended space:
  the tuple $(\text{word identity}, \text{position}, \text{substitution})$.

\item \textbf{Commit}: Set $T(\text{``this is a the-occurrence''}) = 255$.
  The model commits to the hypothesis that this IS a ``the'' occurrence
  despite the unexpected byte.  This commitment is consistent with the
  external counting function $\omega_0$ over ``the''-occurrences:
  the count of ``the'' increases by one, matching the count
  that would result from observing the canonical spelling.

\item \textbf{Learn}: Record the substitution event for later
  $\omega$-processing:
  \begin{equation}
  c(\text{the}, \text{pos}=2, \texttt{e} \to \texttt{h}) \mathrel{+}= 1.
  \end{equation}
  Over time, the model accumulates typo distributions: the probability
  of each substitution at each position in each word.  These become
  learned patterns in the graded support program (Program 4).
\end{enumerate}
\end{definition}

\begin{proposition}[Abduction preserves consistency]
\label{prop:abduction-consistent}
The abductive commitment $T(\text{``the-occurrence''}) = 255$ is
consistent with $\omega_0$ counting.  If the external counting function
records this position as a ``the''-occurrence, then:
\begin{equation}
c_{\text{new}}(\text{the}) = c_{\text{old}}(\text{the}) + 1,
\end{equation}
and the support $s(\text{the}) = \lfloor \log_2 c(\text{the}) \rfloor$
updates accordingly.  The commitment at strength 255 says ``this IS
the-occurrence'' with maximal confidence; the counting function says
``the-occurrences have increased by one.''  Both are consistent because
the commitment determines which events to count, and the counting
determines the weights of future patterns.
\end{proposition}

\begin{remark}[The abduction-learning cycle]
Abduction is not gradient descent.  It is:
\begin{enumerate}
\item Detect surprise (high $\lambda$).
\item Form a hypothesis (existing word + substitution).
\item Commit to the hypothesis (update $T$).
\item Record the event for $\omega$-processing (update counts).
\end{enumerate}
This cycle creates new learned patterns without re-processing the
entire dataset.  It is \emph{online learning}: each surprising event
is processed once, creating a memory trace that updates the model's
statistics.  The memory traces accumulate into the count table,
which determines the weights of future patterns via $\omega_0$.

This is the sense in which the model ``learns typo distributions''
from experience: each misspelling is a joint event
(word, position, substitution) that gets counted, and the counts
become pattern weights for future predictions.
\end{remark}


\section{The Safe-Combination Conjecture}\label{sec:conjecture}

The pattern-space paper~\cite{pattern-space} identified unsafe
evidence combinations---pairs of correlated evidence sources whose
na\"ive Bayesian product double-counts information.  We conjecture
that every such unsafe combination has a safe resolution.

\begin{conjecture}[Safe-combination conjecture]
\label{conj:safe}
For every unsafe evidence combination $(e_1, e_2)$ targeting
conclusion $o$ in the extended event space, there exists a
P-program refinement $\Pi$ such that:
\begin{enumerate}
\item $\Pi$ replaces the unsafe combination with a safe one
  (either absorption, residual, or hierarchical---the three rules
  of~\cite{pattern-space}).
\item The construction of $\Pi$ is guided by the $E \to N \to Q$
  chain: the events are identified ($E$), counted ($N$), and their
  quotients ($Q = 1/P$) determine which evidence is redundant and
  which is novel.
\item The P-program refinement is itself a small UM instance with
  the same five-tuple structure, composable with the rest of the model.
\end{enumerate}
\end{conjecture}

\begin{remark}[Why we believe the conjecture]
The $E \to N \to Q$ chain provides the diagnostic tool.  Given two
correlated evidence sources:
\begin{enumerate}
\item \textbf{Identify the shared information}: Compute the MI
  between $e_1$ and $e_2$ given $o$.  If MI $> 0$, they share
  information.
\item \textbf{Find the common cause}: The shared information has a
  common cause---a shared event or shared offset~\cite{conditional-independence}.
  The $E$-step identifies this common cause.
\item \textbf{Factor out the common cause}: Create a new event
  $e_{\mathrm{common}}$ that represents the shared information.
  Replace $(e_1, e_2) \to o$ with
  $e_{\mathrm{common}} \to o$ (the shared part) plus
  $(e_1 \setminus e_{\mathrm{common}}) \to o$ and
  $(e_2 \setminus e_{\mathrm{common}}) \to o$ (the residuals).
  The $N$-step counts each separately.
\item \textbf{Combine safely}: The residuals are independent
  (they share no information after the common cause is factored out).
  The $Q$-step confirms: the quotients of the residuals multiply
  correctly (Bayes holds because the partial quotients are consistent).
\end{enumerate}
This procedure always terminates because the event space is finite
and the MI between residuals is strictly less than the MI between
the original events.  At each step, the shared information decreases.
\end{remark}

\begin{example}[Unsafe: byte + position $\to$ output]
The combination ``byte is `e'\thinspace'' + ``position is 2'' $\to$
``next byte is space'' is unsafe because position 2 in a 3-letter
word already constrains which bytes are likely (the word is almost
certainly identified).

\textbf{Safe refinement}: Replace with the absorbed pattern
``byte is `e' $\wedge$ position is 2'' $\to$ ``next byte is space''
(a single joint-event pattern, no independence assumed).
This is a P-program with one learned pattern whose weight comes from
$c(\texttt{e}, \mathrm{pos}=2, \texttt{' '})$.

\textbf{Alternative safe refinement}: Use the hierarchical rule.
Stage 1: ``byte sequence `t',`h',`e' at positions 0,1,2'' $\to$
``word is `the'\thinspace'' (recognition P-program, deterministic).
Stage 2: ``word is `the' $\wedge$ position is 3'' $\to$
``next byte is space'' (prediction P-program, learned).
The two stages condition on disjoint information: Stage 1 uses the
byte history; Stage 2 uses the word identity (which absorbs the
byte history).
\end{example}

\begin{example}[Unsafe: BoL + accumulator $\to$ output]
The combination ``BoL match: the'' + ``letter `e' has appeared'' $\to$
``next byte is space'' is unsafe because the BoL event is a
deterministic function of the accumulator events.

\textbf{Safe refinement}: Use only the BoL event (it already
incorporates the accumulator information).  The accumulator event is
\emph{internal} to the BoL P-program and should not be used
independently as evidence for the same conclusion.  This is the
self-similarity principle: internal events of a P-program are not
visible outside it.
\end{example}

\begin{remark}[The safe-combination conjecture as P-programming technique]
If the conjecture holds, then the basic technique of P-programming
is: (1) write a P-program, (2) check for unsafe combinations, (3)
refine until all combinations are safe.  The $E \to N \to Q$ chain
guides each refinement step.  This becomes a systematic methodology
for building interpretable, provably-correct prediction architectures
from data---the practical content of the tock step applied to the
extended event space.
\end{remark}


\section{Toward a Grammar of English}\label{sec:grammar}

\begin{prediction}[Word bigrams as the first grammar fragment]
The language-model patterns ($H' \to H'$) from the pattern-space
paper~\cite{pattern-space} are word-to-word bigrams: the probability
of each word given the previous word.  These bigrams are the first
fragment of a grammar of English, expressible entirely in the UM
framework:
\begin{quote}
\begin{tabular}{p{0.75\textwidth}r}
``Previous word is `of'.'' $\to$ ``Word is `the'.'' & 180 \\
``Previous word is `the'.'' $\to$ ``Word is a noun.'' & 150 \\
``Previous word is `in'.'' $\to$ ``Word is `the'.'' & 170 \\
``Previous word is `is'.'' $\to$ ``Word is an adjective.'' & 130 \\
\end{tabular}
\end{quote}
Each pattern is a weighted implication: ``if the previous word is $w_1$,
then the current word is likely $w_2$, with strength proportional to
$\log_2 c(w_1, w_2)$.''

These are the ``syntactic predictions'' of English, discovered not
by parsing but by counting joint word events.  As the vocabulary
grows, these patterns will cluster into syntactic categories
(the $w_2$ that follow ``the'' cluster into nouns; the $w_2$ that
follow ``is'' cluster into adjectives and verbs).  The categories
are not imposed---they emerge from the count structure.
\end{prediction}

\begin{prediction}[Syntactic categories from word-bigram factorization]
The word-bigram count table $c(w_1, w_2)$ will admit a low-rank
factorization (via SVD or the tock step's MI analysis) into
$\sim$10--20 syntactic categories.  Each category is an event space
$E_{\mathrm{cat}}$ in the factorization tower:
\begin{equation}
E_{\mathrm{word}} \twoheadrightarrow E_{\mathrm{cat}}
\twoheadrightarrow E_{\mathrm{sentence}}.
\end{equation}
The factorization tower for English will have:
\begin{itemize}
\item Level 0: bytes (256 events).
\item Level 1: words ($\sim$1000 events for the core vocabulary).
\item Level 2: syntactic categories ($\sim$15 events:
  noun, verb, adjective, etc.).
\item Level 3: clause structure (subject, predicate, object, etc.).
\end{itemize}
Each level is discovered by the tock step applied to the level below.
The grammar IS the factorization tower.
\end{prediction}

\begin{remark}[Why this could be a breakout paper]
A grammar of English derived entirely from counting---no parsing, no
constituency trees, no dependency annotations---would be a striking
demonstration of the UM framework's power.  The grammar would be:
\begin{enumerate}
\item \textbf{Interpretable}: each syntactic category is a named event
  in the UM.
\item \textbf{Measurable}: each category's value is quantified in bpc.
\item \textbf{Emergent}: categories arise from data, not from
  linguistic theory.
\item \textbf{Predictive}: the grammar improves compression, connecting
  linguistic structure to information theory.
\end{enumerate}
The connection between compression and grammar was noted by Shannon
(1951) but never made operational at scale.  The UM framework, with
its explicit event spaces and counting-based patterns, provides the
machinery to do so.
\end{remark}


\section{Discussion}

\subsection{$P$ is what counts}

The pattern-space paper~\cite{pattern-space} established that the
synapse---the atomic pattern $(e_i, e_j, w) \in E^2 \times T$---is
the unit of value.  This paper makes the patterns explicit as programs.
A P-program is a collection of patterns that implements a computation;
the computation's correctness is guaranteed by the patterns' weights
(255 for deterministic logic, $\leq 255$ for statistical inference).

The phrase ``$P$ is what counts'' has a double meaning: (1) the pattern
table $P$ is the component of the five-tuple that determines predictions,
and (2) $P$ literally counts---each weight is a log count of joint
occurrences.  The five-tuple $(e, t, p, f, \omega)$ reduces to
$P \in T^{|E|^2}$ when $f$ is fixed ($\max$-$\min$) and $\omega$ is
the standard counting function.  The model IS its pattern table.

\subsection{From neurons to programs}

The RNN has neurons that compute implicit functions of the input
(2-offset conjunctions, word-length tracking, carrier signals).
The P-program framework makes these computations explicit:
\begin{center}
\begin{tabular}{lll}
\toprule
RNN mechanism & P-program & Patterns \\
\midrule
$W_h$ rotation & Position counter & 255 (deterministic) \\
Conjunction detectors & BoL recognition & 255 (deterministic) \\
Hidden dynamics & Graded support & Learned ($\omega_0$) \\
Gradient-based learning & Abductive learning & Online ($\omega_0$) \\
\bottomrule
\end{tabular}
\end{center}

Every implicit RNN computation has an explicit P-program equivalent.
The P-program is interpretable (each pattern is a named
implication), measurable (each weight is a log count), and composable
(programs compose via shared events).


\begin{thebibliography}{99}
\bibitem{cmp}
Michaeljohn Clement.
\newblock \emph{CMP}.
\newblock \url{https://cmpr.ai/cmp.pdf}, 2026.

\bibitem{nested-model}
Claude and MJC.
\newblock \emph{The Nested Model: Self-Similar Architecture in the Extended
Event Space}.
\newblock Hutter archive, 15 Feb 2026.

\bibitem{pattern-space}
Claude and MJC.
\newblock \emph{Patterns in the Extended Event Space: Independence,
Correlation, and the New Synapses}.
\newblock Hutter archive, 15 Feb 2026.

\bibitem{extended-es}
Claude and MJC.
\newblock \emph{The Extended Event Space: Injecting Lexical Structure into $H$}.
\newblock Hutter archive, 15 Feb 2026.

\bibitem{carrier-signal}
Claude and MJC.
\newblock \emph{The Carrier Signal Problem}.
\newblock Hutter archive, 12 Feb 2026.

\bibitem{conditional-independence}
Claude and MJC.
\newblock \emph{Conditional Independence on the Offset Graph}.
\newblock Hutter archive, 12 Feb 2026.

\bibitem{logic-counting}
Claude and MJC.
\newblock \emph{Logic from Counting}.
\newblock Hutter archive, 12 Feb 2026.

\bibitem{memory-traces}
Claude and MJC.
\newblock \emph{Memory Traces, Integration, and Explanatory Sufficiency}.
\newblock Hutter archive, 31 Jan 2026.

\bibitem{tock-step}
Claude and MJC.
\newblock \emph{The Tock Step: Domain-Native Architecture from Evidence}.
\newblock Hutter archive, 12 Feb 2026.

\bibitem{MJC_comments_20260216}
MJC.
\newblock \emph{Comments on extended-es / nested-model / tokenization-loss
papers}.
\newblock Hutter archive, 16 Feb 2026.
\end{thebibliography}

\end{document}
