Theorem 4, second claim (as proved): -optimal deterministic agents on width-2 goals recover transitions with error
ProvedGeneralAgentsPO.theorem4_width_two_delta_optimalLet be finite sets with , fix , and . Then there are constants and with the following property. For every there is an estimator , a function of the goal-conditioned policy alone, such that for every communicating cMDP and every deterministic goal-conditioned policy that is -optimal on ,
Formalization Note The constants may depend on and on , but not on , or . The hypothesis is added as in the first claim. The goals with used in the proof have depth less than and are not in as defined. The fix is routine: prepending to each sequential goal raises its depth to without changing its meaning or width.
import Mathlib import Definitions.Def_GeneralAgentsPO_Basic open GeneralAgentsWorldModels
namespace GeneralAgentsPO
theorem theorem4_width_two_delta_optimal {S A : Type*} [Fintype S] [DecidableEq S] [Fintype A]
[DecidableEq A] (hA : 2 ≤ Fintype.card A) (s s' : S) (a : A) (δ : ℝ) (hδ : δ < 1 / 2) :
∃ C : ℝ, ∃ N : ℕ, ∀ n ≥ N, ∃ est : GCStochPolicy S S A → ℝ, ∀ M : CMP S A, M.IsCommunicating →
∀ π : GCStochPolicy S S A, (∀ ψ, (π ψ).IsDeterministic) →
IsDeltaOptimal M δ (PsiDepthWidth (6 * n + 1) 2) π →
|est π - M.P s a s'| ≤ C * Real.log n / n := by sorry
end GeneralAgentsPORead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let and be finite types with decidable equality. is the set of states and the set of actions. Assume . No size assumption is placed on , though it is nonempty because states are fixed below.
Fix:
- states , which may be equal;
- an action ;
- a real number with . There is no lower bound on , so may be zero or negative.
Claim. There exist a real constant and a natural number such that, for every natural number , there is a function with the following property. It assigns a real number to every goal-conditioned policy on and . For every controlled Markov process on with transition kernel that is communicating, and every goal-conditioned policy satisfying conditions (i) and (ii), we have
The conditions on are:
- (i) for every goal , the policy is deterministic;
- (ii) is -optimal for the class in .
Order of choices. The constants and may depend only on .
The function may additionally depend on . It must be one fixed function, chosen before , and it receives only as input, not .
Nothing requires to be computable or of any particular form.
Edge cases of the bound. Here is the natural logarithm, with the convention , and division by yields . For the right-hand side is . Since is chosen existentially, these small values of can be excluded.
Undefined notions. The notions "controlled Markov process", "communicating", "goal", "satisfaction of a goal by a history", and the finite-prefix test "decides" come from an external definitions file whose code is not shown here. They are described only through the comments of the shown file:
- A goal is a finite list (a disjunction) of sequential goals.
- Each sequential goal is a finite list of basic goals.
Policies. A stochastic policy assigns to every finite history a probability vector on . Such a history consists of a list of past state–action pairs together with a current state . The entries are nonnegative and sum to .
- It is deterministic if, for every finite history, some action has probability exactly .
- A goal-conditioned policy is a map from goals to stochastic policies.
Depth, width and the class .
- The depth of a goal is the maximum length of its sequential goals, and for the empty disjunction.
- The width is the number of entries in the list of disjuncts. Repeated disjuncts are counted separately.
- is the set of goals with depth exactly and width exactly .
Goal probabilities. Let be a length- prefix. Its probability under policy started at is
The goal probability is
Here " decides " is the external finite-prefix test, described as "every history with this prefix satisfies ". The supremum is the real supremum; by convention it equals if the set is unbounded above.
The optimal value is the supremum of over all stochastic, history-dependent policies , whether deterministic or not.
-optimality. Condition (ii) means: for every and every state ,
When , the factor exceeds . The condition then cannot hold for any goal with that is attained as the supremum. In that case the hypothesis may be unsatisfiable, and the implication would hold vacuously for such .
Generality. The claim is asserted for all finite and with , all choices of , and all .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.