Theorem 3 (as proved): stochastic -optimal agents contain world models under partial observability
ProvedGeneralAgentsPO.theorem3_partially_observable_agents_contain_world_modelsLet be finite sets with . Fix , , an integer and , and put . There is an estimator with the following property. It receives only the agent's observable first-step behaviour: for every goal , start state and action , the probability that the agent, started in , takes as its first action. For every partially observable cMDP whose cMDP is communicating, and every goal-conditioned observation-based policy that is -th-degree -optimal for it,
Even an agent that cannot see the state, if it is nearly optimal for goals phrased in terms of states, determines the transition probabilities.
Formalization Note The paper states that Theorem 2 "continues to hold" for observation-based policies, with the estimator obtained "by querying the policy". If the estimator may look only at the policy as a function of observation histories, the statement is false. Let each of two environments with the same states have state-revealing observations, the first emitting in state and the second , and let them have and . Take and large enough that the bound is below . A single policy that, after a first observation , plays a nearly optimal policy for environment from is -optimal in both, so an estimator that sees only the policy returns the same value in both. The proof uses only the probabilities of the agent's first action from a start state inside the environment, , which is what querying the agent as a black box gives. The estimator receives exactly these numbers, for all goals, start states and actions, and nothing else; in particular it does not receive or . The hypotheses and are added as in Theorem 2, and is finite.
import Mathlib import Definitions.Def_GeneralAgentsPO_Basic open GeneralAgentsWorldModels
namespace GeneralAgentsPO
theorem theorem3_partially_observable_agents_contain_world_models {S A O : Type*} [Fintype S]
[DecidableEq S] [Fintype A] [DecidableEq A] [Fintype O] (hA : 2 ≤ Fintype.card A)
(s s' : S) (a : A) (n : ℕ) (hn : 1 ≤ n) (δ : ℝ) (hδ : δ < 1 / 2) :
∃ est : (CompGoal S A → S → A → ℝ) → ℝ, ∀ M : POCMP S A O, M.toCMP.IsCommunicating →
∀ π : GCStochPolicy S O A, IsObsDeltaOptimal M δ (PsiDepth (2 * n + 1)) π →
|est (fun ψ x c => ∑ o, M.obs x o * (π ψ).act [] o c) - M.P s a s'| ≤
Real.sqrt (2 * M.P s a s' * (1 - M.P s a s') / n *
Real.log (2 * (1 - δ) / (1 - 2 * δ))) +
2 * Real.log (2 * (1 - δ) / (1 - 2 * δ)) / (3 * n) + 1 / n := by sorry
end GeneralAgentsPORead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let (states), (actions) and (observations) be finite types, with decidable equality on and . Assume has at least two elements, . Fix:
- states and an action ;
- a natural number ;
- a real number . No lower bound is imposed, so may be zero or negative.
Write
Since , the fraction is strictly greater than , so .
The claim. There exists a single function with the following property. Its input is any real-valued function of a goal over , a state and an action . Its output is a real number. The function is chosen once, depending only on , and before any model or policy is given.
The required property is this. Take any partially observable cMDP whose underlying cMDP is communicating. Take any goal-conditioned observation-based stochastic policy that is -optimal for the class . Then
where the input is
Here is the probability that the policy for goal picks action when its entire history is the single initial observation , with no earlier observation–action pairs.
So sees only one thing: for every goal of any depth and every state , the distribution of the agent's very first action when an observation is first drawn from . It does not see or separately, and it sees no later-step behaviour.
For the right-hand side is at least .
Partially observable cMDP. consists of an underlying cMDP with transition values , plus an observation kernel with for every . Because exists, is nonempty, and this forces to be nonempty.
The structure of a cMDP and the meaning of "communicating" come from an imported file that is not shown here. They are taken as given.
Policies. An observation-based stochastic policy assigns, to each finite history together with a current observation , a probability vector on . Its entries are nonnegative and sum to .
A goal-conditioned policy assigns such a policy to every goal .
Goals and depth. A goal is a finite list (a disjunction) of sequential goals. Each sequential goal is a finite list of basic sub-goals. The syntax and the satisfaction relation come from the unshown imported file.
The depth of is the maximum length among its sequential goals, and is for the empty list. is the set of all goals whose depth is exactly . There is no restriction on the number of disjuncts.
Goal probability. For an observation-based policy and a start state , let be the following sum. It runs over all length- state–action sequences that already decide , i.e. satisfy the imported finite-prefix test. Each such contributes
For the indicator and the product are both .
The goal probability is the real supremum over :
This is the usual supremum when the set is bounded above; otherwise a conventional junk value applies. Goals are evaluated on the true states and actions.
The optimal value is , taken over all observation-based stochastic policies , which are not goal-conditioned.
-optimality. is -optimal for if, for every goal and every start state ,
When the factor exceeds . The condition then demands that do strictly better than the supremum wherever .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.