Theorem 1 (as proved): general agents contain world models
ProvedGeneralAgentsWorldModels.theorem1_general_agents_contain_world_modelsLet and be finite sets and let . Then there is a map , from goal-conditioned policies to transition models , with the following property. For every environment on satisfying Assumption 1, every , and every bounded goal-conditioned agent with failure rate for all goals in , the model satisfies, for all ,
When is odd, and the bound is the paper's . The map depends only on , and : the same procedure recovers the model for every environment, every agent and every , so the agent's policy alone determines an approximate world model.
Formalization Note The proof (eqs. (33), (57)) uses attempts of a transition, a goal of depth , and proves the bound . Substituting is valid only for odd ; the statement is therefore given with , which equals the printed bound for odd and is what the proof gives for even . The printed case gives , where the proof says nothing, and is excluded. The printed bound is infinite at , so is assumed. The asymptotic claim rests on a Taylor approximation and is not included.
import Mathlib import Definitions.Def_GeneralAgentsWorldModels_Basic open Finset
namespace GeneralAgentsWorldModels
theorem theorem1_general_agents_contain_world_models {S A : Type*} [Fintype S] [DecidableEq S]
[Fintype A] [DecidableEq A] (n : ℕ) (hn : 3 ≤ n) :
∃ F : GCPolicy S A → S → A → S → ℝ,
∀ M : CMP S A, SatisfiesAssumption1 M →
∀ δ : ℝ, δ < 1 → ∀ π : GCPolicy S A, IsBoundedAgent M π δ n →
∀ (s : S) (a : A) (s' : S),
|F π s a s' - M.P s a s'| ≤
Real.sqrt (M.P s a s' * (1 - M.P s a s') / ((((n - 1) / 2 : ℕ) : ℝ) * (1 - δ))) := by sorry
end GeneralAgentsWorldModelsRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let (states) and (actions) be finite types with decidable equality. Let be a natural number with .
Claim. There exists a single real-valued function
taking as input a deterministic goal-conditioned policy and a triple , such that the following holds. For every environment satisfying Assumption 1, every real , every policy that is a bounded agent for with failure rate and maximum goal depth , and all , :
The order of quantifiers matters. is chosen once, before and . It may depend only on and , not on or . Nothing requires to be computable or constructive in any sense.
Environment. is a controlled Markov process. It consists of numbers with for every . The transitions do not depend on time.
Assumption 1 requires two things:
- Communicating: for all there is a finite chain (with ) such that each step has for some action .
- Enough actions: .
If , no qualifies and the statement is vacuous. If is empty, the final quantifier over is vacuous.
Policies. A policy is deterministic and history-dependent. It maps a finite list of past state–action pairs and the current state to an action.
A goal-conditioned policy assigns such a policy to every composite goal . Goals are syntactic lists, so two lists expressing the same condition count as different goals.
Goals. A sub-goal is a pair :
- is one of three operators: Now, Next or Eventually.
- is an arbitrary set.
A sequential goal is a list of sub-goals. A composite goal is a list of sequential goals, read as their disjunction.
For an infinite trajectory , satisfaction of a sequential goal from time is defined recursively:
- The empty list is always satisfied.
- Now followed by the rest: requires , and the rest is satisfied from time .
- Next followed by the rest: requires , and the rest is satisfied from time .
- Eventually followed by the rest: there is some such that
- for all ,
- , and
- the rest is satisfied from time , the same time step, not .
A composite goal is satisfied by if some listed sequential goal is satisfied from time . An empty composite goal is never satisfied.
is the set of composite goals that are non-empty lists in which every sequential goal is non-empty and has length at most .
Success probability. Fix a policy and an initial state . For a horizon , sum over all sequences of next states :
- Take actions .
- Weight each sequence by .
- Count the sequence only if the length- prefix decides . "Decides" means every infinite trajectory beginning with this prefix satisfies .
The success probability is the real supremum of these sums over all . The optimal value is the real supremum of the success probability over all deterministic history-dependent policies.
Bounded agent. is a bounded agent with failure rate and depth when all of the following hold:
- ;
- for every and every :
Together with the hypothesis , this means effectively ranges over .
Reading the bound. The denominator uses natural-number floor division . Since , this is at least , so the denominator is strictly positive.
Since , the numerator is non-negative, so the square root is the ordinary one. In particular, whenever , the right-hand side is and must equal exactly.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.