arXiv:2610.40503cs.AIOct 2026

Manuscript Offprint

arXiv:2610.40503

Algebraic World Model: From Exploration to Proofs

Guancheng Pan, Qixin Tan, Yang Yuan, Andrew Chi-Chih Yao

Guancheng Pan ∗^{*}

Zhejiang University

3250101086@zju.edu.cn

Yang Yuan †^{\dagger}

Tsinghua University

Shanghai QiZhi Institute

yuanyang@tsinghua.edu.cn

Qixin Tan ∗^{*}

Tsinghua University

tqx23@mails.tsinghua.edu.cn

Andrew C. Yao †^{\dagger}

Tsinghua University

Shanghai QiZhi Institute

andrewcyao@mail.tsinghua.edu.cn

ABSTRACT

AI has made remarkable progress in mathematics, solving challenging problems with machine-checkable proofs in Lean, yet typically relying on predefined mathematical definitions and formal specifications. This raises a natural question: can it reason rigorously about an unknown world? We introduce the Algebraic World Model (AWM), a framework that turns interaction with unfamiliar environments into explicit mathematical models supporting formal reasoning. AWM explores the environment and develops executable Python hypotheses, continually testing and revising them against observations. It then structures these hypotheses into typed objects and shared rules, simplifies their structure through category-theory-guided transformations, and formalizes the resulting model in Lean 4 to prove reachability and impossibility. AWM can formally prove that a goal is unreachable, even beyond explored trajectories. On two impossible game levels, it constructs closed, kernel-checked Lean proofs excluding every legal winning sequence in all six runs, while Claude Opus 5.5 and GPT-6 Astra, equipped with coding tools, produce none in twelve baseline runs. Four of AWM's six initial bounds are correct, compared with one for Opus 5.5 and none for GPT-6 Astra; given only feedback that a cheaper win exists, AWM revises its rules and constructs new proofs, reaching six of six correct bounds. Moreover, AWM produces interpretable mathematical models whose rules can be inspected and tested step by step. Across all 25 public ARC-AGI-3 games, these models enable Lean to replay the winning trajectories of all 183 levels and generalize beyond observed play, predicting unseen transitions and detecting changes in game mechanics. With Claude Opus 5, AWM clears all levels with a score of 99.9, while its certified winning trajectories use only 43% of the human baseline's actions.

1 INTRODUCTION

AI systems are advancing the frontiers of mathematics, from Lean-verified progress on the Riemann zeta function (Anthropic, 2026) to recently reported resolutions of the Navier–Stokes Millennium Prize problem and the local smoothing conjecture (OpenAI, 2026b;a). Yet these advances typically rely on predefined mathematical definitions and formal specifications. In an unfamiliar environment, however, an agent must first identify the relevant objects, infer how actions change them, and determine what constitutes success. The rules on which its reasoning depends are themselves hypotheses to be learned and revised through interaction. This raises a broader question:

Can an agent reason rigorously about an unknown world?

∗^{*}These authors contributed equally.

†^{\dagger}Corresponding authors.

Euler’s treatment of the Königsberg bridges illustrates the role of mathematical structure (Euler, 1741). Land masses become vertices and bridges become edges. A walk crossing every bridge exactly once pairs arrivals and departures at every vertex other than its endpoints, so at most two vertices can have odd degree. The Königsberg graph has four, ruling out every such walk without enumerating routes. A winning trajectory likewise establishes reachability, but proving that none exists requires reasoning about all legal sequences. When the environment is unfamiliar, the objects and rules needed for that reasoning must themselves be learned.

We introduce the Algebraic World Model (AWM), a framework that learns explicit mathematical models of unfamiliar environments through interaction and uses them for formal reasoning. AWM proceeds through three stages (Figure 1). In Explore & Prototype, the agent actively probes the environment and maintains executable hypotheses, testing and revising them against observed transitions. Structure & Simplify organizes these hypotheses into typed objects and rules, then uses category-theory-guided transformations, each checked in Lean through projective and inductive limits, to identify shared structure and simplify its representation while preserving tested distinctions. In Formalize & Prove, AWM completes the model in Lean 4 (de Moura & Ullrich, 2021) and constructs kernel-checked proofs of reachability, impossibility, and other properties. A winning witness establishes reachability; an invariant or a suitable cost lower bound can exclude every legal winning sequence under the model.

01 Explore & Prototype

Figure

02 Structure & Simplify

hypothesis (Python)

def apply(o, a):

return o'

def assert_ (o, a, o'):

return T / F / NA

top-down bottom-up

projective decompose compose

inductive generalize specialize

Algebraic world model

Objects typed state w

Rules w, a → w'

Goal a predicate on w

03 Formalize & Prove

model (Lean 4)

structure Marker where

row : Nat

col : Nat

side : Nat

face : Face

def pressup (b : Board)

(s : St) : Res :=

step b s (.dir .U)

Winnable

theorem witness_wins19

Unsolvable

theorem L4_unwinnable

Figure 1: AWM’s three-stage pipeline: interactive exploration builds a provisional executable model, algebraic transformations reveal and simplify its structure, and Lean 4 formalization enables certified proofs of reachability or impossibility.

We test AWM’s ability to prove impossibility on ARC-AGI-3 (ARC Prize Foundation, 2026b), whose games reveal neither their rules nor their goals. We construct two impossible variants of sc25 levels, preserving their mechanics while setting action budgets just below the minimum winning costs (§4). Across three runs per level, AWM produces closed, kernel-checked Lean proofs excluding all legal winning sequences under its learned models in all six runs. Claude Opus 5.5 and GPT-6 Astra produce no such proofs across twelve baseline runs.

The difference extends beyond proof construction. AWM’s initial bounds match the minimum winning costs in four of six runs, compared with one for Opus 5.5 (without a proof) and none for Astra; other baseline runs report incorrect bounds or remain inconclusive. For example, on level 4 Astra claims impossibility with an unproved minimum winning cost of 22, whereas AWM proves a tight bound of 19 under its learned model, matching the game’s actual minimum winning cost. Given only feedback that a cheaper win exists, AWM revises the rules underlying its remaining two bounds and constructs new closed proofs, bringing its bound accuracy to six of six.

AWM’s learned mechanisms are also explicit and inspectable: typed objects and named rules make their predictions available for step-by-step checking. Across all 25 public ARC-AGI-3 games, AWM builds compact models with a median of six object types and ten rules. These models enable Lean to replay the winning trajectories of all 183 levels, checking represented state transitions and final goal conditions ( §3§3). With Opus 5, AWM clears all 25 games with a score of 99.9, competitive with leading code-executing systems; its certified winning trajectories use 43% of the human baseline's actions.

We make three contributions.

• A framework from exploration to algebraic structure. AWM turns interaction with an unknown environment into executable hypotheses and organizes them into compact models through category-theory-guided transformations checked in Lean, presenting object types as projective and inductive limits. Shared, parameterized rules express related mechanisms in a common form, allowing their properties to be stated and proved uniformly ( §2§2).

• Formal impossibility reasoning in unknown worlds. AWM constructs closed, kernel-checked Lean proofs that rule out all legal winning sequences under its learned rules and specified constraints, including sequences never explored. This establishes model-relative impossibility rather than inferring it from unsuccessful play ( §4§4).

• Inspectable models and traceable proofs. Typed objects and named rules make learned dynamics understandable and their predictions checkable against observations. Lean replay connects the formal representation to recorded behavior, while explicit proof dependencies identify the rules on which a conclusion rests, supporting targeted empirical examination and revision ( §3§3; §4.3§4.3).