How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Tabular prediction and control by interaction
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Conditional Distributions and Regular Conditional Probability
- Conditional Expectation
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Discrete Time Martingales
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Finite Counting, Factorials and Binomial Coefficients
- Finite MDPs and Bellman operators
- Foundations of the Real Numbers for Analysis
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Inclusion–Exclusion, the Pigeonhole Principle and Double Counting
- Infinite Product Measures and Kolmogorov Extension
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Markov Kernels and Markov Chains
- Measurable Functions and Simple Approximation
- Measures and Their Basic Properties
- Metric Spaces
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Order, Zorn's Lemma, and the Axiom of Choice
- Outer Measure and the Caratheodory Extension Theorem
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Probability Spaces Random Variables and Expectation
- Product Measures and the Fubini Tonelli Theorems
- Properties of the Integral and the Working FTC
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Sigma Algebras and Borel Sets
- Signed and Complex Measures Hahn and Jordan
- Simple Field Extensions and the Construction of the Complex Numbers
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Exponential Function
- The Lebesgue Integral and the Convergence Theorems
- The Logarithm and General Powers
- The Lᵖ Spaces Holder Minkowski and Riesz Fischer
- The Radon Nikodym Theorem and Lebesgue Decomposition
- The Riemann Integral: Definition and Integrability
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Logical flowchart
3 · Definitions, theorems and proofs
Predictably weighted bounded martingale differences have a convergent series
Statement
Assume the Axiom of Choice. Let be a discrete filtered probability space. Let be a real martingale-difference sequence relative to the filtration, with almost surely for a finite constant . For each , let be a real -measurable random variable. Suppose that a finite deterministic satisfies
Then the partial sums converge almost surely to a finite real limit.
Statement references
Facts & Assumptions
Given: The Axiom of Choice, the filtered probability space, the bounded martingale differences, the predictable coefficients, and the almost-sure square-sum bound in the Statement.
The Axiom of Choice: every family of nonempty sets has a choice function; this is assumed for the conditional-expectation classes in the martingale-difference definition.
Filtration and filtered probability space: whenever .
Martingale difference sequence: each is -measurable and integrable, and almost surely; conditional expectations are almost-sure classes under AC.
Martingale submartingale and supermartingale: an integrable adapted process is a submartingale when almost surely.
Tower property of conditional expectation: if and is integrable, then almost surely.
Taking out what is known: an integrable factor measurable with respect to the conditioning sigma-algebra can be taken outside conditional expectation when the products are integrable.
Basic algebra and order properties of conditional expectation: conditional expectation is linear, order preserving, and expectation preserving.
Probability measures and probability spaces and Expectation of a nonnegative or integrable random variable: , and a nonnegative integrable constant has expectation equal to that constant.
Sequential suprema, infima, limsup, liminf, and pointwise limits of measurable functions are measurable: a pointwise limit of measurable functions is measurable.
Dominated convergence: pointwise convergence under one integrable majorant permits convergence of expectations.
Continuity from below for measures: for increasing measurable events, the measure of their union is the limit of their measures.
Finite and countable subadditivity of measures: the measure of a countable union is at most the sum of the measures.
The reals are complete: every Cauchy sequence of real numbers converges in .
The well-ordering principle: every nonempty subset of the natural numbers has a least element.
Proof
Given: In addition to the hypotheses in the Statement, all conditional-expectation identities are interpreted almost surely.
Put . The square-sum bound implies almost surely, so is square integrable. Since is -measurable, [F2] and [F5] give . For , [F1] gives , and [F4] gives . Taking out the bounded -measurable factor with [F5], then using expectation preservation [F6], gives . Expanding a finite square therefore yields
Let . By [F8], is measurable; the hypothesis gives and almost surely. The constant is integrable by [F7], so [F9] gives .
For finite , put for , with . Each is adapted and integrable; [F2] and [F6] give , so is a martingale. Since is -measurable, [F5] takes it out of the conditional expectation; the MDS identity from step 1.1 gives . The conditional square expansion therefore gives so is a nonnegative submartingale by [F3]. Let be the event that is the first index in with . These events are disjoint and . Repeated use of the submartingale inequality and [F4] gives , hence Summing over and using gives
Since , for each integer choose the least (with ) such that ; it exists by [F13]. For finite , step 2.1 with bounds the event by . These events increase with , so [F10] gives the same bound for their union over all . For each , [F11] gives , which tends to zero; hence almost surely only finitely many occur. Outside that null event, for every sufficiently large and all with , the tail sum satisfies . Thus the partial sums are Cauchy.
Completeness [F12] makes the Cauchy sequence of partial sums converge in . Since , this is the asserted convergence of .
Optimal action-value Bellman operator
Definition
Let a finite MDP have nonempty finite state set and let . Write and for the real functions on . The optimal action-value Bellman operator is
Each maximum is attained because every is finite and nonempty.
Definition references
The finite state set, admissible state-action pairs, and joint reward-transition masses.
A maximum is an attained upper bound belonging to the set.
Every nonempty finite set of real numbers has an attained maximum.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
Facts & Assumptions
Given: A finite MDP with nonempty finite state set , nonempty finite action sets , finite reward set , joint masses , and .
Finite Markov decision process with joint reward-transition law: every is nonempty and finite, is the set of admissible pairs, and each is a probability mass on the finite set .
Finite, countably infinite, countable, uncountable and Every nonzero natural number is a successor: a nonempty finite action set is in bijection with a nonzero natural number, and every nonzero natural is the successor of a natural ; thus its actions can be listed as .
Every nonempty finite set of reals has a maximum and a minimum: for every natural and real list , the set has an attained maximum and minimum.
Maximum and minimum of a set: a maximum of a real set belongs to that set and is an upper bound for every member; it is unique when it exists.
The sum over a finite index set, and its product form: a real-valued function on a finite index set has a well-defined finite sum.
Verification
Given: The finite MDP, its nonempty finite state-action domain, the discount, and the candidate formula for in the Definition.
Fix . By [F1] and [F2], choose a natural and a bijection . The list for has an attained maximum by [F3]. Every action equals for some , so , and the maximum value is attained by at least one such action.
The maximum value in step 1.1 depends only on the set : it belongs to that set and bounds every member. Uniqueness in [F4] therefore makes it independent of the enumeration . Hence is well-defined.
For each , the bracketed term in the Definition is real by step 2.1, and is finite by [F1]. The finite sum supplied by [F5] is therefore a real number. Thus the displayed formula assigns one real value to every coordinate in and defines a map .
A finite MDP policy generates action-state-reward trajectories
Statement
Assume the Axiom of Choice. Let a finite MDP have nonempty state set , and let be a stationary Markov policy. Fix an initial state and let
with its discrete sigma-algebra. There is a probability law on whose first state is and whose subsequent coordinates are . For every and every feasible finite trajectory , its probability is
where the empty product for is .
Its state-reward marginal also has the finite-prefix probabilities
for each feasible finite state-reward path .
Statement references
A probability law with prescribed iterated finite-prefix kernel laws exists under Choice.
A finite union of pairwise-disjoint finite sets is finite.
A finite product of finite sets is finite.
Sutton and Barto, Reinforcement Learning: An Introduction.
Kaelbling, Littman, and Cassandra, Brown Technical Report CS-96-08.
The policy-mixture reward-state path law with the same marginal probabilities.
Facts & Assumptions
Given: AC, a finite MDP with , a stationary Markov policy , and an initial state .
The Axiom of Choice: every family of nonempty sets has a choice function.
Finite Markov decision process with joint reward-transition law: , , and each are finite; and ; is a probability distribution on .
Finite, countably infinite, countable, uncountable: a finite set is in bijection with a natural number.
The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition and The product rule: , and : a family of pairwise-disjoint finite sets indexed by a finite set has finite union, and a finite Cartesian product of finite sets is finite.
Measure kernel and probability kernel: a probability kernel assigns a probability measure at each input and has measurable event sections.
The product sigma-algebra and its finite iterates: finite product sigma-algebras make coordinate projections measurable.
The well-ordering principle: every nonempty subset of has a least element.
Ionescu-Tulcea construction of a Markov chain: under AC, an initial probability and a sequence of probability kernels determine a probability law with the prescribed iterated finite-prefix laws.
A finite MDP and stationary policy generate a reward-state Markov chain: the reward-state marginal under has the finite-prefix laws obtained by mixing the joint law with .
for finite index sets and and Laws of finite sums and finite products: the finite action sums can be regrouped and distributed across successive time indices.
Ionescu-Tulcea construction of a Markov chain: a probability law with prescribed consistent finite-prefix laws is unique.
Proof
Given: The hypotheses and conventions in the Statement.
The blocks are finite by [F3] and pairwise disjoint because distinct blocks have different first coordinates. Since is finite, [F3] makes finite. Its product with the finite reward and state sets is finite by [F3], so is finite. For each and , define Every term is nonnegative, and [F1] gives . If is a disjoint sequence of subsets of finite , only finitely many are nonempty: enumerate and assign each nonempty its least element in that enumeration; disjointness makes these assigned elements distinct. Therefore finite additivity of the displayed finite sums gives countable additivity. Since and have discrete sigma-algebras, is a probability measure and is measurable; hence is a probability kernel by [F4].
Set and for , with initial measure . For each , let from to be , where when and is the final next-state coordinate of the last trajectory record in when . That coordinate projection is measurable by [F5], so each is measurable in ; its sections are probability measures by step 1.1. Thus the hypotheses of [F7] hold.
Apply [F7] to obtain the probability law with these finite-prefix kernels. For a feasible atom , its iterated prefix mass is the product over of the atom masses . The definition of makes each such mass , giving the displayed formula. For , the initial point mass is .
Fix a finite state-reward path . Summing the action-path formula from step 3.1 over its finitely many action sequences and regrouping the finite sums by time gives the displayed state-reward marginal formula by [F9]. These are the finite-prefix probabilities in [F8]. The initial state is the same point mass, so uniqueness [F10] identifies the state-reward marginal with the stationary-policy path law.
Coordinate-wise stochastic approximation converges to a contraction fixed point
Statement
Assume the Axiom of Choice. Let be a nonempty finite set and put for . Let satisfy
for a fixed , and let satisfy . On a discrete filtered probability space , let be deterministic, let be -measurable, and define . For each , let be deterministic with , , and . Let be a bounded martingale-difference sequence relative to the filtration. Update
If every is selected infinitely often almost surely and the iterates are bounded almost surely, then almost surely in .
Statement references
Facts & Assumptions
Given: The Axiom of Choice, the finite index set, the contraction and fixed point, filtration, bounded martingale-difference noise, deterministic per-coordinate step sizes, infinite visitation, and bounded iterates in the Statement.
The Axiom of Choice: every family of nonempty sets has a choice function; AC is assumed for the conditional-expectation classes used in the martingale-difference definition.
Martingale difference sequence: is -measurable and integrable, and almost surely.
Every nonempty finite set of reals has a maximum and a minimum: every nonempty finite set of real numbers has an attained maximum, so the displayed sup norm is finite and well defined.
Predictably weighted bounded martingale differences have a convergent series: if is bounded martingale-difference noise and is -measurable with an almost-sure deterministic square-sum bound, then converges almost surely.
Limit superior and limit inferior of a nonnegative extended-real sequence: for a bounded nonnegative sequence , and is nonnegative.
Proof
Given: All hypotheses and conventions in the Statement.
Fix and put . The indicator and visit count are -measurable, so is -measurable. Each visit to contributes one term to , hence this sum is at most . By [F2], [F4], and the bound on , the series converges almost surely. Since is finite, these convergence events hold simultaneously for all outside one null set.
Fix an outcome in that full-measure event where all coordinates are visited infinitely often and the iterates are bounded. For a fixed , let be the time of the st update of coordinate , put and , and let and . Before the st update, coordinate still has its value after the first updates, so the update and give . By step 1.1, converges; put , so . For , the identity gives
Let , which is finite because the iterates are bounded and is a contraction. For every , eventually . Iterating the convex-combination recurrence in step 2.1 from such an index bounds by a vanishing multiple of plus : the coefficient of is , which tends to zero since Thus . Letting and using yields .
Put , finite by boundedness. For every , eventually . Since , contraction gives , so . Step 3.1 gives . Coordinate is constant between updates; since the number of its updates tends to infinity, its full-time limsup error equals the limsup of the post-update sequence . Also, for finite , taking a tail supremum commutes with the finite maximum, and the decreasing tail suprema commute with a finite maximum when taking their infimum; hence . Therefore , and forces . Thus on the full-measure event, proving almost-sure convergence.
Tabular Q-learning
Definition
Inputs: A finite MDP with nonempty finite state set , finite nonempty action sets , finite reward alphabet , and discount ; an initial state ; a behavior rule that selects a legal action using the interaction history available at time ; an initial table ; and a step-size rule that, before observing the next reward and state, supplies from the history and selected pair. A deterministic per-pair schedule based on the number of previous visits to is a special case. The interaction must, conditional on its history and the selected pair , draw with joint mass .
Output: The action-value table after every interaction, ; a finite run outputs its current table .
Initialize . For each , select by the behavior rule, obtain from the step-size rule, and observe . Compute
then update only the visited coordinate by
Leave every other coordinate unchanged, set the current table to , and set the current state to . The target uses the greedy maximum even when the behavior rule explores, so this is off-policy and uses no importance-sampling ratio. The procedure makes no convergence claim; convergence requires additional hypotheses not imposed here.
Definition references
Episodic returns, temporal-difference errors, and policy support
Definition
Let a finite MDP have and let be a set of terminal states. Form an absorbing extension with reward alphabet : from each nonterminal state retain the original joint reward-transition law, and from each terminal state use the deterministic transition back to that state with reward zero. Assume AC for the path laws defining policy values. For a stationary policy , an episode starting from ends at its first hitting time ; require almost surely under every policy used. The return from time is
and . This equals the infinite discounted return of the absorbing extension, whose state value is .
For a state-value estimate , the state temporal-difference error on a transition is . For an action-value estimate , the sampled-action Sarsa error is , and the greedy Q-learning error is . In each error, the continuation term is defined as zero when is terminal.
In off-policy prediction, denotes the behavior policy generating episodes and the target policy whose value is estimated. Target support means implies for every state-action pair that can be visited. For a behavior-generated episode, the state-return likelihood ratio from time is
Each denominator is positive on the observed behavior path. When estimating a value conditional on an already fixed action , the first factor begins at time .
Definition references
The finite joint reward-transition law and stationary Markov policies.
The action-state-reward trajectory law and its finite-prefix probabilities.
The infinite discounted return, its path-law expectation, and its boundedness for bounded rewards.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
The optimal action value is attained by a greedy stationary policy
Statement
Assume the Axiom of Choice. Let a finite MDP have nonempty finite state set and discount , and let be its Bellman optimality operator. For a fixed initial pair , an admissible continuation is any discrete filtered process on a probability space such that almost surely, , , almost surely, is measurable with respect to , and are measurable with respect to , and
almost surely for every , , and . Its discounted return is . Let be the unique fixed point of and define as the supremum of over all admissible continuations from . Then this supremum is finite and attained by a continuation that, after the prescribed initial action, always chooses an action maximizing at the current state . In particular,
Statement references
Finite state/action sets, the joint reward-transition law, and bounded rewards.
Adapted processes on a discrete filtration.
The state-value Bellman optimality operator.
Expected discounted policy returns and values.
Unique fixed points of discounted policy and optimality operators.
A stationary policy value is its Bellman fixed point.
Sutton and Barto, Reinforcement Learning: An Introduction.
Kaelbling, Littman, and Cassandra, Brown Technical Report CS-96-08.
Facts & Assumptions
Given: The finite MDP, its reward-transition law, , and the Axiom of Choice.
The Axiom of Choice: every family of nonempty sets has a choice function; this is used for the path-law construction and to select one maximizing action at each state.
Finite Markov decision process with joint reward-transition law: each is finite nonempty, and the reward/state sets are finite, is a probability mass, and .
Filtration and filtered probability space: is increasing; current state-action pairs are measurable at time in an admissible continuation.
Basic algebra and order properties of conditional expectation: conditional expectation is linear, preserves order and constants, and preserves expectation.
Finite-MDP Bellman operators are gamma contractions with unique fixed points: and each stationary-policy operator have unique fixed points for .
Discounted returns and policy values in a finite MDP: is the expected discounted return from state under the policy-induced path law.
Expected discounted policy value is a fixed point of its Bellman operator: under the stated Axiom of Choice and discount hypotheses.
Ionescu-Tulcea construction of a Markov chain: under Choice, an initial law and a sequence of history-dependent probability kernels determine a probability law with the prescribed finite-prefix laws.
A finite MDP policy generates action-state-reward trajectories: a stationary Markov policy has the stated finite-prefix action-state-reward path probabilities from each fixed initial state.
Absolute convergence and tail bound for bounded discounted rewards: bounded rewards give an absolutely convergent discounted return and a uniform tail bound .
Dominated convergence: pointwise-convergent measurable functions under one integrable majorant have convergent expectations.
Expectation of a nonnegative or integrable random variable, The expectation of an indicator is the probability of the event, and Monotonicity and nonnegative homogeneity of the nonnegative integral: a bounded constant is integrable on a probability space because and the nonnegative integral preserves scaling and order.
Finite, countably infinite, countable, uncountable, On the order is membership: , and Every nonzero natural number is a successor: each nonempty finite action set is bijective with a successor natural and can be enumerated by the corresponding finite list .
Every nonempty finite set of reals has a maximum and a minimum and Maximum and minimum of a set: every finite real list has an attained maximum, which is an upper bound for the list and is unique.
Sequential suprema, infima, limsup, liminf, and pointwise limits of measurable functions are measurable: the pointwise limit of a sequence of measurable real functions is measurable.
The product sigma-algebra and its finite iterates: coordinate projections from the history product spaces are measurable.
Measure kernel and probability kernel: a history-dependent assignment of probability measures with measurable event sections is a probability kernel of the type required by [F9].
The product rule: , and : each finite history-coordinate space formed from finitely many finite state, reward, and state-action sets is finite.
Proof
Given: The hypotheses, definitions, and conventions in the Statement and [A1], [F1]–[F20].
The unique fixed point exists by [F6]. Let , which is finite because is finite. Fix and enumerate using [F1] and [F14]. For , [F15] gives an attained list maximum; because the list enumerates all actions, its maximum is exactly the maximum in [F4], independent of the enumeration by uniqueness in [F15]. For each , expanding and by [F1] gives . The triangle inequality, , and the probability-mass identity give . Since the maximum is one of the list entries, . As was arbitrary, . Since , .
Fix any admissible continuation from . For each , expand as the finite sum . These variables are bounded by [F1] and step 1.1, so they are integrable. Conditional linearity and the transition-reward identity in the definition give . The right side is the one-step action value of the measurable current action , so it is at most by [F4] and the fixed-point identity.
The attained list maximum argument in step 1.1 makes the maximizing-action set nonempty at every state. By [A1], choose one such action at every state and call the resulting deterministic stationary policy . Define its stationary probability-family embedding by for . These numbers are nonnegative and sum to one because exactly one legal action equals , so is a stationary Markov policy in [F5]–[F8]. Its policy Bellman sum has only the chosen maximizing action as a nonzero term. The definitions [F4]–[F5] and give . By [F6] this is the unique fixed point of , while [F8] gives ; hence .
Apply order and expectation preservation from [F3] to the conditional inequality in step 2.1, multiply by the nonnegative scalar , and sum for . The intermediate state-value terms cancel, giving . The initial transition law gives . Since by step 1.1 and [F13], it follows that .
Write . Each is measurable because it is a finite sum of measurable rewards, and [F11] gives pointwise convergence to and the bound . Thus is measurable by [F17]; the constant bound is integrable by [F13], so [F12] gives . Also by [F16]. Passing to the limit in the upper bound of step 3.1 shows . The continuation was arbitrary, so .
Construct a continuation with initial pair and thereafter action following each transition. Take and with their discrete sigma-algebras, initial law concentrated at , and history kernels for every measurable , where is the last pair in . For disjoint sets , their preimages are disjoint subsets of the finite set , so only finitely many are nonempty and the finite mass formula is countably additive; its total mass is one by [F1]. It is measurable in because it is a finite sum of functions of the current-pair coordinate projection, which is measurable by [F18]. Thus each is a probability kernel by [F19], and [F9] gives a path law with these prefix products. Set , where and . The coordinate projections make current pairs measurable at time and next observations measurable at time by [F18]. The finite history-coordinate set is finite by [F20], so each atom of fixes a finite history. On a positive-mass atom ending at , the prefix product in [F9] shows that extending it by reward , state , and next action has conditional probability ; all other next-action extensions have conditional probability zero. Thus the conditional probability of given is on every positive-mass atom, which proves the required almost-sure conditional identity. Hence this process is admissible. By the product form of the finite-prefix probabilities, after the first transition its conditional continuation from has the stationary-policy prefix laws in [F10] for : the next action equals at its current state with probability one, so [F7] identifies its conditional expected discounted tail as . The expectation convergence proved for every admissible continuation in step 4.1 passes this prefix identity to the infinite return. Therefore by step 2.2. This admissible continuation attains the upper bound, so and the supremum is a finite maximum.
Since was arbitrary, the formula and finite attainment claim hold on all of .
Tabular Q-learning converges under per-pair Robbins–Monro steps and full visitation
Statement
Assume the Axiom of Choice. Let a finite MDP have nonempty state set , finite state-action set , finite reward alphabet , and discount . Put . On a discrete filtered probability space , let be deterministic. At time , the current pair is -measurable, the reward almost surely and next state are -measurable, and
almost surely for every and . Define . Suppose every is selected infinitely often almost surely and the deterministic per-pair step sizes satisfy
Apply the Q-learning update
leaving all other coordinates unchanged.
For each initial pair , define as the supremum of over all discrete filtered processes with initial pair almost surely, , , almost surely, current state-action pairs measurable at time , next states and rewards measurable at time , and the same conditional reward-transition law displayed above at every time. The rewards are bounded, so all these discounted returns are absolutely convergent and integrable.
Then converges almost surely in the finite-state sup norm to the unique function satisfying
This unique fixed point is the optimal action-value function.
The claim uses diminishing per-pair steps and full visitation; it gives no convergence guarantee for a constant step size.
Statement references
The Axiom of Choice assumed for conditional-expectation existence.
The finite joint reward-transition law and bounded reward alphabet.
The state-value Bellman optimality operator.
The state-value Bellman operator is a gamma contraction with a unique fixed point.
The finite action-value Bellman map targeted by Q-learning.
The sampled tabular Q-learning update.
The locally proved coordinate-wise stochastic-approximation result.
Tsitsiklis, Asynchronous Stochastic Approximation and Q-Learning.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
Facts & Assumptions
Given: The Axiom of Choice, a finite MDP, , the filtered interaction process and its conditional transition-reward law, the per-pair visit counts and step sizes, and the Q-learning update in the Statement.
The Axiom of Choice: every family of nonempty sets has a choice function; AC is inherited by conditional-expectation classes and martingale differences used below.
Finite Markov decision process with joint reward-transition law: for each admissible pair , and its finite sum over is ; and ; the expected reward is bounded in absolute value by .
Finite-MDP Bellman operators are gamma contractions with unique fixed points: has a unique fixed point when .
Tabular Q-learning: the visited action-value coordinate is updated toward .
Filtration and filtered probability space and Martingale difference sequence: the filtration is increasing, and a martingale difference is adapted, integrable, and has zero conditional mean given the preceding sigma-algebra.
Conditional expectation given a sigma algebra and Conditional expectation as an ae class: conditional-expectation versions satisfy event-integral identities; the class is unique almost surely and exists under the stated AC assumption.
Basic algebra and order properties of conditional expectation and Taking out what is known: conditional expectation is linear, expectation preserving, and order preserving (if almost surely then almost surely); bounded measurable factors can be taken outside.
Coordinate-wise stochastic approximation converges to a contraction fixed point: a bounded MDS-driven coordinate-wise recursion converges to its contraction fixed point under infinite visitation and per-coordinate Robbins–Monro steps.
The optimal action value is attained by a greedy stationary policy: for each initial state-action pair, the maximal expected discounted return over all adapted MDP continuations is attained by following a greedy stationary policy after the initial action and equals , where is the unique fixed point of .
Proof
Given: The hypotheses, definitions, and conventions in the Statement and [A1], [F1]–[F10].
Let be the unique fixed point of supplied by [F3], and define For each , the finite sum in [F1] gives . Thus [F2] and give . Substituting this identity into [F4] yields . For finite lists and , let ; then for every , so , and exchanging the lists gives . Therefore, for each , Taking the maximum over proves . Any other fixed point would then satisfy ; since , this forces . By [F10], this fixed point is the pointwise maximal expected discounted return from each initial state-action pair and is attained by a greedy stationary continuation, so it is the optimal action-value function in the Statement.
Put . Then . If , the sampled target lies in . The update is a convex combination of and because ; hence induction gives for every .
By induction from deterministic , the update and the observation measurability in the Statement make -measurable. Define . Expand as a finite sum over and using the indicators of . Since and are -measurable, the conditional transition-reward identity in the Statement, linearity, and taking out known factors [F7]–[F8] give . Thus is an -measurable martingale difference by [F6]. Step 1.2 bounds both and its conditional expectation by , so almost surely. Rewriting the update as shows that all hypotheses of [F9] hold for index set , map , fixed point from step 1.1, and contraction constant .
Applying [F9] gives almost surely in . This is the asserted convergence.
Finite-episode importance sampling has the target-policy mean under support
Statement
Assume the Axiom of Choice. Let a finite MDP with terminal set have , and let and be stationary target and behavior policies. Suppose implies for every nonterminal state and action , and episodes reach in finite time almost surely from every state under both policies. For any starting state , a behavior-generated episode has first terminal time and ratio
where the empty product for is . For every bounded measurable real function of the finite episode,
The identity therefore applies to every episode suffix starting at a state that can be reached by a finite behavior history. Fix an initial state . If is a positive-probability finite behavior history from that first visits at time and ends immediately upon observing , before the action is sampled (when is terminal, no action is sampled and the suffix is empty), let
be the suffix return. Then
Thus the ordinary first-visit importance-sampling return has mean conditional on each pre-action first-visit history.
Statement references
Facts & Assumptions
Given: AC, a finite MDP and discount, target and behavior policies, target support, almost-sure episode termination from every state under both policies, and the bounded measurable function in the Statement.
The Axiom of Choice: every family of nonempty sets has a choice function; AC is used for the policy path laws.
Finite Markov decision process with joint reward-transition law: conditional on a state-action pair, the same finite joint next-state/reward law is used under both policies.
A finite MDP policy generates action-state-reward trajectories: for every feasible finite state-action-reward trajectory, its probability under policy is the product of over its steps.
Episodic returns, temporal-difference errors, and policy support: is the product of action-probability ratios along the finite episode, and the support condition makes its denominators positive on behavior-observed paths.
Discounted returns and policy values in a finite MDP: under the absorbing zero-reward extension, the target return is the discounted path return and is bounded by .
Probability measures and probability spaces and Expectation of a nonnegative or integrable random variable: path probabilities are countably additive and expectations are Lebesgue integrals.
Monotone convergence for the integral: expectations of increasing nonnegative measurable functions converge to the expectation of their pointwise limit.
Proof
Given: The hypotheses and conventions in the Statement and [A1], [F1]–[F6].
Fix a finite terminal trajectory with and . By [F2], If , every transition-reward factor and every target action factor is positive. Target support then makes every corresponding behavior action factor positive, so . On each behavior-positive trajectory, canceling the shared transition-reward factors gives ; if its target probability is zero, the ratio is zero.
For each episode length , there are finitely many terminal trajectories because the state, action, and reward alphabets are finite. These terminal-path events are disjoint over all lengths and cover probability one under both policies by the termination hypothesis. Enumerate them by increasing length and, within each length, any finite enumeration. For any finite initial collection of these paths, step 1.1 gives As the collections increase to all terminal paths, [F6] passes both nonnegative sums to their expectations. Thus , so is integrable.
Apply the same finite-path identity separately to the nonnegative functions and ; step 2.1 makes both weighted expectations finite. Subtracting the two equalities by linearity of the integral gives . For , the target expectation is by [F4].
Let be one finite behavior history ending at a first visit to at time , with . For every finite terminal suffix starting at , the product formula [F2] factors the joint probability as . The suffix likelihood ratio contains only action factors from time onward, so step 1.1 gives the target-to-behavior ratio for that suffix. Since is the bounded discounted suffix return and target termination holds from , step 3.1 gives . Summing over suffixes therefore yields . Dividing by the positive proves the conditional first-visit assertion.
Tabular TD(0) policy prediction
Definition
Inputs: A finite MDP with nonempty state set , discount , terminal set , stationary policy , an initial-state rule specifying a distribution on at each episode boundary (a fixed distribution sampled independently for each episode is a special case), an episode budget , an initial table with on , and a step-size rule giving from the available history before the next reward and state are observed. Deterministic per-state sequences indexed by visit count are a special case. Assume the Axiom of Choice for the path laws defining , and that every episode used reaches almost surely from its start state.
Interpret successive draws on finite discrete transition-record spaces, including a restart record at each episode boundary. Conditional on the full available history and its current state , choose the action using and the next reward/state using ; the initial-state rule gives the restart kernel. Require all sampling and step-size rules to be measurable with respect to their available histories. The table and counts are computed from these records. Under the stated AC assumption, the history-dependent kernel construction supplies this law, with a fixed stop symbol after a finite budget.
Output: The value table after every transition update and after every completed episode. A finite budget returns the final table after those episodes; budget specifies the successive tables indefinitely, with no final output or convergence assertion.
Initialize and visit counts for . For each episode allowed by the budget, sample its start state using the initial-state rule. If it is terminal, end that episode without an update. Otherwise, at each current nonterminal state , sample from , obtain from the step-size rule, and then observe from the MDP's joint reward-transition law conditional on the available history and selected pair. For a visit-index schedule use . Form
where the continuation term is zero when . Update
Leave every other coordinate unchanged, increment , and output the updated table. If is terminal, end the episode; otherwise continue from . The next episode starts by applying the initial-state rule again, retaining the table and counts; stop after completed episodes when is finite. Thus the sampled transitions use the policy whose value is estimated. This is a one-step bootstrapped prediction procedure and makes no convergence claim.
Definition references
Under AC, successive history-dependent probability kernels give the sampling law.
The finite joint reward-transition law and stationary policies.
The discounted return and state value under a stationary policy.
The policy value is a fixed point of its Bellman operator.
The episodic return and state TD-error conventions.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
Tabular on-policy Sarsa control
Definition
Inputs: A finite MDP with nonempty finite state set , finite nonempty action sets, discount , terminal set , an initial-state rule specifying a distribution on at each episode boundary (independent draws from a fixed are a special case), an episode budget , an initial table , a step-size rule giving from available history before the next reward and state are observed (deterministic per-pair visit-index schedules are a special case), and an action-selection rule that uses the current table and available history to supply a distribution on the legal actions of the current state. Assume the Axiom of Choice for the policy path laws, that the sampling rules are measurable functions of the information available when used, and that the episodes generated by the actual rule, including within-episode changes, reach almost surely from their start states.
Interpret successive draws on finite discrete transition-record spaces, including a restart record at each episode boundary. Conditional on the full available history and its current state , choose the action using the distribution supplied by at the current history and the next reward/state using ; the initial-state rule gives the restart kernel. Require all sampling and step-size rules to be measurable with respect to their available histories. The table and counts are computed from these records. Under the stated AC assumption, the history-dependent kernel construction supplies this law, with a fixed stop symbol after a finite budget.
Output: The action-value table after every transition update and after every completed episode. A finite budget returns the final table after those episodes; budget specifies the successive tables indefinitely and has no final output or convergence assertion.
Initialize and visit counts for all . For each episode allowed by the budget, sample its start state using the initial-state rule. If it is terminal, end the episode without an update. Otherwise sample the initial action using with the current table and history. At each current nonterminal pair , obtain from the step-size rule before observing from the MDP's conditional joint reward-transition law. For a visit-index schedule use . If , apply to the still pre-update table and the available history through the new state, sample from that action distribution, and set
If , instead set and take no terminal action. Update only the current pair:
leaving every other coordinate unchanged. Increment and output the updated table. If the next state is terminal, end the episode; otherwise set and continue. Retain the sampled as the action actually executed next; do not resample it after updating the table. At the following transition, the next application of may use the updated table and history. A policy frozen for an episode is permitted as a special case. Stop after completed episodes when is finite. The sampled next action, rather than a maximum over actions, is part of the target and is also used by the behavior process, so Sarsa is on-policy. The procedure makes no convergence claim.
Definition references
Under AC, successive history-dependent probability kernels give the sampling law.
The finite state-dependent action sets and joint reward-transition law.
The discounted return and policy value.
The Sarsa TD-error and terminal-continuation conventions.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
First-visit Monte Carlo policy evaluation
Definition
Inputs: A finite MDP with nonempty finite state set , discount , terminal set , an initial-state rule, and an episode budget . Assume the Axiom of Choice for the policy path laws defining and the episode distributions, and that episodes reach in finite time almost surely from every state under each stationary policy used: the target , and also the behavior in off-policy mode. Choose one mode: (a) on-policy prediction with independent episodes under a stationary target policy ; or (b) off-policy prediction with independent episodes under a stationary behavior policy and stationary target policy . In off-policy mode require for every nonterminal state and action .
Output: After every finite number of completed episodes, for every nonterminal state its visit count and each available estimate; report no estimate when its required denominator is zero. A finite budget returns these outputs after episode ; budget emits successive finite-prefix outputs without a final output or convergence assertion. Set the value estimate of every terminal state to .
Initialize visit counts and leave each nonterminal state's estimate unavailable. Generate successive independent episodes using the selected mode and initial-state rule; stop after episodes when is finite. In episode , for each nonterminal state visited before termination, let be its first visit time and let be the return from that visit.
In on-policy mode, update only on this first visit: set ; if , set , and otherwise set
Then set . In off-policy mode, for each first visit compute
where is the terminal time and an empty product is . Maintain and initially; add to and to , and increment . After any completed episodes, the ordinary first-visit estimator is
when ; otherwise no ordinary estimate is produced. The weighted first-visit estimator is
when ; otherwise no weighted estimate is produced. Under target support, for each positive-probability behavior history ending immediately upon a first visit to a nonterminal state , before its action is sampled, the ordinary weighted return has conditional mean by the finite-episode likelihood-ratio identity. The self-normalized weighted estimator need not be unbiased at a finite sample size. These procedures make no convergence claim or Monte Carlo control claim.
Definition references
The finite MDP and stationary policies.
Discounted returns and state values.
Finite episodes, first-visit returns, support, and trajectory ratios.
The ordinary importance-sampling return has target-policy conditional mean under support.
Sutton and Barto, Reinforcement Learning: An Introduction.
Yang, Optimal Control and Reinforcement Learning, Chapter 2.
4 · Examples, counterexamples and false statements
None yet.
Sources
- John N. Tsitsiklis, Asynchronous Stochastic Approximation and Q-Learning
- Richard S. Sutton and Andrew G. Barto, Reinforcement Learning: An Introduction, 2nd ed.
- Han-Dong Yang, Optimal Control and Reinforcement Learning, Chapter 2: Value-based Reinforcement Learning
- Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra, Planning and Acting in Partially Observable Stochastic Domains, Brown Technical Report CS-96-08
- Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra, Planning and Acting in Partially Observable Stochastic Domains, Brown CS-96-08