Lemma 4 (as proved): factoring a Next sub-goal followed by an Eventually sub-goal
ProvedGeneralAgentsWorldModels.lemma4_factor_next_eventuallyLet the environment satisfy Assumption 1, let with for a set of states and , and let be a deterministic stationary Markov policy such that from every state , eventually reaches and takes there with probability one. Then
where .
Formalization Note The printed Lemma 4 assumes only that is deterministic and Markovian. Its proof applies Lemma 3 from each (eq. (20)), which needs the reachability hypothesis added here; without it the printed identity fails (a policy that never reaches gives on the left and on the right when ).
import Mathlib import Definitions.Def_GeneralAgentsWorldModels_Basic open Finset
namespace GeneralAgentsWorldModels
theorem lemma4_factor_next_eventually {S A : Type*} [Fintype S] [DecidableEq S] [Fintype A]
(M : CMP S A) (hM : SatisfiesAssumption1 M) (μ : S → A) (g₁ : Set S) (sg : S) (ag : A)
(rest : SeqGoal S A) (s₀ : S)
(hreach : ∀ x ∈ g₁, succProb M [[evVisit sg ag]] (fun _ y => μ y) x = 1) :
succProb M [nextIn g₁ :: evVisit sg ag :: rest] (fun _ y => μ y) s₀ =
(∑ x : S, g₁.indicator (fun y => M.P s₀ (μ s₀) y) x) *
succProb M [rest] (fun _ y => μ y) sg := by sorry
end GeneralAgentsWorldModelsRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a finite, nonempty-or-empty set of states with decidable equality, and a finite set of actions. Let be a controlled Markov process on with actions . It is given by transition probabilities , with for every and , and these do not depend on time.
Assume satisfies Assumption 1:
- has at least two elements.
- is communicating: for any two distinct states there is a finite chain with such that each step has for some action .
Further, fix:
- a map , used as the deterministic stationary policy that plays in state , ignoring all history;
- a set ;
- a state and an action ;
- a finite, possibly empty, list of sub-goals;
- an initial state .
Goals and satisfaction. A sub-goal is a pair with (Now, Next, Eventually) and . Let be an infinite trajectory. A list of sub-goals is evaluated at time as follows:
- The empty list holds.
- holds at iff and the remainder holds at .
- holds at iff and the remainder holds at .
- holds at iff there is a such that for , , and the remainder holds at . Here is the first time at or after that is hit.
A composite goal, given as a list of sequential goals, is satisfied by iff some member holds at time . Writing for the composite goal consisting of the single sequential goal , this theorem uses:
- ;
- .
Success probability. For a composite goal and a start state , define
where the product's starting state is . A finite prefix "decides" if every infinite sequence of state–action pairs extending it satisfies . These extensions are arbitrary and need not be consistent with or .
Hypothesis. For every ,
That is, started from , the pair is reached at some time with probability ; time counts. Two consequences:
- Under the pair at any visit to is . So if , this hypothesis can only hold when .
- If , the hypothesis holds vacuously.
Conclusion.
Here is the probability that the first transition from under action lands in .
On the right, is evaluated on a fresh trajectory started at at time , whose first pair is . On the left, the remaining sub-goals are evaluated from the first time at which .
When is empty, the composite goal is satisfied by every trajectory, and the right-hand factor equals .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.