{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "34993aaf",
   "metadata": {},
   "source": [
    "# Milestone 010 — What state should a reasoner preserve?\n",
    "\n",
    "**Research period:** September 2–3, 2026  \n",
    "**Historical anchors:** #193, #198, #223\n",
    "\n",
    "One branch of the project began with a deliberately provocative question: could translating ordinary language into something more structurally explicit, such as Lojban, provide a better intermediate representation for reasoning?\n",
    "\n",
    "That question needed an immediate correction. Tokenization, translation, and semantic normalization solve different problems. Replacing English with another serialization doesn't by itself tell us whether the representation preserves the information a reasoner will need.\n",
    "\n",
    "The more useful question became: **when is it safe for a reasoning system to treat two internal states as equivalent?**\n",
    "\n",
    "For a single fixed task, the answer can be straightforward. If no outcome we care about can distinguish two states, then the representation doesn't necessarily need to preserve the distinction between them. Recurrent reasoning makes that harder because today's indistinguishable states can evolve into different futures.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cab4de90",
   "metadata": {},
   "source": [
    "## From static to dynamic sufficiency\n",
    "\n",
    "Suppose two internal states are equivalent for the current task. If the reasoning process updates both states and they remain equivalent, then the system can continue treating them as the same. If one update sends them into states with different future behavior, the original equivalence discarded something the recurrence needed.\n",
    "\n",
    "This means a useful compressed state for recurrent reasoning has to satisfy two requirements: it must preserve the distinctions needed for the task, and the reasoning dynamics must respect those distinctions as the state evolves.\n",
    "\n",
    "> **Sticky note — quotient:** a quotient groups objects according to an equivalence relation and treats everything within one equivalence class as the same object for the purpose being studied. The important question is therefore not simply what gets discarded, but which distinctions we have declared irrelevant.\n",
    "\n",
    "That shifted the target away from a particular intermediate language. I was now looking for a **dynamic or predictive quotient**: the smallest state that preserves the distinctions required for relevant future behavior.\n",
    "\n",
    "The word *smallest* matters here conceptually, rather than as a claim that fewer dimensions are always better. Preserving every available detail is safe in one sense, but it can also make the state unnecessarily expensive and leave irrelevant variables available as shortcuts. The goal is sufficient information, rather than maximal information.\n",
    "\n",
    "## Research context\n",
    "\n",
    "This reframing connected the project to several older ideas that had reached similar answers from different directions.\n",
    "\n",
    "In statistics, a **sufficient statistic** preserves the information needed for a specified inference while allowing other details of the original data to be discarded. The information bottleneck develops a related tradeoff: retain information useful for a target while compressing information that isn't useful for that target.\n",
    "\n",
    "Sequential systems add the future-behavior requirement. **Predictive State Representations** describe state through predictions about future observable behavior rather than requiring a particular hidden-state interpretation. **Causal-state** constructions in computational mechanics similarly group histories that imply the same distribution over futures. Myhill–Nerode equivalence in automata theory and bisimulation in state-transition systems use closely related logic: two states can be merged only when the relevant future behavior cannot distinguish them.\n",
    "\n",
    "I didn't begin the branch by combining those theories. The project arrived first at the need for a recurrence-compatible equivalence relation, and the subsequent literature sweep showed that the underlying idea had several mature precedents. Those precedents changed how I described the result: the interesting question wasn't whether I had invented a new notion of semantic state, but how these existing notions of predictive sufficiency could constrain the representation I was trying to build.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "example-boundary-010",
   "metadata": {},
   "source": [
    "## Illustrative example\n",
    "\n",
    "This six-state system illustrates a quotient under recurrence. It does not model natural-language reasoning.\n",
    "\n",
    "Saved output is included so you can inspect the example without starting a kernel. Running it in Lab executes this example only.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "dcc291a1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 class 0 -> 2 class 0\n",
      "1 class 1 -> 3 class 1\n",
      "2 class 0 -> 4 class 0\n",
      "3 class 1 -> 5 class 1\n",
      "4 class 0 -> 0 class 0\n",
      "5 class 1 -> 1 class 1\n"
     ]
    }
   ],
   "source": [
    "# Toy quotient: states are equivalent if they have the same parity.\n",
    "states=range(6)\n",
    "R=lambda x:(x+2)%6  # respects parity\n",
    "for x in states:\n",
    "    print(x, 'class', x%2, '->', R(x), 'class', R(x)%2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7a52be4f",
   "metadata": {},
   "source": [
    "## Why Lojban stopped being the main question\n",
    "\n",
    "A constrained language can still be useful. Lojban, AMR, DRS, UCCA, or another structured representation might provide a convenient serialization or expose relationships that ordinary text leaves implicit.\n",
    "\n",
    "But any fixed semantic compiler has a hard boundary: if it throws away a distinction, no downstream reasoner can recover that distinction from the compiled representation alone. A representation sufficient for one declared task may therefore be insufficient for a future task that depends on something it discarded.\n",
    "\n",
    "That made “find the right semantic language” too strong a target. A candidate language is better treated as one possible coordinate system or approximation to the state we actually care about.\n",
    "\n",
    "The deeper target is behavioral: preserve whatever distinctions are necessary for the future reasoning and observations the system is expected to support.\n",
    "\n",
    "## What this does not show\n",
    "\n",
    "The dynamic-quotient formulation doesn't tell us what equivalence relation a language model should learn. Defining the correct future behavior is itself part of the modeling problem, and different tasks can require different distinctions.\n",
    "\n",
    "It also doesn't imply that aggressive compression is always desirable. If future requirements are unknown, discarding information can permanently remove capabilities we later discover we needed. “Minimal sufficient state” only has meaning relative to a declared family of future observations, actions, or tasks.\n",
    "\n",
    "What the formulation does give me is a test for proposed semantic representations: instead of asking whether a representation looks structured, elegant, or linguistically appealing, ask which distinctions it merges and whether those merged states remain indistinguishable under the reasoning dynamics we care about.\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "publication": {
   "exampleKind": "illustrative",
   "outputEnvironment": {
    "matplotlib": "3.11.2",
    "numpy": "2.5.3",
    "scikit-learn": "1.9.1"
   },
   "question": "When is it safe for a recurrent reasoner to treat two states as equivalent?",
   "sequence": 10
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
