Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1: probabilities of incompatible goals add

Proved
GeneralAgentsPO.lemma1_incompatible_goals_add

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

goal-conditioned-agentsmarkov-decision-processespartial-observabilityreinforcement-learningworld-models

Let (S,A,P)(\mathcal S,\mathcal A,P)(S,A,P) be a finite cMDP and let φ1,φ2\varphi_1,\varphi_2φ1​,φ2​ be incompatible goals: no history satisfies both. Then for every policy π\piπ and every state sss,

Pr⁡(φ1∨φ2∣π,s)=Pr⁡(φ1∣π,s)+Pr⁡(φ2∣π,s),\Pr(\varphi_1\vee\varphi_2\mid\pi,s)=\Pr(\varphi_1\mid\pi,s)+\Pr(\varphi_2\mid\pi,s),Pr(φ1​∨φ2​∣π,s)=Pr(φ1​∣π,s)+Pr(φ2​∣π,s),

and consequently, for every sss,

max⁡πPr⁡(φ1∨φ2∣π,s)≤max⁡πPr⁡(φ1∣π,s)+max⁡πPr⁡(φ2∣π,s).\max_\pi\Pr(\varphi_1\vee\varphi_2\mid\pi,s)\le\max_\pi\Pr(\varphi_1\mid\pi,s)+\max_\pi\Pr(\varphi_2\mid\pi,s).πmax​Pr(φ1​∨φ2​∣π,s)≤πmax​Pr(φ1​∣π,s)+πmax​Pr(φ2​∣π,s).

This additivity is what turns success probabilities of single goals φb,w\varphi_{b,w}φb,w​ into binomial probabilities for the disjunctions ρb,r\rho_{b,r}ρb,r​, ψb,k\psi_{b,k}ψb,k​ and χb,k\chi_{b,k}χb,k​.

Formalization Note The disjunction φ1∨φ2\varphi_1\vee\varphi_2φ1​∨φ2​ of two goals (each a list of sequential goals) is the concatenation of the two lists, and max⁡π\max_\pimaxπ​ is a supremum over all stochastic history-dependent policies.

Preamble
import Mathlib
import Definitions.Def_GeneralAgentsPO_Basic

open GeneralAgentsWorldModels
Formal statement
namespace GeneralAgentsPO

theorem lemma1_incompatible_goals_add {S A : Type*} [Fintype S] [Fintype A]
    (M : CMP S A) (φ₁ φ₂ : CompGoal S A) (h : IsIncompatible φ₁ φ₂) :
    (∀ (π : StochPolicy S A) (s : S),
      goalProb M π (φ₁ ++ φ₂) s = goalProb M π φ₁ s + goalProb M π φ₂ s) ∧
    ∀ s : S, optValue M (φ₁ ++ φ₂) s ≤ optValue M φ₁ s + optValue M φ₂ s := by sorry

end GeneralAgentsPO
Source
Cifuentes, General Agents Contain World Models, even under Partial Observability and Stochasticity, arXiv:2602.03146v1 (2026), Section 2, Lemma 1, p. 5
Read-back

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

Throughout, SSS (states) and AAA (actions) are arbitrary finite types; either may be empty. MMM is a controlled Markov process on SSS and AAA, with transition probabilities P(s′∣s,a)P(s' \mid s, a)P(s′∣s,a). No further assumption is made on MMM; in particular it need not be communicating. The notions of goal, satisfaction and "finite prefix decides" come from an imported definitions file that is not reproduced here. They are described below as that file's names and docstrings indicate.

Goals. A general goal φ\varphiφ is a finite list of sequential goals ⟨ψ1,…,ψk⟩\langle \psi_1, \dots, \psi_k \rangle⟨ψ1​,…,ψk​⟩, read as the disjunction ⋁iψi\bigvee_i \psi_i⋁i​ψi​. For two goals, φ1+ ⁣ ⁣+φ2\varphi_1 \mathbin{+\!\!+} \varphi_2φ1​++φ2​ is the list concatenation: the disjunction of all disjuncts of φ1\varphi_1φ1​ followed by all disjuncts of φ2\varphi_2φ2​. The empty list (empty disjunction) is allowed.

Incompatibility. The hypothesis is that φ1\varphi_1φ1​ and φ2\varphi_2φ2​ are incompatible: for every infinite history τ=((s0,a0),(s1,a1),… )\tau = ((s_0,a_0),(s_1,a_1),\dots)τ=((s0​,a0​),(s1​,a1​),…), if τ\tauτ satisfies φ1\varphi_1φ1​ then τ\tauτ does not satisfy φ2\varphi_2φ2​. Here satisfaction is the semantic relation from the imported file. The hypothesis holds automatically if either goal is never satisfied, for example the empty disjunction.

Policies. A policy π\piπ is stochastic and history-dependent. Given a finite list of past pairs (s0,a0),…,(si−1,ai−1)(s_0,a_0),\dots,(s_{i-1},a_{i-1})(s0​,a0​),…,(si−1​,ai−1​) and a current state sis_isi​, it assigns to each action ccc a number π(c∣hi)≥0\pi(c \mid h_i) \ge 0π(c∣hi​)≥0, and these numbers sum to 111 over c∈Ac \in Ac∈A. If AAA is empty, no policy exists.

Prefix probability. For T∈NT \in \mathbb{N}T∈N and a sequence u=((s0,a0),…,(sT−1,aT−1))u = ((s_0,a_0),\dots,(s_{T-1},a_{T-1}))u=((s0​,a0​),…,(sT−1​,aT−1​)) of TTT state–action pairs, the prefix probability from start state sss is

Pr⁡π,s(u)  =  [s0=s]  ∏i<Tπ(ai∣hi)  ∏i+1<TP(si+1∣si,ai),\Pr\nolimits_{\pi,s}(u) \;=\; [s_0 = s]\;\prod_{i<T} \pi(a_i \mid h_i)\;\prod_{i+1<T} P(s_{i+1}\mid s_i,a_i),Prπ,s​(u)=[s0​=s]i<T∏​π(ai​∣hi​)i+1<T∏​P(si+1​∣si​,ai​),

where hih_ihi​ is the history s0a0…sis_0 a_0 \dots s_is0​a0​…si​. When T=0T = 0T=0 the indicator and both products are 111.

Goal probability. The quantity probUpToT\mathrm{probUpTo}_TprobUpToT​ is the sum of Pr⁡π,s(u)\Pr_{\pi,s}(u)Prπ,s​(u) over those length-TTT sequences uuu that decide the goal ψ\psiψ. "Decide" is the imported finite-prefix test: every history with prefix uuu satisfies ψ\psiψ. The goal probability is then

Pr⁡(ψ∣π,s)  =  sup⁡T∈NprobUpToT,\Pr(\psi \mid \pi, s) \;=\; \sup_{T \in \mathbb{N}} \mathrm{probUpTo}_T,Pr(ψ∣π,s)=T∈Nsup​probUpToT​,

taken as a real supremum. By the formal convention, a real supremum of a family that is not bounded above is 000.

Optimal value. The optimal value is

V∗(ψ,s)  =  sup⁡πPr⁡(ψ∣π,s),V^*(\psi, s) \;=\; \sup_{\pi} \Pr(\psi \mid \pi, s),V∗(ψ,s)=πsup​Pr(ψ∣π,s),

a real supremum over all stochastic history-dependent policies. By the same convention, it equals 000 if there are no policies (for example when AAA is empty) or if the family is unbounded.

Conclusion. Under the incompatibility hypothesis, both of the following hold:

  1. For every policy π\piπ and every start state s∈Ss \in Ss∈S, the probability is exactly additive:
Pr⁡(φ1+ ⁣ ⁣+φ2∣π,s)  =  Pr⁡(φ1∣π,s)+Pr⁡(φ2∣π,s).\Pr(\varphi_1 \mathbin{+\!\!+} \varphi_2 \mid \pi, s) \;=\; \Pr(\varphi_1 \mid \pi, s) + \Pr(\varphi_2 \mid \pi, s).Pr(φ1​++φ2​∣π,s)=Pr(φ1​∣π,s)+Pr(φ2​∣π,s).
  1. For every s∈Ss \in Ss∈S, the optimal values satisfy a non-strict inequality:
V∗(φ1+ ⁣ ⁣+φ2,s)  ≤  V∗(φ1,s)+V∗(φ2,s).V^*(\varphi_1 \mathbin{+\!\!+} \varphi_2, s) \;\le\; V^*(\varphi_1, s) + V^*(\varphi_2, s).V∗(φ1​++φ2​,s)≤V∗(φ1​,s)+V∗(φ2​,s).

Two features of the statement.

  • The hypothesis is phrased through semantic satisfaction on infinite histories. The probabilities, by contrast, are defined through the finite-prefix "decides" test.
  • If SSS is empty, both conjuncts hold vacuously. If AAA is empty, the first conjunct is vacuous and the second reads 0≤0+00 \le 0 + 00≤0+0.
Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 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