Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1: a deterministic Markov policy reaches any state with probability 1

Proved
GeneralAgentsWorldModels.lemma1_markov_policy_reaches_state

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

controlled-markov-processesgoal-conditioned-agentslinear-temporal-logicregret-boundsworld-models

Let the environment satisfy Assumption 1 (a finite, stationary, communicating controlled Markov process with at least two actions) and let s′∈Ss'\in Ss′∈S. Then there is a deterministic Markov policy μ:S→A\mu:S\to Aμ:S→A (taking action μ(st)\mu(s_t)μ(st​) at time ttt) that, started from any state s≠s′s\ne s's=s′, eventually reaches s′s's′ with probability one:

P(τ⊨◊[S=s′]∣μ,s)=1for all s≠s′.P\big(\tau\models\Diamond[S=s']\mid\mu,s\big)=1\qquad\text{for all }s\ne s'.P(τ⊨◊[S=s′]∣μ,s)=1for all s=s′.

This is the navigation primitive used to return to a fixed state between the repeated trials of Lemma 6.

Preamble
import Mathlib
import Definitions.Def_GeneralAgentsWorldModels_Basic

open Finset
Formal statement
namespace GeneralAgentsWorldModels

theorem lemma1_markov_policy_reaches_state {S A : Type*} [Fintype S] [DecidableEq S] [Fintype A]
    (M : CMP S A) (hM : SatisfiesAssumption1 M) (s' : S) :
    ∃ μ : S → A, ∀ s : S, s ≠ s' →
      succProb M [[evState s']] (fun _ x => μ x) s = 1 := by sorry

end GeneralAgentsWorldModels
Source
Richens, Abel, Bellot and Everitt, General agents contain world models, arXiv:2506.01622v5 (ICML 2025), Appendix A.6, Lemma 1, p. 13 (Assumption 1, Section 2.2, p. 2)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let SSS be a finite set of states with decidable equality and AAA a finite set of actions. Let MMM be a controlled Markov process on (S,A)(S, A)(S,A), given by a transition function P(s,a,s′)≥0P(s, a, s') \ge 0P(s,a,s′)≥0 satisfying, for every s∈Ss \in Ss∈S and a∈Aa \in Aa∈A,

∑s′∈SP(s,a,s′)=1.\sum_{s' \in S} P(s, a, s') = 1.s′∈S∑​P(s,a,s′)=1.

The function PPP does not depend on time.

Hypothesis. MMM satisfies "Assumption 1", which consists of two conditions:

  • Communicating. For every pair of distinct states s≠s′′s \neq s''s=s′′, there is a finite chain s=x0,x1,…,xk=s′′s = x_0, x_1, \dots, x_k = s''s=x0​,x1​,…,xk​=s′′ with k≥1k \ge 1k≥1. Each step xi→xi+1x_i \to x_{i+1}xi​→xi+1​ must have P(xi,a,xi+1)>0P(x_i, a, x_{i+1}) > 0P(xi​,a,xi+1​)>0 for some action aaa, and that action may depend on the step.
  • At least two actions. ∣A∣≥2|A| \ge 2∣A∣≥2.

Fix a target state s′∈Ss' \in Ss′∈S.

Conclusion. There exists a function μ:S→A\mu : S \to Aμ:S→A with the following property. Let π\piπ be the policy that, given any history and current state xxx, plays μ(x)\mu(x)μ(x). This is a stationary deterministic policy that ignores the history. Then for every starting state s∈Ss \in Ss∈S with s≠s′s \neq s's=s′,

succProb(ψ,π,s)=1,\mathrm{succProb}(\psi, \pi, s) = 1,succProb(ψ,π,s)=1,

where ψ\psiψ is the composite goal consisting of a single disjunct. That disjunct is a sequential goal with a single sub-goal, "eventually [S=s′][S = s'][S=s′]". Unfolded, the success probability is

succProb(ψ,π,s)=sup⁡T∈N  ∑(s1,…,sT)∈ST(∏i=0T−1P(si,μ(si),si+1))⋅1[the prefix decides ψ],\mathrm{succProb}(\psi, \pi, s) = \sup_{T \in \mathbb{N}} \; \sum_{(s_1, \dots, s_T) \in S^T} \left( \prod_{i=0}^{T-1} P\big(s_i, \mu(s_i), s_{i+1}\big) \right) \cdot \mathbf{1}\big[\text{the prefix decides } \psi\big],succProb(ψ,π,s)=T∈Nsup​(s1​,…,sT​)∈ST∑​(i=0∏T−1​P(si​,μ(si​),si+1​))⋅1[the prefix decides ψ],

with the following conventions:

  • s0=ss_0 = ss0​=s, and the supremum is the real-number supremum.
  • The prefix is ((s0,μ(s0)),…,(sT,μ(sT)))\big((s_0, \mu(s_0)), \dots, (s_T, \mu(s_T))\big)((s0​,μ(s0​)),…,(sT​,μ(sT​))).
  • "Decides ψ\psiψ" means that every infinite sequence of state–action pairs extending this prefix satisfies ψ\psiψ. The extensions are arbitrary and need not be consistent with MMM or π\piπ.
  • An infinite sequence satisfies ψ\psiψ iff there is a time u≥0u \ge 0u≥0 at which the state equals s′s's′, with the state differing from s′s's′ at all earlier times. This is equivalent to the state equaling s′s's′ at some time.

Because s≠s′s \neq s's=s′ makes SSS have at least two elements, an extension can avoid s′s's′ forever. So the prefix decides ψ\psiψ exactly when some sis_isi​ with 0≤i≤T0 \le i \le T0≤i≤T equals s′s's′. The TTT-th term is therefore the probability that the chain with kernel P(x,μ(x),⋅)P(x, \mu(x), \cdot)P(x,μ(x),⋅), started at sss, visits s′s's′ within the first TTT steps. The conclusion says the supremum of these finite-horizon probabilities equals 111.

Edge cases.

  • The statement makes no claim about the starting state s=s′s = s's=s′.
  • If S={s′}S = \{s'\}S={s′}, the conclusion holds vacuously for any μ\muμ. Such a μ\muμ exists because ∣A∣≥2|A| \ge 2∣A∣≥2 makes AAA nonempty.
  • A single μ\muμ must work simultaneously for all starting states s≠s′s \neq s's=s′.
Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me