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

\title{Unification: Bayes, Thermo, Quotient, and Factor Maps}
\author{Hutter RNN Project}
\date{January 31, 2026}

\begin{document}
\maketitle

\section{The Five Pieces}

\subsection{Bayes (Probability)}
Luck as the reciprocal of probability:
\[
\lambda(e) := \frac{1}{p(e)}, \qquad \Lambda(e) := \log_2 \lambda(e) = -\log_2 p(e)
\]
Additivity of log-luck:
\[
\Lambda(e_1, \ldots, e_n) = \sum_{i=1}^n \Lambda(e_i \mid e_1, \ldots, e_{i-1})
\]

\subsection{Thermo (Microstates)}
Event space cardinality:
\[
|E| = \prod_{i=1}^k |E_i|
\]
Information content:
\[
I(E) = \log_2 |E| = \sum_{i=1}^k \log_2 |E_i|
\]
Remaining microstates after observation:
\[
\text{Remaining} = |E| \cdot p = \frac{|E|}{\lambda}
\]

\subsection{Quotient (Equivalence Classes)}
Layer quotient:
\[
q_i := \frac{|\text{distinguishable inputs}|}{|\text{distinguishable outputs}|}
\]
Cumulative quotient:
\[
Q_n := \prod_{i=1}^n q_i
\]
After $n$ layers: $|E|/Q_n$ distinguishable states remain.

\subsection{E $\to$ N Embedding (Mixed-Radix)}
Bijection from product space to natural numbers:
\[
(e_1, \ldots, e_k) \mapsto \sum_{i=1}^k e_i \cdot \prod_{j>i} |E_j|
\]
Inverse via repeated div/mod.

\subsection{Factor Maps}
Factoring map $\phi_i: E \to A_i \times B_i$, decoder $d_i: A_i \times B_i \to T$.

Translator between factorizations:
\[
\tau_{1 \to 2} := \rho_2 \circ d_1
\]
Commuting law:
\[
d_2 \circ \tau_{1 \to 2} = d_1
\]

\section{The Unifying Diagram}

\begin{verbatim}
         E (events)
         |
    phi  |  factor map
         v
   E_1 x E_2 x ... x E_k
         |
  encode |  mixed-radix
         v
         N
         |
    Q    |  quotient = luck
         v
        N/Q (remaining microstates)
\end{verbatim}

Reading top to bottom:
\begin{enumerate}
\item \textbf{Factor}: Decompose event space into product of factors
\item \textbf{Encode}: Map product to natural number (mixed-radix polynomial)
\item \textbf{Quotient}: Collapse by equivalence relation (layer compression)
\end{enumerate}

\section{The Key Identity}

\begin{center}
\fbox{\textbf{The quotient IS the luck.}}
\end{center}

\[
Q = \lambda
\]

This unifies:
\begin{itemize}
\item Bayesian inference (updating beliefs via likelihood)
\item Thermodynamics (counting remaining microstates)
\item Neural network layers (dimensionality reduction)
\item Arithmetic coding (interval narrowing)
\end{itemize}

\section{Bayes $\leftrightarrow$ Thermo Duality}

\begin{center}
\begin{tabular}{lll}
\toprule
\textbf{Bayes} & \textbf{Thermo} & \textbf{Relation} \\
\midrule
$p$ & $1/\lambda$ & probability = 1/luck \\
$-\log p$ & $\Lambda = \log \lambda$ & entropy = log-luck \\
$|E| \cdot p$ & $|E|/\lambda$ & remaining microstates \\
\bottomrule
\end{tabular}
\end{center}

They are the same thing in different notation.

\section{Factor Map Commutation}

When two factorizations $\phi_1, \phi_2$ both approximate the true behavior $t^*$:

\begin{verbatim}
           E
          / \
    phi_1/   \phi_2
        /     \
       v       v
      Z_1 --> Z_2
        \     /
      d_1\   /d_2
          \ /
           v
           T
\end{verbatim}

The triangle commutes: $d_2 \circ \tau_{1 \to 2} = d_1$.

Agreement bound:
\[
\hat{t}_1 =_{\varepsilon_1 + \varepsilon_2} \hat{t}_2
\]

\section{Connection to Pattern Injection}

SVD factorization of the bigram matrix $P$:
\[
P^T = U \cdot S \cdot V^T
\]

This is a factor map: $P^T \to (\text{output directions}) \times (\text{input directions})$.

The singular values $S$ are the ``luck'' of each direction---how much variance (microstates) each component captures.

Truncating to rank-$k$ is a quotient operation:
\[
Q = \frac{\sum S_i^2}{\sum_{i \leq k} S_i^2}
\]

Component 0 captures 97.5\% of variance (low luck, high probability).
Components 1--5 capture interpretable structure in the remaining 2.5\%.

\section{The Depth Limit}

Maximum pattern depth in float32:
\[
d_{\max} = \left\lfloor \frac{24}{-\log_2 p_{\text{avg}}} \right\rfloor
\]

This is where all four views converge:
\begin{itemize}
\item \textbf{Bayes}: Can't represent probabilities below $2^{-24}$
\item \textbf{Thermo}: Can't distinguish more than $2^{24}$ microstates
\item \textbf{Quotient}: Cumulative $Q$ overflows after $d_{\max}$ layers
\item \textbf{Factor maps}: Can't translate patterns deeper than precision allows
\end{itemize}

\begin{center}
\fbox{$Q$ carries unbounded information. \texttt{float32} doesn't.}
\end{center}

\end{document}
