Optimal Single-Policy Sample Complexity and Transient Coverage for Average-Reward Offline RL
Extracted source text · arXiv 2506.20904
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{margin=1in}
%\usepackage[authoryear]{natbib}
\usepackage{natbib}
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=true,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true]{hyperref}
\hypersetup{citecolor=blue}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{appendix}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}
\usepackage{mathrsfs}
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}[section]
\theoremstyle{plain}
\newtheorem{lem}[thm]{\protect\lemmaname}
\theoremstyle{remark}
\newtheorem{rem}[thm]{\protect\remarkname}
\theoremstyle{plain}
\newtheorem{cor}[thm]{\protect\corollaryname}
\theoremstyle{plain}
\newtheorem{conjecture}[thm]{\protect\conjecturename}
\theoremstyle{definition}
\newtheorem{defn}[thm]{\protect\definitionname}
\theoremstyle{plain}
\newtheorem{prop}[thm]{\protect\propositionname}
\providecommand{\corollaryname}{Corollary}
\providecommand{\lemmaname}{Lemma}
\providecommand{\remarkname}{Remark}
\providecommand{\theoremname}{Theorem}
\providecommand{\conjecturename}{Conjecture}
\providecommand{\definitionname}{Definition}
\providecommand{\propositionname}{Proposition}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{float}
\newcommand{\Span}{\text{span}}
\newcommand{\argmin}{\text{argmin}}
\newcommand{\argmax}{\text{argmax}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\renewcommand{\P}{\mathbb{P}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Var}{\mathbb{V}}
\newcommand{\Varhat}{\widehat{\mathbb{V}}}
\newcommand{\act}{\mathcal{A}}
\newcommand{\br}{\textsc{br}}
\newcommand{\Phat}{\widehat{P}}
\newcommand{\Vhat}{\widehat{V}}
\newcommand{\Qhat}{\widehat{Q}}
\newcommand{\Qstar}{Q^\star}
\newcommand{\Vstar}{V^\star}
\newcommand{\pistar}{\pi^\star}
\newcommand{\pihstar}{\widehat{\pi}^\star}
\newcommand{\stat}{\mathcal{S}}
\newcommand{\dataset}{\mathcal{D}}
\newcommand{\one}{\mathbf{1}}
\newcommand{\zero}{\mathbf{0}}
\newcommand{\Vmax}{V_{\mathrm{max}}}
\newcommand{\pert}{\mathrm{p}}
\newcommand{\rpert}{\widetilde{r}}
\newcommand{\Rpert}{\widetilde{R}}
\newcommand{\ind}{\mathbb{I}}
\newcommand{\pihat}{\widehat{\pi}}
\newcommand{\Vhatstar}{\widehat{V}^\star}
\newcommand{\Qhatstar}{\widehat{Q}^\star}
\newcommand{\Vc}{\overline{V}}
\newcommand{\Thpe}{\widehat{\mathcal{T}}_{\mathrm{pe}}}
%\newcommand{\Ttpe}{\widetilde{\mathcal{T}}_{\mathrm{pe}}}
%\newcommand{\Mopm}{\widetilde{\mathcal{T}}_{\mathrm{pe}}}
\newcommand{\Tope}{\overline{\mathcal{T}}_{\mathrm{pe}}}
\newcommand{\Mopm}{\widetilde{\mathcal{T}}}
\newcommand{\Mopsp}{\widetilde{\mathcal{T}}_{1}}
\newcommand{\Mopvar}{\widetilde{\mathcal{T}}_{2}}
\newcommand{\Qhpe}{\widehat{Q}_{\mathrm{pe}}}
\newcommand{\Vhpe}{\widehat{V}_{\mathrm{pe}}}
\newcommand{\clip}{\mathrm{clip}}
\newcommand{\Ucover}{\mathcal{U}_{\mathrm{cover}}}
\newcommand{\rhohat}{\widehat{\rho}}
\newcommand{\hhat}{\widehat{h}}
\newcommand{\A}{\mathcal{A}}
\renewcommand{\S}{\mathcal{S}}
\newcommand{\gammared}{{\overline{\gamma}}}
\newcommand{\Otilde}{\widetilde{O}}
\newcommand{\Ttilde}{\widetilde{\Theta}}
\newcommand{\Omtilde}{\widetilde{\Omega}}
\newcommand{\tmix}{\tau_{\mathrm{unif}}}
\newcommand{\trel}{\tau_{\mathrm{rel}}}
\newcommand{\tstar}{\tau^\star}
\DeclareMathOperator*{\Clim}{\text{C-lim}}
\newcommand{\Tb}{\mathsf{B}}
%\newcommand{\Pt}{\widetilde{P}}
\newcommand{\Lt}{\widetilde{L}}
\newcommand{\htilde}{\widetilde{h}}
\newcommand{\rhot}{\widetilde{\rho}}
\newcommand{\Cclip}{C^\star_{\mathrm{clipped}}}
\newcommand{\trunc}{\overline{\tau}}
\renewcommand{\algorithmicrequire}{\textbf{input:}}
\global\long\def\EE#1{\mathbb{E}\left[ #1\right]}%
\global\long\def\twonorm#1{\left\Vert #1\right\Vert _{2}}%
\global\long\def\fronorm#1{\left\Vert #1\right\Vert _{\textrm{F}}}%
\global\long\def\opnorm#1{\left\Vert #1\right\Vert _{\textnormal{op}}}%
\global\long\def\infnorm#1{\left\Vert #1\right\Vert _{\infty}}%
\global\long\def\infinfnorm#1{\left\Vert #1\right\Vert _{\infty \to \infty}}%
\global\long\def\onenorm#1{\left\Vert #1\right\Vert _{1}}%
\global\long\def\nucnorm#1{\left\Vert #1\right\Vert _{\textnormal{nuc}}}%
\global\long\def\spannorm#1{\left\Vert #1\right\Vert _{\textnormal{span}}}%
\global\long\def\suppspannorm#1{\left\Vert #1\right\Vert _{\textnormal{span}(P_{\pistar}^\infty)}}%
\global\long\def\suppinfnorm#1{\left\Vert #1\right\Vert _{\ell^\infty(P_{\pistar}^\infty)}}%
%\newcommand{\supp}[1]{\textnormal{supp}\left( #1 \right)}
\newcommand{\supp}[1]{\textnormal{supp}( #1 )}
\global\long\def\tvnorm#1{\left\Vert #1\right\Vert _{\textnormal{TV}}}%
\newcommand{\dg}{d_{G}}
\newcommand{\odg}{\overline{d}_G}
\newcommand{\tmixg}{t_{\mathrm{G}}}
\newcommand{\PiMR}{\Pi^{\textnormal{MR}}}
\newcommand{\gammahat}{\widehat{\gamma}}
\newcommand{\gest}{\widehat{\gamma}^\star}
\newcommand{\gopt}{\widetilde{\gamma}^\star}
\newcommand{\T}{\mathcal{T}}
\newcommand{\Ts}{\overline{\mathcal{T}}}
\newcommand{\rt}{\widetilde{r}}
%\newcommand{\Dow}{D_{\mathrm{ow}}}
\newcommand{\Dow}{T_{\mathrm{hit}}}
\newcommand{\bt}{\tilde{b}}
\newcommand{\btp}{\tilde{b}'}
\newcommand{\maxiter}{K}
\newcommand{\Lhat}{\widehat{\mathcal{L}}}
\newcommand{\ntot}{n_{\mathrm{tot}}}
\newcommand{\tmixsingle}{\tau}
\newcommand{\unifspan}{H_{\mathrm{unif}}}
\newcommand{\St}{\tilde{S}}
\newcommand{\term}{q}
\newcommand{\raux}{\overline{r}}
%\newcommand{\Maux}{\overline{\mathcal{M}}}
\newcommand{\Maux}{\mathcal{M}'}
\newcommand{\Mor}{\mathcal{M}}
\newcommand{\Mhat}{\widehat{\mathcal{M}}}
%\newcommand{\Mt}{\widetilde{\mathcal{M}}}
\newcommand{\Mt}{\widehat{\mathcal{M}}'}
\newcommand{\Pt}{\widehat{P}'}
\newcommand{\gammap}{\overline{\gamma}}
\newcommand{\nt}{\tilde{n}}
\global\long\def\tspannorm#1{\Vert #1\Vert _{\textnormal{span}}}%
\global\long\def\tinfnorm#1{\Vert #1\Vert _{\infty}}%
\global\long\def\tonenorm#1{\Vert #1\Vert _{1}}%
\usepackage{enumitem}
% For comments and todos
\usepackage{todonotes} %this imports tikz and we get weird errors when we don't use it and instead do \usepackage{tikz} for some reason
%\usepackage[showdeletions]{color-edits}
%\usepackage[suppress]{color-edits}
%\addauthor[Matthew]{mz}{red}
%\addauthor[Matthew]{mzalt}{purple}
%\addauthor[Yudong]{yc}{ForestGreen}
%\addauthor[Guy]{gz}{blue}
% This provides the following commands:
% \mzedit{text}
% \mzreplace{old-text}{new-text}
% \mzcomment{comment}
% \mzmargincomment{comment}
% \mzdelete{deleted-text}
% \mzdeletecomment{comment}{deleted-text}
%\usepackage{tikz}
\usetikzlibrary{backgrounds}
\title{Optimal Single-Policy Sample Complexity and Transient Coverage for Average-Reward Offline RL}
% The \author macro works with any number of authors. There are two commands
% used to separate the names and addresses of multiple authors: \And and \AND.
%
% Using \And between authors leaves it to LaTeX to determine where to break the
% lines. Using \AND forces a line break at that point. So, if LaTeX puts 3 of 4
% authors names on the first line, and the last on the second line, try using
% \AND instead of \And before the third author name.
\usepackage{authblk}
\author{Matthew Zurek}
\author{Guy Zamir}
\author{Yudong Chen}
\affil{Department of Computer Sciences, University of Wisconsin-Madison\\\vspace{0.8em}
\texttt{matthew.zurek@wisc.edu}\quad\texttt{gzamir@wisc.edu}\quad\texttt{yudongchen@cs.wisc.edu}}
\date{}
\begin{document}
\maketitle
\begin{abstract}
We study offline reinforcement learning in average-reward MDPs, which presents increased challenges from the perspectives of distribution shift and non-uniform coverage, and has been relatively underexamined from a theoretical perspective.
While previous work obtains performance guarantees under single-policy data coverage assumptions, such guarantees utilize additional complexity measures which are uniform over all policies, such as the uniform mixing time. We develop sharp guarantees depending only on the target policy, specifically the bias span and a novel policy hitting radius, yielding the first fully single-policy sample complexity bound for average-reward offline RL.
We are also the first to handle general weakly communicating MDPs, contrasting restrictive structural assumptions made in prior work.
To achieve this, we introduce an algorithm based on pessimistic discounted value iteration enhanced by a novel quantile clipping technique, which enables the use of a sharper empirical-span-based penalty function. Our algorithm also does not require any prior parameter knowledge for its implementation.
Remarkably, we show via hard examples that learning under our conditions requires coverage assumptions beyond the stationary distribution of the target policy, distinguishing single-policy complexity measures from previously examined cases. We also develop lower bounds nearly matching our main result.
\end{abstract}
% We study offline reinforcement learning in average-reward MDPs, which presents increased challenges from the perspectives of distribution shift and non-uniform coverage, and has been relatively underexamined from a theoretical perspective. While previous work obtains performance guarantees under single-policy data coverage assumptions, such guarantees utilize additional complexity measures which are uniform over all policies, such as the uniform mixing time. We develop sharp guarantees depending only on the target policy, specifically the bias span and a novel policy hitting radius, yielding the first fully single-policy sample complexity bound for average-reward offline RL. We are also the first to handle general weakly communicating MDPs, contrasting restrictive structural assumptions made in prior work. To achieve this, we introduce an algorithm based on pessimistic discounted value iteration enhanced by a novel quantile clipping technique, which enables the use of a sharper empirical-span-based penalty function. Our algorithm also does not require any prior parameter knowledge for its implementation. Remarkably, we show via hard examples that learning under our conditions requires coverage assumptions beyond the stationary distribution of the target policy, distinguishing single-policy complexity measures from previously examined cases. We also develop lower bounds nearly matching our main result.
\section{Introduction}
Reinforcement learning (RL) has achieved impressive results for many control problems where it is possible to collect large amounts of experience through online interaction with the environment. However, many real-world application areas where we would like to apply RL methods, such as robotics, education, or healthcare, there may not exist simulators and data collection can be expensive or dangerous. Offline RL is a subfield of RL which seeks to address these issues by learning from historical data without online interaction, and hence achieving the maximum possible statistical efficiency is the paramount concern. The lack of online experience collection poses many related challenges to offline RL methods. One issue, often termed \textit{distribution shift}, is that improving a policy's performance will inherently change the distribution of states and actions it experiences, potentially moving it away from the distribution of the historical dataset.
Another closely related issue, sometimes referred to as \textit{non-uniform coverage}, is that our dataset may generally be unevenly concentrated so that it is impossible to estimate the performance of all policies to uniform accuracy, and instead we must balance exploitation with varying degrees of confidence.
Recent research has made significant progress on the theoretical limits of offline RL by addressing these issues. However, many of these advances have been confined to the finite horizon setting, or the discounted infinite horizon setting, which can also behave like a finite horizon due to the irrelevance of distant future rewards.
In this paper we focus on the challenging average-reward setting where the goal is to maximize the long-term average of rewards, which has been underexplored from a theoretical perspective.
We briefly argue that the two aforementioned difficulties are amplified in the average-reward setting, and have not been satisfactorily addressed by previous work.
First, since the average-reward objective captures performance in the long-horizon limit, we must contend with distribution shifts that occur after arbitrarily long time scales.
Secondly, the issue of non-uniform coverage is magnified because while the (effective) horizon can serve as an extrinsic upper bound on the complexity of a particular policy, in the average-reward setting different policies can have arbitrarily different intrinsic complexities (as measured by parameters such as the span of the policy's relative value function).
Existing work has developed algorithms which succeed under single-policy data coverage assumptions/concentrability coefficients, but has only done so when also
using parameters that upper bound the complexity of all policies.
Such large uniform-policy complexity measures can lead to vacuous bounds and overall fail to fully address both of the above issues.
Additionally, algorithms from prior work fail to obtain optimal statistical efficiency and require foreknowledge of unlearnable parameters (such as coverage coefficients or environmental complexity parameters) for their implementation.
% Similarly to how structural properties like irreducibility and periodicity determine the long-run behavior of Markov chains, topological aspects play a larger role in average-reward RL than for other RL objectives.
\subsection{Our contributions}
We address all of these challenges, developing an algorithm for (single-policy coverage) offline average-reward RL which is the first to handle the weakly communicating setting where not all policies have constant gains, as well as the first to obtain a convergence rate dependent on the bias span of only the target policy (as opposed to uniform complexity measures).
Informally, our main theorem provides a high-probability guarantee on the suboptimality of the output policy $\pihat$ of the form
\begin{align}
\infnorm{\rho^\star - \rho^{\pihat}} \leq \Otilde\bigg( \sqrt{\frac{S \tspannorm{h^{\pistar}}}{m}} \,\, \bigg), \label{eq:informal_main_thm}
\end{align}
where $\tspannorm{h^{\pistar}}$ is the bias-span of the target policy $\pistar$ and $S$ is the number of states. This holds whenever the sample size $n(s,a)$ per state-action pair $(s,a)$ satisfies $n(s, \pistar(s)) \geq m \mu^{\pistar}(s) + \Otilde\big(\Dow(P, \pistar)^2\big)$ for all states $s$. Here $\mu^{\pistar}$ is the stationary distribution of the target policy, $m$ is the ``effective dataset size,'' and $\Dow(P, \pistar)$ is a novel \textit{policy hitting radius} that measures the time for $\pistar$ to reach a particular state in the support of its stationary distribution, and is thus also a single-policy complexity measure.
Interestingly, this condition requires data even for state-action pairs $(s,\pistar(s))$ for which $s$ is transient ($\mu^{\pistar}(s) = 0$) under the target policy, and we show via a hard example that this requirement is nearly unimprovable. In particular, this implies two surprising findings: i) with a fully ``single-policy'' sample complexity, learning a near-optimal policy is impossible under coverage conditions with respect to only the stationary distribution of the target policy, even with arbitrarily large amounts of data; ii) on the other hand, only a bounded amount of data from the transient state-action pairs of the target policy is sufficient to achieve vanishing suboptimality. We also show another lower bound which implies the optimality of the guarantee~\eqref{eq:informal_main_thm} in terms of its dependence on $m$, making our result the first among offline average-reward RL approaches to achieve an optimal rate for large $m$.
Our algorithm is based upon a pessimistic discounted value iteration procedure, involving a very large and prior-knowledge-free choice of discount factor. Most notably we develop a \textit{quantile clipping} technique which enables the use of a sharper empirical-span-based penalty function.
\subsection{Related work}
First we discuss prior work on average-reward offline RL. To the best of our knowledge the only works with explicit results for this setting are \cite{ozdaglar_offline_2024} and \cite{gabbianelli_offline_2023}. \cite{ozdaglar_offline_2024} assume that the MDP is unichain, and obtain guarantees with a constrained linear programming (LP) algorithm in terms of the uniform mixing time $\tmix$ (defined in Section \ref{sec:setup}), for both general function approximation and tabular settings.
We also discuss quantitative comparisons to the tabular results from \cite{ozdaglar_offline_2024} after presenting our main theorem.
\cite{gabbianelli_offline_2023} assume that all policies in the MDP have constant (state-independent) gain, which is more general than unichain MDPs but does not hold in weakly communicating MDPs. \cite{gabbianelli_offline_2023} consider the linear MDP setting, develop an algorithm based on primal-dual methods for solving LPs, and obtain guarantees in terms of a uniform bound on the span of all policies $\unifspan$. The algorithms in both of these works require knowledge of certain concentrability coefficients.
Next we briefly discuss related work for offline RL outside of the average-reward setting (and refer to the references therein for more extensive background).
Our algorithm is essentially a careful refinement of the pessimistic value iteration approach of \cite{li_settling_2023} for the discounted tabular setting, which in turn is a refinement of \cite{rashidinejad_bridging_2022}. Many recent works (e.g., \cite{liu_provably_2020, jin_is_2021, xie_bellman-consistent_2021, uehara_pessimistic_2021, yin2021towards, rashidinejad_bridging_2022, shi_pessimistic_2022, yan_efficacy_2023}) have demonstrated the ability for pessimistic approaches to address the distribution shift/non-uniform coverage challenges of offline RL and achieve near-optimal performance under single-policy concentrability assumptions, including sharp instance-dependent bounds \citep{yin2021towards, yin_nearoptimal_2022} for policy learning in finite-horizon settings. These improve upon uniform coverage requirements made in prior work (e.g., \cite{munos_performance_2007, farahmand_error_2010, chen_informationtheoretic_2019}).
Finally we discuss prior work on average-reward RL under uniform coverage assumptions.
Many papers on average-reward RL considering the tabular generative model setting \citep{kearns_finite-sample_1998} actually only require a dataset with an equal number of samples from all state-action pairs (e.g., \cite{wang_near_2022, wang_optimal_2023, zurek_plug-approach_2025, zurek_span-agnostic_2025, zurek_span-based_2025}), and hence we believe such papers could be easily extended to the uniform coverage setting, obtaining a guarantee dependent on the smallest number of samples for any state-action pair.
While such works could thus certainly be considered as studying offline RL, in this paper we generally mean offline RL to describe guarantees involving only single-policy coverage assumptions. Achieving instance-dependent guarantees in terms of the bias span of an optimal policy (e.g., \cite{zhang_sharper_2023, wang_near_2022, zurek_span-based_2025}) and removing the need for prior knowledge of complexity parameters (e.g., \cite{jin_feasible_2024, neu_dealing_2024, tuynman_finding_2024, zurek_span-agnostic_2025}) have been the objectives of extensive research in the uniform coverage setting.
\section{Background and problem setup}
\label{sec:setup}
\subsection{Background}
A Markov decision process (MDP) is a tuple $(\S, \A, P, r)$ where $\S$ and $\A$ respectively denote the finite state and action spaces, $P : \S \times \A \to \Delta(\S)$ is the transition kernel (with $\Delta(\S)$ denoting the probability simplex on $\S$), and $r : [0,1]^{\S \times \A}$ is the reward function. We let $S = |\S|$ and $A = |\A|$. We generally omit the explicit reference to $\S$ and $\A$ when defining MDPs. A (Markovian/stationary) policy is a mapping $\pi : \S \to \Delta(\A)$. We call a policy deterministic if for all $s\in \S$, $\pi(s)$ only places probability mass on one action, and in this case we also treat $\pi$ as a mapping $\S \to \A$. Let $\Pi$ denote the set of all stationary deterministic policies. An initial state $s_0 \in \S$ and policy $\pi$ induce a distribution over trajectories $(s_0, A_0, S_1, A_1, \dots)$ where $A_t \sim \pi(S_t), S_{t+1} \sim P(\cdot \mid S_t, A_t)$, and we let $\E^\pi_{s_0}$ denote the expectation with respect to this distribution.
We often treat $P$ as an $(\S \times \A)$-by-$\S$ matrix where $P_{sa, s'} = P(s' \mid s,a)$, and let $P_{sa}$ denote the $sa$-th row of this matrix (treated as a ``row vector'', so $P_{sa}X = \sum_{s'}P_{sa}(s') X(s')$ for $X \in \R^\S$).
For $X \in \R^\S$ and $s\in \S,a\in \A$, define the next-state value variance $\Var_{P_{sa}}\left[ X \right] = \sum_{s' \in \S} P(s'\mid s,a) X(s')^2 - (\sum_{s' \in \S} P(s'\mid s,a) X(s'))^2$.
A discounted MDP is a tuple $(\S, \A, P, r, \gamma)$ where $\gamma \in [0,1)$ is the discount factor. For a policy $\pi$, the discounted value function $V_\gamma^\pi \in [0, \frac{1}{1-\gamma}]^\S$ is defined $V_\gamma^\pi(s) = \E^{\pi}_{s} [\sum_{t=0}^\infty \gamma^t R_t]$ where $R_t = r(S_t, A_t)$, and the gain $\rho^\pi \in [0,1]^\S$, is $\rho^\pi(s) = \Clim_{t \to \infty} \E^\pi_s[R_t] = \lim_{T \to \infty} \frac{1}{T}\E^\pi_s[\sum_{t=0}^{T-1} R_t]$ where $\Clim$ is the Cesaro limit. We define the optimal gain $\rho^\star = \sup_{\pi \in \Pi} \rho^\pi$, and we say a policy $\pi$ is gain-optimal if $\rho^\pi = \rho^\star$. A gain-optimal policy always exists \citep{puterman_markov_1994}.
The bias function of a policy $\pi$, $h^\pi \in \R^{\S}$, is $h^\pi(s) = \Clim_{T \to \infty} \E_s^\pi [\sum_{t=0}^{T-1} (R_t - \rho^\pi(S_t))]$.
$M : \R^{\S \times \A} \to \R^\S$ denotes the action maximization operator where $M(Q)(s) = \max_{a \in \A } Q(s,a)$, and $M^\pi$ denotes the policy matrix where $M^\pi(Q)(s) = \sum_{a\in \A}\pi(s)(a) Q(s,a)$, for any $Q \in \R^{\S \times \A}$, $s \in \S$, and policy $\pi$. We often drop the parenthesis and write $MQ := M(Q)$. For any $Q \in \R^{\S\times \A}$, the discounted (action-value) Bellman operator $\T : \R^{\S \times \A} \to \R^{\S \times \A}$ is $\T(Q) := r + \gamma PM(Q)$, and the policy-evaluation Bellman operator $\T^\pi$ is $\T^{\pi}(Q):= r + \gamma P M^\pi Q$, for any policy $\pi$.
Let $\N = \{1, 2, \dots\}$ denote the set of natural numbers. Define $\zero, \one$ as the all-zero and all-one vectors, respectively. For $X \in \R^\S$, let $\tspannorm{X} = \max_{s \in \S}X(s) - \min_{s \in \S}X(s)$ denote the span semi-norm. We use $\Otilde(\cdot), \Ttilde(\cdot), \Omtilde(\cdot)$ notation to ignore constants as well as logarithmic factors in $S, A, \frac{1}{1-\gamma}$, $\frac{1}{\delta}$, and $\ntot$, where $\delta$ and $\ntot$ are the failure probability and the total dataset size, to be defined below. Let $e_s \in \R^\S$ denote the vector which is all zero except for a $1$ in entry $s \in \S$. For two vectors $v, v' \in \R^d$, $v \geq v'$ denotes the elementwise inequality $v(i) \geq v'(i)$ for all $i$.
Under the transition kernel $P$, a policy $\pi$ induces a Markov chain over state $\S$, whose transition matrix is denoted by $P_\pi$. The policy $\pi$ is said to be unichain if it induces a unichain Markov chain, meaning that the chain consists of a single (irreducible) recurrent class plus a possibly empty set of transient states. An MDP is unichain if all deterministic policies in the MDP are unichain. An MDP is communicating (aka strongly connected) if for any pair of states $s, s'\in \S$, $s'$ is accessible from $s$, meaning there exists some policy $\pi$ and some $k \in \N$ such that $\E_{s}^\pi \ind(S_k = s') > 0$. An MDP is weakly communicating if it consists of a set of states $\S_c$ such that, for any $s, s' \in \S_c$, $s'$ is accessible from $s$, plus a set of states $\S_t = \S \setminus \S_c$ which are transient under all policies. All unichain and communicating MDPs are weakly communicating.
A unichain policy $\pi$ has constant (state-independent) $\rho^\pi$, and thus in unichain MDPs, all policies have constant gains. In weakly communicating MDPs, the optimal gain $\rho^\star$ is constant, but sub-optimal policies $\pi$ may have non-constant $\rho^\pi$.
For any unichain policy $\pi$, we write its (unique) stationary distribution as $\mu^{\pi} \in \R^\S$ (which we treat as a ``row vector'').
For any unichain policy $\pi$, we define its mixing time $\tmixsingle(\pi) = \inf \{t \geq 0 : \onenorm{e_s^\top P_{\pi}^t - \mu^{\pi}} \leq \frac{1}{2} \}$. Define the uniform mixing time as $\tmix = \sup_{\pi \in \Pi} \tmixsingle(\pi)$. Also define the uniform span bound $\unifspan = \sup_{\pi \in \Pi} \tspannorm{h^\pi}$.
For any $s \in \S$, let $\eta_{s} := \inf\{t \geq 0 : S_t = s\}$ be the first hitting time of state $s$. Define the diameter $D = \max_{s, s' \in \S} \min_{\pi \in \Pi} \E_s^{\pi}[\eta_{s'}]$, and we sometimes write $D_P$ to emphasize the dependence on $P$.
\subsection{Offline RL setting}
We assume a sample size function $n : \S \times \A \to \N$ is fixed a priori, and for each $s \in \S, a \in \A$, we assume that we have $n(s,a)$ samples $S^{1}_{s,a}, \dots, S^{n(s,a)}_{s,a}$ sampled independently from the next-state transition distribution $P(\cdot \mid s,a)$. We define the dataset $\dataset = \left( (s,a,S_{s,a}^{i})\right)_{s\in\S,a\in\A,1 \leq i \leq n(s,a)}$ and let $\ntot = \sum_{s\in \S, a\in\A}n(s,a)$ denote the total dataset size.
We assume the reward function $r$ is known.
We introduce a new quantity which plays a key role in both our main theorem and our lower bounds.
For any transition kernel matrix $P$ and policy $\pi$, we define the \textit{policy hitting radius}
\begin{align}
\Dow(P, \pi) := \inf_{s^\star \in \S} \sup_{s_0 \in \S} \E_{s_0}^\pi [\eta_{s^\star}],
\end{align}
where again $\eta_s$ is the first hitting time of state $s$. In words, $\Dow(P, \pi)$ measures the largest expected amount of time required to hit the ``center'' state $s^\star$, for the optimal choice of $s^\star$ (which will always be a recurrent state). As shown in Lemma \ref{lem:Dow_finite_unichain}, $\Dow(P, \pi)$ is always finite if $P_\pi$ is unichain. We also always have that $\tspannorm{h^\pi} \leq 4\Dow(P, \pi)$ for any $\pi$ (Lemma \ref{lem:dow_span_bound}). There is generally no relationship between $\Dow(P, \pi)$ and $\tmixsingle(\pi)$; see the discussion in Appendix \ref{sec:tmix_dow_reln}.
\section{Main results}
\label{sec:main_results}
%In this section, we present our main results.
\subsection{Algorithm}
\begin{algorithm}[h]
\caption{Pessimistic Value Iteration With Quantile Clipping} \label{alg:LCBVI}
\begin{algorithmic}[1]
\Require Dataset $\dataset$, reward function $r$, discount factor $\gamma\in(0,1)$, failure probability $\delta\in(0,1)$
\State Form empirical transition matrix $\Phat$ used in $\Thpe$ from $\dataset$
\State Let $\Qhat_0 = \zero$ and $\maxiter = \Big\lceil \frac{\log ( \frac{2\ntot}{1-\gamma} )}{1-\gamma} \Big \rceil$ \algorithmiccomment{initialization and number of iterations}
%\State Let $\Qhat_0 = \zero$
\For{$t = 1, \dots, \maxiter$}
\State Let $\Qhat_t = \Thpe(\Qhat_{t-1})$
\EndFor
\State Let $\Qhat = \Qhat_{\maxiter}$ and for each $s \in \S$, let $\pihat(s) \in \argmax_{a \in \A} \Qhat(s,a)$
%\State For each $s \in \S$, let $\pihat(s) \in \argmax_{a \in \A} \Qhat(s,a)$
\State \Return $\pihat, \Qhat$
\end{algorithmic}
\end{algorithm}
First we describe the algorithm used to obtain our main result. We employ a discounted reduction approach, i.e., approximating the average-reward MDP by a discounted MDP with an appropriate choice of discount factor. The main component of our approach, Algorithm \ref{alg:LCBVI}, is a pessimistic value iteration subroutine which can be understood as solving a discounted MDP.
%used to have algorithm here
Now we define the pessimistic Bellman operator $\Thpe : \R^{\S \times \A} \to \R^{\S \times \A}$ used in Algorithm \ref{alg:LCBVI}. $\Thpe$ is a function of $\gamma$ as well as the dataset $\dataset$, utilizing the empirical transition matrix $\Phat$ where $\Phat(s' \mid s, a) = \frac{1}{n(s,a)}\sum_{i=1}^{n(s,a)} \ind(S^i_{sa} = s')$. If $n(s,a)=0$ for some $s,a$ then for concreteness we define $\Phat(s' \mid s, a) = 1/S$, although any default probability distribution over $\S$ would be fine, since our construction of $\Thpe$ does not depend on rows $\Phat_{sa}$ such that $n(s,a)=0$.\footnote{If $n(s,a)=0$ then $\beta(s,a)= \alpha > 1$ and $T_{\beta(s,a)}( \Phat_{sa}, MQ) = (\min_{s'} (MQ)(s'))\one$, causing the $\max$ in~\eqref{eq:defn_of_Thpe} to equal $\min_{s'} (MQ)(s')$.}
For any $Q \in \R^{\S \times \A}$ and any $s \in \S, a \in \A$, we define
\begin{align}
\Thpe (Q)(s,a) &:= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, MQ) - b(s,a, MQ), \min_{s'}(MQ)(s') \right \} .\label{eq:defn_of_Thpe}
\end{align}
Here $MQ \in \R^\S$ takes the maximum over actions of the Q-function $Q$ (and thus should be understood as the corresponding value function). The term $b(s,a,MQ)\geq 0$ is a certain Bernstein-style penalty, which is chosen below to ensure that $\Thpe (Q)$ lower-bounds the true (unknown) Bellman operator $\T(Q)$ for any $Q$. The expression $\Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, MQ)$ denotes the inner product of the probability distribution $\Phat_{sa}$ with the vector $T_{\beta(s,a)}( \Phat_{sa}, MQ) \in \R^\S$, which is a ``quantile-clipped'' version of $MQ$ to be defined momentarily. For $\beta \in [0,1]$, the quantile clipping operator $T_\beta: \R^\S \times \R^\S \to \R^S$ is defined as follows: for any $V\in \R^\S$, $s \in \S$, and probability distribution $\mu \in \R^\S$, let
\begin{align}
T_\beta(\mu, V)(s) = \min\Bigg\{
V(s),
~\sup \bigg\{V(s') : s' \in \S, \sum_{s'' \in \S : V(s'') \geq V(s')} \!\!\!\! \mu(s') \geq \beta \bigg\}
\Bigg\}. \label{eq:qc_operator_defn}
\end{align}
%\begin{align*}
% T_\beta(\mu, V)(s) = \min\left\{
% V(s),
% ~\sup \Bigg\{V(s') : s' \in \S, \sum_{s'' \in \S : V(s'') \geq V(s')} \!\!\!\! \mu(s') \geq \beta \Bigg\}
% \right\}.
%\end{align*}
%\begin{align*}
% T_\beta(\mu, V)(s) := \min\left\{\begin{aligned}
% &V(s), \\
% &\sup \bigg\{V(s') : s' \in \S, \sum_{s'' \in \S : V(s'') \geq V(s')} \mu(s') \geq \min\{\beta,1\} \bigg\}
% \end{aligned} \right\}.
%\end{align*}
In words, all entries of $V$ larger than the (largest) $1-\beta$ quantile with respect to $\mu$ are clipped down to this quantile.
To extend the definition to $\beta > 1$, we set $T_\beta(\mu, V)(s) = \min_{s'\in \S}V(s')$, that is all entries will be clipped to the minimum entry of $V$.
Finally we define the penalty term
\begin{align}
%b(s,a,V) := \max \left \{ \sqrt{\frac{\alpha(s,a) }{n(s,a)-1} \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}( \Phat_{sa}, V) \right]} , \frac{\alpha(s,a) }{n(s,a)-1} \spannorm{T_{\beta(s,a)}( \Phat_{sa}, V)} \right \} + \frac{5}{\ntot} \label{eq:penalty_term_defn}
%b(s,a,V) = \max \left \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}( \Phat_{sa}, V) \right]} , \beta(s,a) \spannorm{T_{\beta(s,a)}( \Phat_{sa}, V)} \right \} + \frac{5}{\ntot} \label{eq:penalty_term_defn}
b(s,a,V) = \max \bigg \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}( \Phat_{sa}, V) \right]} , \beta(s,a) \spannorm{T_{\beta(s,a)}( \Phat_{sa}, V)} \bigg \} + \frac{5}{\ntot} \label{eq:penalty_term_defn}
\end{align}
where $\alpha = 8\log \big( \frac{6S^2A\ntot}{(1-\gamma)\delta}\big)$ and $\beta(s,a) = \frac{\alpha}{\max\{n(s,a)-1, 1\}}$. Note that $\beta(s,a) = \Otilde(\frac{1}{n(s,a)})$ (whenever $n(s,a) > 0$).
The pessimistic Bellman operator $\Thpe$ has several nice properties that are crucial to our analysis.
\begin{lem}
\label{lem:pessimistic_Bellman_operator_properties_short}
$\Thpe$ satisfies the following:
\begin{enumerate}[itemsep=0pt, topsep=0pt]
\item Monotonicity: If $Q \geq Q'$ then $\Thpe(Q) \geq \Thpe(Q')$.
\item Constant shift: For any $c \in \R$, $\Thpe(Q + c \one) = \Thpe(Q) + \gamma c \one$.
\item $\gamma$-contractivity: $\Thpe$ is a $\gamma$-contraction and has a unique fixed point $\Qhpe^\star \in [0, \frac{1}{1-\gamma}]^\S$.
\end{enumerate}
\end{lem}
See Lemma \ref{lem:pessimistic_Bellman_operator_properties} for a more complete statement. In summary, like previous pessimistic value iteration approaches \citep{li_settling_2023, rashidinejad_bridging_2022}, our pessimistic Bellman operator shares key properties with usual Bellman operators enabling us to find an approximate fixed point in $\Otilde(\frac{1}{1-\gamma})$ value iteration steps, and then we will choose policy $\pihat$ to be greedy with respect to this fixed point.
Now we discuss the motivation for quantile clipping, and the differences from prior work. In particular we highlight the constant shift property enjoyed by $\Thpe$. This is highly desirable for the average-reward setting, and more generally any weakly communicating MDPs, since in such MDPs the optimal value function behaves as $V^\star_\gamma \approx \frac{1}{1-\gamma}\rho^\star + h^{\star}$ and $\rho^\star$ is a multiple of $\one$. The constant shift property essentially guarantees that we only penalize the variability in the relative value differences between states, not the overall horizon-dependent scale $\frac{1}{1-\gamma}$ of the cumulative rewards. The $\tspannorm{\cdot}$-based second term in our penalty function definition~\eqref{eq:penalty_term_defn} of $b$ is essential for this constant-shift property, since the span semi-norm is invariant to translation by multiples of $ \one$. Previous ``Bernstein-style'' penalty functions \citep{li_settling_2023} use a larger term like $\beta(s,a)\frac{1}{1-\gamma} \approx \frac{1}{n(s,a)} \frac{1}{1-\gamma}$, which breaks the constant shift property and can dominate the first (variance-based) term in~\eqref{eq:penalty_term_defn} when used with large horizons. Naively using $\beta(s,a)\tspannorm{V}$ in the second term of~\eqref{eq:penalty_term_defn} actually fails to ensure the monotonicity and contractivity properties of $\Thpe$, for reasons that we elaborate upon in Section \ref{sec:proof_sketches}. Fortunately, the introduction of quantile clipping remedies these issues, and only introduces small additional bias: since only entries representing at most $\beta(s,a) = \Otilde(\frac{1}{n(s,a)})$ of the probability mass with respect to $\Phat_{sa}$ have their values clipped, we have
$\Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, V) \leq \Phat_{sa} V \leq \Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, V) + \beta(s,a)\spannorm{V},$
%\begin{align*}
%\Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, V) \leq \Phat_{sa} V \leq \Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, V) + \beta(s,a)\spannorm{V},
%\end{align*}
and introducing quantile clipping within the two terms of the penalty function $b$ in~\eqref{eq:penalty_term_defn} only reduces the penalty value, relative to instead using $\Var_{\Phat_{sa}}\left[ V\right]$ and $\tspannorm{V}$. (See Lemma \ref{lem:truncated_variance_bound}.)
\subsection{Main theorem}
Now we present our main theorem on the performance of Algorithm \ref{alg:LCBVI}. We will apply Algorithm \ref{alg:LCBVI} with a very large discount factor $\gamma$ such that the effective horizon is $\frac{1}{1-\gamma} = \ntot$.
\begin{thm}
\label{thm:main_theorem}
There exist absolute constants $C_1, C_2$ such that the following holds:
Fix $\delta > 0$. Let $\gamma = 1-\frac{1}{\ntot}$ and $\alpha = 8\log \big( \frac{6S^2A\ntot}{(1-\gamma)\delta}\big)$. Let $\pistar $ be a deterministic gain-optimal policy which is unichain with stationary distribution $\mu^{\pistar}$. Suppose there exists some $m \in \N$ such that
\begin{align*}
n(s, \pistar(s)) \geq m \mu^{\pistar}(s) + \alpha \left(C_2\Dow(P, \pistar)\right)^2 +4.
\end{align*}
Then letting $\pihat$ be the policy returned by Algorithm \ref{alg:LCBVI} with inputs $\dataset$, $r$, $\gamma = 1 - \frac{1}{\ntot}$, and $\delta$, we have with probability at least $1 - 5\delta$ that
\begin{align*}
\rho^{\pihat} \geq \rho^{\star} - \sqrt{\frac{C_1 S (\tspannorm{h^{\pistar}} + 1)\alpha }{m}}.
\end{align*}
\end{thm}
We prove Theorem \ref{thm:main_theorem} in Appendix \ref{sec:proof_of_main_theorem}. Theorem \ref{thm:main_theorem} demonstrates that as the ``effective dataset size'' $m$ increases, the suboptimality of $\pihat$ decreases at a rate of
%$\Otilde\left(\sqrt{S \tspannorm{h^{\pistar}}/m}\right)$,
$\Otilde(\sqrt{S \tspannorm{h^{\pistar}}/m})$,
which matches our lower bound Theorem \ref{thm:recurrent_lb}.
%
Our coverage assumption is qualitatively different than previous works on average-reward RL, since even for states $s$ which are transient under $\pistar$ (and thus have $\mu^{\pistar}(s) = 0$), we still require $\Otilde(\Dow(P, \pistar)^2)$ samples from the state-action pair $(s, \pistar(s))$. Note that up to a log factor this transient state coverage assumption is independent of $m$, meaning that vanishing suboptimality is possible with only an essentially bounded amount of data from transient states. (In the absence of this additional term we could treat $\ntot/m$ as a ``concentrability coefficient'' similar to prior work, but we believe our results are stated more clearly in terms of the effective dataset size $m$.) As shown in Theorem \ref{thm:transient_lb}, this transient data requirement is necessary to obtain a $\tspannorm{h^{\pistar}}$-based guarantee, and our dependence on $\Dow(P, \pistar)$ is nearly optimal. Theorem \ref{thm:main_theorem} requires $\pistar$ to be unichain, which is a mild assumption, since even in weakly communicating MDPs where not all policies are unichain, there always exists a unichain gain-optimal policy \citep{bertsekas_approximate_2018}.
%We also note that for any unichain gain-optimal policy $\pistar$, there may exist many other policies which agree with $\pistar$ on the recurrent class of $\pistar$, but choose different actions in navigating to this recurrent class; Theorem \ref{thm:main_theorem} may be applied to any of these with the most favorable transient coverage.
No prior parameter knowledge, such as of $\tspannorm{h^{\pistar}}$ or the value of $m$ (or equivalently a coverage coefficient) is needed for Algorithm \ref{alg:LCBVI} to be implemented and enjoy the above guarantee.
In particular $\gamma$ is set so that the effective horizon is $\ntot$. Actually our theorem would hold for arbitrarily larger choices of the effective horizon, and the guarantee would not degrade except for a logarithmic dependence on the effective horizon, but this would be suboptimal from a computational perspective, since %$\Otilde(\frac{1}{1-\gamma})$
$\Otilde(1/(1-\gamma))$ iterations are required for convergence in Algorithm \ref{alg:LCBVI}. Also see Theorem \ref{thm:main_thm_arbitrary_comp} for a version of Theorem \ref{thm:main_theorem} allowing $\pistar$ to be gain-suboptimal.
In the unichain tabular setting, \cite{ozdaglar_offline_2024} obtain a suboptimality bound like
%$\Otilde \left( \sqrt{C^2 \tmix^2 S / \ntot}\right)$
$\Otilde ( \sqrt{C^2 \tmix^2 S / \ntot})$
where $C \geq 1$ is a certain coverage coefficient roughly equivalent to $\ntot/m$. With this substitution their bound becomes
%$\Otilde \left( \sqrt{C \tmix^2 S / m}\right)$,
$\Otilde ( \sqrt{C \tmix^2 S / m})$,
which interestingly degrades with the coverage coefficient $C$ even as the effective dataset size $m$ is held constant, while our bound has no such issue. We also have $\tspannorm{h^{\pistar}} \leq O(\tmix)$, and qualitatively $\tspannorm{h^{\pistar}}$ is much sharper since it depends only on $\pistar$ rather than all policies.
\subsection{Lower bounds}
In this subsection we present two lower bounds implying the near-optimality of our Theorem \ref{thm:main_theorem}.
Below, for an MDP $(P_\theta, r)$, $\rho_\theta^\pi$, $h_{\theta}^\pi$ and $\mu_\theta^\pi$ denote the gain, bias and stationary distribution of a policy $\pi$, respectively; $\rho_\theta^*$ and $D_\theta$ denote the optimal gain and the diameter of the MDP, respectively; and $\P_{\theta,n}$ denotes the distribution of the dataset $\dataset$ under this MDP when the sample size function is $n$.
First, we present the surprising fact that, to obtain convergence rates dependent on certain single-policy complexity measures including $\tspannorm{h^{\pistar}}$ and $\Dow(P, \pistar)$, coverage assumptions with respect to only the stationary distribution of the target policy are insufficient to learn a near-optimal policy, even with an arbitrarily large amount of data.
\begin{thm}
\label{thm:transient_lb}
For any $T \geq 4$ and any $m \in \mathbb{N}$, there exist a finite index set $\Theta$, transition matrices $P_\theta$ for each $\theta\in\Theta$, and a reward function $r$, such that for all $\delta\in\left(0,\frac{1}{e^9}\right]$, there exists a function $n : \S \times \A \to \mathbb{N}$ satisfying the following:
\begin{enumerate}[itemsep=0pt, topsep=0pt]
\item For each $\theta \in \Theta$, the MDP $(P_\theta, r)$ is unichain and communicating, with $A \leq O\left( \left\lceil\frac{m}{T}\right\rceil \right)$ actions and diameter $T$.
\item For each $\theta \in \Theta$, the MDP $(P_\theta, r)$ has a unique deterministic gain-optimal policy $\pistar_\theta$ such that $\Dow(P_\theta, \pistar_\theta) \leq T$ and $n(s, \pistar_\theta(s)) \geq m \mu^{\pistar_\theta}_\theta(s) + \frac{T}{6}\log\left(\frac{1}{\delta}\right)$ for all $s \in \S$.
\item For any algorithm $\mathscr{A}$ that maps the dataset $\mathcal{D}$ to a stationary policy, we have
\begin{align*}
\max_{\theta\in \Theta} \P_{\theta,n} \big(\, \rho_\theta^* - \rho_\theta^{\mathscr{A}(\dataset)} > 1/2 \,\big) \geq \delta .
\end{align*}
\end{enumerate}
\end{thm}
Note that the ``effective dataset size'' parameter $m$
%(such that $n(s, \pistar_\theta(s)) \geq m \mu^{\pistar_\theta}(s) + T/4$ holds)
can be taken arbitrarily large,
meaning that learning better than a $\frac{1}{2}$-suboptimal policy is impossible even with arbitrarily large amounts of data from the stationary distribution of the target policy.
This does not contradict the error bounds from prior work which make stationary-distribution-based coverage assumptions and involve uniform complexity measures $\tmix, \unifspan$ \citep{ozdaglar_offline_2024, gabbianelli_offline_2023}, since the parameters $\tmix, \unifspan$ scale with $m$ in our hard instances in such a way as to render such bounds vacuous.
In contrast, the parameters $\tspannorm{h_{\theta}^{\pistar_\theta}}, \Dow(P_\theta, \pistar_\theta),$ and $D_{\theta}$ remain bounded, implying that a convergence rate involving any of these parameters is impossible without data coverage beyond the stationary distribution, revealing a qualitatively different behavior of such parameters.
While oftentimes results for average-reward setups can be predicted/derived by taking appropriate large-$\gamma$ limits of results for discounted settings, taking the limit as $\gamma \to 1$ of usual discounted occupancy coverage assumptions (e.g., $C^\star$ in \citet[Theorem 6]{rashidinejad_bridging_2022}) only leads to requirements on covering the stationary distribution.
The setup in Theorem \ref{thm:transient_lb} even provides the learner with $\Omtilde(\Dow(P_\theta, \pistar_\theta))$ samples from state-action pairs which are transient under the target policy $(\mu_\theta^{\pistar_\theta}(s) = 0)$, and this is still insufficient for learning near-optimal policies.
This implies that the transient state dataset coverage requirement of Theorem \ref{thm:main_theorem} is nearly unimprovable, up to an additional factor of $\Otilde(\Dow(P, \pistar))$. A complete proof of Theorem \ref{thm:transient_lb} is provided in Appendix \ref{sec:proof_transient_lb} and a sketch is provided in Section \ref{sec:proof_sketches}, but we briefly summarize the key idea: even with an arbitrarily large (but finite) amount of data from the recurrent class of the target policy, we may inevitably learn a policy with a small probability of leaving these well-covered states. Without any data we cannot learn how to recover from such a transition and navigate back to highly-rewarding regions quickly enough. This unfavorable but rare transition has negligible impact for finite horizon/discounted RL objectives (if the starting state is within the highly-rewarding region). In unichain MDPs all policies are guaranteed to eventually return to the recurrent class of the optimal policy eventually (because all recurrent classes must overlap, otherwise it would be possible to construct a multichain policy), but the fact that some policies take a long time to do so means that the uniform mixing time $\tmix$ is very large, even if the optimal policy can recover quickly. Despite being unichain, such MDPs are qualitatively close to being non-unichain (but weakly communicating).
Next, we present a lower bound which demonstrates that dependence on $m$ in Theorem \ref{thm:main_theorem} is tight.
\begin{thm}
\label{thm:recurrent_lb}
There exist absolute constants $c_1, c_2,c_3>0$ such that for any $T\geq c_1$, $S\geq c_2$, $k\geq 0$, and $m \geq \max\{TS,kS\}$, one can construct a finite index set $\Theta$, transition matrices $P_\theta$ for each $\theta \in \Theta$, a reward function $r$, and a function $n : \mathcal{S} \times \mathcal{A} \to \mathbb{N}$ such that the following hold:
\begin{enumerate}[itemsep=0pt, topsep=0pt]
\item For each $\theta\in\Theta$, the MDP $(P_\theta, r)$ is unichain and communicating, with $S$ states and diameter $T$.
\item For each $\theta \in \Theta$, the MDP $(P_\theta, r)$ has a unique stationary gain-optimal policy $\pistar_\theta$ such that $\Dow(P_\theta, \pistar_\theta) \leq T$ and $n(s,\pistar_\theta(s)) \geq m \mu_\theta^{\pistar_\theta}(s) + k$ for all $s\in\mathcal{S}$.
\item For any algorithm $\mathscr{A}$ that maps the dataset $\mathcal{D}$ to a stationary policy, we have
\begin{align}
\max_{\theta \in \Theta} \P_{\theta,n}\bigg(\, \rho_\theta^* - \rho_\theta^{\mathscr{A}(\dataset)} >
c_3\sqrt{\frac{TS}{m}} \,\bigg) \geq \frac{1}{64}. \label{eq:recurrent_lb_thm_subopt_bd}
\end{align}
\end{enumerate}
\end{thm}
Since generally $\Dow(P, \pi) \geq \spannorm{h^\pi}/4$ (see Lemma \ref{lem:dow_span_bound}), Theorem \ref{thm:main_theorem} implies a lower bound in terms of $\tspannorm{h^{\pistar}}$ ($\tspannorm{h_\theta^{\pistar_\theta}}$ and $\Dow(P_\theta, \pistar_\theta)$ are on the same order in the instances of Theorem \ref{thm:recurrent_lb}).
We add the parameter $k$ to demonstrate that a coverage requirement in the form of Theorem \ref{thm:main_theorem} does not affect the dependence on $m$ in \eqref{eq:recurrent_lb_thm_subopt_bd} for sufficiently large $m$.
In particular after setting $k = \Ttilde(T^2)$ to match Theorem \ref{thm:main_theorem}, its dependence on $\tspannorm{h^{\pistar}}, S,$ and $m$ matches~\eqref{eq:recurrent_lb_thm_subopt_bd} and thus is unimprovable up to $\Otilde(\cdot)$ factors as long as $m \geq \Ttilde(T^2 S)$.
Theorem \ref{thm:recurrent_lb} is proven in Appendix \ref{sec:proof_dataset_lb}.
\section{Proof sketches}
\label{sec:proof_sketches}
\subsection{Main theorem}
First we discuss the proof of Theorem \ref{thm:main_theorem}, including the motivation for quantile clipping.
%
The key idea of pessimistic value iteration is to choose $\Thpe$ so that $\Thpe(\Qhpe^\star) \leq \T(\Qhpe^\star)$, and then letting $\pihat$ be greedy with respect to $\Qhpe^\star$ (meaning $\T(\Qhpe^\star) = \T^{\pihat}(\Qhpe^\star)$), we have
\begin{align*}
\Qhpe^\star = \Thpe(\Qhpe^\star) \leq \T(\Qhpe^\star) = \T^{\pihat}(\Qhpe^\star)
\end{align*}
so by standard monotonicity arguments we have $\Qhpe^\star \leq Q^{\pihat} $. The challenge is then to choose $\Thpe$ as ``close'' to $\T$ as possible, so that $\Qhpe^\star$ is as close as possible to $Q^\star$ (while ensuring $\Thpe(\Qhpe^\star) \leq \T(\Qhpe^\star)$), in order to maximize $Q^{\pihat}$.
Using $\alpha$ to hide $\Otilde(\cdot)$ terms, an empirical Bernstein-like bound \citep{maurer_empirical_2009} for the quantity $\Vhpe^\star = M \Qhpe^\star$, and upper-bounding a sum by $\max$, yields
%\begin{align}
% P_{sa} \Vhpe^\star \geq \Phat_{sa} \Vhpe^\star - \max \left\{ \sqrt{\alpha \frac{\Var_{\Phat_{sa}}\Big[\Vhpe^\star \Big]}{n(s,a)}}, \alpha\frac{\spannorm{\Vhpe^\star}}{n(s,a)}\right\} =: \Phat_{sa} \Vhpe^\star - \bt(s,a, \Vhpe^\star )
% \quad\forall s,a.
% \label{eq:pf_sketch_bernstein_like_ineq}
%\end{align}
\begin{align}
%P_{sa} \Vhpe^\star \geq \Phat_{sa} \Vhpe^\star - \max \left\{ \begin{array}{c} \sqrt{\alpha \frac{\Var_{\Phat_{sa}}\Big[\Vhpe^\star \Big]}{n(s,a)}}, \alpha\frac{\spannorm{\Vhpe^\star}}{n(s,a)} \end{array} \right\} =: \Phat_{sa} \Vhpe^\star - \bt(s,a, \Vhpe^\star ) ~~\forall s,a.
P_{sa} \Vhpe^\star \geq \Phat_{sa} \Vhpe^\star - \max \left\{\rule{0cm}{0.7cm}\right. \sqrt{\alpha \frac{\Var_{\Phat_{sa}}\Big[\Vhpe^\star \Big]}{n(s,a)}}, \alpha\frac{\spannorm{\Vhpe^\star}}{n(s,a)} \left\}\rule{0cm}{0.7cm}\right. =: \Phat_{sa} \Vhpe^\star - \bt(s,a, \Vhpe^\star ) ~~\forall s,a.
\label{eq:pf_sketch_bernstein_like_ineq}
\end{align}
This sharp span-based form of penalty function $\bt$ is crucial for the constant shift property described in Lemma \ref{lem:pessimistic_Bellman_operator_properties_short}, since both $\Var_{\Phat_{sa}}\left[\cdot \right]$ and $\spannorm{\cdot}$ are invariant to shifts by multiples of $ \one$. As discussed there this property is essential for the average-reward setting, and the Bernstein-style penalty used in \cite{li_settling_2023} replaces the second term from the max in \eqref{eq:pf_sketch_bernstein_like_ineq} with $\frac{1}{1-\gamma} \geq \tspannorm{\Vhpe^\star}$ and hence does not enjoy this property. However, we cannot simply use an operator like $\widetilde{\mathcal{T}}(Q)(s,a) := r(s,a) + \gamma \Phat_{sa} \Vhpe^\star - \gamma \bt(s,a, \Vhpe^\star )$, because the span term within $\bt$ would lead to non-monotonicity of $\widetilde{\mathcal{T}}$ and disrupt many other essential properties (like $\gamma$-contractivity). To see the non-monotonicity, suppose some $s'$ has $\Phat(s' \mid s,a) < \frac{\alpha}{n(s,a)}$. Then, for $V \in \R^\S$ where $V(s')$ is the largest entry, ignoring non-differentiability edge cases, we have
\begin{align*}
\frac{d}{dV(s')}\left(\Phat_{sa} V - \alpha\frac{\tspannorm{V}}{n(s,a)} \right) &=\frac{d}{dV(s')}\left( \Phat_{sa} V - \alpha\frac{V(s') - \min_{s'' \in \S} V(s'')}{n(s,a)} \right) \\
&= \Phat(s' \mid s,a) - \frac{\alpha}{n(s,a)} < 0.
\end{align*}
However, if we replace $V$ with the quantile-clipped quantity $T_{\alpha/n(s,a)}(\Phat_{s,a},V)$, then increasing $V(s')$ (when it is the largest entry of $V$) will only increase $T_{\alpha/n(s,a)}(\Phat_{s,a},V)$ if $\Phat(s' \mid s,a)$ has at least $\alpha/n(s,a)$ probability mass. Hence, by fixing the overpenalization caused by $\spannorm{\cdot}$, quantile clipping is essential to define our empirical-span-based pessimistic Bellman operator.
Now we discuss a few other aspects of the proof of Theorem \ref{thm:main_theorem}.
Obtaining the Bernstein-style inequality~\eqref{eq:pf_sketch_bernstein_like_ineq} is nontrivial due to statistical dependence between $\Phat_{sa}$ and $\Vhpe^\star$. We remedy this with an argument based on leave-one-out/absorbing MDP techniques \citep{agarwal_model-based_2020}, which requires additional covering steps due to the presence of quantile clipping. (See Lemmas \ref{lem:LOO_constructions} and \ref{lem:concentration_helper_lemma}.)
It is somewhat surprising that Theorem \ref{thm:main_theorem} is able to obtain a bias-span-based guarantee without requiring any prior bias-span knowledge, since prior work in related uniform coverage settings has shown this is impossible when the effective horizon is large/on the same order as the size of the dataset \citep{zurek_plug-approach_2025}. This is closely related to the issue that the bias span $\spannorm{h^{\pi}}$ of a policy $\pi$ is not estimable to multiplicative error with a sample complexity polynomial in only $S, A$, and $\spannorm{h^\pi}$ \citep{zurek_span-based_2025, tuynman_finding_2024}. However, our proof suggests that $\spannorm{h^{\pi}}$ \textit{is} estimable if we allow a dependence on the policy hitting radius $\Dow(P, \pi)$, which we believe is an independently interesting finding. (See Lemma \ref{lem:empirical_span_bound}.) This fact plays a key role in bounding the suboptimality in terms of $\spannorm{h^\pi}$.
\subsection{Transient lower bound}
Next we briefly describe the idea behind the hard instances within Theorem \ref{thm:transient_lb}, which implies that transient coverage is required for offline RL with single-policy complexity parameters.
Consider the MDP $P$ in Figure \ref{fig:transient_lb_simple}, which is parameterized by $m$, which we imagine as arbitrarily large, and $T$, which we imagine as measuring the complexity of $P$. There are two states with two actions each, an absorbing \texttt{stay} action and a \texttt{leave} action which has a small chance of leading to the other state. State $1$ has reward $1$ for both actions and state $2$ has reward $0$ for both actions, so clearly the optimal policy $\pistar$ is to take \texttt{leave} in state $2$ and take \texttt{stay} in state $1$, and the associated stationary distribution has all its mass on state $1$. Also, assuming $m \geq T$, $\Dow(P, \pistar) = T$, since this is the expected amount of time to hit state $1$ starting from state $2$. Therefore to satisfy the coverage assumption $n(s,\pistar(s)) \geq m \mu^{\pistar}(s) + \Dow(P, \pistar)$, it would suffice to provide $m$ samples for \textit{both} state $1$ actions, and $T$ samples for \textit{both} state $2$ actions.
\begin{figure}[H]
\centering
\resizebox{0.49\textwidth}{!}{
\begin{tikzpicture}[ -> , >=stealth, shorten >=2pt , line width=0.5pt, node distance =2cm, scale=0.9]
\node [circle, draw] (one) at (-2 , 0) {1};
\node [circle, draw] (two) at (2 , 0) {2};
\node [circle, draw, fill, inner sep=0.01cm, label={above:$a=\texttt{leave}, R =1$~~~~~~}] (dot1) at (-1.7 , 1) {};
\node [circle, draw, fill, inner sep=0.01cm, label={below:~~~~~~$a=\texttt{leave}, R =0$}] (dot2) at (1.7 , -1) {};
\path (one) edge [loop below, looseness=15] node [below] {$a=\texttt{stay}, R =1$~~~~~~} (one) ;
\path (two) edge [loop above, looseness=15] node [above] {~~~~~~$a=\texttt{stay}, R =0$} (two) ;
\path (one) edge[-] [bend left] node [above] {} (dot1) ;
\path (dot1) edge[dashed] [bend left] node [right] {$1-\frac{1}{m}$} (one);
\path (dot1) edge[dashed] [bend left] node [above] {$\frac{1}{m}$} (two);
\path (two) edge[-] [bend left] node [above] {} (dot2) ;
\path (dot2) edge[dashed] [bend left] node [left] {$1-\frac{1}{T}$} (two);
\path (dot2) edge[dashed] [bend left] node [below] {$\frac{1}{T}$} (one);
\begin{scope}[on background layer]
\draw[thick] (current bounding box.south west)
rectangle
(current bounding box.north east);
\end{scope}
\node[below=4pt of current bounding box] {\large$P$};
\end{tikzpicture}
}{
\begin{tikzpicture}[ -> , >=stealth, shorten >=2pt , line width=0.5pt, node distance =2cm, scale=0.9]
\node [circle, draw] (one) at (-2 , 0) {1};
\node [circle, draw] (two) at (2 , 0) {2};
\path (one) edge [loop below, looseness=15] node [below] {$a=\texttt{stay}, R =1$~~~~~~} (one) ;
\path (two) edge [loop above, looseness=15] node [above] {~~~~~~$a=\texttt{stay}, R =0$} (two) ;
\path (one) edge [loop above, looseness=15] node [above] {$a=\texttt{leave}, R =1$~~~~~~} (one) ;
\path (two) edge [loop below, looseness=15] node [below] {~~~~~~$a=\texttt{leave}, R =0$} (two) ;
\begin{scope}[on background layer]
\draw[thick] (current bounding box.south west)
rectangle
(current bounding box.north east);
\end{scope}
\node[below=4pt of current bounding box] {\large$\Phat$};
\end{tikzpicture}
}
\vspace{-10pt}
\caption{An MDP $P$ parameterized by $m, T$, and an empirical MDP $\Phat$ which has constant probability of being sampled from $P$. Each solid arrow indicates an action and is annotated with its reward. Arrows which split into multiple dashed arrows indicate possible stochastic transitions, and each dashed arrow is annotated with the associated probabilities.}
\label{fig:transient_lb_simple}
\end{figure}
For this sample size function $n$, with constant probability
%($\approx 1/e^2$)
we will not observe any transitions to the other state from either of the \texttt{leave} actions (that is, the samples from each of these state-action pairs would all be of the form $(s, \texttt{leave}, s)$). Under such an event, illustrated by the empirical MDP $\Phat$, no algorithm could distinguish between the \texttt{leave} and \texttt{stay} actions in either state better than random guessing. If an algorithm is forced to return a deterministic policy, then there would be a constant probability of choosing the policy $\pi$ where $(\pi(1), \pi(2)) = (\texttt{leave}, \texttt{stay})$, which will remain in state $2$ (and hence have gain $\zero$). To generalize to algorithms which may choose randomized policies, we add more copies of the \texttt{stay} action to state $2$, so that a ``guessed'' randomized policy has a low chance of returning to state $1$ quickly enough for good performance. Also $P$ is not unichain, but we can add an arbitrarily small ($O(m^{-2})$) probability for the \texttt{stay} actions in state $2$ to return to state $1$, which ensures unichainedness without meaningfully changing the story.
We emphasize that the hardness is not due to the inability to identify the \texttt{stay} action in state $1$, since in general we cannot expect to perfectly match the stationary distribution of the target policy (and in this example, the policy $(\texttt{leave}, \texttt{leave})$ still has suboptimality only $O(T/m)$). Rather, the hardness is due to the fact that it is nontrivial to navigate (quickly) back to the target policy's stationary distribution after leaving it, and learning to do so requires data coverage beyond said stationary distribution.
\section{Conclusion}
\label{sec:conclusion}
We developed the first average-reward offline RL algorithms for MDPs where not all policies have constant gain, and also the first convergence rates depending only on the bias span of a single policy. A main limitation of our work is its focus on the tabular setting, hence an important direction is to extend these improvements to function approximation setups to avoid dependence on $S$ in the results. While Theorem \ref{thm:transient_lb} demonstrates the necessity of data from the target policy from all states, this may be limiting in practice, so an interesting future direction is to explore additional assumptions or information that could be provided to the algorithm to circumvent this requirement.
\section*{Acknowledgment}
Y.\ Chen and M.\ Zurek acknowledge support by National Science Foundation grants CCF-2233152 and DMS-2023239.
\bibliographystyle{plainnat}
%\bibliography{refs_mz.bib}
\bibliography{refs_copy.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\appendix
\section{Additional notation and guide to appendices}
Let $\pi$ be some stationary policy.
Note that $P_\pi$ (defined above as the Markov chain over states induced by policy $\pi$ on the transition kernel $P$) is equal to $M^\pi P$. We also define $r_\pi = M^\pi r$. Then we have $V^\pi_\gamma = (I - \gamma P_\pi)^{-1} r_\pi$. $\infnorm{\cdot}$ and $\onenorm{\cdot}$ denote the usual $\ell_\infty$/$\ell_1$-norms, respectively. $\infinfnorm{W}$ denotes the $\infnorm{\cdot}\to\infnorm{\cdot}$ operator norm of a matrix $W$. In particular $\infinfnorm{(I -\gamma P_\pi)^{-1}} = \frac{1}{1-\gamma}$. We note that the action maximization operator $M$ and the policy matrix $M^\pi$ both satisfy monotonicity: $V \geq V'$ (elementwise, for $Q, Q' \in \R^{\S \times \A}$) implies $M(Q) \geq M(Q')$, and likewise that $M^\pi Q \geq M^\pi Q'$. These two operators also both satisfy the ``constant-shift'' property, that for any $c \in \R$ and any $Q \in \R^{\S \times \A}$, we have $M(Q + c \one) = c \one + M(Q)$ and $M^\pi(Q + c \one) = c \one + M^\pi(Q)$. Also we note that $M$ and $M^\pi$ are both $1$-Lipschitz with respect to $\infnorm{}$, that is $\infnorm{MQ - MQ'} \leq \infnorm{Q - Q'}$ and $\infnorm{M^\pi Q - M^\pi Q'} \leq \infnorm{Q - Q'}$.
For any vector $x$ we let $x^{\circ k}$ denote its elementwise $k$th power.
We let $\ind$ denote the usual indicator function used in probability where $\ind(E)$ is a random variable with value $1$ if the event $E$ holds and $0$ otherwise.
In Appendix \ref{sec:proof_of_main_theorem} we prove the main theorem, Theorem \ref{thm:main_theorem}. In Appendix \ref{sec:proof_transient_lb} we prove Theorem \ref{thm:transient_lb} and in Appendix \ref{sec:proof_dataset_lb} we prove Theorem \ref{thm:recurrent_lb}. Appendix \ref{sec:deferred_proofs} contains additional supporting results.
\section{Proof of main theorem}
\label{sec:proof_of_main_theorem}
\subsection{Well-definedness}
We also define a fixed-policy/policy evaluation version of $\Thpe$ which will be useful within the analysis. For any fixed stationary policy $\pi$, we let
\begin{align}
\Thpe^\pi (Q)(s,a) &:= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, M^\pi Q) - b(s,a, M^\pi Q), \min_{s'}(M^\pi Q)(s') \right \} .\label{eq:defn_of_Thpe_pi}
\end{align}
We also define $\Vhpe^{\pi} := M^{\pi} \Qhpe^{\pi}$, where $\Qhpe^{\pi}$ is the unique fixed point of $\Thpe^\pi$ (justified in the below lemma).
The following is a more comprehensive variant of Lemma \ref{lem:pessimistic_Bellman_operator_properties_short}.
\begin{lem}
\label{lem:pessimistic_Bellman_operator_properties}
\begin{enumerate}
\item \label{lem:pessimistic_Bellman_operator_properties_pt1}
$\Thpe$ satisfies the following properties:
\begin{enumerate}
\item Monotonicity: If $Q \geq Q'$ then $\Thpe(Q) \geq \Thpe(Q')$.
\item Constant shift: For any $c \in \R$, $\Thpe(Q + c \one) = \Thpe(Q) + \gamma c \one$.
\item $\gamma$-contractivity: $\Thpe$ is a $\gamma$-contraction and has a unique fixed point $\Qhpe^\star$.
\item Boundedness: $\zero \leq \Qhpe^\star \leq \frac{1}{1-\gamma}\one$.
\end{enumerate}
\item For any fixed stationary deterministic policy $\pi$, the analogous statements hold for $\Thpe^{\pi}$: \label{lem:pessimistic_Bellman_operator_properties_pt2}
\begin{enumerate}
\item Monotonicity: If $Q \geq Q'$ then $\Thpe^\pi(Q) \geq \Thpe^\pi(Q')$.
\item Constant shift: For any $c \in \R$, $\Thpe^\pi(Q + c \one) = \Thpe^\pi(Q) + \gamma c \one$.
\item $\gamma$-contractivity: $\Thpe^\pi$ is a $\gamma$-contraction and has a unique fixed point $\Qhpe^\pi$.
\item Boundedness: $\zero \leq \Qhpe^\pi \leq \frac{1}{1-\gamma}\one$.
\end{enumerate}
\item For any fixed stationary deterministic policy $\pi$, we have $\Qhpe^\star \geq \Qhpe^\pi$. \label{lem:pessimistic_Bellman_operator_properties_pt3}
\end{enumerate}
\end{lem}
\begin{proof}
We note that a few steps are similar to \citet[Lemma 1]{li_settling_2023}, but our new choice of penalty requires much more involved analysis.
We define an auxiliary operator $\Tope : \R^\S \to \R^{\S\A}$ by, for any $V \in \R^\S$,
\begin{align*}
\Tope (V)(s,a) &:= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{\beta(s,a)}( \Phat_{sa}, V) - b(s,a, V), \min_{s'}(V)(s') \right \} .
\end{align*}
We defer the verification of the following fact, which involves somewhat lengthy calculations, to Appendix \ref{sec:tope_monotonicity_proof}.
\begin{lem}
\label{lem:tope_monotonicity}
Let $V, V' \in \R^\S$ be arbitrary and suppose that $V \geq V'$. Then (elementwise)
\begin{align*}
\Tope(V) \geq \Tope(V').
\end{align*}
\end{lem}
Given Lemma \ref{lem:tope_monotonicity}, we can relatively easily verify Lemma \ref{lem:pessimistic_Bellman_operator_properties}. We note that Lemma \ref{lem:tope_monotonicity} makes use of the quantile clipping in an essential way.
Now we will show item~\ref{lem:pessimistic_Bellman_operator_properties_pt1} except for the boundedness property. Notice that $\Thpe(Q) = \Tope(MQ)$ (for any $Q \in \R^{\S\A}$). Therefore letting $Q, Q' \in\R^{\S\A}$ with $Q \geq Q'$, we have by monotonicity of $M$ that $MQ \geq MQ'$, and thus by monotonicity of $\Tope$ we conclude that
\begin{align*}
\Thpe(Q) = \Tope(MQ) \geq \Tope(MQ') = \Thpe(Q')
\end{align*}
as desired. Next we check the constant shift property of $\Tope$. Fix $c \in \R, V \in \R^\S$, and $s \in \S, a \in \A$. Then we have that $T_{\beta(s,a)}(\Phat_{sa}, V + c \one) = T_{\beta(s,a)}(\Phat_{sa}, V) + c \one$, regardless of whether $\beta(s,a) \in [0,1]$ or $\beta(s,a) > 1$, since when $\beta(s,a) > 1$ we have $T_{\beta(s,a)}(\Phat_{sa}, V + c \one) = \min_{s \in \S}(V + c \one) \one = (\min_{s \in \S}(V) + c) \one$, and when $\beta(s,a) \leq 1$, by~\eqref{eq:qc_operator_defn} we have
\begin{align*}
T_{\beta(s,a)}(\Phat_{sa}, V+ c \one)(s) &= \min\Bigg\{
V(s) + c,
~\sup \bigg\{V(s') + c : s' \in \S, \sum_{s'' \in \S : V(s'')+c \geq V(s') + c} \!\!\!\! \Phat_{sa}(s') \geq \beta \bigg\}
\Bigg\} \\
&= c + \min\Bigg\{
V(s),
~\sup \bigg\{V(s') : s' \in \S, \sum_{s'' \in \S : V(s'') \geq V(s')} \!\!\!\! \Phat_{sa}(s') \geq \beta \bigg\}
\Bigg\}\\
&= c + T_{\beta(s,a)}(\Phat_{sa}, V)(s).
\end{align*}
Therefore
\begin{align*}
&\Var_{\Phat_{sa}}\left[ T_{\beta(s,a)}(\Phat_{sa}, V + c \one)\right] = \Var_{\Phat_{sa}}\left[ T_{\beta(s,a)}(\Phat_{sa}, V ) + c \one\right]= \Var_{\Phat_{sa}}\left[ T_{\beta(s,a)}(\Phat_{sa}, V ) \right]\\
\text{and}\quad& \spannorm{T_{\beta(s,a)}(\Phat_{sa}, V + c \one)} = \spannorm{T_{\beta(s,a)}(\Phat_{sa}, V )+ c \one} = \spannorm{T_{\beta(s,a)}(\Phat_{sa}, V)}
\end{align*}
and therefore we have that
$b(s,a,V) = b(s,a,V+c \one)$. Additionally we have that
\begin{align*}
\min_{s'}\left(V + c \one \right)(s') = \min_{s'} V(s') + c .
\end{align*}
Hence
\begin{align}
\Tope(V + c \one)(s,a) &= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{{\beta(s,a)}}( \Phat_{sa}, V+ c \one) - b(s,a, V+ c \one), \min_{s'}(V+ c \one)(s') \right \} \nonumber\\
&= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{{\beta(s,a)}}( \Phat_{sa}, V) + c \Phat_{sa} \one - b(s,a, V), \min_{s'}(V)(s') + c \right \} \nonumber\\
&= r(s,a) + \gamma c + \gamma\max \left\{ \Phat_{sa} T_{{\beta(s,a)}}( \Phat_{sa}, V) - b(s,a, V), \min_{s'}(V)(s') \right \} \nonumber\\
&= \gamma c + \Tope(V)(s,a) \label{eq:tope_eigenvector}
\end{align}
(since $\Phat_{sa} \one = 1$). Using~\eqref{eq:tope_eigenvector} and the fact that $M(Q + c \one) = MQ + c \one$ we can show that $\Thpe$ satisfies the constant shift property as well:
\begin{align*}
\Thpe(Q + c \one) = \Tope(M(Q + c \one)) = \Tope(MQ + c \one) = \Tope(MQ )+ \gamma c \one = \Thpe(Q )+ \gamma c \one
\end{align*}
as desired. Finally we can check contractivity of $\Thpe$. We note that it suffices to show that $\Tope$ is $\gamma$-Lipschitz, since then we would have for any $Q_1, Q_2 \in \R^{\S\A}$ that
\begin{align*}
\infnorm{\Thpe(Q_1) - \Thpe(Q_2)} = \infnorm{\Tope(MQ_1) - \Tope(MQ_2)} \leq \gamma \infnorm{MQ_1 - MQ_2} \leq \gamma \infnorm{Q_1 - Q_2}
\end{align*}
as desired, where the first inequality is due to the (assumed) Lipschitzness of $\Tope$ and the second inequality is due to the $1$-Lipschitzness of $M$. Now we verify that $\Tope$ is indeed $\gamma$-Lipschitz.
For any $V_1, V_2 \in \R^{\S}$ we have $V_1 \leq V_2 + \infnorm{V_1 - V_2}\one$ (elementwise), so by monotonicity of $\Tope$ (Lemma \ref{lem:tope_monotonicity}), and then using the fact that $\Tope$ satisfies the constant shift property (shown in~\eqref{eq:tope_eigenvector}) in the next inequality, we have
\begin{align*}
\Tope(V_1) &\leq \Tope(V_2 + \infnorm{V_1-V_2}\one) \\
&= \Tope(V_2) + \gamma \infnorm{V_1-V_2}\one
\end{align*}
so by rearranging
\begin{align*}
\Tope(V_1)-\Tope(V_2) \leq \gamma \infnorm{V_1-V_2}\one.
\end{align*}
By reversing the roles of $V_1$ and $V_2$ we also have
\begin{align*}
\Tope(V_2)-\Tope(V_1) \leq \gamma \infnorm{V_1-V_2}\one
\end{align*}
or equivalently
\begin{align*}
-\gamma \infnorm{V_1-V_2}\one \leq \Tope(V_1)-\Tope(V_2).
\end{align*}
Combining these two inequalities involving $\Tope(V_2)-\Tope(V_1)$ we conclude that $\infnorm{\Tope(V_1)-\Tope(V_2)} \leq \gamma \infnorm{V_1 - V_2}$ as desired and thus $\Thpe$ is a $\gamma$-contraction. By the Banach fixed-point theorem (e.g. \cite[Chapter 4.5]{pugh_real_2015}) this implies the existence of a unique fixed point of $\Thpe$, which we call $\Qhpe^\star$. (We check that $\zero \leq \Qhpe^\star \leq \frac{1}{1-\gamma}\one$ later.)
Now we will show item~\ref{lem:pessimistic_Bellman_operator_properties_pt2} except for the boundedness property. Notice that similarly to the previous case, $\Thpe^\pi(Q) = \Tope(M^\pi Q)$ (for any $Q \in \R^{\S\A}$). The only properties of $M$ used in the proofs for the previous case were monotonicity (that $Q \geq Q' \implies MQ \geq MQ'$), that $M(Q + c \one) = MQ + c \one$, and that $M$ is $1$-Lipschitz. All of these properties are also true with $M^\pi$ in place of $M$, so in fact all proofs used to verify item~\ref{lem:pessimistic_Bellman_operator_properties_pt1} can immediately be applied (with this minor modification) to also verify item~\ref{lem:pessimistic_Bellman_operator_properties_pt2}.
Next, item \ref{lem:pessimistic_Bellman_operator_properties_pt3} would follow by showing that for any fixed $Q\in \R^{SA}$ we have
\begin{align}
\Thpe(Q) \geq \Thpe^\pi(Q) \label{eq:bellman_prop_pt3_key}
\end{align}
since then by a standard argument we can show for any integer $k \geq 0$ that
\begin{align*}
\left(\Thpe\right)^{(k)}(\zero) \geq \left(\Thpe^\pi\right)^{(k)}(\zero)
\end{align*}
(where $(k)$ denotes $k$ compositions of an operator) and therefore that
\begin{align*}
\Qhpe^\star = \lim_{k \to \infty } \left(\Thpe\right)^{(k)}(\zero) \geq \lim_{k \to \infty } \left(\Thpe^\pi\right)^{(k)}(\zero) = \Qhpe^\pi.
\end{align*}
So now we focus on showing~\eqref{eq:bellman_prop_pt3_key}, but this follows immediately from the fact that $M Q \geq M^\pi Q$ and that $\Tope$ is monotone (Lemma \ref{lem:tope_monotonicity}), since we have
\begin{align*}
\Thpe(Q) = \Tope(MQ) \geq \Tope(M^\pi Q) = \Thpe^\pi(Q).
\end{align*}
Finally, we check both boundedness properties. Since we already have that $\Qhpe^{\pi} \leq \Qhpe^{\star}$, it suffices to show that $\zero \leq \Qhpe^{\pi}$ and that $\Qhpe^{\star} \leq \frac{1}{1-\gamma}\one$. First, note that we have $\Thpe^\pi(\zero) \geq \zero$, since for any $s\in \S, a \in \A$,
\begin{align*}
\Thpe^\pi(\zero)(s,a) &= r(s,a) + \gamma \max \left\{\Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, M^\pi\zero) - b(s,a,M^\pi \zero), \min_{s'} (M^\pi\zero)(s')\right\} \\
& \geq r(s,a) + \gamma \min_{s'} (M^\pi\zero)(s') = r(s,a) \geq 0.
\end{align*}
Then by monotonicity of $\Thpe^\pi$ we have for any integer $k \geq 0$ that
\begin{align*}
\left(\Thpe^\pi \right)^{(k)} (\zero) \geq \left(\Thpe^\pi \right)^{(k-1)} (\zero) \geq \cdots \geq \zero
\end{align*}
and so
\begin{align*}
\Qhpe^\pi = \lim_{k \to \infty } \left(\Thpe^\pi\right)^{(k)}(\zero) \geq \zero
\end{align*}
as desired. Similarly, we have that $\Thpe(\one /(1-\gamma)) \leq \one /(1-\gamma)$, since for any $s\in \S, a \in \A$,
\begin{align*}
&\Thpe(\one /(1-\gamma))(s,a) \\
&= r(s,a) + \gamma \max \left\{\Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\one /(1-\gamma)) - b(s,a,M\one /(1-\gamma)), \min_{s'} (M\one /(1-\gamma))(s')\right\} \\
&\leq 1 + \gamma \frac{1}{1-\gamma} = \frac{1}{1-\gamma}.
\end{align*}
By an analogous argument to the previous bound, we have from monotonicity of $\Thpe$ that $\left(\Thpe \right)^{(k)} (\one /(1-\gamma)) \leq \one /(1-\gamma)$ for all positive integers $k$ and thus that $\Qhpe^\star \leq \one /(1-\gamma)$.
\end{proof}
In the above proof we defined the operator $\Tope$ and verified its Lipshitzness, which we state in the following lemma as $\Tope$ will appear again later.
\begin{lem}
\label{lem:tope_additional_properties}
$\Tope$ is $\gamma$-Lipschitz.
\end{lem}
\subsection{Optimization}
In this subsection we establish the basic properties of the outputs of Algorithm \ref{alg:LCBVI}.
\begin{lem}
\label{lem:opt_guarantees}
Algorithm \ref{alg:LCBVI} returns $\Qhat$ such that
\begin{align*}
\Qhat \leq \Qhpe^\star \leq \Qhat + \frac{1}{2\ntot}\one \quad \text{and} \quad \Thpe(\Qhat) \geq \Qhat.
\end{align*}
\end{lem}
\begin{proof}
First we note that $\Thpe(\zero) \geq \zero$, which follows easily from the definition~\eqref{eq:defn_of_Thpe} since (for arbitrary $s\in \S, a \in \A$)
\begin{align*}
\Thpe(\zero)(s,a) &= r(s,a) + \gamma \max \left\{\Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\zero) - b(s,a,M\zero), \min_{s'} (M\zero)(s')\right\} \\
& \geq r(s,a) + \gamma \min_{s'} (M\zero)(s') = r(s,a) \geq 0.
\end{align*}
$\Thpe(\Qhat) \geq \Qhat$ follows from this fact and monotonicity of $\Thpe$ by standard arguments, since if for any $t \in \N$ we have that $\Thpe(\Qhat_t) \geq \Qhat_t $ then
\begin{align*}
\Thpe(\Qhat_{t+1}) = \Thpe\left(\Thpe(\Qhat_t)\right) \geq \Thpe\left(\Qhat_t\right)
\end{align*}
so by induction (since $\Qhat_0 = \zero$) $\Thpe(\Qhat_t) \geq \Qhat_t$ holds for $t = K$, and we have $\Qhat_K = \Qhat$ by definition.
Now we argue that $\Qhat \leq \Qhpe^\star$, which follows from $\Thpe(\Qhat) \geq \Qhat$ and monotonicity of $\Thpe$ by standard arguments, since assuming for some $t \geq 1$ that $\Thpe^{(t)}(\Qhat) \geq \Qhat$, then we have
by monotonicity that
\begin{align*}
\left(\Thpe \right)^{(t+1)}(\Qhat) = \left(\Thpe \right)\left(\Thpe^{(t)} (\Qhat)\right) \geq \Thpe(\Qhat) \geq \Qhat
\end{align*}
and so by induction $\left(\Thpe \right)^{(t)}(\Qhat) \geq \Qhat$ for all $t \geq1$, and thus
\begin{align*}
\Qhpe^\star = \lim_{t \to \infty} \left(\Thpe \right)^{(t)}(\Qhat) \geq \lim_{t \to \infty}\Qhat = \Qhat
\end{align*}
as desired.
Finally we check that $\Qhpe^\star \leq \Qhat + \frac{1}{2\ntot}\one$.
Again note that $\Qhat = \Qhat_\maxiter$.
By the definition of $\maxiter = \left\lceil \frac{\log \left( \frac{2\ntot}{1-\gamma} \right)}{1-\gamma} \right \rceil$, as well as the fact that $\log(1/\gamma) \geq 1- \gamma$ for any $\gamma$, we have
\begin{align*}
\gamma^\maxiter = e^{\maxiter \log(\gamma)} \leq e^{\frac{\log \left( \frac{2\ntot}{1-\gamma} \right)}{1-\gamma}\log(\gamma)} = e^{\frac{\log \left( \frac{1-\gamma}{2\ntot} \right)}{1-\gamma}\log(1/\gamma)} \leq e^{\log \left( \frac{1-\gamma}{2\ntot} \right)} = \frac{1-\gamma}{2\ntot}.
\end{align*}
Using this bound, $\gamma$-contractivity, and the fact that $\zero \leq \Qhpe^\star \leq \frac{1}{1-\gamma}\one$ from Lemma \ref{lem:pessimistic_Bellman_operator_properties}, we have
\begin{align*}
\infnorm{\Qhat_\maxiter - \Qhpe^\star} &\leq \gamma^\maxiter \infnorm{\Qhat_0 - \Qhpe^\star} = \gamma^\maxiter \infnorm{\zero - \Qhpe^\star} \leq \gamma^\maxiter \frac{1}{1-\gamma} \leq \frac{1}{2\ntot}
\end{align*}
which implies $\Qhpe^\star \leq \Qhat + \frac{1}{2\ntot}\one$.
\end{proof}
\subsection{Concentration}
In this subsection we establish the key concentration inequalities, given in Lemmas \ref{lem:concentration_for_pessimism_Thpe} and \ref{lem:concentration_for_pessimism_Thpe_pistar}, using leave-one-out techniques. We start with two helper lemmas which abstractly handle the leave-one-out-based covering steps before proving Lemmas \ref{lem:concentration_for_pessimism_Thpe} and \ref{lem:concentration_for_pessimism_Thpe_pistar}.
\begin{lem}
\label{lem:concentration_helper_lemma}
Fix some $\delta' > 0$ and some $s \in \S, a \in \A$. Suppose that for some random vector $X \in \R^\S$, there exists a (deterministic) set $U$ and some random variables $X_u \in \R^\S$ for each $u$ (that is, for each $u \in U$, $X_u$ is a random vector in $\R^\S$) such that
\begin{enumerate}
\item For all $u \in U$, $X_u$ is independent of all samples $S_{sa}^1, \dots, S_{sa}^{n(s,a)}$ drawn from $P(\cdot \mid s,a)$.
\item Almost surely there exists some $u^\star \in U$ such that $\infnorm{X - X_{u^\star}} \leq \frac{1}{\ntot}$.
\end{enumerate}
Also assume $n(s,a) \geq 2$. Then with probability at least $1 - 6\delta'$, we have that
\begin{align}
\left|(\Phat_{sa} - P_{sa}) X \right| &\leq \spannorm{X}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}} +\frac{2}{\ntot}\left( 1 + \sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}}\right) \\
\left|(\Phat_{sa} - P_{sa}) X \right|
& \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)}}+ \spannorm{X}\frac{\log (|U|/\delta')}{3 n(s,a)} \nonumber\\
& \qquad + \frac{1}{\ntot}\left(2+ \sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}}+ 2\frac{\log (|U|/\delta')}{3 n(s,a)}\right) \\
\left| \sqrt{\frac{n(s,a)}{n(s,a)-1}\Var_{\Phat_{sa}} \left[ X\right]} - \sqrt{\Var_{P_{sa}} \left[ X\right]} \right| &\leq \spannorm{X} \sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \frac{1}{\ntot}\left(2\sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + 3\right) \label{eq:concentration_helper_lemma_emp_var_term}\\
\left|(\Phat_{sa} - P_{sa}) X \right| & \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)-1}}+\spannorm{X}\frac{7}{3}\frac{\log (|U|/\delta')}{ n(s,a)-1} \nonumber\\
& \qquad+ \frac{1}{\ntot} \left(2 + 3\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)-1}} + \frac{14}{3}\frac{ \log (|U|/\delta')}{n(s,a)-1} \right)
\end{align}
\end{lem}
\begin{proof}
We start by showing that
\begin{align}
\left|(\Phat_{sa} - P_{sa}) X \right| &\leq \left|(\Phat_{sa} - P_{sa}) X_{u^\star} \right| + \left|(\Phat_{sa} - P_{sa}) (X - X_{u^\star}) \right| \nonumber \\
& \leq \left|(\Phat_{sa} - P_{sa}) X_{u^\star} \right| + \onenorm{\Phat_{sa} - P_{sa} } \infnorm{X - X_{u^\star}} \nonumber \\
& \leq \left|(\Phat_{sa} - P_{sa}) X_{u^\star} \right| + \frac{2}{\ntot} \label{eq:concentration_covering_step_1}
\end{align}
where the final inequality is because $\onenorm{\Phat_{sa} - P_{sa} } \leq 2$ and $\infnorm{X - X_{u^\star}} \leq \frac{1}{\ntot}$.
Then since for any fixed $u \in U$ we have $(\Phat_{sa} - P_{sa}) X_{u} = \sum_{i=1}^{n(s,a)} (X_{u}(S^i_{sa}) - P_{sa}X_{u})$, by Hoeffding's inequality conditioned on $X_u$ (since by assumption $X_{u}$ is independent from the $S^i_{sa}$ and each term in the above sum is contained within the interval $[\min X_{u}, \max X_{u}]$ which has length $\spannorm{X_{u}}$) we have that
\begin{align*}
\P \left( \left|\sum_{i=1}^{n(s,a)} (X_{u}(S^i_{sa}) - P_{sa}X_{u})\right| \geq \spannorm{X_{u}}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}} ~\middle|~ X_u\right) \leq \frac{2 \delta'}{|U|}
\end{align*}
and so
\begin{align*}
\P \left( \left|\sum_{i=1}^{n(s,a)} (X_{u}(S^i_{sa}) - P_{sa}X_{u})\right| \geq \spannorm{X_{u}}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}} \right) \leq \E \frac{2 \delta'}{|U|} = \frac{2 \delta'}{|U|}.
\end{align*}
Taking a union bound, the above inequality holds for all $u \in U$ with probability at least $1 - 2\delta'$.
Finally, since
\begin{align}
\spannorm{X_{u^\star}} \leq \spannorm{X} + \spannorm{X_{u^\star} - X} \leq \spannorm{X} + 2\infnorm{X_{u^\star} - X} \leq \spannorm{X} + \frac{2}{\ntot}, \label{eq:concentration_covering_span_bound}
\end{align}
combining with~\eqref{eq:concentration_covering_step_1} we have that
\begin{align*}
\left|(\Phat_{sa} - P_{sa}) X \right| & \leq \frac{2}{\ntot} + \spannorm{X_{u^\star}}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}} \leq \frac{2}{\ntot} + \spannorm{X}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}} + \frac{2}{\ntot}\sqrt{\frac{\log |U|/\delta'}{2 n(s,a)}}.
\end{align*}
Next we would like to apply the concentration inequalities of \cite{maurer_empirical_2009}. To apply their theorems as stated, we must shift and normalize to define (for each $u \in U$)
\begin{align*}
X'_{u} := \frac{X_u - \min_{x \in \S}X_u(x)}{\spannorm{X_u }}
\end{align*}
so that $X'_{u} \in [0,1]$ almost surely. Fixing some $u \in U$ and applying \citet[Theorem 10]{maurer_empirical_2009}, assuming $n(s,a) \geq 2$, we have with probability at least $1 - 2 \delta'/|U|$ that
\begin{align*}
\left| \sqrt{\frac{n(s,a)}{n(s,a)-1}\Var_{\Phat_{sa}} \left[ X'_u\right]} - \sqrt{\Var_{P_{sa}} \left[ X'_u\right]} \right| &\leq \sqrt{\frac{2 \ln |U|/\delta'}{n(s,a)-1}}
\end{align*}
using the facts that by standard calculations, abbreviating $\nt = n(s,a)$ for convenience,
\begin{align*}
\E \left[\frac{1}{2\nt(\nt-1)} \sum_{i=1}^{\nt} \sum_{j=1}^{\nt} \left(X'_u(S^i_{sa}) - X'_u(S^j_{sa}) \right)^2 \right]&= \frac{\nt}{2\nt(\nt-1)} 0 + \frac{\nt(\nt-1)}{2\nt(\nt-1)}\E\left[ \left(X'_u(S^1_{sa}) - X'_u(S^2_{sa}) \right)^2 \right] \\
&= \frac{1}{2} \left( 2\E \left[ \left(X'_u(S^1_{sa}) \right)^2\right] - 2\E \left[ X'_u(S^1_{sa}) \right]^2 \right) \\
&= \Var \left[ X'_u(S^1_{sa}) \right] = \Var_{P_{sa}} \left[X'_u \right]
\end{align*}
and
\begin{align*}
\frac{1}{2\nt(\nt-1)} \sum_{i=1}^{\nt} \sum_{j=1}^{\nt} \left(\Vhpe^{s,u,s'}(S^i_{sa}) - \Vhpe^{s,u,s'}(S^j_{sa}) \right)^2 &= \frac{\nt}{\nt-1}\Phat_{sa} \left( X'_u - \Phat_{sa}X'_u\one \right)^{\circ 2}\\
&= \frac{\nt}{\nt-1}\Var_{\Phat_{sa}} \left[X'_u \right]
\end{align*}
(since \citet[Theorem 10]{maurer_empirical_2009} as stated involves the quantity $\frac{1}{2\nt(\nt-1)} \sum_{i=1}^{\nt} \sum_{j=1}^{\nt} \left(X'_u(S^i_{sa}) - X'_u(S^j_{sa}) \right)^2$ and its expectation). Taking a union bound and undoing the normalization and shifting, we have for all $u \in U$ that
\begin{align}
\left| \sqrt{\frac{n(s,a)}{n(s,a)-1}\Var_{\Phat_{sa}} \left[ X_u\right]} - \sqrt{\Var_{P_{sa}} \left[ X_u\right]} \right| &\leq \spannorm{X_u} \sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} \label{eq:concentration_variance_covering_step_1}
\end{align}
with probability at least $1 - 2 \delta'$. For any arbitrary probability distribution $\mu \in \R^\S$ we have that
\begin{align}
\left| \sqrt{\Var_\mu\left[ X \right] } - \sqrt{\Var_\mu\left[ X_{u^\star} \right] }\right| & \leq \frac{1}{\ntot} \label{eq:concentration_variance_covering_step_2}
\end{align}
since
\begin{align*}
\sqrt{\Var_\mu\left[ X \right] } &= \sqrt{\Var_\mu\left[ X_{u^\star} + (X - X_{u^\star}) \right] } \leq \sqrt{\Var_\mu\left[ X_{u^\star} \right]} + \sqrt{\Var_\mu\left[X - X_{u^\star} \right] }
\end{align*}
(where the inequality step follows from triangle inequality since $Y \mapsto \sqrt{\E Y^2}$ is a norm on random variables $Y$) and then we have
\begin{align*}
\sqrt{\Var_\mu\left[X - X_{u^\star} \right] } \leq \infnorm{X - X_{u^\star}} \leq \frac{1}{\ntot}.
\end{align*}
Thus combining~\eqref{eq:concentration_variance_covering_step_1} with~\eqref{eq:concentration_variance_covering_step_2} we conclude that
\begin{align}
&\left| \sqrt{\frac{n(s,a)}{n(s,a)-1}\Var_{\Phat_{sa}} \left[ X\right]} - \sqrt{\Var_{P_{sa}} \left[ X\right]} \right| \\
&\qquad\leq \left| \sqrt{\frac{n(s,a)}{n(s,a)-1}\Var_{\Phat_{sa}} \left[ X_{u^\star}\right]} - \sqrt{\Var_{P_{sa}} \left[ X_{u^\star}\right]} \right| + \sqrt{\frac{n(s,a)}{n(s,a)-1}}\frac{1}{\ntot} + \frac{1}{\ntot}\nonumber\\
& \qquad\leq \spannorm{X_{u^\star}} \sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \sqrt{\frac{n(s,a)}{n(s,a)-1}}\frac{1}{\ntot} + \frac{1}{\ntot} \nonumber\\
& \qquad\leq \spannorm{X} \sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \frac{2}{\ntot}\sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \sqrt{\frac{n(s,a)}{n(s,a)-1}}\frac{1}{\ntot} + \frac{1}{\ntot} \label{eq:concentration_covering_true_vs_emp_var}
\end{align}
using~\eqref{eq:concentration_covering_span_bound} again in the final inequality.
To obtain the slightly simplified bound~\eqref{eq:concentration_helper_lemma_emp_var_term} we use that by assumption $n(s,a) \geq 2$, so $\sqrt{\frac{n(s,a)}{n(s,a)-1}} \leq \sqrt{2} \leq 2$.
Now, similarly to our use of Hoeffding's inequality, using Bernstein's inequality (e.g., \citet[Theorem 3]{maurer_empirical_2009}), as well as a union bound over all $u \in U$, we have that with probability at least $1 - 2 \delta'$, for all $u \in U$,
\begin{align*}
\left|(\Phat_{sa} - P_{sa}) X_{u} \right| \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ X_{u} \right] \log (|U|/\delta')}{n(s,a)}} + \spannorm{X_u}\frac{\log (|U|/\delta')}{3 n(s,a)}.
\end{align*}
Combining this inequality (for $u = u^\star$) along with~\eqref{eq:concentration_covering_step_1},~\eqref{eq:concentration_covering_span_bound}, and~\eqref{eq:concentration_variance_covering_step_2}, we obtain that
\begin{align*}
&\left|(\Phat_{sa} - P_{sa}) X \right| \\
&\leq \left|(\Phat_{sa} - P_{sa}) X_{u^\star} \right| + \frac{2}{\ntot} \\
& \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ X_{u^\star} \right] \log (|U|/\delta')}{n(s,a)}} + \spannorm{X_u}\frac{\log (|U|/\delta')}{3 n(s,a)}+ \frac{2}{\ntot} \\
& \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)}}+ \frac{1}{\ntot} \sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}} + \spannorm{X}\frac{\log (|U|/\delta')}{3 n(s,a)}+\frac{2}{\ntot}\frac{\log (|U|/\delta')}{3 n(s,a)}+ \frac{2}{\ntot}.
\end{align*}
Combining this with~\eqref{eq:concentration_covering_true_vs_emp_var} we furthermore obtain that
\begin{align*}
&\left|(\Phat_{sa} - P_{sa}) X \right| \\
& \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)}}+\spannorm{X}\frac{\log (|U|/\delta')}{3 n(s,a)}+ \frac{1}{\ntot} \left(\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}} +2\frac{\log (|U|/\delta')}{3 n(s,a)}+ 2\right) \\
& \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)-1}}+\spannorm{X}\frac{\log (|U|/\delta')}{3 n(s,a)}+ \frac{1}{\ntot} \left(\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}} +2\frac{\log (|U|/\delta')}{3 n(s,a)}+ 2\right) \\
& \qquad + \sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}}\left(\spannorm{X} \sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \frac{2}{\ntot}\sqrt{\frac{2 \log |U|/\delta'}{n(s,a)-1}} + \sqrt{\frac{n(s,a)}{n(s,a)-1}}\frac{1}{\ntot} + \frac{1}{\ntot} \right) \\
& \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)-1}}+\spannorm{X}\frac{7}{3}\frac{\log (|U|/\delta')}{ n(s,a)-1} \\
& \qquad + \frac{1}{\ntot} \left(\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)}} +2\frac{\log (|U|/\delta')}{3 n(s,a)}+ 2 + 2\frac{2 \log (|U|/\delta')}{n(s,a)-1} + 2\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)-1}} \right) \\
& \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ X \right] \log (|U|/\delta')}{n(s,a)-1}}+\spannorm{X}\frac{7}{3}\frac{\log (|U|/\delta')}{ n(s,a)-1} \\
& \qquad+ \frac{1}{\ntot} \left(2 + 3\sqrt{\frac{2 \log (|U|/\delta')}{n(s,a)-1}} + \frac{14}{3}\frac{ \log (|U|/\delta')}{n(s,a)-1} \right).
\end{align*}
\end{proof}
Now we develop several leave-one-out constructions which satisfy the conditions of Lemma \ref{lem:concentration_helper_lemma}.
\begin{lem}
\label{lem:LOO_constructions}
\begin{enumerate}
\item (LOO construction for $\Vhpe^\star$) For each $s,a$, there exists a set $U^1_{sa} \subseteq \R$ with $|U^1_{sa}| \leq \frac{\ntot}{1-\gamma}$ and random vectors $(X^1_u)_{u \in U^1_{sa}}$ such that 1) for all $u \in U^1_{sa}$, $X^1_u$ is independent from $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$, and 2) almost surely there exists some $u \in U^1_{sa}$ such that $\infnorm{\Vhpe^\star - X^1_u} \leq \frac{1}{\ntot}$. \label{item:LOO_constructions_1}
\item (LOO constructions for $T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\star)$) For each $s,a$, there exists a set $U^2_{sa}\subseteq \R$ with $|U^2_{sa}| \leq S\frac{\ntot}{1-\gamma}$ and random vectors $(X^2_u)_{u \in U^2_{sa}}$ such that 1) for all $u \in U^2_{sa}$, $X^2_u$ is independent from $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$, and 2) almost surely there exists some $u \in U^2_{sa}$ such that $\infnorm{T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\star) - X^2_u} \leq \frac{1}{\ntot}$. \label{item:LOO_constructions_2}
\item (LOO construction for $\Vhpe^\pi$) Fix any policy $\pi$. For each $s,a$, there exists a set $U^3_{sa}\subseteq \R$ with $|U^3_{sa}| \leq \frac{\ntot}{1-\gamma}$ and random vectors $(X^3_u)_{u \in U^3_{sa}}$ such that 1) for all $u \in U^3_{sa}$, $X^3_u$ is independent from $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$, and 2) almost surely there exists some $u \in U^3_{sa}$ such that $\infnorm{\Vhpe^\pi - X^3_u} \leq \frac{1}{\ntot}$. \label{item:LOO_constructions_3}
\item (LOO constructions for $T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\pi)$) Fix any policy $\pi$. For each $s,a$, there exists a set $U^4_{sa}\subseteq \R$ with $|U^4_{sa}| \leq S\frac{\ntot}{1-\gamma}$ and random vectors $(X^4_u)_{u \in U^4_{sa}}$ such that 1) for all $u \in U^4_{sa}$, $X^4_u$ is independent from $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$, and 2) almost surely there exists some $u \in U^4_{sa}$ such that $\infnorm{T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\pi) - X^4_u} \leq \frac{1}{\ntot}$. \label{item:LOO_constructions_4}
\end{enumerate}
\end{lem}
\begin{proof}
We start by showing \autoref{item:LOO_constructions_1}. Fix arbitrary $s \in \S, a \in \A$. For any $u \in \R$ we define the reward function $r^{s,u} \in \R^{\S \A}$, (random) transition matrix $\Phat^s \in \R^{\S\A \times \S}$, and (random) operator $\Tope^{s,u} : \R^\S \to \R^{\S\A}$ by (for arbitrary $s' \in \S, a' \in \S, V \in \R^\S$)
\begin{align*}
\Phat^{s}_{s'a'} &= \begin{cases}
e_{s}^\top & s' = s \\
\Phat_{s'a'} & s' \neq s
\end{cases} \\
r^{s,u}(s',a') &= \begin{cases}
u & s' = s \\
r(s',a') & s' \neq s
\end{cases} \\
\Tope^{s,u}(V)(s',a') &= r^{s,u}(s',a') +\gamma\max \left\{ \Phat^s_{s'a'} T_{\beta(s',a')}( \Phat^s_{s'a'}, V) - b^s(s',a', V), \min_{s''}(V)(s'') \right \}
\end{align*}
where
\begin{align}
b^{s}(s',a', V) := \max \left \{ \sqrt{\beta(s',a') \Var_{\Phat^s_{s'a'}} \left[T_{\beta(s',a')}(\Phat^s_{s'a'}, V)\right] } , \beta(s',a') \spannorm{ T_{\beta(s',a')}(\Phat^s_{s'a'}, V)} \right\} + \frac{5}{\ntot} \label{eq:LOO_penalty_term}
\end{align}
Note $e_{s}^\top$ is a vector which is all $0$ except for a $1$ in state $s$, meaning that state $s$ is absorbing in $\Phat^{s,u}$, for all actions. Also all actions receive reward $u$ in this state. All other state-action pairs have the same rewards and transition distributions as in the MDP $(\Phat, r)$. Also, we have defined $b^s$ and $\Tope^{s,u}$ in an identical manner to $b$ and $\Tope$, except we now use $r^{s,u}$ and $\Phat^{s}$ in place of $r$ and $\Phat$. Since all of the properties of $\Tope$ verified above only required $\Phat$ to be a valid transition matrix and for $r$ to be a vector in $[0,1]^{\S\A}$, the properties hold identically for $\Tope^{s,u}$, and thus by Lemma \ref{lem:tope_additional_properties} we have that $\Tope^{s,u}$ is $\gamma$-Lipschitz.
Now we define $\Lhat^{s,u} : \R^\S \to \R^\S$ as $\Lhat^{s,u}(V) := M \Tope^{s,u} (V)$ (for any $V \in \R^\S$). By the $\gamma$-Lipschitzness of $\Tope^{s,u}$ and the $1$-Lipschitzness of $M$, we immediately have that $\Lhat^{s,u}$ is a $\gamma$-contraction, since
\begin{align*}
\infnorm{\Lhat^{s,u}(V_1) - \Lhat^{s,u}(V_2)} = \infnorm{M \Tope^{s,u}(V_1) - M \Tope^{s,u}(V_2) } \leq \infnorm{\Tope^{s,u}(V_1) - \Tope^{s,u}(V_2)} \leq \gamma \infnorm{V_1 - V_2}
\end{align*}
for any $V_1, V_2 \in \R^\S$. Therefore contractivity implies that there exists a unique fixed point of $\Lhat^{s,u}$ (e.g. \cite[Chapter 4.5]{pugh_real_2015}), which we call $X^1_u$. Note that since $\Lhat^{s,u}$ is defined without using $\Phat_{sa}$, it is independent of all samples $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$ drawn from $P(\cdot \mid s,a)$.
Now, as intermediate steps, we show the following two properties:
\begin{enumerate}
\item[A.] For any $u, u' \in \R$, we have $\infnorm{X^1_u - X^1_{u'}} \leq \frac{|u-u'|}{1-\gamma}$.
\item[B.] Letting $U^\star = \Vhpe^\star(s) - \gamma \max_{\widetilde{a} \in \A}\max \left\{ \Phat^s_{s\widetilde{a}}T_{\beta(s,\widetilde{a})}(\Phat^s_{s\widetilde{a}}, \Vhpe^\star) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\}$, we have $X^1_{U^\star} = \Vhpe^\star$, and $U^\star \in [0,1]$.
\end{enumerate}
For A, letting $u, u' \in \R$, we can calculate that
\begin{align*}
\infnorm{X^1_u - X^1_{u'}} &= \infnorm{\Lhat^{s,u}(X^1_u) - \Lhat^{s,u'}(X^1_{u'})} = \infnorm{M \Tope^{s,u}(X^1_u) - M\Tope^{s,u'}(X^1_{u'})} \\
& \leq \infnorm{ \Tope^{s,u}(X^1_u) - \Tope^{s,u'}(X^1_{u'})} \\
& =\infnorm{ r^{s,u} - r^{s,u'} + \Tope^{s,u'}(X^1_u) - \Tope^{s,u'}(X^1_{u'})} \\
& \leq \infnorm{ r^{s,u} - r^{s,u'}} + \infnorm{\Tope^{s,u'}(X^1_u) - \Tope^{s,u'}(X^1_{u'})} \\
& \leq |u-u'| + \gamma \infnorm{X^1_u - X^1_{u'}}
\end{align*}
where the key equality step was that $\Tope^{s,u}(X^1_u) = r^{s,u} - r^{s,u'} + \Tope^{s,u'}(X^1_u)$, and in the final inequality we used $\gamma$-Lipschitzness of $\Tope^{s,u'}$. Rearranging we obtain that $\infnorm{X^1_u - X^1_{u'}} \leq \frac{|u-u'|}{1-\gamma}$ as desired, verifying A.
For B we first check that $X^1_{U^\star} = \Vhpe^\star$. It suffices to check that $M \Tope^{s, U^\star}(\Vhpe^\star) = M \Tope(\Vhpe^\star)$, because then we would have that
\begin{align*}
\Lhat^{s,U^\star}(\Vhpe^\star) = M \Tope^{s, U^\star}(\Vhpe^\star) = M \Tope(\Vhpe^\star) = M\Thpe(\Qhpe^\star) = M \Qhpe^\star = \Vhpe^\star
\end{align*}
thus showing that $\Vhpe^\star$ is a fixed point of $\Lhat^{s,U^\star}$, and by uniqueness of this fixed point we must have $X^1_{U^\star} = \Vhpe^\star$. Comparing the definitions of $\Tope(\Vhpe^\star)$ and $\Tope^{s, U^\star}(\Vhpe^\star)$, it is immediate that $M \left(\Tope^{s, U^\star}(\Vhpe^\star)\right)(s') = M \left(\Tope(\Vhpe^\star)\right)(s')$ for all $s' \neq s$, so it remains to check the equality for $s' = s$.
First we argue that for all $a' \in \A$, we have $b^s(s, a', \Vhpe^\star ) = \frac{5}{\ntot}.$ If $\beta(s,a') > 1$ then we have $T_{\beta(s,a')}(\Phat^s_{sa'}, \Vhpe^\star) = \left(\min_{s'} \Vhpe^\star(s') \right)\one$, and if $\beta(s,a') \leq 1$ then we have $T_{\beta(s,a')}(\Phat^s_{sa'}, \Vhpe^\star) = \Vhpe^\star(s)\one$, since $\Phat^s_{sa'} = e_s^\top$ ($\Phat^s_{sa'}$ transitions to state $s$ with probability $1$). Either way $T_{\beta(s,a')}(\Phat^s_{sa'}, \Vhpe^\star)$ is a multiple of the all-ones vector, which implies $\Var_{\Phat^s_{s'a'}} \left[T_{\beta(s',a')}(\Phat^s_{s'a'}, \Vhpe^\star)\right] = 0$ and $\spannorm{ T_{\beta(s',a')}(\Phat^s_{s'a'}, \Vhpe^\star)} = 0$, and thus that $b^s(s, a', \Vhpe^\star ) = \frac{5}{\ntot}.$ Therefore by the construction of $U^\star$ we have that
\begin{align*}
M \left(\Tope^{s, U^\star}(\Vhpe^\star)\right)(s) &= \max_{a'} U^\star + \gamma\max \left\{ \Phat^s_{sa'} T_{\beta(s,a')}( \Phat^s_{sa'}, \Vhpe^\star) - b^s(s,a', \Vhpe^\star), \min_{s''}(\Vhpe^\star)(s'') \right \} \\
&= \max_{a'} U^\star +\gamma \max \left\{ \Phat^s_{sa'} T_{\beta(s,a')}( \Phat^s_{sa'}, \Vhpe^\star) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} \\
&= \Vhpe^\star(s) - \gamma \max_{\widetilde{a} \in \A}\max \left\{ \Phat^s_{s\widetilde{a}}T_{\beta(s,\widetilde{a})}(\Phat^s_{s\widetilde{a}}, \Vhpe^\star) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} \\
& \qquad+\gamma \max_{a'} \max \left\{ \Phat^s_{sa'} T_{\beta(s,a')}( \Phat^s_{sa'}, \Vhpe^\star) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} \\
&= \Vhpe^\star(s) = M \left(\Tope(\Vhpe^\star)\right)(s)
\end{align*}
as desired, so we have checked that $X^1_{U^\star} = \Vhpe^\star$.
Now it remains to verify that $U^\star \in [0,1]$. Given our calculation of $T_{\beta(s,a')}(\Phat^s_{s a'}, \Vhpe^\star)$ (for any $a' \in \A$) above, we have the alternate expression for $U^\star$
\begin{align*}
U^\star &= \Vhpe^\star(s) - \gamma \begin{cases}
\max \left\{ \Vhpe^\star(s) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} & \exists a' \in \A : \beta(s, a') \leq 1 \\
\max \left\{ \min_{s''} \Vhpe^\star(s'') - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} & \text{o.w.}
\end{cases} \\
&= \Vhpe^\star(s) - \gamma \begin{cases}
\max \left\{ \Vhpe^\star(s) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} & \exists a' \in \A : \beta(s, a') \leq 1 \\
\min_{s''} \Vhpe^\star(s'') & \text{o.w.}
\end{cases}.
\end{align*}
We consider the two cases in the above expression. If $\exists a' \in \A : \beta(s, a') \leq 1$, then we can upper bound $U^\star$ as
\begin{align*}
U^\star \leq \Vhpe^\star(s) - \gamma \max \left\{ \Vhpe^\star(s) - \frac{5}{\ntot}, \min_{s''} \Vhpe^\star(s'')\right\} \leq \Vhpe^\star(s) - \gamma \Vhpe^\star(s) \leq (1-\gamma)\frac{1}{1-\gamma} = 1
\end{align*}
where the last inequality is due to the fact that $\Vhpe^\star = M \Qhpe^\star \leq M\frac{1}{1-\gamma}\one = \frac{1}{1-\gamma}\one$ (by Lemma \ref{lem:pessimistic_Bellman_operator_properties}). For the lower bound in this case, we have
\begin{align*}
U^\star = \min \left\{ (1-\gamma)\Vhpe^\star(s) + \frac{5}{\ntot}, \Vhpe^\star(s) - \min_{s''} \Vhpe^\star(s'')\right\}
\end{align*}
which is clearly $\geq 0$ (note the first term within the $\min$ is $\geq 0$ by Lemma \ref{lem:pessimistic_Bellman_operator_properties}).
Now we consider the case that there does not exist $a' \in \A $ such that $ \beta(s, a') \leq 1$, that is, the case that $\beta(s,a') > 1$ for all $a' \in \A$. Then as argued above we have for all $a' \in \A$ that $T_{\beta(s,a')}(\Phat_{sa'}, \Vhpe^\star) = \left(\min_{s''} \Vhpe^\star(s'') \right)\one$, and so by the definition of $\Thpe$ and the fact that $\Qhpe^\star $ is its fixed point and $\Vhpe^\star = M \Qhpe^\star$, we have
\begin{align*}
\Vhpe^\star(s) &=\max_{a' \in \A} r(s,a') +\gamma\max \left\{ \Phat_{sa'} T_{\beta(s,a')}( \Phat_{sa'}, \Vhpe^\star) - b(s,a', \Vhpe^\star), \min_{s''} \Vhpe^\star(s'') \right \} \\
&= \max_{a' \in \A} r(s,a') +\gamma\max \left\{ \min_{s''} \Vhpe^\star(s'') -b(s,a', \Vhpe^\star), \min_{s''} \Vhpe^\star(s'') \right \} \\
&= \max_{a' \in \A} r(s,a') +\gamma \min_{s''} \Vhpe^\star(s'')
\end{align*}
(using the fact that $b(s,a', \Vhpe^\star) \geq 0$ to compute the max). Hence in this case
\begin{align*}
U^\star = \Vhpe^\star(s) - \gamma \min_{s''} \Vhpe^\star(s'') = \max_{a' \in \A} r(s,a') +\gamma \min_{s''} \Vhpe^\star(s'')- \gamma \min_{s''} \Vhpe^\star(s'') = \max_{a' \in \A} r(s,a')
\end{align*}
which is clearly in $[0,1]$.
We have thus verified B.
Now unfix $u$ and let $U^1_{sa}$ be a set of $\frac{\ntot}{1-\gamma}$ points chosen by dividing $[0,1]$ into $\frac{\ntot}{1-\gamma}$ intervals and placing a point at the midpoint of each such interval. Note this guarantees that for any $x \in [0,1]$ there exists some $u \in U$ such that $|x-u| \leq \frac{1-\gamma}{2\ntot}$. Therefore, letting $\widetilde{U}^\star \in U$ be this closest point in $U$ to the value $U^\star $, we have by A and B that
\begin{align*}
\infnorm{X^1_{\widetilde{U}^\star} - \Vhpe^\star} = \infnorm{X^1_{\widetilde{U}^\star} - X^1_{U^\star}} \leq \frac{|\widetilde{U}^\star-U^\star|}{1-\gamma} \leq \frac{1}{1-\gamma}\frac{1-\gamma}{2\ntot} = \frac{1}{2\ntot} \leq \frac{1}{\ntot}.
\end{align*}
Therefore we have confirmed \autoref{item:LOO_constructions_1}.
Now we continue to \autoref{item:LOO_constructions_2}. Fix $s \in \S, a \in \A$, and define $U^2_{sa} = U^1_{sa} \times \S$. For each $u, s' \in U^2_{sa}$, we define
\begin{align*}
X^2_{u,s'} = \clip(X^1_{u}, X^1_{u}(s')),
\end{align*}
that is, we clip all entries of the vector $X^1_{u}$ constructed in the previous part so that they are $\leq X^1_{u}(s')$. Since $X^1_{u}$ was independent of all samples $S^1_{sa}, \dots, S^{n(s,a)}_{sa}$ drawn from $P(\cdot \mid s,a)$, the same is true of $X^2_{u,s'}$. Define $S^\star(s,a)$ to be a state such that $Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) = \Vhpe^\star(S^\star(s,a))$ (if multiple states satisfy this, we can break ties in some consistent manner). Then for any $u, s' \in U^2_{sa}$ we have
\begin{align}
\infnorm{T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\star) - X^2_{u,s'}} &= \infnorm{\clip\left(\Vhpe^\star, Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)\right) - \clip(X^1_{u}, X^1_{u}(s'))} \nonumber\\
&=\infnorm{\clip\left(\Vhpe^\star, \Vhpe^\star(S^\star(s,a))\right) - \clip(X^1_{u}, X^1_{u}(s'))} \nonumber\\
&\leq \infnorm{\clip\left(\Vhpe^\star, \Vhpe^\star(S^\star(s,a))\right) - \clip\left(X^1_{u}, \Vhpe^\star(S^\star(s,a))\right)} \nonumber \\
&\qquad +\infnorm{ \clip\left(X^1_{u}, \Vhpe^\star(S^\star(s,a))\right) -\clip(X^1_{u}, X^1_{u}(s'))} \nonumber \\
& \leq \infnorm{\Vhpe^\star - X^1_u} + \left|\Vhpe^\star(S^\star(s,a)) - X^1_{u}(s')\right|. \label{eq:LOO_constructions_2_intermediate_bound}
\end{align}
From \autoref{item:LOO_constructions_1} we know there exists some $u \in U^1_{sa}$ such that $\infnorm{\Vhpe^\star - X^1_u} \leq \frac{1}{2\ntot}$, and furthermore if $s' = S^\star(s,a)$ then
\begin{align*}
\left|\Vhpe^\star(S^\star(s,a)) - X^1_{u}(s')\right| = \left|\Vhpe^\star(s') - X^1_{u}(s')\right| \leq \infnorm{\Vhpe^\star - X^1_u} \leq \frac{1}{2\ntot}.
\end{align*}
Combining these with~\eqref{eq:LOO_constructions_2_intermediate_bound} we conclude that almost surely there exists some $(u, s') \in U^1_{sa} \times \S = U^2_{sa}$ such that $\infnorm{T_{\beta(s,a)}(\Phat_{sa},\Vhpe^\star) - X^2_{u,s'}} \leq \frac{1}{\ntot}$ as desired. Therefore we have confirmed \autoref{item:LOO_constructions_2}.
For \autoref{item:LOO_constructions_3} and \autoref{item:LOO_constructions_4}, we can use nearly identical constructions, with the only difference being that for \autoref{item:LOO_constructions_3} we define $X^3_u$ to be the fixed point of the operator $\Lhat^{\pi, s,u} : \R^\S \to \R^\S$ as $\Lhat^{\pi, s,u}(V) := M^\pi \Tope^{s,u} (V)$ (and otherwise use the same construction as for $X^1_u$), and then for \autoref{item:LOO_constructions_4} we use $X^3_u$ in place of $X^1_u$ in the construction for $X^2_u$. Thus, the key difference is replacing $M$ with $M^\pi$ within the construction for $X^3_u$, and since the only properties of $M$ used were $1$-Lipschitzness and that $M \one = \one$, which both hold with $M^\pi$ in place of $M$, and also the fact that $\Vhpe^\star = M \Qhpe^\star$ which is analogous to the fact that $\Vhpe^{\pi} = M^{\pi} \Qhpe^{\pi}$, all steps work in an analogous manner.
\end{proof}
Now we can prove the key concentration inequalities needed for the rest of the proof.
\begin{lem}
\label{lem:concentration_for_pessimism_Thpe}
With probability at least $1 - \delta$, for all $s \in \S, a \in \A$, if $n(s,a) \geq 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, then
\begin{align*}
&\left|\left(\Phat_{sa} - P_{sa}\right) T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right| \\
& \qquad\leq \max \left \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)\right] } , \beta(s,a) \spannorm{ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)} \right\} + \frac{4.5}{\ntot} \\
&\qquad = b(s,a, \Vhpe^\star) - \frac{1}{2 \ntot}
\end{align*}
where $\alpha = 8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$ and $\beta(s,a) = \frac{\alpha}{\max\{n(s,a)-1,1\}}$.
\end{lem}
\begin{proof}
Fix some $s \in \S$ and $a \in \A$. If $n(s,a) < 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$ then we have nothing to check. Otherwise, we can immediately combine \autoref{item:LOO_constructions_2} of Lemma \ref{lem:LOO_constructions} (which gives $|U| \leq S\frac{\ntot}{1-\gamma}$) with Lemma \ref{lem:concentration_helper_lemma} (since our condition on $n(s,a)$ clearly implies $n(s,a) \geq 2$) to conclude that with probability at least $1 - 6 \delta'$,
\begin{multline*}
\left|(\Phat_{sa} - P_{sa}) T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right| \\
\qquad \qquad \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right] \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{n(s,a)-1}}+\spannorm{T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)}\frac{7}{3}\frac{\log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{ n(s,a)-1} \\
+ \frac{1}{\ntot} \left(2 + 3\sqrt{\frac{2 \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{n(s,a)-1}} + \frac{14}{3}\frac{ \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{n(s,a)-1} \right).
\end{multline*}
Taking a union bound over all $s \in \S, a \in \A$, and setting $\delta' = \frac{\delta}{6SA}$, we obtain that with probability at least $1 - \delta$, for all $s \in \S, a \in \A$ where $n(s,a) \geq 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, we have
\begin{align*}
&\left|(\Phat_{sa} - P_{sa}) T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right| \\
& \leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1}}+\spannorm{T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)}\frac{7}{3}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ n(s,a)-1} \\
& \qquad\qquad\qquad+ \frac{1}{\ntot} \left(2 + 3\sqrt{\frac{2 \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1}} + \frac{14}{3}\frac{ \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1} \right)\\
&\quad\leq \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1}}+\spannorm{T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)}\frac{7}{3}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ n(s,a)-1} + \frac{4.5}{\ntot} \\
&\quad\leq 2\max \left\{ \sqrt{\frac{2 \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1}}, \spannorm{T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)}\frac{7}{3}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ n(s,a)-1} \right\} + \frac{4.5}{\ntot} \\
&\quad= \max \left\{ \sqrt{\frac{8 \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star) \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)-1}}, \spannorm{T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^\star)}\frac{14}{3}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ n(s,a)-1} \right\} + \frac{4.5}{\ntot} \\
&\quad\leq b(s,a, \Vhpe^\star) - \frac{1}{2\ntot}.
\end{align*}
where the second inequality uses the assumption that $n(s,a) \geq 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$ and the fact that $2 + 3 \sqrt{\frac{1}{4}} + \frac{14}{3}\frac{1}{8} < 4.5$, and then we bounded $a + b \leq 2 \max\{a,b\}$. We also note that since we are in the case that $n(s,a) \geq 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right) \geq 9$, we have that $n(s,a) - 1 = \max\{n(s,a) - 1, 1\}$.
\end{proof}
\begin{lem}
\label{lem:concentration_for_pessimism_Thpe_pistar}
Fix any policy $\pistar$.
With probability at least $1 - 2\delta$, for all $s \in \S, a \in \A$, if $n(s,a) \geq 1 + 8\ln \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, then
\begin{align*}
&\left|\left(\Phat_{sa} - P_{sa}\right) T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) \right| \\
&\qquad \leq \max \left \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})\right] } , \beta(s,a) \spannorm{ T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \right\} + \frac{5}{\ntot} \\
&\qquad = b(s,a, \Vhpe^{\pistar})
\end{align*}
and
\begin{align}
\sqrt{\Var_{\Phat_{sa}} \left[\Vhpe^{\pistar}\right] } \leq \sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\frac{2 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{n(s,a)}} + \frac{4}{\ntot} \label{eq:concentration_for_pessimism_Thpe_pistar_variance}
\end{align}
and
\begin{align}
\left|(\Phat_{sa} - P_{sa}) \Vhpe^{\pistar} \right| & \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)}}+\spannorm{\Vhpe^{\pistar}}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ 3n(s,a)} + \frac{3}{\ntot} \label{eq:concentration_for_pessimism_Thpe_pistar_bernstein}
\end{align}
where $\alpha = 8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$ and $\beta(s,a) = \frac{\alpha}{\max\{n(s,a)-1,1\}}$.
\end{lem}
\begin{proof}
The first statement is analogous to Lemma \ref{lem:concentration_for_pessimism_Thpe} but uses the construction of \autoref{item:LOO_constructions_4} of Lemma \ref{lem:LOO_constructions} in place of \autoref{item:LOO_constructions_2}. Thus combining \autoref{item:LOO_constructions_4} of Lemma \ref{lem:LOO_constructions} with Lemma \ref{lem:concentration_helper_lemma}, taking a union bound and performing the same simplifications, we obtain that with probability at least $1 - \delta$,
for all $s \in \S, a \in \A$, if $n(s,a) \geq 1 + 8\ln \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, then
\begin{align*}
\left|\left(\Phat_{sa} - P_{sa}\right) T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) \right| & \leq b(s,a, \Vhpe^{\pistar}) .
\end{align*}
Now we establish the second two properties. We will show that they both hold with probability $1-\delta$, after which we are done since we can then use a union bound to combine with the above. Fixing some $s \in \S$ and $a \in \A$, if $n(s,a) < 1+8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$ then we have nothing to check. Otherwise, we can immediately combine \autoref{item:LOO_constructions_3} of Lemma \ref{lem:LOO_constructions} (which gives $|U| \leq \frac{\ntot}{1-\gamma} \leq S\frac{\ntot}{1-\gamma}$) with Lemma \ref{lem:concentration_helper_lemma} (since our condition on $n(s,a)$ implies $n(s,a) \geq 2$) to conclude that with probability at least $1 - 6 \delta'$, we have both
\begin{align}
\left|(\Phat_{sa} - P_{sa}) \Vhpe^{\pistar} \right| & \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right] \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{n(s,a)}}+\spannorm{\Vhpe^{\pistar}}\frac{\log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{ 3n(s,a)} \nonumber\\
&\qquad \qquad + \frac{1}{\ntot} \left(2 + \sqrt{\frac{2 \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{n(s,a)}} + 2\frac{ \log \left(S\frac{\ntot}{(1-\gamma)\delta'} \right)}{3n(s,a)} \right) \label{eq:concentration_for_pessimism_Thpe_pistar_1}
\end{align}
and
\begin{align}
\sqrt{\frac{n(s,a)}{n(s,a)-1}}\sqrt{\Var_{\Phat_{sa}} \left[\Vhpe^{\pistar}\right]} &\leq \sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\frac{2 \log \left( \frac{S\ntot}{(1-\gamma)\delta'}\right)}{n(s,a)-1}} \\
& \qquad \qquad + \frac{1}{\ntot}\left(2\sqrt{\frac{2 \log \left( \frac{S\ntot}{(1-\gamma)\delta'}\right)}{n(s,a)-1}} + 3\right).\label{eq:concentration_for_pessimism_Thpe_pistar_2}
\end{align}
Taking a union bound over all $s, a \in \S, \A$ and setting $\delta' = \frac{\delta}{6SA}$, we have that with probability at least $1 - \delta$, for all $s,a$ such that $n(s,a) \geq 1 + 8\ln \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, both
\begin{align*}
\left|(\Phat_{sa} - P_{sa}) \Vhpe^{\pistar} \right| & \leq \sqrt{\frac{2 \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)}}+\spannorm{\Vhpe^{\pistar}}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ 3n(s,a)} + \frac{3}{\ntot}
\end{align*}
and
\begin{align*}
\sqrt{\Var_{\Phat_{sa}} \left[\Vhpe^{\pistar}\right]} &\leq \sqrt{\frac{n(s,a)-1}{n(s,a)}}\sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\frac{2 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{n(s,a)}} \\
& \qquad \qquad + \frac{1}{\ntot}\left(2\sqrt{\frac{2 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{n(s,a)}} + 3\right) \\
& \leq \sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\frac{2 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{n(s,a)}} + \frac{4}{\ntot}
\end{align*}
where for the first bound we simplified~\eqref{eq:concentration_for_pessimism_Thpe_pistar_1} using the condition on $n(s,a)$ and the fact that $2 + \sqrt{\frac{2}{8}} + \frac{2}{3}\frac{1}{8} < 3$, and for the second bound we simplified~\eqref{eq:concentration_for_pessimism_Thpe_pistar_2} also using the condition on $n(s,a)$ and then the fact that $2 \sqrt{\frac{2}{8}} + 3 = 4$.
\end{proof}
\subsection{Pessimism}
In this subsection we establish the following essential pessimism property, making use of the previous concentration results and our construction of $\Thpe$.
\begin{lem}
\label{lem:pessimism}
Under the event in Lemma \ref{lem:concentration_for_pessimism_Thpe}, we have that
\begin{align*}
Q^{\pihat} \geq \Qhat.
\end{align*}
\end{lem}
\begin{proof}
We will show that $\T^{\pihat}(\Qhat) \geq \Qhat$ (where $\T^{\pihat}(Q) := r + PM^{\pihat} Q$ is the Bellman evaluation operator for $\pihat$), which by a standard argument implies that $Q^{\pihat} \geq \Qhat$, since we can then easily derive (by monotonicity of $\T^{\pihat}$) that $(\T^{\pihat})^{(k)}(\Qhat) \geq \Qhat$ for any integer $k \geq 0$, and thus
\begin{align*}
Q^{\pihat} = \lim_{k\to\infty}(\T^{\pihat})^{(k)}(\Qhat) \geq \Qhat.
\end{align*}
Fixing arbitrary $s \in \S, a \in \A$, we will now verify that $\T^{\pihat}(\Qhat)(s,a) \geq \Qhat(s,a)$. From Lemma \ref{lem:opt_guarantees} we have that $\Thpe(\Qhat)(s,a) \geq \Qhat(s,a)$.
We consider two cases based upon the value of $\Thpe(\Qhat)(s,a)$, which by~\eqref{eq:defn_of_Thpe} is either 1) equal to $r(s,a) + \gamma \Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\Qhat) - \gamma b(s,a,M\Qhat)$ or 2) equal to $r(s,a) + \gamma \min_{s'} (M\Qhat)(s')$. In the simpler case 2, we thus have that
\begin{align*}
\Thpe(\Qhat)(s,a) = r(s,a) + \gamma \min_{s'} (M\Qhat)(s') \leq r(s,a) + \gamma P_{sa} M \Qhat = r(s,a) + \gamma P_{sa} M^{\pihat} \Qhat = \T^{\pihat}(\Qhat)(s,a)
\end{align*}
using the facts that $\min_{s'} V(s') \leq P_{sa} V$ for any $V \in \R^{\S}$ (since $P_{sa}$ is a probability distribution) and that $M \Qhat = M^{\pihat} \Qhat$ since $\pihat$ is greedy with respect to $\Qhat$. We therefore have that $\Qhat(s,a) \leq \Thpe(\Qhat)(s,a) \leq \T^{\pihat}(\Qhat)(s,a)$ in case 2, as desired. Now we consider case 1. Note that since we are in case 1, we must have that $\beta(s,a) \leq 1$, which implies that $n(s,a) \geq \alpha + 1$ (because if we had $\beta(s,a) > 1$, then we would have $T_{\beta(s,a)}(\Phat_{sa}, M\Qhat) = \min_{s'} (M\Qhat)(s')$, and $b(s,a, M\Qhat)>0$, so the term $T_{\beta(s,a)}(\Phat_{sa}, M\Qhat) - b(s,a, M\Qhat)$ could not have achieved the maximum in the definition~\eqref{eq:defn_of_Thpe} of $\Thpe$). Then we have that
\begin{align*}
\Qhat(s,a) &\leq \Thpe(\Qhat)(s,a) \\
& \leq \Thpe(\Qhpe^\star)(s,a) = r(s,a) + \gamma \Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\Qhpe^\star) - \gamma b(s,a,M\Qhpe^\star) \\
& \leq r(s,a) + \gamma P_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\Qhpe^\star) + \gamma \left|(\Phat_{sa} - P_{sa}) T_{\beta(s,a)}(\Phat_{sa}, M\Qhpe^\star)\right| - \gamma b(s,a,M\Qhpe^\star) \\
& \leq r(s,a) + \gamma P_{sa} T_{\beta(s,a)}(\Phat_{sa}, M\Qhpe^\star) + \gamma b(s,a,M\Qhpe^\star) - \frac{1}{2\ntot} - \gamma b(s,a,M\Qhpe^\star) \\
& \leq r(s,a) + \gamma P_{sa} M\Qhpe^\star -\frac{1}{2\ntot} \\
& \leq r(s,a) + \gamma P_{sa} M\Qhat \\
& = r(s,a) + \gamma P_{sa} M^{\pihat}\Qhat = \T^{\pihat}(\Qhat)(s,a)
\end{align*}
where the first inequality is due to $\Thpe(\Qhat) \geq \Qhat$ from Lemma \ref{lem:opt_guarantees}, the second inequality is due to monotonicity of $\Thpe$ (Lemma \ref{lem:pessimistic_Bellman_operator_properties}) and the fact that $\Qhat \leq \Qhpe^\star$ (Lemma \ref{lem:opt_guarantees}), the third inequality is by triangle inequality, the fourth inequality is from Lemma \ref{lem:concentration_for_pessimism_Thpe}, the fifth inequality is from the trivial fact that elementwise $T_{\beta(s,a)}(\Phat_{sa}, M\Qhpe^\star) \leq M \Qhpe^\star$, the sixth inequality follows from $\Qhpe^\star \leq \Qhat + \frac{1}{2\ntot}\one$ due to Lemma \ref{lem:opt_guarantees} (since by monotonicity of $M$, $M\Qhpe^\star \leq M(\Qhat + \frac{1}{2\ntot}\one) = M \Qhat + \frac{1}{2\ntot}\one$), and the final equality is from the definition of $\pihat$ (from Algorithm \ref{alg:LCBVI}) since it is greedy with respect to $\Qhat$. Combining the two cases we have shown that $\T^{\pihat}(\Qhat) \geq \Qhat$ as desired.
Combining the two cases we have shown that $\T^{\pihat}(\Qhat) \geq \Qhat$ as desired.
\end{proof}
%\begin{lem}
% \label{lem:pistar_eval_pessimism}
% Under the event in Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar}, we have that
% \begin{align*}
% V^{\pistar} \geq \Vhpe^{\pistar}.
% \end{align*}
%\end{lem}
%\begin{proof}
% The proof of this lemma is analogous to the proof of Lemma \ref{lem:pessimism}. It suffices to show that $Q^{\pistar} \geq \Qhpe^{\pistar}$, since then by monotonicity of $M^{\pistar}$ we have that
% \begin{align*}
% V^{\pistar} = M^{\pistar} Q^{\pistar} \geq M^{\pistar}\Qhpe^{\pistar} = \Vhpe^{\pistar}.
% \end{align*}
%\end{proof}
\subsection{Policy hitting radius lemmas}
\label{sec:pol_hit_rad_lemmas}
In this subsection we establish some key properties regarding the relationship between $\Dow$ and certain discounted policy occupancy measures which will appear in later analysis steps. We also establish some facts about $\Dow$ of general interest and compare it to the mixing time.
Recall that $\eta_{s} := \inf\{t \geq 0 : S_t = s\}$ is the first hitting time of state $s$.
We define an additional useful quantity: for any $s^\star \in \S$, let
\begin{align*}
\Dow(P, \pi, s^\star) := \sup_{s_0} \E_{s_0}^\pi \eta_{s^\star}.
\end{align*}
This is the maximum expected hitting time of state $s^\star$ in the Markov chain $P_\pi$ (which can be infinite). Then we have
\begin{align*}
\Dow(P, \pi) := \inf_{s^\star} \Dow(P, \pi, s^\star) = \inf_{s^\star} \sup_{s_0} \E_{s_0}^\pi \eta_{s^\star}.
\end{align*}
$\Dow(P, \pi)$ is finite if and only if $P_\pi$ is unichain:
\begin{lem}
\label{lem:Dow_finite_unichain}
Fix a policy $\pi$ and an MDP transition kernel $P$. Then the Markov chain $P_\pi$ is unichain if and only if $\Dow(P, \pi)$ is finite.
\end{lem}
\begin{proof}
First, suppose that $\Dow(P, \pi)$ is finite. Then there exists some $s^\star$ such that for all $s_0 \in \S$, $\E^\pi_{s_0} \eta_{s^\star} < \infty$. Therefore $s^\star$ is reachable from any state, so all recurrent classes must contain $s^\star$, but since the irreducible closed recurrent classes (along with the transient states) form a partition of $\S$, this implies that there can only be one closed irreducible recurrent class, that is that $P_\pi$ is unichain.
Next, suppose that $P_\pi$ is unichain. Let $\tilde{s}^\star$ be some state in the single closed irreducible recurrent class of $P_\pi$. Now we argue that $\E_{s_0}^\pi[\eta_{\tilde{s}^\star}] < \infty$ for any $s_0 \in \S$. First, it is a standard fact (in finite Markov chains) that letting $C$ be the recurrent class, we have $M := \max_{s_0 \in C} \E_{s_0}^\pi[\eta_{\tilde{s}^\star}] < \infty$ (e.g. \cite{kemeny_finite_1976}, where $\E_{s_0}^\pi[\eta_{\tilde{s}^\star}]$ is referred to as the mean first passage time). Now letting $s_0$ be any fixed transient state, since there exists a unique irreducible recurrent class $C$, letting $\eta_C = \inf\{t \geq 0 : S_t \in C\}$ be its first hitting time, it is also a standard fact (for finite Markov chains) that $\E_{s_0}^\pi \eta_C < \infty$ (replacing $C$ with a single absorbing state, the new chain becomes an absorbing chain, and the absorption time formulas in \cite{kemeny_finite_1976} imply $\E_{s_0}^\pi \eta_C < \infty$). Then a calculation using the strong Markov property (where $\mathcal{F}_{\eta_C}$ is the stopped sigma-algebra associated with the stopping time $\eta_C$) implies that
\begin{align*}
\E^\pi_{s_0}[\eta_{\tilde{s}^\star}] = \E^\pi_{s_0} \E^\pi_{s_0}\left[\eta_{\tilde{s}^\star} \mid \mathcal{F}_{\eta_C}\right] = \E^\pi_{s_0} \left[\E^\pi_{S_{\eta_C}}\left[\eta_{\tilde{s}^\star} \right] + \eta_{C} \right] \leq \E^\pi_{s_0} \left[M + \eta_{C} \right] < \infty.
\end{align*}
Since there are only a finite number of such transient states $s_0$, the maximum of $\E^\pi_{s_0}[\eta_{\tilde{s}^\star}]$ over all such states is finite. Hence $\Dow(P, \pi) \leq \max_{s_0 \in \S} \E_{s_0}^\pi[\eta_{\tilde{s}^\star}] < \infty$.
\end{proof}
Define $d^\pi_{\gamma,s_0} \in \R^\S$ as
\begin{align*}
d^\pi_{\gamma,s_0}(s) = \sum_{t=0}^\infty \gamma^t e_{s_0}^\top P_\pi^t e_s.
\end{align*}
We often drop the dependence on $\gamma, \pi$ and simply write $d_{s_0}$. We also define $d^\star(s) = \frac{1}{1-\gamma}\mu^\star(s)$.
\begin{lem}
\label{lem:occupancy_l1_diff_coupling_bound}
Let $s^\star \in \S$ satisfy $\Dow(P, \pi) = \Dow(P, \pi, s^\star)$. Then
\begin{align*}
\sup_{s_0} \sum_{s \in \S} \left| d_{s_0}(s) - d_{s^\star}(s)\right| \leq 2 \Dow(P, \pi)
\end{align*}
and
\begin{align*}
\sup_{s_0, s_1} \sum_{s \in \S} \left| d_{s_0}(s) - d_{s_1}(s)\right| \leq 4 \Dow(P, \pi).
\end{align*}
\end{lem}
\begin{proof}
We use a coupling argument, and these calculations are somewhat inspired by those in \cite[Lemma B.13]{cheikhi_statistical_2023}.
Starting with the first statement, fix some $s_0 \in \S$. Let $S^\star_0, S^\star_1, \dots,$ be the stochastic process with distribution given by the Markov chain $P_\pi$ with starting state $s^\star$, and let $S_0, S_1, \dots,$ be the stochastic process with distribution given by the Markov chain $P_\pi$ but with starting state $s_0$. Let $\eta_{s^\star} = \inf \{t : S_t = s^\star\}$ be the first hitting time of the state $s^\star$ by the process $(S_t)_{t=0}^\infty$. Now define the process $S'_0, S'_1, \dots$ identically to $(S_t)_{t=0}^\infty$ but to follow $(S^\star_t)_{t=0}^\infty$ once it reaches $s^\star$, that is $S'_{\eta_{s^\star}} = S^\star_0, S'_{\eta_{s^\star}+1} = S^\star_1,$ and so on.
It is a standard fact due to the Markov property that $(S'_t)_{t=0}^\infty$ has the same distribution as $(S_t)_{t=0}^\infty$. Now add an absorbing terminal state $\term$ (which we do not consider as an element of $\S$) and for all $t \geq 1$ let $Z_t \sim \text{Bernoulli}(\gamma)$ (independently), and define the processes $(\St'_{t})_{t=0}^\infty$ and $(\St^\star_{t})_{t=0}^\infty$ by $\St'_{0} = S'_0$, $\St^\star_0 = S^\star_0$, and for all $t \geq 0$,
\begin{align*}
\St^\star_{t+1} &= \begin{cases}
\term & \text{$\exists k \in \{1, \dots, t+1\}$ such that $Z_k = 1$} \\
S^\star_{t+1} & \text{otherwise}
\end{cases},\\
\St'_{t+1} &= \begin{cases}
\term & \text{$\exists k \in \{1, \dots, t+1\}$ such that $Z_k = 1$} \\
S'_{t+1} & \text{otherwise}
\end{cases}.
\end{align*}
Intuitively speaking, $(\St'_{t})_{t=0}^\infty$ and $(\St^\star_{t})_{t=0}^\infty$ will reach the absorbing state $\term$ at the same time, and the probability of reaching it on any given timestep is $\gamma$ if it has not yet been reached. It is a standard fact that $d^\pi_{\gamma,s_0}(s) = \E \sum_{t=0}^\infty \ind(\St'_t = s)$ and that $d^\pi_{\gamma,s^\star}(s) = \E \sum_{t=0}^\infty \ind(\St^\star_t = s)$.
Hence using the above coupling we can bound $d^\pi_{\gamma,s_0}(s) - d^\pi_{\gamma,s^\star}(s)$. Specifically we have
\begin{align}
\sum_{s \in \S} \left|d^\pi_{\gamma,s_0}(s) - d^\pi_{\gamma,s^\star}(s) \right| &= \sum_{s \in \S} \left|\E \sum_{t=0}^\infty\left( \ind(\St'_t = s) - \ind(\St^\star_t = s) \right)\right| \nonumber\\
& \leq \sum_{s \in \S} \E\left| \sum_{t=0}^\infty\left( \ind(\St'_t = s) - \ind(\St^\star_t = s) \right)\right| \nonumber\\
&= \E \sum_{s \in \S} \left| \sum_{t=0}^{\eta_{\term}-1} \left( \ind(\St'_t = s) - \ind(\St^\star_t = s) \right)\right| \label{eq:dow_coupling_1}
\end{align}
where in the final equality we let $\eta_{\term} = \inf \{t \geq 1 : Z_t = 1\}$ be the first hitting time of the terminal state.
Now we consider two cases. On the event that $\eta_{\term} \leq \eta_{s^\star}$, we have
\begin{align*}
\sum_{s \in \S} \left| \sum_{t=0}^{\eta_{\term}-1} \left( \ind(\St'_t = s) - \ind(\St^\star_t = s) \right)\right| & \leq \sum_{s \in \S} \sum_{t=0}^{\eta_{\term}-1}\left| \ind(\St'_t = s) - \ind(\St^\star_t = s) \right| \\
&= \sum_{t=0}^{\eta_{\term}-1} 2 \ind(\St'_t \neq \St^\star_t) \\
&= 2 \eta_{\term} \leq 2 \eta_{s^\star}.
\end{align*}
On the event that $\eta_{s^\star} < \eta_{\term}$, we have
\begin{align*}
&\sum_{s \in \S} \left| \sum_{t=0}^{\eta_{\term}-1} \left( \ind(\St'_t = s) - \ind(\St^\star_t = s) \right)\right| \\
&= \sum_{s \in \S} \left| \sum_{t=0}^{\eta_{\term}-1} \left( \ind(S'_t = s) - \ind(S^\star_t = s) \right)\right| \\
&= \sum_{s \in \S} \left| \sum_{t=0}^{\eta_{s^\star}-1} \ind(S'_t = s) + \sum_{t=\eta_{s^\star}}^{\eta_{\term}-1} \ind(S'_t = s) - \sum_{t=0}^{\eta_{\term} - \eta_{s^\star}-1}\ind(S^\star_t = s) - \sum_{t=\eta_{\term} - \eta_{s^\star}}^{\eta_{\term} -1}\ind(S^\star_t = s) \right| \\
&= \sum_{s \in \S} \left| \sum_{t=0}^{\eta_{s^\star}-1} \ind(S'_t = s) - \sum_{t=\eta_{\term} - \eta_{s^\star}}^{\eta_{\term} - 1}\ind(S^\star_t = s) \right| \\
&= \sum_{s \in \S} \left| \sum_{t=0}^{\eta_{s^\star}-1} \left( \ind(S'_t = s) - \ind(S^\star_{t + \eta_{\term} - \eta_{s^\star}} = s) \right) \right| \\
& \leq \sum_{s \in \S} \sum_{t=0}^{\eta_{s^\star}-1} \left| \ind(S'_t = s) - \ind(S^\star_{t + \eta_{\term} - \eta_{s^\star}} = s) \right| \\
& = 2 \sum_{t=0}^{\eta_{s^\star}-1} \ind(S'_t \neq S^\star_{t + \eta_{\term} - \eta_{s^\star}}) \leq 2 \eta_{s^\star}
\end{align*}
using the fact that $S'_{\eta_{s^\star}} = S^\star_0, S'_{\eta_{s^\star}+1} = S^\star_1, \dots$ to cancel terms.
Combining the bounds for the two cases with~\eqref{eq:dow_coupling_1}, we have that
\begin{align*}
\sum_{s \in \S} \left|d^\pi_{\gamma,s_0}(s) - d^\pi_{\gamma,s^\star}(s) \right|
&\leq \E 2 \eta_{s^\star} \leq 2 \Dow(P, \pi)
\end{align*}
as desired.
The second statement of the lemma follows immediately from the first, since by triangle inequality
\begin{align*}
\sup_{s_0, s_1} \sum_{s \in \S} \left| d_{s_0}(s) - d_{s_1}(s)\right| = \sup_{s_0, s_1} \onenorm{d_{s_0} - d_{s_1}} \leq \sup_{s_0, s_1} \onenorm{d_{s_0} - d_{s^\star}} + \onenorm{d_{s^\star} - d_{s_1}} \leq 4 \Dow(P, \pi).
\end{align*}
\end{proof}
\begin{lem}
\label{lem:occupancy_l1_diff_coupling_bound_stationary}
Let $\pi$ be a policy such that $P_\pi$ is unichain, and let $\mu^\pi \in \R^\S$ denote its stationary distribution. Then
\begin{align*}
\sum_{s \in \S} \left|d^\pi_{\gamma, s_0}(s) - \frac{1}{1-\gamma}\mu^\pi(s)\right| \leq 4\Dow(P, \pi).
\end{align*}
\end{lem}
\begin{proof}
Since $\mu^\pi$ is a stationary distribution, we have for any $s \in \S$ that
\begin{align*}
\sum_{s' \in \S} \mu^\pi(s') d^\pi_{\gamma, s'}(s) = (\mu^\pi)^\top (I - \gamma P_\pi)^{-1} e_s = (\mu^\pi)^\top \sum_{t=0}^\infty \gamma^t P_\pi^t e_s = \sum_{t=0}^\infty \gamma^t (\mu^\pi)^\top e_s = \frac{1}{1-\gamma}\mu^\pi(s)
\end{align*}
(since $(\mu^\pi)^\top P_\pi = (\mu^\pi)^\top$). Then we can calculate by Jensen's inequality that for any fixed $s \in \S$,
\begin{align*}
\left| d^\pi_{\gamma, s_0}(s) - \frac{1}{1-\gamma}\mu^\pi(s) \right| &= \left| d^\pi_{\gamma, s_0}(s) - \sum_{s' \in \S} \mu^\pi(s') d^\pi_{\gamma, s'}(s) \right| \\
&= \left| \sum_{s' \in \S} \mu^\pi(s') \left( d^\pi_{\gamma, s_0}(s) - d^\pi_{\gamma, s'}(s) \right) \right| \\
& \leq \sum_{s' \in \S} \mu^\pi(s') \left| d^\pi_{\gamma, s_0}(s) - d^\pi_{\gamma, s'}(s) \right| .
\end{align*}
Therefore
\begin{align*}
\sum_{s \in \S} \left|d^\pi_{\gamma, s_0}(s) - \frac{1}{1-\gamma}\mu^\pi(s)\right| &\leq \sum_{s \in \S}\sum_{s' \in \S} \mu^\pi(s') \left| d^\pi_{\gamma, s_0}(s) - d^\pi_{\gamma, s'}(s) \right| = \sum_{s' \in \S} \mu^\pi(s') \sum_{s \in \S} \left| d^\pi_{\gamma, s_0}(s) - d^\pi_{\gamma, s'}(s) \right| \\
& \leq \sum_{s' \in \S} \mu^\pi(s') 4 \Dow(P, \pi) = 4 \Dow(P, \pi)
\end{align*}
where in the second inequality step we used Lemma \ref{lem:occupancy_l1_diff_coupling_bound}.
\end{proof}
\begin{lem}
\label{lem:dow_span_bound}
For any policy $\pi$, $\spannorm{h^\pi} \leq 4\Dow(P, \pi)$.
\end{lem}
\begin{proof}
Note that by Lemma \ref{lem:Dow_finite_unichain}, if $P_\pi$ is not unichain then $\Dow(P, \pi) = \infty$ and so the desired bound holds trivially (note $\spannorm{h^\pi}$ is always finite). So we can now focus on the case that $P_\pi$ is unichain. This implies $\rho^\pi$ is a state-independent constant. In this case it is a standard fact (e.g. \cite[Corollary 8.2.4]{puterman_markov_1994}) that for any $s,s' \in \S$,
\begin{align*}
h^\pi(s) - h^\pi(s') = \lim_{\gamma \to 1^-} V_\gamma^\pi(s) - V_\gamma^\pi(s').
\end{align*}
Therefore
\begin{align*}
\spannorm{h^\pi} &= \max_{s,s'\in \S}h^\pi(s) - h^\pi(s') \\
&= \max_{s,s'\in \S} \lim_{\gamma \to 1^-} V_\gamma^\pi(s) - V_\gamma^\pi(s') \\
&= \max_{s,s'\in \S} \lim_{\gamma \to 1^-} e_s^\top (I - \gamma P_\pi)^{-1} r_\pi - e_{s'}^\top (I - \gamma P_\pi)^{-1} r_\pi \\
&= \max_{s,s'\in \S} \lim_{\gamma \to 1^-} (d^\pi_{\gamma, s} - d^\pi_{\gamma, s'}) r_\pi \\
&\leq \max_{s,s'\in \S} \lim_{\gamma \to 1^-} \onenorm{d^\pi_{\gamma, s} - d^\pi_{\gamma, s'}} \infnorm{r_\pi} \\
&\leq \max_{s,s'\in \S} \lim_{\gamma \to 1^-} 4 \Dow(P, \pi) \\
&= 4 \Dow(P, \pi)
\end{align*}
where the inequality steps are by Holder's inequality and Lemma \ref{lem:occupancy_l1_diff_coupling_bound}.
\end{proof}
\subsubsection{Relationship between policy hitting radius and uniform mixing time}
\label{sec:tmix_dow_reln}
Here we argue that there is generally no relationship between the policy hitting radius and the mixing time. First, if $P_\pi$ is a unichain and periodic Markov chain, then the mixing time will be infinite/undefined whereas $\Dow(P, \pi) < \infty$ by Lemma \ref{lem:Dow_finite_unichain}.
Now we show an example where the mixing time can be arbitrarily smaller than the policy hitting radius. Suppose that $P$, $\pi$ are defined so that $P_\pi$ is the random walk on the complete graph on $L$ nodes, where $L$ is any positive integer. Then $\mu^\pi(s) = 1/L$ for all $s \in \S$, and after just one step from any starting state we have that $S_1$ has distribution $\mu^\pi$ so $\tmixsingle(\pi)=1$. However, for any fixed starting state $s_0$ and any state $s \neq s_0$, we have that $\eta_{s} \sim \text{Geom}(1/L)$, so $\E^\pi_{s_0} \eta_s = L$, and hence $\Dow(P, \pi) = L$.
\subsection{Error analysis}
Now we can continue with analyzing the relationship between $\Qhpe^\star$ and $\rho^{\pistar}$, for a comparator policy $\pistar$. Having established pessimism (Lemma \ref{lem:pessimism}), which implies an upper bound on $\Qhpe^\star$, we now seek to lower-bound this quantity.
Since (by Lemma \ref{lem:pessimistic_Bellman_operator_properties}) $ \Qhpe^\star \geq \Qhpe^{\pistar}$, it suffices to lower-bound $\Qhpe^{\pistar}$ in terms of $V^{\pistar}$, which is then related to $\rho^{\pistar}$.
\begin{lem}
\label{lem:truncated_variance_bound}
For any probability distribution $\mu \in \Delta^{\S}$, any $V \in \R^\S$, and any $\beta \in [0,1]$, we have that
\begin{align*}
\Var_{\mu} \left[ T_{\beta}(\mu, V) \right] \leq \Var_{\mu} \left[ V \right].
\end{align*}
\end{lem}
\begin{proof}
We prove this by showing the more general statement that for any random variable $X$ and any scalar $a$,
\[
\Var \left[ \min(X,a)\right] \leq \Var \left[ X\right].
\]
Let $T = \min(X,a)$ and $\Delta = X - T$. Then
\begin{align*}
\Var \left[ X\right] &= \Var \left[ T\right] + \Var \left[ \Delta\right] + 2 \text{Cov}(T, \Delta).
\end{align*}
Thus to show $ \Var \left[ X\right] \geq \Var \left[ T\right]$ it suffices to show that $\text{Cov}(T, \Delta) \geq 0$. Now we compute
\begin{align*}
\text{Cov}(T, \Delta) &= \E \left[ \Delta (T - \E T)\right] \\
&= \E \left[ \Delta (T - \E T)\ind\{X \geq a\}\right]+ \E \left[ \Delta (T - \E T)\ind\{X < a\}\right].
\end{align*}
On the event $\{X < a\}$ we have $\Delta = 0$, so $\E \left[ \Delta (T - \E T)\ind\{X < a\}\right] = 0$. On the event $\{X \geq a\}$, $(T - \E T) \geq 0$ since $T=a$ and $\E T \leq a$, and $\Delta \geq 0$, so $\E \left[ \Delta (T - \E T)\ind\{X \geq a\}\right] \geq 0$. Therefore $\text{Cov}(T, \Delta) \geq 0$ as desired.
\end{proof}
\begin{lem}
\label{lem:Qhpe_pistar_almost_sim_lemma}
Fix any deterministic policy $\pistar$.
Under the event in Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar},
\begin{align*}
V^{\pistar} - \Vhpe^{\pistar} \leq (I - \gamma P_{\pistar})^{-1} \gamma \bt_{\pistar}
\end{align*}
where
\begin{align*}
\bt_{\pistar}(s) = 2\sqrt{\beta(s,\pistar(s)) \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} + \frac{12}{\ntot} .
\end{align*}
We also have that
\begin{align}
\Vhpe^{\pistar} - \gamma P_{\pistar} \Vhpe^{\pistar} + \gamma \bt_{\pistar} \geq r_{\pistar}. \label{eq:Vhpe_pistar_lb_sim_lem}
\end{align}
\end{lem}
\begin{proof}
Fix $s \in \S, a \in \A$. First we handle the case that $\beta(s,a) \leq 1$. This implies that $n(s,a) \geq 1 + \alpha = 1 + 8 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$.
By the definition~\eqref{eq:defn_of_Thpe_pi} of $\Thpe^{\pistar}$ we have that
\begin{align}
\Qhpe^{\pistar}(s,a) \geq r(s,a) + \gamma \Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) - \gamma b(s,a,\Vhpe^{\pistar}). \label{eq:Qhpe_pistar_lb_1}
\end{align}
By the definition of $T_{\beta(s,a)} (\Phat_{sa}, \Vhpe^{\pistar})$ we have that (elementwise)
\begin{align}
\Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) &= \sum_{s'} \Phat_{sa}(s') T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})(s') \nonumber\\
&= \sum_{s':\Vhpe^{\pistar}(s') \leq Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})(s') \nonumber\\
& \qquad \qquad+ \sum_{s':\Vhpe^{\pistar}(s') > Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})(s') \nonumber\\
&= \sum_{s':\Vhpe^{\pistar}(s') \leq Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') \Vhpe^{\pistar}(s') \nonumber\\
& \qquad \qquad+ \sum_{s':\Vhpe^{\pistar}(s') > Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) \nonumber\\
&\geq \sum_{s':\Vhpe^{\pistar}(s') \leq Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') \Vhpe^{\pistar}(s') \nonumber\\
& \qquad \qquad+ \sum_{s':\Vhpe^{\pistar}(s') > Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') \left(\Vhpe^{\pistar}(s') - \spannorm{\Vhpe^{\pistar}} \right) \nonumber\\
& > \Phat_{sa} \Vhpe^{\pistar} - \beta(s,a) \spannorm{\Vhpe^{\pistar}} \label{eq:Vhpe_pistar_inner_prod_lb}
\end{align}
where in the final inequality we used that $\sum_{s':\Vhpe^{\pistar}(s') > Q_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar})} \Phat_{sa}(s') < \beta(s,a)$. Using~\eqref{eq:concentration_for_pessimism_Thpe_pistar_bernstein} from Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar} to relate $\Phat_{sa} \Vhpe^{\pistar}$ to $P_{sa} \Vhpe^{\pistar}$, we can further bound
\begin{align}
\Phat_{sa} T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) & \geq P_{sa} \Vhpe^{\pistar} - \left|(\Phat_{sa} - P_{sa}) \Vhpe^{\pistar} \right| - \beta(s,a) \spannorm{\Vhpe^{\pistar}} \nonumber \\
& \geq P_{sa} \Vhpe^{\pistar} - \sqrt{\frac{2 \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right] \log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{n(s,a)}}-\spannorm{\Vhpe^{\pistar}}\frac{\log \left(\frac{6S^2A\ntot}{(1-\gamma)\delta} \right)}{ 3n(s,a)} \nonumber \\
&\qquad - \frac{3}{\ntot} - \beta(s,a) \spannorm{\Vhpe^{\pistar}} \nonumber \\
& \geq P_{sa} \Vhpe^{\pistar} - \sqrt{ \beta(s,a) \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right]} - 2 \beta(s,a) \spannorm{\Vhpe^{\pistar}} - \frac{3}{\ntot}.
\label{eq:Vhpe_pistar_inner_prod_lb_2}
\end{align}
To finish lower-bounding~\eqref{eq:Qhpe_pistar_lb_1} we must also lower-bound $b(s,a,\Vhpe^{\pistar})$.
It is immediate to see that $\spannorm{T_{\beta(s,a)} (\Phat_{sa}, \Vhpe^{\pistar})} \leq \spannorm{\Vhpe^{\pistar}}$, and also by Lemma \ref{lem:truncated_variance_bound} (since we are in the $\beta(s,a) \leq 1$ case) we have that $\Var_{\Phat_{sa}} \left[T_{\beta(s,a)}(\Phat_{sa}, \Vhpe^{\pistar}) \right] \leq \Var_{\Phat_{sa}} \left[\Vhpe^{\pistar}\right]$. These two facts yield that
\begin{align}
b(s,a,\Vhpe^{\pistar}) &= \max \left \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ T_{\beta(s,a)}( \Phat_{sa}, \Vhpe^{\pistar}) \right]} , \beta(s,a) \spannorm{T_{\beta(s,a)}( \Phat_{sa}, \Vhpe^{\pistar})} \right \} + \frac{5}{\ntot} \nonumber \\
& \leq \max \left \{ \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ \Vhpe^{\pistar} \right]} , \beta(s,a) \spannorm{\Vhpe^{\pistar}} \right \} + \frac{5}{\ntot} \nonumber \\
& \leq \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ \Vhpe^{\pistar} \right]} + \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot}. \label{eq:Vhpe_pistar_b_bd_1}
\end{align}
Furthermore, using the bound~\eqref{eq:concentration_for_pessimism_Thpe_pistar_variance} from Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar}, we can further bound~\eqref{eq:Vhpe_pistar_b_bd_1} as
\begin{align}
&b(s,a,\Vhpe^{\pistar}) \nonumber\\
& \leq \sqrt{\beta(s,a) \Var_{\Phat_{sa}} \left[ \Vhpe^{\pistar} \right]} + \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \nonumber\\
& \leq \sqrt{\beta(s,a)} \left( \sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\frac{2 \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{n(s,a)}} + \frac{4}{\ntot} \right) + \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \nonumber \\
& \leq \sqrt{\beta(s,a)} \left( \sqrt{\Var_{P_{sa}} \left[\Vhpe^{\pistar}\right]} + \spannorm{\Vhpe^{\pistar}} \sqrt{\beta(s,a)} + \frac{4}{\ntot} \right) + \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \nonumber \\
& \leq \sqrt{\beta(s,a) \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right]} + 2 \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{9}{\ntot} \label{eq:Vhpe_pistar_b_bd_2}
\end{align}
(using the definition of $\beta(s,a)$ and the fact that we are in the $\beta(s,a) \leq 1$ case).
Combining~\eqref{eq:Vhpe_pistar_b_bd_2} and~\eqref{eq:Vhpe_pistar_inner_prod_lb_2} with~\eqref{eq:Qhpe_pistar_lb_1} we obtain that
\begin{align*}
\Qhpe^{\pistar}(s,a) &\geq r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - 2 \gamma \sqrt{ \beta(s,a) \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right]} - 4 \gamma \beta(s,a) \spannorm{\Vhpe^{\pistar}} - \frac{12 \gamma}{\ntot} \\
&= r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - \gamma \bt(s,a)
\end{align*}
where we define $\bt(s,a) = \sqrt{ \beta(s,a) \Var_{P_{sa}} \left[ \Vhpe^{\pistar} \right]} + 4 \beta(s,a) \spannorm{\Vhpe^{\pistar}} + \frac{12 }{\ntot} $.
Now for the simpler case that $\beta(s,a) > 1$, we have that
\begin{align*}
\Qhpe^{\pistar}(s,a) &= r(s,a) + \gamma \min_{s'} \Vhpe^{\pistar}(s') \\
&\geq r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - \gamma \spannorm{\Vhpe^{\pistar}} \\
&\geq r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - \gamma \beta(s,a) \spannorm{\Vhpe^{\pistar}} \\
& \geq r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - \gamma \bt(s,a).
\end{align*}
Combining the two cases of $\beta(s,a)$, we have for all $s, a$ that $\Qhpe^{\pistar}(s,a)\geq r(s,a) + \gamma P_{sa} \Vhpe^{\pistar} - \gamma \bt(s,a)$.
Therefore by monotonicity of $M^{\pistar}$,
\begin{align*}
\Vhpe^{\pistar} = M^{\pistar} \Qhpe^{\pistar} \geq M^{\pistar} \left(r + \gamma P \Vhpe^{\pistar} - \gamma \bt \right) = r_{\pistar} + \gamma P_{\pistar} \Vhpe^{\pistar} - \gamma \bt_{\pistar}.
\end{align*}
We also have
$\Vhpe^{\pistar} - \gamma P_{\pistar} \Vhpe^{\pistar} + \gamma \bt_{\pistar} \geq r_{\pistar}$, which will be needed later.
By the Bellman equation for $\pistar$ we also have that $V^{\pistar} = r_{\pistar} + \gamma P_{\pistar} V^{\pistar}$. Combining these, rearranging, and using the monotonicity of multiplication by $(I-\gamma P_{\pistar})^{-1}$ (since all its entries are nonnegative), we obtain
\begin{align*}
& V^{\pistar} - \Vhpe^{\pistar} \leq r_{\pistar} + \gamma P_{\pistar} V^{\pistar} - r_{\pistar} + \gamma \bt_{\pistar} - \gamma P_{\pistar} \Vhpe^{\pistar} = \gamma \bt_{\pistar} + \gamma P_{\pistar} (V^{\pistar} - \Vhpe^{\pistar}) \\
\implies & (I-\gamma P_{\pistar}) (V^{\pistar} - \Vhpe^{\pistar}) \leq \gamma \bt_{\pistar} \\
\implies & V^{\pistar} - \Vhpe^{\pistar} \leq (I-\gamma P_{\pistar})^{-1} \gamma \bt_{\pistar}
\end{align*}
as desired.
\end{proof}
\begin{lem}
\label{lem:error_analysis_empirical_span}
Fix a deterministic unichain policy $\pistar$.
Suppose that for all $s \in \S$, $n(s, \pistar(s)) \geq m \mu^{\pistar}(s) + 4 + 4 \Dow(P, \pistar)$, $\frac{1}{1-\gamma} \geq m$, and $\frac{1}{1-\gamma} \geq 2$. Then under the event in Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar}, we have that
%\begin{align*}
% \infnorm{V^{\pistar} - \Vhpe^{\pistar}} \leq \frac{1}{1-\gamma}\sqrt{\frac{2048 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2An}{(1-\gamma)\delta}\right)}{m}} + \frac{640 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2An}{(1-\gamma)\delta}\right)}{(1-\gamma)m} + \frac{12}{(1-\gamma)n}.
%\end{align*}
\begin{align*}
&\max_{s_0 \in \S} \left( V^{\pistar}(s_0) - \Vhpe^{\pistar}(s_0) \right) \\
&\leq \frac{1}{1-\gamma}\sqrt{\frac{2048 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}} + \frac{640 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{(1-\gamma)m} + \frac{12}{(1-\gamma)\ntot}.
\end{align*}
\end{lem}
\begin{proof}
First we note that, using Lemma \ref{lem:Qhpe_pistar_almost_sim_lemma}, we have
\begin{align*}
\max_{s_0 \in \S} \left( V^{\pistar}(s_0) - \Vhpe^{\pistar}(s_0) \right) \leq \max_{s_0 \in \S} e_{s_0}^\top (I - \gamma P_{\pistar})^{-1} \gamma \bt_{\pistar} = \max_{s_0 \in \S} \left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle.
\end{align*}
We will now fix some arbitrary $s_0 \in \S$ and try to bound $\left \langle d^{\pistar}_{\gamma,s_0}, \bt_{\pistar}\right\rangle$.
By the assumptions in the lemma statement we have that for all $s \in \S$,
\begin{align*}
n(s, \pistar(s)) &\geq m \mu^{\pistar}(s) + 4 \Dow(P, \pistar) = (1-\gamma)m \frac{1}{1-\gamma}\mu^{\pistar}(s) + 4 \Dow(P, \pistar) \\
& \geq (1-\gamma)m d^{\pistar}_{\gamma,s_0}(s) - (1-\gamma)m \left| d^{\pistar}_{\gamma,s_0}(s) - \frac{1}{1-\gamma}\mu^{\pistar}(s)\right| + 4 \Dow(P, \pistar) \\
& \geq (1-\gamma)m d^{\pistar}_{\gamma,s_0}(s) - (1-\gamma)m 4 \Dow(P, \pistar) + 4 \Dow(P, \pistar) \\
& \geq (1-\gamma)m d^{\pistar}_{\gamma,s_0}(s)
\end{align*}
where the third inequality is a consequence of Lemma \ref{lem:occupancy_l1_diff_coupling_bound_stationary}. For convenience we will let $C := (1-\gamma)m$, and so we have shown that $n(s, \pistar(s)) \geq C d^{\pistar}_{\gamma,s_0}(s)$ for all $s \in \S$. Also for convenience abbreviate $\ell = \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$. Using the fact that $n(s, \pistar(s)) \geq 4$ which implies
$\frac{1}{\max\{n(s, \pistar(s))-1, 1\}}= \frac{1}{n(s, \pistar(s))-1} \leq \frac{4/3}{n(s, \pistar(s))}\leq \frac{2}{n(s, \pistar(s))}$, we can simplify $\bt_{\pistar}$ as
\begin{align*}
\bt_{\pistar}(s) &= 2\sqrt{\beta(s,\pistar(s)) \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} + \frac{12}{n} \\
&= 2\sqrt{\frac{8 \ell}{n(s, \pistar(s))-1} \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\frac{8 \ell}{n(s, \pistar(s))-1} \spannorm{\Vhpe^{\pistar}} + \frac{12}{\ntot} \\
& \leq 2\sqrt{\frac{16 \ell}{n(s, \pistar(s))} \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\frac{16 \ell}{n(s, \pistar(s))} \spannorm{\Vhpe^{\pistar}} + \frac{12}{\ntot}.
\end{align*}
Using this and the fact that $n(s, \pistar(s)) \geq C d^{\pistar}_{\gamma,s_0}(s)$ for all $s \in \S$, we have
\begin{align}
\left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle &\leq \sum_{s \in \S} d^{\pistar}_{\gamma,s_0}(s) \left( 2\sqrt{\frac{16 \ell}{n(s, \pistar(s))} \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\frac{16 \ell}{n(s, \pistar(s))} \spannorm{\Vhpe^{\pistar}} + \frac{12}{\ntot} \right)\nonumber\\
& \leq \sum_{s \in \S} d^{\pistar}_{\gamma,s_0}(s) \left( 2\sqrt{\frac{16 \ell}{C d^{\pistar}_{\gamma,s_0}(s)} \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + 4\frac{16 \ell}{C d^{\pistar}_{\gamma,s_0}(s)} \spannorm{\Vhpe^{\pistar}} + \frac{12}{\ntot} \right) \nonumber \\
&= \sum_{s \in \S} 2\sqrt{d^{\pistar}_{\gamma,s_0}(s) \frac{16 \ell}{C} \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + S4\frac{16 \ell}{C} \spannorm{\Vhpe^{\pistar}} + \sum_{s \in \S} d^{\pistar}_{\gamma,s_0}(s) \frac{12}{\ntot} \nonumber\\
& \leq \sqrt{\frac{64 S \ell}{C}} \sqrt{ \sum_{s \in \S}d^{\pistar}_{\gamma,s_0}(s) \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} + \frac{64 S \ell}{C} \spannorm{\Vhpe^{\pistar}} + \frac{12}{(1-\gamma) \ntot} \label{eq:error_analysis_empirical_span_1}
\end{align}
where in the final inequality we used Cauchy-Schwarz to bound the first term.
Now we focus on bounding the quantity $\sum_{s \in \S}d^{\pistar}_{\gamma,s_0}(s) \Var_{P_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]$.
Let $c = \min_{s \in \S} \Vhpe^{\pistar}(s)$ and $\Vc = \Vhpe^{\pistar} - c\one$. Then
\begin{align}
\Vc \circ \Vc - \gamma^2 P_{\pistar} \Vc \circ P_{\pistar} \Vc &= (\Vc - \gamma P_{\pistar} \Vc) \circ (\Vc + \gamma P_{\pistar} \Vc) \nonumber \\
& \leq (\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one) \circ (\Vc + \gamma P_{\pistar} \Vc) \nonumber\\
& \leq 2 \infnorm{\Vc} (\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one) \label{eq:error_analysis_empirical_span_var_term_bd}
\end{align}
where for the first inequality we used that $\Vc + \gamma P_{\pistar} \Vc \geq \zero$ and that $\bt_{\pistar} + (1-\gamma)c \one \geq \zero$, and for the second inequality we used that $\Vc + \gamma P_{\pistar} \Vc \leq 2 \infnorm{\Vc} \one$ and that $\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one \geq \zero$, which follows from the fact that
\begin{align*}
\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one = \Vhpe^{\pistar} - \gamma P_{\pistar} \Vhpe^{\pistar} + \gamma \bt_{\pistar} \geq r_{\pistar} \geq \zero
\end{align*}
using~\eqref{eq:Vhpe_pistar_lb_sim_lem} in the inequality step.
Thus
\begin{align}
\left\langle d^{\pistar}_{\gamma,s_0}, \Var_{P_{\pistar}} \left[ \Vhpe^{\pistar} \right] \right\rangle &= \left\langle d^{\pistar}_{\gamma,s_0}, \Var_{P_{\pistar}} \left[ \Vc \right] \right\rangle \nonumber\\
&= \left\langle d^{\pistar}_{\gamma,s_0}, P_{\pistar} (\Vc)^{\circ 2} - (P_{\pistar} \Vc)^{\circ 2} \right\rangle \nonumber\\
&= \left\langle d^{\pistar}_{\gamma,s_0}, P_{\pistar} (\Vc)^{\circ 2} - \frac{1}{\gamma^2} (\Vc)^{\circ 2} + \frac{1}{\gamma^2 } \left((\Vc)^{\circ 2} - \gamma^2(P_{\pistar} \Vc)^{\circ 2} \right)\right \rangle \nonumber\\
& \stackrel{(i)}{\leq} \left\langle d^{\pistar}_{\gamma,s_0}, P_{\pistar} (\Vc)^{\circ 2} - \frac{1}{\gamma^2} (\Vc)^{\circ 2} + \frac{1}{\gamma^2 } 2 \infnorm{\Vc} (\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one) \right \rangle \nonumber\\
& \stackrel{(ii)}{\leq}\left\langle d^{\pistar}_{\gamma,s_0}, \frac{1}{\gamma^2 } 2 \infnorm{\Vc} (\Vc - \gamma P_{\pistar} \Vc + \gamma \bt_{\pistar} + (1-\gamma)c \one) \right \rangle \nonumber\\
&= \frac{2 \infnorm{\Vc}}{\gamma^2} e_{s_0}^\top (I - \gamma P_{\pistar})^{-1} \left((I - \gamma P_{\pistar}) \Vc + \gamma \bt_{\pistar} + (1-\gamma )c\one \right) \nonumber \\
&= \frac{2 \infnorm{\Vc}}{\gamma^2} e_{s_0}^\top (I - \gamma P_{\pistar})^{-1} \left((I - \gamma P_{\pistar}) \Vhpe^\star + \gamma \bt_{\pistar} \right) \nonumber \\
&= \frac{2 \infnorm{\Vc}}{\gamma^2} e_{s_0}^\top \Vhpe^\star + \frac{4 \infnorm{\Vc}}{\gamma^2} \langle d^{\pistar}_{\gamma,s_0}, \gamma \bt_{\pistar} \rangle \nonumber\\
&\leq \frac{2 \infnorm{\Vc}}{\gamma^2}\frac{1}{1-\gamma} + \frac{4 \infnorm{\Vc}}{\gamma} \langle d^{\pistar}_{\gamma,s_0}, \bt_{\pistar} \rangle. \label{eq:error_analysis_empirical_span_2}
\end{align}
In $(i)$ we use~\eqref{eq:error_analysis_empirical_span_var_term_bd} and in $(ii)$ we use that
\begin{align*}
\left\langle d^{\pistar}_{\gamma,s_0}, P_{\pistar} (\Vc)^{\circ 2} - \frac{1}{\gamma^2} (\Vc)^{\circ 2} \right \rangle & \leq \left\langle d^{\pistar}_{\gamma,s_0}, P_{\pistar} (\Vc)^{\circ 2} - \frac{1}{\gamma} (\Vc)^{\circ 2} \right \rangle \\
&= \frac{1}{\gamma} e_{s_0}^\top(I - \gamma P_{\pistar})^{-1} (\gamma P_{\pistar} - I) (\Vc)^{\circ 2} \leq 0.
\end{align*}
Combining the bound~\eqref{eq:error_analysis_empirical_span_2} with~\eqref{eq:error_analysis_empirical_span_1} (and noting that $\infnorm{\Vc} = \spannorm{\Vhpe^{\pistar}}$), we obtain that
\begin{align*}
\left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle
& \leq \sqrt{\frac{64 S \ell}{C}} \sqrt{ \frac{2 \spannorm{\Vhpe^{\pistar}}}{\gamma^2}\frac{1}{1-\gamma} + \frac{4 \spannorm{\Vhpe^{\pistar}}}{\gamma} \left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle} \\
& \qquad \qquad+ \frac{64 S \ell}{C} \spannorm{\Vhpe^{\pistar}} + \frac{12}{(1-\gamma) \ntot} \\
& \leq \sqrt{\frac{512 \spannorm{\Vhpe^{\pistar}} S \ell}{C}} \left(\sqrt{\frac{1}{1-\gamma}} + \sqrt{\left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle} \right) \\
& \qquad \qquad+ \frac{64 S \ell}{C} \spannorm{\Vhpe^{\pistar}} + \frac{12}{(1-\gamma) \ntot}
\end{align*}
where we simplified by using that $\sqrt{a + b} \leq \sqrt{a} + \sqrt{b}$ and that $\frac{1}{\gamma} \leq 2$ (since $\frac{1}{1-\gamma} \geq 2$ implies that $\gamma \geq \frac{1}{2}$). The above is a quadratic inequality in $x := \sqrt{\left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle}$ of the form
\begin{align*}
x^2 \leq x\sqrt{8y} + \sqrt{\frac{8y}{1-\gamma}} + y + \frac{12}{(1-\gamma)\ntot}
\end{align*}
where $y = \frac{64 S \spannorm{\Vhpe^{\pistar}} \ell}{C}$. From the quadratic formula we obtain that
\begin{align*}
x \leq \frac{\sqrt{8y} + \sqrt{8y + 4\left(\sqrt{\frac{8y}{1-\gamma}} + y + \frac{12}{(1-\gamma)\ntot} \right)}}{2}
\end{align*}
and then squaring both sides we obtain that
\begin{align*}
\left \langle d^{\pistar}_{\gamma,s_0} , \bt_{\pistar}\right\rangle = x^2 &\leq \frac{\left( \sqrt{8y} + \sqrt{8y + 4\left(\sqrt{\frac{8y}{1-\gamma}} + y + \frac{12}{(1-\gamma)\ntot} \right)} \right)^2}{4} \\
&\leq \frac{1}{2}\left(8y + 8y + 4\left(\sqrt{\frac{8y}{1-\gamma}} + y + \frac{12}{(1-\gamma)\ntot} \right) \right) \\
&= 10y + \sqrt{\frac{32 y}{1-\gamma}} + \frac{12}{(1-\gamma)\ntot} \\
&= 10 \frac{64 S \spannorm{\Vhpe^{\pistar}} \ell}{C} + \sqrt{32\frac{64 S \spannorm{\Vhpe^{\pistar}} \ell}{C(1-\gamma)}} + \frac{12}{(1-\gamma)\ntot}
\end{align*}
using that $(a + b)^2 \leq 2a^2 + 2b^2$. Recalling the definitions of $C = (1-\gamma)m$ and $\ell = \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, and also since the above bound held for arbitrary $s_0$, we have thus shown that
\begin{align*}
&\max_{s_0 \in \S} \left( V^{\pistar}(s_0) - \Vhpe^{\pistar}(s_0) \right) \\
&\leq \frac{1}{1-\gamma}\sqrt{\frac{2048 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}} + \frac{640 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{(1-\gamma)m} + \frac{12}{(1-\gamma)\ntot}.
\end{align*}
\end{proof}
\subsection{Controlling the empirical span}
While Lemma \ref{lem:error_analysis_empirical_span} is approaching the desired result, it involves the empirical span term $\spannorm{\Vhpe^{\pistar}}$ which we would like to bound in terms of $\spannorm{V^{\pistar}}$. Such a bound is the objective of this subsection, and makes crucial use of our assumption of data even for states which are transient under $P_{\pistar}$.
\begin{lem}
\label{lem:dow_stability}
Fix a deterministic unichain policy $\pistar$.
Suppose that $n(s, \pistar(s)) \geq 72(\Dow(P, \pistar))^2 \log \left(\frac{2S}{\delta} \right)$ for all $s \in \S$. Then with probability at least $1 - \delta$,
\begin{align*}
\Dow(\Phat, \pistar) \leq 24 \Dow(P, \pistar).
\end{align*}
\end{lem}
\begin{proof}
The proof of this lemma is inspired by that of \citet[Lemma 4]{zurek_plug-approach_2025}. For any MDP $\mathcal{M}$ and $s \in \S$ we let $E^\pi_{s_0, \mathcal{M}}$ denote the expectation with respect to the Markov chain induced by $\pi$ in the MDP $\mathcal{M}$ from starting state $s_0$, and similarly we let $\P^\pi_{s_0, \mathcal{M}}(E) =
\E^\pi_{s_0, \mathcal{M}} [\ind(E)]$ denote the associated probability measure. Let $s^\star \in \S$ satisfy $\Dow(P, \pistar) = \Dow(P, \pi, s^\star)$.
Let $\Mhat$ be the MDP $(\Phat, r)$. Then
\begin{align}
\Dow(\Phat, \pistar) \leq \Dow(\Phat, \pistar, s^\star) = \max_{s_0 \in \S} \E_{s_0, \Mhat}^\pi [\eta_{s^\star}]. \label{eq:dow_stability_1}
\end{align}
Supposing that $k \in \N$ satisfies $\max_{s_0 \in \S} \P_{s_0, \Mhat} (\eta_{s^\star} \geq k) \leq \frac{1}{2}$, then we have for any $s_0'$ that
\begin{align}
\E_{s_0', \Mhat}^\pi [\eta_{s^\star}] &= \sum_{t=0}^\infty \P_{s_0', \Mhat}(\eta_{s^\star} > t) \nonumber \\
&= \sum_{i=0}^\infty \sum_{t=0}^{k-1} \P_{s_0', \Mhat}(\eta_{s^\star} > ik +t) \nonumber \\
&\leq \sum_{i=0}^\infty \sum_{t=0}^{k-1} \P_{s_0', \Mhat}(\eta_{s^\star} > ik) \nonumber \\
&= k \sum_{i=0}^\infty \P_{s_0', \Mhat}(\eta_{s^\star} > ik) \nonumber \\
& \leq k \sum_{i=0}^\infty 2^{-i} = 2k \label{eq:dow_stability_2}
\end{align}
where the final inequality step used that
\begin{align*}
\P_{s_0', \Mhat}(\eta_{s^\star} > ik) \leq \left(\max_{s_0 \in \S} \P_{s_0, \Mhat} (\eta_{s^\star} > k) \right)^i \leq 2^{-i}
\end{align*}
which follows from the following standard arguments: for any integer $i \geq 1$ (since this formula obviously holds for $i = 0$), we have
\begin{align*}
&\P_{s_0', \Mhat}(\eta_{s^\star} > ik) \\
& \leq \P_{s_0', \Mhat}(\eta_{s^\star} \geq ik)\\
&= \P_{s_0', \Mhat} \left(\text{$\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$ and $\eta_{s^\star} \not \in \{(i-1)k, \dots, ik - 1\}$} \right) \\
&\stackrel{(i)}{=} \E_{s_0', \Mhat} \P_{s_0', \Mhat} \left(\text{$\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$ and $\eta_{s^\star} \not \in \{(i-1)k, \dots, ik - 1\}$} \mid \mathcal{F}_{(i-1)k}\right) \\
&\stackrel{(ii)}{=} \E_{s_0', \Mhat}\left[ \ind \left(\text{$\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$} \right)\P_{s_0', \Mhat} \left(\text{$\eta_{s^\star} \not \in \{(i-1)k, \dots, ik - 1\}$} \mid \mathcal{F}_{(i-1)k}\right)\right] \\
&\stackrel{(iii)}{=} \E_{s_0', \Mhat}\left[ \ind \left(\text{$\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$} \right)\P_{S_k, \Mhat} \left(\text{$\eta_{s^\star} \not \in \{0, \dots, k-1\}$} \right)\right] \\
&\stackrel{(iv)}{\leq} \frac{1}{2}\E_{s_0', \Mhat}\left[ \ind \left(\text{$\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$} \right) \right] \\
&= \frac{1}{2}\P_{s_0', \Mhat}(\eta_{s^\star} \geq (i-1)k)
\end{align*}
where $\mathcal{F}_{(i-1)k}$ is the sigma-algebra generated by $S_0, \dots, S_{(i-1)k}$, step $(i)$ is the tower property, step $(ii)$ is because the event $\eta_{s^\star} \not \in \{0, \dots, (i-1)k - 1\}$ is $\mathcal{F}_{(i-1)k}$-measurable, step $(iii)$ is the Markov property (e.g., \cite[Theorem 5.2.3]{durrett_probability_2019}), and step $(iv)$ is because
$\P_{S_k, \Mhat} \left(\text{$\eta_{s^\star} \not \in \{0, \dots, k-1\}$} \right) = \P_{S_k, \Mhat}(\eta_{s^\star} \geq k) \leq \frac{1}{2}$ (this last inequality holding almost surely, due to the assumption that $\max_{s_0 \in \S} \P_{s_0, \Mhat} (\eta_{s^\star} \geq k) \leq \frac{1}{2}$).
Since these arguments held for arbitrary $i$, we can repeat them to obtain the desired bound.
Now we try to find such a $k$.
Define the reward function $\raux$ by $\raux(s,a ) = \ind(s \neq s^\star)$ and also let $P'$ be the same transition matrix as $P$ except with state $s^\star$ made to be absorbing for all actions. Then, for some $\gammap$ to be chosen later, letting $V^{\pistar}_{\gammap, \Maux}$ be the discounted value function for policy $\pistar$ in MDP $\Maux = (P', \raux)$, and letting $\E^{\pistar}_{s_0, \Maux}, \E^{\pistar}_{s_0, \Mor}$ denote expectations with respect to the MDPs $\Maux$ and $\Mor$ respectively, we have that
\begin{align*}
V^{\pistar}_{\gammap, \Maux}(s_0) &= \E^{\pistar}_{s_0, \Maux} \sum_{t = 0}^\infty \gammap^t \ind(S_t \neq s^\star)\\
&= \E^{\pistar}_{s_0, \Mor} \sum_{t = 0}^\infty \gammap^t \ind(\eta_{s^\star} > t) \\
& \leq \E^{\pistar}_{s_0, \Mor} \sum_{t = 0}^\infty \ind(\eta_{s^\star} > t) \\
&= \E^{\pistar}_{s_0, \Mor} [\eta_{s^\star}] \leq \Dow(P, \pistar, s^\star).
\end{align*}
This implies $\spannorm{V^{\pistar}_{\gammap, \Maux}} \leq \Dow(P, \pistar, s^\star)$, which will be needed shortly.
Let $\Pt$ similarly be the same transition matrix as $\Phat$ except $s^\star$ is absorbing for all actions. Let $\Mt $ be the MDP $(\Pt, \raux)$. Then for any $k \in \N$ we have
\begin{align*}
V^{\pistar}_{\gammap, \Mt}(s_0) &= \E^{\pistar}_{s_0, \Mt} \sum_{t = 0}^\infty \gammap^t \ind(S_t \neq s^\star)\\
&= \E^{\pistar}_{s_0, \Mhat} \sum_{t = 0}^\infty \gammap^t \ind(\eta_{s^\star} > t) \\
&\geq \E^{\pistar}_{s_0, \Mhat} \sum_{t = 0}^{k-1} \gammap^t \ind(\eta_{s^\star} > t) \\
&\geq \E^{\pistar}_{s_0, \Mhat} \sum_{t = 0}^{k-1} \gammap^{k-1} \ind(\eta_{s^\star} > k-1) \\
&= k \gammap^{k-1} \P_{s_0, \Mhat} (\eta_{s^\star} > k-1).
\end{align*}
Rearranging this implies that
\begin{align}
\P_{s_0, \Mhat} (\eta_{s^\star} > k-1) \leq \frac{ V^{\pistar}_{\gammap, \Mt}(s_0)}{k \gammap^{k-1}} \leq \frac{ 3V^{\pistar}_{\gammap, \Mt}(s_0)}{k } \label{eq:dow_stability_3}
\end{align}
where for the second inequality we set $\gammap = 1 - \frac{1}{k}$ and used the fact that $(1-\frac{1}{k})^{k-1} \geq 1/e \geq 1/3$ for all integers $k > 1$.
Now we bound $V^{\pistar}_{\gammap, \Mt}(s_0)$ using concentration inequalities.
For concreteness in the following application of Hoeffding we set $k = 12 \Dow(P, \pistar)$ so $\gamma = 1 - 1/(12 \Dow(P, \pistar))$.
By Hoeffding's inequality, we have for any $s \neq s^\star$ that with probability at least $1 - \delta'$
\begin{align*}
\left| e_s^\top (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gammap, \Maux}\right| \leq \sqrt{\frac{\spannorm{V^{\pistar}_{\gammap, \Maux}}^2 \log \left(\frac{2}{\delta'} \right)}{2 n(s,\pistar(s))}} \leq \sqrt{\frac{(\Dow(P, \pistar, s^\star))^2 \log \left(\frac{2}{\delta'} \right)}{2 n(s,\pistar(s))}}
\end{align*}
and trivially we have $\left| e_{s^\star}^\top (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gamma, \Maux}\right| = 0$. Therefore by a union bound over all $s \in \S$ and setting $\delta' = \frac{\delta}{S}$, we have with probability at least $1 - \delta$ that
\begin{align*}
\infnorm{ (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gammap, \Maux}} \leq \min_{s \in \S} \sqrt{\frac{(\Dow(P, \pistar, s^\star))^2 \log \left(\frac{2S}{\delta} \right)}{2 n(s,\pistar(s))}} \leq \frac{1}{12}
\end{align*}
where the second inequality uses the condition that $n(s, \pistar(s)) \geq \frac{12^2}{2}(\Dow(P, \pistar, s^\star))^2 \log \left(\frac{2S}{\delta} \right) = 72(\Dow(P, \pistar))^2 \log \left(\frac{2S}{\delta} \right)$ for all $s \in \S$.
Following standard arguments for the difference between two value functions with different transition matrices we have
\begin{align*}
V^{\pistar}_{\gammap, \Mt} - V^{\pistar}_{\gammap, \Maux} &= (I - \gammap \Pt_{\pistar})^{-1} \raux_{\pistar} - (I - \gammap P'_{\pistar})^{-1} \raux_{\pistar} \\
&= (I - \gammap \Pt_{\pistar})^{-1} (I - \gammap P'_{\pistar}) (I - \gammap P'_{\pistar})^{-1} \raux_{\pistar} - (I - \gammap \Pt_{\pistar})^{-1} (I - \gammap \Pt_{\pistar}) (I - \gammap P'_{\pistar})^{-1} \raux_{\pistar} \\
&= \gammap (I - \gammap \Pt_{\pistar})^{-1} (\Pt_{\pistar} - P'_{\pistar}) (I - \gammap P'_{\pistar})^{-1} \raux_{\pistar} \\
&= \gammap (I - \gammap \Pt_{\pistar})^{-1} (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gammap, \Maux}.
\end{align*}
Hence
\begin{align*}
\infnorm{V^{\pistar}_{\gammap, \Mt} - V^{\pistar}_{\gammap, \Maux}} &= \infnorm{\gammap (I - \gammap \Pt_{\pistar})^{-1} (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gammap, \Maux}} \\
& \leq \infinfnorm{\gammap (I - \gammap \Pt_{\pistar})^{-1}} \infnorm{ (\Pt_{\pistar} - P'_{\pistar}) V^{\pistar}_{\gammap, \Maux}} \\
& \leq \frac{\gammap}{1-\gammap} \frac{1}{12} \\
& \leq \frac{k}{12} = \Dow(P, \pistar, s^\star).
\end{align*}
Combining this with~\eqref{eq:dow_stability_3}, we have that
\begin{align*}
\max_{s_0 \in \S} \P_{s_0, \Mhat} (\eta_{s^\star} \geq k) &=
\max_{s_0 \in \S} \P_{s_0, \Mhat} (\eta_{s^\star} > k-1) \\
&\leq \frac{3 \infnorm{V^{\pistar}_{\gammap, \Mt}}}{k} \leq \frac{3 \infnorm{V^{\pistar}_{\gammap, \Maux}}}{k} + \frac{3 \infnorm{V^{\pistar}_{\gammap, \Mt} - V^{\pistar}_{\gammap, \Maux}}}{k} \\
&\leq \frac{3 \Dow(P, \pistar) + 3 \Dow(P, \pistar)}{12 \Dow(P, \pistar)} = \frac{1}{2}.
\end{align*}
Using $k = 12 \Dow(P, \pistar)$ in~\eqref{eq:dow_stability_2} and combining with~\eqref{eq:dow_stability_1}, we conclude that
\begin{align*}
\Dow(\Phat, \pistar) \leq \max_{s_0 \in \S} \E_{s_0, \Mhat}^\pi [\eta_{s^\star}] \leq 2k = 24\Dow(P, \pistar)
\end{align*}
as desired.
\end{proof}
\begin{lem}
\label{lem:empirical_span_bound}
Fix a deterministic unichain policy $\pistar$.
Suppose that $n(s, \pistar(s))\geq 1 + \alpha \left(576\Dow(P, \pistar)\right)^2$ for all $s \in \S$, where $\alpha = 8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$. Then with probability at least $1 - 2\delta$,
\begin{align*}
\spannorm{\Vhpe^{\pistar}} \leq 3\spannorm{V^{\pistar}} + 2.
\end{align*}
\end{lem}
\begin{proof}
By the definition~\eqref{eq:defn_of_Thpe_pi} of $\Thpe^{\pistar}$, we have for any $s \in \S$ that
\begin{align*}
\Vhpe^{\pistar}(s) &= e_s^\top M^{\pistar} \Qhpe^{\pistar} \\
&= e_s^\top M^{\pistar} \Thpe^{\pistar} \left(\Qhpe^{\pistar} \right) \\
&= r(s, \pistar(s)) + \gamma \max \Big\{ \Phat_{s\pistar(s)} T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, M^{\pistar} \Qhpe^{\pistar}) - b(s,\pistar(s), M^{\pistar} \Qhpe^{\pistar}), \\
&\qquad\qquad\qquad\qquad\qquad\qquad\min_{s'}(M^{\pistar} \Qhpe^{\pistar})(s') \Big \} \\
&= r_{\pistar}(s) + \gamma \max \Big\{ \Phat_{s\pistar(s)} T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) - b(s,\pistar(s), \Vhpe^{\pistar}), \min_{s'}(\Vhpe^{\pistar})(s') \Big \} \\
&= r_{\pistar}(s) + \gamma \Phat_{s\pistar(s)} \Vhpe^{\pistar} + \gamma \max \Big\{ \Phat_{s\pistar(s)} \left(T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) - \Vhpe^{\pistar} \right) - b(s,\pistar(s), \Vhpe^{\pistar}),\\
& \qquad\qquad\qquad\qquad\qquad\qquad \min_{s'}(\Vhpe^{\pistar})(s') - \Phat_{s\pistar(s)} \Vhpe^{\pistar} \Big \} \\
&= r_{\pistar}(s) + \gamma \Phat_{s\pistar(s)} \Vhpe^{\pistar} - \gamma \btp(s)
\end{align*}
where we have defined $\btp \in \R^\S$ as
\begin{align*}
\btp(s) = -\max \Big\{ \Phat_{s\pistar(s)} \left(T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) - \Vhpe^{\pistar} \right) - b(s,\pistar(s), \Vhpe^{\pistar}), \min_{s'}(\Vhpe^{\pistar})(s') - \Phat_{s\pistar(s)} \Vhpe^{\pistar} \Big \}.
\end{align*}
Note that both terms within the $\max$ in the definition of $\btp(s)$ are $\leq 0$, so $\btp \geq 0$, and also we can bound
\begin{align}
\btp(s) &\leq - \left(\Phat_{s\pistar(s)} \left(T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) - \Vhpe^{\pistar} \right) - b(s,\pistar(s), \Vhpe^{\pistar}) \right) \nonumber\\
&= \Phat_{s\pistar(s)} \left(\Vhpe^{\pistar} - T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) \right) + b(s,\pistar(s), \Vhpe^{\pistar}) \nonumber\\
&\stackrel{(i)}{\leq } \beta(s, \pistar(s)) \spannorm{\Vhpe^{\pistar}} + b(s,\pistar(s), \Vhpe^{\pistar}) \nonumber\\
&\stackrel{(ii)}{\leq } \sqrt{\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}}^2 } + 2\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \label{eq:btp_bound}
\end{align}
where $(i)$ is due to the fact that $\Phat_{s\pistar(s)} T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) \geq \Phat_{s\pistar(s)} \Vhpe^{\pistar} - \beta(s, \pistar(s)) \spannorm{\Vhpe^{\pistar}}$, which holds by an argument identical to that of~\eqref{eq:Vhpe_pistar_inner_prod_lb}, and $(ii)$ holds since
\begin{align*}
b(s,\pistar(s),\Vhpe^{\pistar}) &= \max \Big \{ \sqrt{\beta(s,\pistar(s)) \Var_{\Phat_{s\pistar(s)}} \left[ T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar}) \right]} , \\
& \qquad\beta(s,\pistar(s)) \spannorm{T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar})} \Big \} + \frac{5}{\ntot} \\
& \leq \max \Big \{ \sqrt{\beta(s,\pistar(s)) \Var_{\Phat_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right]} , \beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} \Big \} + \frac{5}{\ntot} \\
& \leq \max \Big \{ \sqrt{\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}}^2 } , \beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} \Big \} + \frac{5}{\ntot} \\
& \leq \sqrt{\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}}^2 } + \beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot}
\end{align*}
where we used Lemma \ref{lem:truncated_variance_bound} and the fact that $\spannorm{T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar})} \leq \spannorm{\Vhpe^{\pistar}}$ in the first inequality,
then that $\Var_{\Phat_{s\pistar(s)}} \left[ \Vhpe^{\pistar} \right] \leq \spannorm{\Vhpe^{\pistar}}^2$, and then bounded the $\max$ by the sum.
(While Lemma \ref{lem:truncated_variance_bound} is stated for $\beta(s, \pistar(s)) \leq 1$, if $\beta(s, \pistar(s)) > 1$ then $T_{\beta(s,\pistar(s))}( \Phat_{s\pistar(s)}, \Vhpe^{\pistar})$ is a constant vector so the bound is still true.)
Now since $\btp$ satisfies $\Vhpe^{\pistar} = r_{\pistar} - \gamma\btp + \gamma \Phat_{\pistar} \Vhpe^{\pistar}$, we can rearrange to obtain that $\Vhpe^{\pistar} = (I - \gamma \Phat_{\pistar})^{-1} (r_{\pistar} - \gamma \btp)$. Likewise by the standard Bellman equation we have that $V^{\pistar} = r_{\pistar} + \gamma P_{\pistar} V^{\pistar}$ so $V^{\pistar} = (I - \gamma P_{\pistar})^{-1}r_{\pistar}$.
Then we can calculate that
\begin{align}
V^{\pistar} - \Vhpe^{\pistar} &= (I - \gamma P_{\pistar})^{-1} r_{\pistar} - (I - \gamma \Phat_{\pistar})^{-1} (r_{\pistar}- \gamma\btp) \nonumber\\
&= (I - \gamma \Phat_{\pistar})^{-1} (I - \gamma \Phat_{\pistar}) (I - \gamma P_{\pistar})^{-1} r_{\pistar} \nonumber\\
& \qquad \qquad - (I - \gamma \Phat_{\pistar})^{-1} (I - \gamma P_{\pistar}) (I - \gamma P_{\pistar})^{-1} (r_{\pistar}- \gamma\btp) \nonumber\\
&= \gamma (I - \gamma \Phat_{\pistar})^{-1} (P_{\pistar} - \Phat_{\pistar}) (I - \gamma P_{\pistar})^{-1} r_{\pistar} + (I - \gamma \Phat_{\pistar})^{-1}\gamma \btp \nonumber\\
&= \gamma (I - \gamma \Phat_{\pistar})^{-1} (P_{\pistar} - \Phat_{\pistar}) V^{\pistar} + (I - \gamma \Phat_{\pistar})^{-1} \gamma \btp. \label{eq:empirical_span_bound_sim_lem}
\end{align}
Now we can bound
\begin{align}
\spannorm{\Vhpe^{\pistar}} &= \max_{s,s'} (e_s - e_{s'})^\top \Vhpe^{\pistar} \nonumber\\
&= \max_{s,s'} (e_s - e_{s'})^\top \left(V^{\pistar} + \Vhpe^{\pistar} - V^{\pistar} \right) \nonumber \\
& \leq \max_{s,s'} (e_s - e_{s'})^\top \left(V^{\pistar} \right) + \max_{s,s'} (e_s - e_{s'})^\top \left( \Vhpe^{\pistar} - V^{\pistar} \right) \nonumber \\
&= \spannorm{V^{\pistar}} + \max_{s,s'} (e_s - e_{s'})^\top \left( \Vhpe^{\pistar} - V^{\pistar} \right). \label{eq:emp_sp_bd_1}
\end{align}
Fixing arbitrary $s, s' \in \S$ and letting $\xi = e_s - e_{s'}$, and using~\eqref{eq:empirical_span_bound_sim_lem}, we have that
\begin{align}
\xi^\top \left(\Vhpe^{\pistar} - V^{\pistar} \right) &= \xi^\top \left( \gamma (I - \gamma \Phat_{\pistar})^{-1} (\Phat_{\pistar} - P_{\pistar}) V^{\pistar} - (I - \gamma \Phat_{\pistar})^{-1} \gamma \btp\right) \nonumber \\
& \leq \gamma \onenorm{\xi^\top (I - \gamma \Phat_{\pistar})^{-1}} \infnorm{(\Phat_{\pistar} - P_{\pistar}) V^{\pistar}} + \gamma \onenorm{\xi^\top (I - \gamma \Phat_{\pistar})^{-1}} \infnorm{\btp} .\label{eq:emp_sp_bd_2}
\end{align}
Next we bound all the terms in~\eqref{eq:emp_sp_bd_2}.
First, $\onenorm{\xi^\top (I - \gamma \Phat_{\pistar})^{-1}} \leq 4 \Dow(\Phat, \pistar)$ by Lemma \ref{lem:occupancy_l1_diff_coupling_bound}, and furthermore by Lemma \ref{lem:dow_stability}, since its conditions are satisfied under the conditions of the present lemma (since $\alpha \geq \log(\frac{2S}{\delta})$), we have with probability at least $1 - \delta$ that $\Dow(\Phat, \pistar) \leq 24 \Dow(P, \pistar)$. Hence $\onenorm{\xi^\top (I - \gamma \Phat_{\pistar})^{-1}} \leq 96 \Dow(P, \pistar)$. Next, for any $s\in \S$, by Hoeffding's inequality, with probability at least $1 - \delta'$ we have
\begin{align*}
\left|e_s^\top (\Phat_{\pistar} - P_{\pistar}) V^{\pistar} \right| & \leq \sqrt{\frac{\spannorm{V^{\pistar}}^2 \log \left( \frac{2}{\delta'}\right)}{2n(s,\pistar(s))}}
\end{align*}
and so by a union bound over all $s \in \S$ and setting $\delta' = \frac{\delta}{S}$, we have that with additional failure probability at most $\delta$ that
\begin{align*}
\infnorm{(\Phat_{\pistar} - P_{\pistar}) V^{\pistar}} \leq \spannorm{V^{\pistar}} \sqrt{\max_{s \in \S}\frac{\log(\frac{2S}{\delta})}{2 n(s, \pistar(s))}}.
\end{align*}
Finally, using the bound~\eqref{eq:btp_bound}, we have
\begin{align*}
\infnorm{\btp} &\leq \max_{s \in \S} \sqrt{\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}}^2 } + 2\beta(s,\pistar(s)) \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \\
& \leq \max_{s \in \S} 3\sqrt{\beta(s,\pistar(s)) } \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot}
\end{align*}
because our condition on $n(s, \pistar(s))$ guarantees that $\beta(s, \pistar(s)) \leq 1$ so $\beta(s, \pistar(s)) \leq \sqrt{\beta(s, \pistar(s))}$.
Combining these three bounds with~\eqref{eq:emp_sp_bd_2}, using that $\gamma \leq 1$, and taking the maximum over all $s, s'$, we have that
\begin{align*}
&\max_{s,s'} (e_s - e_{s'})^\top \left( \Vhpe^{\pistar} - V^{\pistar} \right) \\
&\leq 96 \Dow(P, \pistar) \left(\spannorm{V^{\pistar}} \sqrt{\max_{s \in \S}\frac{\log(\frac{2S}{\delta})}{2 n(s, \pistar(s))}} + 3\sqrt{\max_{s\in \S}\beta(s,\pistar(s)) } \spannorm{\Vhpe^{\pistar}} + \frac{5}{\ntot} \right)
\end{align*}
Combining this with~\eqref{eq:emp_sp_bd_1} and rearranging, we have that
\begin{align}
&\spannorm{\Vhpe^{\pistar}} \left(1 - 3 \cdot 96 \Dow(P, \pistar)\sqrt{\max_{s\in \S}\beta(s,\pistar(s)) } \right) \nonumber\\
& \qquad \leq \spannorm{V^{\pistar}} \left(1 + 96 \Dow(P, \pistar)\sqrt{\max_{s \in \S}\frac{\log(\frac{2S}{\delta})}{2 n(s, \pistar(s))}} \right) + 96 \Dow(P, \pistar) \frac{5}{\ntot}. \label{eq:emp_sp_bd_3}
\end{align}
Noticing that $576 = 3 \cdot 2 \cdot 96$, our condition on $n(s, \pistar(s))$ in the lemma statement is chosen exactly so that
\begin{align*}
\left(1 - 3 \cdot 96 \Dow(P, \pistar)\sqrt{\max_{s\in \S}\beta(s,\pistar(s)) } \right) &= \left(1 - 3 \cdot 96 \Dow(P, \pistar)\sqrt{\max_{s\in \S}\frac{\alpha}{n(s,\pistar(s))-1} } \right)\\
&\geq 1 - \frac{1}{2} = \frac{1}{2}.
\end{align*}
Also since for all $s \in \S$, $\beta(s, \pistar(s)) = \frac{\alpha}{\max\{n(s, \pistar(s)) - 1,1\}}= \frac{\alpha}{n(s, \pistar(s)) - 1}\geq \frac{\log(\frac{2S}{\delta})}{2 n(s, \pistar(s))}$ (since $\alpha \geq 8\log(\frac{2S}{\delta})$ and $n(s, \pistar(s)) \geq 4$ so $\max\{n(s, \pistar(s)) - 1,1\} = n(s, \pistar(s)) -1 \geq \frac{1}{2} n(s, \pistar(s))$), we can also simply bound
\begin{align*}
\left(1 + 96 \Dow(P, \pistar)\sqrt{\max_{s \in \S}\frac{\log(\frac{2S}{\delta})}{2 n(s, \pistar(s))}} \right) \leq 1 + \frac{1}{2}.
\end{align*}
We can also bound $96 \Dow(P, \pistar) \frac{5}{\ntot} \leq 1$ (by lower-bounding $\ntot$ by $n(s_0, \pistar(s_0))$ for one arbitrary $s_0 \in \S$). Combining all these bounds with~\eqref{eq:emp_sp_bd_3}, we obtain
\begin{align*}
\frac{1}{2}\spannorm{\Vhpe^{\pistar}} \leq \frac{3}{2}\spannorm{V^{\pistar}} + 1
\end{align*}
which implies
\begin{align*}
\spannorm{\Vhpe^{\pistar}} \leq 3\spannorm{V^{\pistar}} + 2
\end{align*}
as desired.
\end{proof}
\subsection{Average-reward-to-discounted reduction}
Now we can combine our previous results and relate the discounted MDP quantities to $\rho^{\pistar}$ and $h^{\pistar}$.
\begin{lem}
\label{lem:amdp_dmdp_red}
There exist some absolute constants $C_1, C_2$ such that the following holds:\
Fix a deterministic unichain policy $\pistar$.
Suppose that $n(s, \pistar(s))\geq m \mu^{\pistar}(s) + 4 + \alpha \left(576\Dow(P, \pistar)\right)^2$ for all $s \in \S$, where $\alpha = 8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)$, and that $\frac{1}{1-\gamma} \geq m$ and $\frac{1}{1-\gamma} \geq 2$. Then with probability at least $1 - 5\delta$, we have that
\begin{align*}
\rho^{\pihat} &\geq \rho^{\pistar} - \sqrt{\frac{C_1 S \left(\spannorm{h^{\pistar}} +1\right)\alpha}{m}}\one - \frac{C_2 S \left(\spannorm{h^{\pistar}} +1\right) \alpha}{m}\one.
\end{align*}
\end{lem}
\begin{proof}
By Lemma \ref{lem:error_analysis_empirical_span} (the conditions of which are met here as $\alpha(s, \pistar(s)) \left(576\Dow(P, \pistar)\right)^2 \geq 4 \Dow(P, \pistar)$), we have under the event of Lemma \ref{lem:concentration_for_pessimism_Thpe_pistar}, which holds with probability at least $1 - 2\delta$, that
\begin{align*}
&\max_{s_0 \in \S} \left( V^{\pistar}(s_0) - \Vhpe^{\pistar}(s_0) \right) \\
&\leq \frac{1}{1-\gamma}\sqrt{\frac{2048 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}} + \frac{640 S \spannorm{\Vhpe^{\pistar}} \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{(1-\gamma)m} + \frac{12}{(1-\gamma)\ntot}.
\end{align*}
Combining this with the conclusion of Lemma \ref{lem:empirical_span_bound} which implies $\spannorm{\Vhpe^{\pistar}} \leq 3\left(\spannorm{V^{\pistar}} +1\right)$ and adds additional failure probability at most $2\delta$ by the union bound, we have that
\begin{align}
\max_{s_0 \in \S} \left( V^{\pistar}(s_0) - \Vhpe^{\pistar}(s_0) \right)
&\leq \frac{1}{1-\gamma}\sqrt{\frac{6144 S \left(\spannorm{V^{\pistar}} +1\right)\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}} \nonumber \\
& \qquad + \frac{1920 S \left(\spannorm{V^{\pistar}} +1\right) \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{(1-\gamma)m} + \frac{12}{(1-\gamma)\ntot}. \label{eq:dmdp_red_1}
\end{align}
For convenience abbreviate the right-hand-side of~\eqref{eq:dmdp_red_1} as $\varepsilon$. Then since $Q^{\pihat} \geq \Qhat$ by Lemma \ref{lem:pessimism} (which holds under the event of Lemma \ref{lem:concentration_for_pessimism_Thpe}, adding additional failure probability at most $\delta$) and $\Qhat \geq \Qhpe^\star - \frac{1}{2\ntot}\one$ by Lemma \ref{lem:opt_guarantees}, we have that
\begin{align}
V^{\pihat} = M^{\pihat} Q^{\pihat} \geq M^{\pihat}\Qhat = M\Qhat\geq M\left( \Qhpe^\star - \frac{1}{2\ntot}\one \right) = M \Qhpe^{\star} - \frac{1}{2\ntot}\one = \Vhpe^\star - \frac{1}{2\ntot}\one. \label{eq:dmdp_red_2}
\end{align}
Furthermore we have
\begin{align}
\Vhpe^\star \stackrel{(i)}{\geq} \Vhpe^{\pistar} \stackrel{(ii)}{\geq} V^{\pistar} - \varepsilon \one \stackrel{(iii)}{\geq} \frac{1}{1-\gamma}\rho^{\pistar} - \spannorm{V^{\pistar}}\one - \varepsilon \one \label{eq:dmdp_red_3}
\end{align}
where $(i)$ is due to Lemma \ref{lem:pessimistic_Bellman_operator_properties} which gives $\Qhpe^\star \geq \Qhpe^{\pistar}$, which implies $\Vhpe^\star = M\Qhpe^\star \geq M^{\pistar} \Qhpe^\star \geq M^{\pistar}\Qhpe^{\pistar}$ using monotonicity of $M^{\pistar}$. $(ii)$ is due to~\eqref{eq:dmdp_red_1}, and $(iii)$ uses $\infnorm{V^{\pistar} - \frac{1}{1-\gamma}\rho^{\pistar}} \leq \spannorm{V^{\pistar}}$ due to \citet[Lemma 6]{zurek_span-agnostic_2025}.
Also by \citet[Lemma 6]{zurek_span-agnostic_2025}, we have the elementwise inequality $\rho^{\pihat} \geq (1-\gamma)\left(\min_{s \in \S} V^{\pihat}(s)\right) \one$. Thus
\begin{align*}
\rho^{\pihat} &\geq (1-\gamma)\min_{s \in \S} V^{\pihat}(s)\one \\
&\stackrel{(i)}{\geq} (1-\gamma)\min_{s \in \S} \Vhpe^\star(s)\one - \frac{1-\gamma}{2\ntot}\one \\
& \stackrel{(ii)}{\geq} \min_{s \in \S} \rho^{\pistar}(s) \one-(1-\gamma)\spannorm{V^{\pistar}}\one - (1-\gamma)\varepsilon \one - \frac{1-\gamma}{2\ntot}\one \\
& \stackrel{(iii)}{\geq} \rho^{\pistar} -(1-\gamma)\spannorm{V^{\pistar}}\one- \frac{1-\gamma}{2\ntot}\one - \sqrt{\frac{6144 S \left(\spannorm{V^{\pistar}} +1\right)\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}} \one\nonumber \\
& \qquad - \frac{1920 S \left(\spannorm{V^{\pistar}} +1\right) \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m} \one- \frac{12}{\ntot} \one\\
& \stackrel{(iv)}{\geq} \rho^{\pistar} - \sqrt{\frac{6144 S \left(\spannorm{V^{\pistar}} +1\right)\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m}}\one - \frac{1933 S \left(\spannorm{V^{\pistar}} +1\right) \log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right)}{m} \one
\end{align*}
where $(i)$ uses~\eqref{eq:dmdp_red_2}, $(ii)$ uses~\eqref{eq:dmdp_red_3}, $(iii)$ uses the fact that $\rho^{\pistar}$ is assumed to be state-independent and the definition of $\varepsilon$ (and canceling/simplifying), and $(iv)$ uses that $\frac{1}{1-\gamma} \geq m$ (so $(1-\gamma ) \leq \frac{1}{m}$), that $1 - \gamma \leq 1$, and $\ntot \geq m$.
Furthermore, using \citet[Lemma 26]{zurek_span-agnostic_2025} we have (since $\rho^{\pistar}$ is constant) that $\spannorm{V^{\pistar}} \leq 2\spannorm{h^{\pistar}}$. Combining this with the above bound and letting $C_1 = 2 \cdot 6144 / 8, C_2 = 2 \cdot 1933/8$, we obtain the desired bound.
\end{proof}
\subsection{Completing the proof}
Here we complete the proof of the main Theorem \ref{thm:main_theorem} by checking conditions and simplifying previous results. The following result is actually more general than Theorem \ref{thm:main_theorem} because it allows an arbitrary unichain deterministic comparator policy $\pistar$, rather than requiring $\pistar$ to be gain-optimal. Theorem \ref{thm:main_theorem} follows immediately from the below theorem by adding this additional requirement that $\rho^{\pistar} = \rho^\star$.
\begin{thm}
\label{thm:main_thm_arbitrary_comp}
There exist absolute constants $C_1', C_2'$ such that the following holds:
Fix $\delta > 0$. Let $\gamma = 1-\frac{1}{\ntot}$ and $\alpha = 8\log \big( \frac{6S^2A\ntot}{(1-\gamma)\delta}\big)$. Let $\pistar $ be a deterministic policy which is unichain with stationary distribution $\mu^{\pistar}$. Suppose there exists some $m \in \N$ such that
\begin{align*}
n(s, \pistar(s)) \geq m \mu^{\pistar}(s) + \alpha \left(C_2'\Dow(P, \pistar)\right)^2 +4.
\end{align*}
Then letting $\pihat$ be the policy returned by Algorithm \ref{alg:LCBVI} with inputs $\dataset$, $r$, $\gamma = 1 - \frac{1}{\ntot}$, and $\delta$, we have with probability at least $1 - 5\delta$ that
\begin{align*}
\rho^{\pihat} \geq \rho^{\pistar} - \sqrt{\frac{C_1' S \left(\spannorm{h^{\pistar}} + 1\right)\alpha }{m}}.
\end{align*}
\end{thm}
\begin{proof}
Note that the condition on $n$ implies that $\ntot \geq 4$, so setting $\frac{1}{1-\gamma} = \ntot$ has $\frac{1}{1-\gamma} \geq 2$. Also we have
\begin{align*}
\ntot \geq \sum_{s \in \S} n(s, \pistar(s)) \geq \sum_{s \in \S} m \mu^{\pistar}(s) = m
\end{align*}
using the assumption on $n(s, \pistar(s))$ for all $s$, so setting $\frac{1}{1-\gamma} = \ntot$ also ensures $\frac{1}{1-\gamma} \geq m$. Therefore we can apply Lemma \ref{lem:amdp_dmdp_red} to obtain that
if $n(s, \pistar(s))\geq m \mu^{\pistar}(s) + 4 + \alpha \left(576\Dow(P, \pistar)\right)^2$ for all $s \in \S$, then with probability at least $1 - 5\delta$, we have
\begin{align*}
\rho^{\pihat} &\geq \rho^{\pistar} - \sqrt{\frac{C_1 S \left(\spannorm{h^{\pistar}} +1\right)\alpha}{m}}\one - \frac{C_2 S \left(\spannorm{h^{\pistar}} +1\right) \alpha}{m}\one
\end{align*}
where $\alpha = 8\log \left( \frac{6S^2A\ntot}{(1-\gamma)\delta}\right) = 8\log \left( \frac{6S^2A\ntot^2}{\delta}\right)$. Thus we can set $C_2' = 576$. To choose $C_1'$, note that since trivially $\rho^{\pistar} \leq \one$ and $\rho^{\pihat} \geq \zero$, if the term $\frac{C_2 S \left(\spannorm{h^{\pistar}} +1\right) \alpha}{m} \geq 1$ then the bound
\begin{align*}
\rho^{\pihat} &\geq \rho^{\pistar} - \sqrt{ \frac{C_2 S \left(\spannorm{h^{\pistar}} +1\right) \alpha}{m}}\one
\end{align*}
holds vacuously, and otherwise if it is $\leq 1$ then we have
\begin{align*}
\rho^{\pihat} &\geq \rho^{\pistar} - \sqrt{\frac{C_1 S \left(\spannorm{h^{\pistar}} +1\right)\alpha}{m}}\one - \sqrt{\frac{C_2 S \left(\spannorm{h^{\pistar}} +1\right) \alpha}{m}\one}
\end{align*}
since $\sqrt{x} \geq x$ for $x \in [0,1]$. Since $\sqrt{a} + \sqrt{b} \leq \sqrt{2(a+b)}$, we can take $C_1' = 2(C_1 + C_2)$.
\end{proof}
\section{Proof of Theorem \ref{thm:transient_lb}}
\label{sec:proof_transient_lb}
Let $T \geq 4$ and $m \in \mathbb{N}$ be arbitrary.
\paragraph{Step 1: MDP construction}
Define $p = \frac{1}{3(m+T)}$, $A = \left\lceil \frac{16}{pT} \right\rceil$, and $q = \frac{1}{AT}$.
The set of states is $\S=\{0,1\}$, and the set of actions is $\A=\{0,1,\dots,A-1\}$.
The reward function $r : \S \times \A \to [0,1]$ is defined by $r(0,a)=1$ and $r(1,a)=0$ for all $a\in\A$.
We define an index set $\Theta = \Big\{(i,b)\,\Big|\, i\in\{0,1\}, b\in\{0,1,\dots,A-1\}\Big\}$.
For each $\theta = (i,b) \in \Theta$, we define the transition matrix $P_\theta$ as follows:
\begin{center}
\begin{tabular}{ c | c | c }
$s$ & $a$ & $P_\theta(s' |s,a)$ \\
\hline
0 & $i$ & $\ind(s'=0)$ \\
0 & $1-i$ & $\left(1-p\right)\ind(s'=0) + p\ind(s'=1)$\\
0 & $\geq 2$ & $\ind(s'=1)$ \\
1 & $b$ & $\frac{1}{T}\ind(s'=0) + \left( 1 - \frac{1}{T} \right) \ind(s'=1)$\\
1 & $\neq b$ & $q\ind(s'=0) + \left(1-q\right)\ind(s'=1)$
\end{tabular}
\end{center}
\begin{figure}[H]
\centering
\begin{tikzpicture}
[ -> , >=stealth, shorten >=2pt , line width=0.5pt, node distance =2cm, scale=1.1, transform shape]
\node [circle, draw, minimum width=1.3cm] (s0) at (-3 , 0) {0};
\node [circle, draw, minimum width=1.3cm] (s1) at (3 , 0) {1};
\node [circle, draw, fill, inner sep=0.01cm] (dot0) at (-1, 0.2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot1) at (2.7, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot2) at (2.7, -2) {};
\path (s0) edge [loop left, looseness=15, blue] node [left,text=black] {1} (s0) ;
\path (s0) edge[-,red] [bend left] node [above] {} (dot0) ;
\path (dot0) edge[dashed,red] [bend left] node [below right,text=black] {$1-p$} (s0);
\path (dot0) edge[dashed,red] [bend right=10] node [above,text=black] {$p$} (s1);
\path (s1) edge[-,blue] [bend left] node [above] {} (dot1) ;
\path (dot1) edge[dashed,blue] [bend left] node [right,text=black] {$1-\frac{1}{T}$} (s1);
\path (dot1) edge[dashed,blue] [bend right] node [above,text=black] {$\frac{1}{T}$} (s0);
\path (s1) edge[-,red] [bend left] node [above] {} (dot2) ;
\path (dot2) edge[dashed,red] [bend left] node [left,text=black] {$1-q$} (s1);
\path (dot2) edge[dashed,red] [bend left] node [below,text=black] {$q$} (s0);
\end{tikzpicture}
\caption{Diagram of the MDP $(P_{(0,0)},r)$. Arrows splitting into multiple dashed arrows indicate stochastic transitions, and each dashed arrow is annotated with the associated probability. Blue arrows represent action 0 and red arrows represent action 1. In state 1, the red arrow also represents actions $2,\dots,A-1$ (which are all identical). The reward function does not depend on the action, and is $+1$ in state $0$ and $+0$ in state $1$.
In general, the MDP $(P_{(i,b)},r)$ is similar, except that the blue arrow in state $0$ represents action $i$ and the blue arrow in state $1$ represents action $b$.}
\label{fig:transient_lb}
\end{figure}
See Figure \ref{fig:transient_lb} for a diagram of the MDP $(P_\theta,r)$ for $\theta = (0,0)$.
We now state some easily verifiable facts about the MDP ($P_\theta, r$):
\begin{itemize}
\item The unique deterministic gain-optimal stationary policy $\pistar_\theta$ is the one that takes action $i$ in state 0 and action $b$ in state 1.
\item The optimal gain is $\rho^*_\theta = 1$.
\item $\mu^{\pistar_\theta}_\theta(0) = 1$ and $\mu^{\pistar_\theta}_\theta(1) = 0$.
\item The policy hitting radius $\Dow(P_\theta, \pistar_\theta)$, the optimal bias span $\spannorm{h^{\pistar_\theta}_{P_\theta}}$, and the diameter are all at most $T$.
\item Suppose a stationary policy $\pi$ usually makes the wrong decisions -- specifically $\pi(i|0) < \frac{1}{2}$ and $\pi(b |1) < \frac{4}{A}$. Then $\rho^\pi_\theta < \frac{\frac{4}{A}\cdot\frac{1}{T}+(1-\frac{4}{A})q}{\frac{4}{A}\cdot\frac{1}{T}+(1-\frac{4}{A})q + \frac{p}{2}} \leq \frac{5q}{5q + \frac{p}{2}} \leq \frac{\frac{5p}{16}}{\frac{5p}{16} + \frac{p}{2}} < \frac{1}{2}$. In words, our choice of $A$ is one that is sufficiently large so that randomly guessing the optimal action $b$ in state 1 will not yield a good policy.
\end{itemize}
Note that action 2 in state 0 is added to keep the diameter bounded by $T$, and actions $3,\dots,A-1$ in state 0 simply keep the action space independent of the state, consistent with our upper bounds.
Since actions $2,\dots,A-1$ in state 0 are always suboptimal, whenever we consider some policy $\pi$, we will assume that $\pi(a|0) = 0$ for $a\geq 2$.
\paragraph{Step 2: dataset construction}
For any $\delta \in \left(0,\frac{1}{e^9}\right]$, denote $t_\delta = \left\lceil \frac{T}{6} \log\left(\frac{1}{\delta}\right) \right\rceil$.
We define $n : \mathcal{S}\times\mathcal{A} \to \mathbb{N}$ by
$n(0,0) = n(0,1) = m+t_\delta$ and $n(1,a) = t_\delta$ for all $a \in \mathcal{A}$.
Observe that this choice of $n$ satisfies the desired requirements.
Indeed, since $\mu_\theta^{\pistar_\theta}(0) = 1$ and $\mu_\theta^{\pistar_\theta}(1) = 0$, we have
\[
n(0,\pistar_\theta(0))
= n(0,i) \geq m+ \frac{T}{6} \log\left(\frac{1}{\delta}\right)
= m \mu_\theta^{\pistar_\theta}(0) + \frac{T}{6} \log\left(\frac{1}{\delta}\right)
\]
and
\[
n(1,\pistar_\theta(1))
= n(1,b)
\geq \frac{T}{6} \log\left(\frac{1}{\delta}\right)
= m \mu_\theta^{\pistar_\theta}(1) + \frac{T}{6} \log\left(\frac{1}{\delta}\right)
.\]
\paragraph{Step 3: impossible to do well in all MDPs}
Suppose towards a contradiction that there exists an algorithm $\mathscr{A}$ that maps the dataset $\mathcal{D}$ to a stationary policy $\hat{\pi} = \mathscr{A}(\mathcal{D})$ such that for all $\theta \in \Theta$, $\P_{\theta,n}\left(\rho_\theta^{\hat{\pi}} > \frac{1}{2}\right)$.
Before proceeding, we define some events.
Let $\mathcal{B}$ be the bad event that $\mathcal{D}$ contains no transitions from state 0 to state 1 and no transitions from state 1 to state 0.
Let $\mathcal{E}_0$ be the event that $\hat{\pi}(0|0) \geq \frac{1}{2}$ ($\hat{\pi}$ prefers action 0 in state 0).
Similarly, let $\mathcal{E}_1$ be the event that $\hat{\pi}(1|0) \geq \frac{1}{2}$ ($\hat{\pi}$ prefers action 1 in state 0).
For each $a\in\mathcal{A}$, let $\mathcal{F}_a$ be the event that $\hat{\pi}(a|1) \geq \frac{4}{A}$ ($\hat{\pi}$ gives significant weight to action $a$ in state 1).
A key idea is that under event $\mathcal{B}$, the dataset is the same no matter the underlying MDP.
That is, under event $\mathcal{B}$, we always have
\[
\mathcal{D} = (\underbrace{0,\dots,0}_{2n(0,0) \text{ times}},\underbrace{1,\dots,1}_{An(1,0) \text{ times}})
.\]
It follows that for all $\theta,\theta' \in \Theta$,
\[
\P_{\theta,n}(\mathcal{E}_i\,|\,\mathcal{B}) = \P_{\theta',n}(\mathcal{E}_i\,|\,\mathcal{B}) \qquad \forall i\in\{0,1\}
\]
and
\[
\P_{\theta,n}(\mathcal{F}_a\,|\,\mathcal{B}) = \P_{\theta',n}(\mathcal{F}_a\,|\,\mathcal{B}) \qquad \forall a\in\A
.\]
For ease of notation, going forward we will drop the subscript $\theta,n$ when it does not matter what the underlying MDP is.
Since $\P(\mathcal{E}_0 \cup \mathcal{E}_1 \,|\, \mathcal{B}) = 1$, we must have $\P(\mathcal{E}_{i'} \,|\, \mathcal{B}) \geq \frac{1}{2}$ for some $i'\in\{0,1\}$.
Furthermore, for some $a'\in\mathcal{A}$ we have $\P(\mathcal{F}_{a'} \,|\, \mathcal{B}) \leq \frac{1}{4}$, or equivalently, $\P(\mathcal{F}_{a'}^c \,|\, \mathcal{B}) > \frac{3}{4}$.
Indeed, if this were not the case, we would have
\[
\mathbb{E}\left[ \sum_{a\in\mathcal{A}} \hat{\pi}(a | 1)\,\Bigg|\,\mathcal{B}\right]
= \sum_{a\in\mathcal{A}} \mathbb{E} \left[ \hat{\pi}(a | 1) \,\big|\,\mathcal{B}\right]
\geq \sum_{a\in\mathcal{A}} \mathbb{E}\left[ \hat{\pi}(a | 1) \,\big|\, \mathcal{F}_a \cap \mathcal{B} \right] \P(\mathcal{F}_a \,|\,\mathcal{B})
> \sum_{a\in\mathcal{A}} \frac{4}{A} \cdot \frac{1}{4}
= 1
,\]
which is a contradiction because we always have $\sum_{a\in\mathcal{A}} \hat{\pi}(a | 1) = 1$.
We have shown that when the dataset does not contain any useful transitions, there must be at least one MDP where the algorithm is likely to make a poor guess.
Our last step will be to combine this fact with Lemma \ref{lem:bad_event_prob} which tells us that the dataset will be useless with large enough probability.
We noted above that when the underlying MDP is $(P_{(i',a')},r)$ and a policy $\pi$ satisfies $\pi(i'|0)<\frac{1}{2}$ and $\pi(a'|1) < \frac{4}{A}$ we have $\rho^\pi_{(i',a')} < \frac{1}{2}$.
In particular, under the the event $\mathcal{E}_{i'}^c \cap \mathcal{F}_{a'}^c$ we have $\rho^{\hat{\pi}}_{(i',a')} < \frac{1}{2}$.
Subsequently, for $\theta' = (i',a')$, we have
\[
\P_{\theta',n}\left(\rho^{\hat{\pi}}_{\theta'} < \frac{1}{2}\right)
\geq
\P_{\theta',n}(\mathcal{E}_{i'}^c \cap \mathcal{F}_{a'}^c)
\geq
\P_{\theta',n}(\mathcal{E}_{i'}^c \cap \mathcal{F}_{a'}^c \cap \mathcal{B})
=
\P(\mathcal{E}_{i'}^c \cap \mathcal{F}_{a'}^c | \mathcal{B}) \P_{\theta'}(\mathcal{B})
\geq
\frac{1}{4} \cdot 4\delta
= \delta
,\]
where the final inequality follows from Lemma \ref{lem:bad_event_prob}.
In summary, we have shown that
\[
\max_{\theta \in \Theta} \P_{\theta,n} \left( \rho_\theta^* - \rho_\theta^{\mathscr{A}(\mathcal{D})} \geq \frac{1}{2} \right) \geq \delta
,\]
as desired.
\qed
\subsection{Auxiliary lemmas}
\begin{lem} \label{lem:bad_event_prob}
For all $\theta \in \Theta$, we have $\P_{\theta,n}(\mathcal{B}) \geq 4\delta$.
\end{lem}
\begin{proof}
By symmetry $\P_\theta(\mathcal{B})$ are equal for all $\theta$, so for ease of notation we drop the subscript $\theta$.
Let $\mathcal{B}_0$ be the event that $\mathcal{D}$ contains no transitions from state 0 to state 1, and let $\mathcal{B}_1$ be the event that $\mathcal{D}$ contains no transitions from state 1 to state 0.
Then \[
\P(\mathcal{B}) = \P(\mathcal{B}_0 \cap \mathcal{B}_1) = \P(\mathcal{B}_0) \P(\mathcal{B}_1)
,\]
with the last equality following by independence.
Now,
\[
\P(\mathcal{B}_0)
= (1-p)^{m+t_\delta}
.\]
Recall that $p = \frac{1}{3(m+T)}$. In the case that $m \geq t_\delta$, we have
\begin{equation} \label{eq:bad_event_eq1}
(1-p)^{m+t_\delta}
\geq \left(1 - \frac{1}{6m}\right)^{2m} \geq \frac{1}{e}
,\end{equation}
with the last inequality following from Lemma \ref{lem:geom_bound_fixed} with $x=2m$ and $c=3$.
Otherwise, when $m < t_\delta$, we have
\begin{equation} \label{eq:bad_event_eq2}
(1-p)^{m+t_\delta}
\geq \left( 1 - \frac{1}{6T} \right)^{2t_\delta}
\geq 4\delta^{1/3}
,\end{equation}
with the last inequality following from claim 3 of Lemma \ref{lem:geom_bound_delta} with $x=2T$.
Combining Equations (\ref{eq:bad_event_eq1}) and (\ref{eq:bad_event_eq2}) and the fact that $4\delta^{1/3} \leq \frac{1}{e}$, we have
\[
\P(\mathcal{B}_0) \geq 4\delta^{1/3}
.\]
Next,
\[
\P(\mathcal{B}_1) = \left(1-\frac{1}{T} \right)^{t_\delta} (1-q)^{(A-1)t_\delta}
.\]
Claim 2 of Lemma \ref{lem:geom_bound_delta} with $x=T$ gives us that $\left(1-\frac{1}{T} \right)^{t_\delta} \geq \delta^{1/3}$.
Moreover, recalling that $q = \frac{1}{AT}$, we have
\[
(1-q)^{(A-1)t_\delta}
\geq (1-q)^{At_\delta}
= \left( 1- \frac{1}{AT} \right)^{A t_\delta}
\geq \delta^{1/3}
,\]
with the last inequality following from claim 2 of Lemma \ref{lem:geom_bound_delta} with $x=AT$.
Hence, $\P(\mathcal{B}_1) \geq \delta^{2/3}$, and consequently, $\P(\mathcal{B}) \geq 4\delta$.
\end{proof}
\begin{lem} \label{lem:geom_bound_fixed}
For all $x\geq 2$ and $c\geq 2$, we have
\[
\left( 1 - \frac{1}{cx} \right)^x \geq \frac{1}{e}
.\]
\end{lem}
\begin{proof}
We have
\begin{align*}
\log\left( \left( 1- \frac{1}{cx}\right)^x \right)
&= x\log\left( 1 - \frac{1}{cx}\right) \\
&\geq x\left(- \frac{1}{cx} - \frac{1}{c^2x^2} \right) \\
&= -\frac{1}{c} \left(1 + \frac{1}{cx}\right) \\
&\geq -\frac{2}{c} \\
&\geq -1 \\
&= \log\left(\frac{1}{e}\right),
\end{align*}
where the first inequality follows from $\log(1-y) \geq -y - y^2$ for $y \in[0,0.68]$.
Since $\log x$ is monotonically increasing, we are done.
\end{proof}
\begin{lem} \label{lem:geom_bound_delta}
For any $x \geq 4$, the following holds:
\begin{enumerate}
\item For any $\delta\in\left(0,\frac{1}{e}\right]$, we have
$\left(1-\frac{1}{x}\right)^{\left\lceil \frac{x}{2} \log \left( \frac{1}{\delta} \right)\right\rceil}
\geq \delta$.
\item For any $\delta\in\left(0,\frac{1}{e^3}\right]$, we have
$\left(1-\frac{1}{x}\right)^{\left\lceil \frac{x}{6} \log \left( \frac{1}{\delta} \right)\right\rceil}
\geq \delta^{1/3}$.
\item
For any $\delta\in\left(0,\frac{1}{e^9}\right]$, we have
$\left(1-\frac{1}{3x}\right)^{\left\lceil \frac{x}{6} \log \left( \frac{1}{\delta} \right)\right\rceil}
\geq 4 \delta^{1/3}$.
\end{enumerate}
\end{lem}
\begin{proof}
We will prove claim 1 by showing that $\left(1-\frac{1}{x}\right)^{\frac{x}{2} \log \left( \frac{1}{\delta} \right) + 1}
\geq \delta$.
For any $x \geq 4$ and $\delta \in \left(0,\frac{1}{e}\right]$, we have
\begin{align*}
\log\left(\left( 1 - \frac{1}{x}\right)^{\frac{x}{2}\log\left( \frac{1}{\delta}\right)+1} \right)
&= \left(\frac{x}{2}\log\left(\frac{1}{\delta}\right)+1\right) \log\left(1 - \frac{1}{x}\right) \\
&\geq \left(\frac{x}{2}\log\left(\frac{1}{\delta}\right)+1\right) \left( -\frac{1}{x} - \frac{1}{x^2} \right) \\
&= \left( \frac{1}{2} + \frac{1}{2x} \right)\log\delta
- \frac{1}{x} - \frac{1}{x^2}\\
&\geq \frac{5}{8} \log\delta - \frac{5}{16}\\
&= \frac{5}{8} \log\delta + \frac{5}{16}\log\left(\frac{1}{e}\right) \\
&\geq \left(\frac{5}{8}+\frac{5}{16}\right)\log \delta \\
&\geq \log\delta,
\end{align*}
where the first inequality follows from $\log(1-y) \geq -y - y^2$ for $y \in[0,0.68]$.
Since $\log x$ is monotonically increasing, claim 1 follows.
For claim 2, take $x\geq 4$ and $\delta \in \left(0,\frac{1}{e^3}\right]$.
Then $\delta' = \delta^{1/3} \in \left(0,\frac{1}{e}\right]$, so by claim 1 we have
\[
\left(1-\frac{1}{x}\right)^{\left\lceil \frac{x}{6} \log \left( \frac{1}{\delta} \right)\right\rceil}
=\left(1-\frac{1}{x}\right)^{\left\lceil \frac{x}{2} \log \left( \frac{1}{\delta'} \right)\right\rceil}
\geq \delta'
= \delta^{1/3}
.\]
Finally, for claim 3, take $x\geq 4$ and $\delta \in \left(0,\frac{1}{e^9}\right]$, and let $y = 3x$.
Since $\delta' = \delta^{1/3}\in \left(0,\frac{1}{e^3}\right]$, claim 2 gives us that
\[
\left(1-\frac{1}{3x}\right)^{\left\lceil \frac{x}{6} \log \left( \frac{1}{\delta} \right)\right\rceil}
=\left(1-\frac{1}{y}\right)^{\left\lceil \frac{y}{6} \log \left( \frac{1}{\delta'} \right)\right\rceil}
\geq (\delta')^{1/3}
\geq 4\delta^{1/3}
,\]
where the last inequality holds because $\delta^{1/3} < \frac{1}{8}$.
\end{proof}
\section{Proof of Theorem \ref{thm:recurrent_lb}}
\label{sec:proof_dataset_lb}
We define the absolute constants $c_1 = 4$ and $c_2 = 33$.
Let $T \geq c_1$, $S \geq c_2$, $k\geq 0$, and $m \geq \max \{ TS,kS\}$ be arbitrary.
\paragraph{Step 1: MDP construction}
Define $S' = S-1$, $D = T-2$, $\varepsilon = \frac{1}{256} \sqrt{\frac{TS}{m}}$.
Note that $\varepsilon \leq \frac{1}{256}$.
Let $p = \frac{1-\varepsilon}{D}$ and $q = \frac{1}{D}$.
The set of states is $\S = \{0,1,\dots,S'\}$ and the set of actions is $\A = \{0,1,\dots,S'\}$.
The reward function $r : \S \times \A \to [0,1]$ is defined to be 1 when $s \neq 0$ and $a\leq 1$, and 0 otherwise.
We define an index set $\Theta = \{0,1\}^{S'}$.
For each $\theta \in \Theta$, we define the transition matrix $P_\theta$ as follows:
\begin{center}
\begin{tabular}{ c | c | c}
$s$ & $a$ & $P_\theta(s' |s,a)$ \\
\hline
0 & 0 & $(1-q)\ind(s'=s) + \frac{q}{S'} \sum_{s''\geq1} \ind(s'=s'')$ \\
0 & $a\geq 1$ & $(1-\frac{q}{2})\ind(s'=s) + \frac{q}{2S'} \sum_{s''\geq1} \ind(s'=s'')$ \\
$s\geq1$ & $\theta_s$ & $(1-p)\ind(s'=s) + p\ind(s'=0)$\\
$s\geq1$ & $1-\theta_s$ & $(1-q)\ind(s'=s) + q\ind(s'=0)$\\
$s \geq 2$ & $s$ & $\frac{1}{2}\ind(s'=1) + \frac{1}{2S'} \sum_{s''\geq1} \ind(s'=s'')$\\
$s \geq 1$ & $a \neq s,a\geq2$ & $\frac{1}{2}\ind(s'=a) + \frac{1}{2S'} \sum_{s''\geq1} \ind(s'=s'')$\\
\end{tabular}
\end{center}
\begin{figure}[H]
\centering
\begin{tikzpicture}[->, >=stealth, thick, node distance=2cm, scale=0.8, transform shape]
\path[use as bounding box] (-6.5,-2) rectangle (6,5.5);
% States
\node[circle, draw, minimum size=1cm] (s0) at (0,0) {0};
\node[circle, draw, minimum size=1cm] (s1) at (-6,3) {1};
\node[circle, draw, minimum size=1cm] (s2) at (-2,3) {2};
\node (sdots) at (2,3) {\large $\cdots$};
\node[circle, draw, minimum size=1cm] (sp) at (6,3) {$S'$};
\node [circle, draw, fill, inner sep=0.01cm] (dot1p) at (-7, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot1q) at (-5, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot2p) at (-3, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot2q) at (-1, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dotsp) at (5, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dotsq) at (7, 2) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot0a) at (0, -1.5) {};
\node [circle, draw, fill, inner sep=0.01cm] (dot0b) at (0, 5) {};
\path (s1.west) edge[-,blue] [bend right] node [left] {} (dot1p) ;
\path (dot1p) edge[dashed,blue] [bend right] node [below,text=black] {$p$} (s0);
\path (dot1p) edge[dashed,blue] [bend right] node [right,text=black] {$1-p$} (s1.south west);
\path (s1.south east) edge[-,red] [bend right] node [below] {} (dot1q) ;
\path (dot1q) edge[dashed,red] [bend right=20] node [below,text=black] {$q$} (s0);
\path (dot1q) edge[dashed,red] [bend right] node [right,text=black] {$1-q$} (s1.east);
\path (s2.west) edge[-,blue] [bend right] node [above] {} (dot2p) ;
\path (dot2p) edge[dashed,blue] [bend right] node [above,text=black] {$p$} (s0);
\path (dot2p) edge[dashed,blue] [bend right] node [right,text=black] {$1-p$} (s2.south west);
\path (s2.south east) edge[-,red] [bend right] node [above] {} (dot2q) ;
\path (dot2q) edge[dashed,red] [bend right=20] node [right,text=black] {$q$} (s0);
\path (dot2q) edge[dashed,red] [bend right] node [right,text=black] {$1-q$} (s2.east);
\path (sp.west) edge[-,blue] [bend right] node [above] {} (dotsp) ;
\path (dotsp) edge[dashed,blue] [bend left] node [above,text=black] {$p$} (s0);
\path (dotsp) edge[dashed,blue] [bend right] node [right,text=black] {$1-p$} (sp.south west);
\path (sp.south east) edge[-,red] [bend right] node [above] {} (dotsq) ;
\path (dotsq) edge[dashed,red] [bend left] node [below,text=black] {$q$} (s0);
\path (dotsq) edge[dashed,red] [bend right] node [right,text=black] {$1-q$} (sp.east);
\path (s0) edge[-,blue] [bend left] node [right] {} (dot0a);
\path (dot0a) edge[dashed,blue] [bend left] node [left,text=black] {$1-q$} (s0);
\draw[dashed, -, blue] (dot0a) to [bend left=90,looseness=4.5] (dot0b) ;
\path (dot0b) edge[dashed,blue] [bend right=15] node [below,text=black] {$\frac{q}{S'}$} (s1);
\path (dot0b) edge[dashed,blue] [bend right=15] node [below,text=black] {$\frac{q}{S'}$} (s2);
\path (dot0b) edge[dashed,blue] [bend left=15] node [below,text=black] {$\frac{q}{S'}$} (sp);
\end{tikzpicture}
\caption{Diagram of the MDP $(P_{(0,\dots,0)},r)$ only including actions 0 and 1. Arrows splitting into multiple dashed arrows indicate stochastic transitions, and each dashed arrow is annotated with the associated probability. Blue arrows represent action 0 and red arrows represent action 1. The reward is 0 at state 0 and the reward is 1 at all other states.
In general, the MDP $(P_\theta, r)$ is similar, except in each state $s\geq1$, the blue arrow represents the optimal action $\theta_s$.
\label{fig:recurrent_lb}}
\end{figure}
Observe that the decision-maker needs to decide between two actions in states $1,\dots,S'$. Both actions give an immediate reward of $1$, but one action has a slightly higher probability of transiting to the bad state 0. At state 0, which has a reward of 0, the agent will likely be trapped for a long time before returning to one of states $1,\dots,S'$.
See Figure \ref{fig:recurrent_lb} for a diagram of the MDP $(P_\theta,r)$ for $\theta=(0,\dots,0)$.
We now state some easily verifiable facts about the MDP $(P_\theta, r)$:
\begin{itemize}
\item The MDP has $S$ states, is unichain, and has diameter $\frac{1}{q}+\frac{1}{1/2} = D+2= T$.
\item There is a unique gain-optimal policy $\pistar_\theta$. It takes action 0 in state 0 and action $\theta_s$ in state $s$ for $s\geq 1$.
\item $\mu^{\pistar_\theta}_\theta(0) = \frac{p}{p+q} = \frac{1-\varepsilon}{2-\varepsilon}$. By symmetry, it follows that $\mu^{\pistar_\theta}_\theta(s) = \frac{1}{S'}\left(1-\mu_\theta^{\pistar_\theta}\right) = \frac{1/S'}{2-\varepsilon}$ for $s\geq 1$.
\item The optimal gain is $\rho^*_\theta = 1 - \mu_\theta^{\pistar_\theta}(0) = \frac{1}{2-\varepsilon}$.
\end{itemize}
Note that actions $2,\dots,S'$ for states $s\geq 1$ are always suboptimal, and only exist to keep the diameter bounded by $T$.
Furthermore, actions $1,\dots,S'$ in state 0 simply keep the action space independent of the state, consistent with our upper bounds.
As such, whenever we consider some policy $\pi$, we will assume that it may only take actions 0 and 1 in states $s\geq 1$ and action 0 in state 0.
\paragraph{Step 2: dataset construction}
We define $n : \mathcal{S} \times \mathcal{A} \to \mathbb{N}$ by $n(0,0) = m$ and
\[
n(s,a) = \frac{2m}{S'}
\]
for all $s\geq 1$ and $a\in\{0,1\}$.
For all other $(s,a)$ we set $n(s,a) = 0$.
Observe that this choice of $n$ satisfies $n(s,\pistar_\theta(s)) = \frac{m}{S'} + \frac{m}{S'} \geq m\mu_\theta^{\pistar_\theta}(s) + k$ for all $s\in\S$.
\paragraph{Step 3: reduction to estimation}
Given a stationary policy $\pi$ and some $\theta\in\Theta$, let $L_\theta^\pi(s)$ be the proportion of incorrect actions $\pi$ takes in state $s$.
To be precise, we define $L_\theta^\pi(s) = \pi(1-\theta_s|s)$.
We also set $L_\theta^\pi = \sum_{s=1}^{S'} L_\theta^\pi(s)$.
By Lemma \ref{lem:gain}, we can upper bound the gain of a policy $\pi$ in terms of $L^\pi_\theta$:
\[
\rho_\theta^\pi \leq \frac{1+\varepsilon^2}{2-\varepsilon(1-L_\theta^\pi/S')}
.\]
Subsequently, for any stationary policy $\pi$,
\begin{equation} \label{eq:optimality_gap}
\rho_\theta^* - \rho_\theta^{\pi} \geq \frac{1}{2-\varepsilon} - \frac{1+\varepsilon^2}{2-\varepsilon(1-L_\theta^\pi/S')} \geq \frac{\varepsilon L_\theta^\pi/S' - 2\varepsilon^2}{4}
.
\end{equation}
Now, suppose the underlying MDP is $(P_\theta,r)$.
Let $\mathscr{A}$ be an algorithm that maps the dataset to a stationary policy $\hat{\pi}=\mathscr{A}(\mathcal{D})$,
and consider the estimator $\hat{\theta}^\mathscr{A}$ whose $s$th coordinate is $\hat{\pi}(1|s)$.
By the definition of $L_\theta^{\hat{\pi}}$, we have $L_\theta^{\hat{\pi}} = \left\| \hat{\theta}^\mathscr{A} - \theta \right\|_1$.
Our next step is to show that no estimator can achieve low $\ell_1$ error uniformly over $\Theta$ with high probability, a result which will lower bound $L_\theta^{\hat{\pi}}$ and consequently also the sub-optimality of $\hat{\pi}$ for some $\theta$.
\paragraph{Step 4: Fano's method}
We will achieve such a lower bound with Fano's method.
First, by the Gilbert-Varshamov Lemma (Lemma \ref{lem:gilbert_varshamov}), there exists some subset $\Theta'\subset\Theta$ such that $|\Theta'| \geq 2^{S'/8}$ and $\|\theta - \theta'\|_1 \geq S'/8$ for any $\theta\neq\theta'\in \Theta'$.
Since $\max_{\theta,\theta'\in\Theta'} \text{KL}(\P_{\theta,n} \,\|\, \P_{\theta',n}) \leq (S'/16 - 1)\log2$ by Lemma \ref{lem:maxkl}, Local Fano's (Lemma \ref{lem:fano}) gives us that for any estimator $\hat{\theta}$,
\[
\max_\theta \E_{\theta,n}\left[ \left\| \hat{\theta} - \theta \right\|_1 \right] \geq \frac{S'}{16} \left( 1 - \frac{(S'/16 - 1)\log2+ \log2}{\log\left(2^{S'/8}\right)} \right) \geq \frac{S'}{32}
,\]
which implies that
\[
\max_{\theta\in\Theta} \P_{\theta,n}\left( \left\| \hat{\theta} - \theta \right\|_1 > \frac{S'}{64} \right) \geq \frac{1}{64}
.\]
Since the above holds for estimator of the dataset, it of course holds for $\hat{\theta}^\mathscr{A}$, where $\mathscr{A}$ is any algorithm that maps the dataset to a stationary policy.
Therefore,
\begin{equation} \label{eq:lb_error}
\max_\theta \P_{\theta,n}\left( L^{\mathscr{A}(\mathcal{D})}_\theta > \frac{S'}{64} \right) \geq \frac{1}{64}
.
\end{equation}
Now, by Equation \ref{eq:optimality_gap}, in the event that $L_\theta^{\mathscr{A}(\mathcal{D})} > \frac{S'}{64}$,
\[
\rho_\theta^* - \rho_\theta^{\mathscr{A}(\mathcal{D})} > \frac{\varepsilon/64 - 2\varepsilon^2}{4} \geq \frac{\varepsilon}{512}
= 2^{-17} \sqrt{\frac{TS}{m}}
,\]
with the second inequality holding by $\varepsilon \leq \frac{1}{256}$.
Thus, plugging back into Equation \ref{eq:lb_error} yields
\[
\max_\theta \P_{\theta,n}\left( \rho_\theta^* - \rho_\theta^{\mathscr{A}(\mathcal{D})} > c_3 \sqrt{\frac{TS}{m}}\right) \geq \frac{1}{64}
,\]
with $c_3 = 2^{-17}$.
\qed
\subsection{Auxiliary lemmas}
\begin{lem} \label{lem:gain}
Let $\pi$ be a stationary policy on MDP $M_\theta$. Then
\[
\rho_\theta^\pi \leq \frac{1+\varepsilon^2}{2-\varepsilon(1-L_\theta^\pi/S')}
.\]
\end{lem}
\begin{proof}
A routine computation (see Lemma \ref{lem:recurrent_lb_gain_computation}) yields
\[
\rho_\theta^\pi = \frac{\frac{q}{S'}\sum_{s=1}^{S'}\frac{1}{\kappa_s}}{1+\frac{q}{S'}\sum_{s=1}^{S'}\frac{1}{\kappa_s}}
,\]
where $\kappa_s = L_\theta^\pi(s) q + (1-L_\theta^\pi(s))p = \frac{1 - \varepsilon(1-L_\theta^\pi(s))}{D}$ is the probability of transiting from state $s$ to state 0 under $\pi$.
Since $\frac{x}{1+x}$ is monotonically increasing for $x>-1$, to achieve the desired upper bound for $\rho_\theta^\pi$ it suffices to find an acceptable upper bound for $\lambda :=\frac{q}{S'}\sum_{s=1}^{S'}\frac{1}{\kappa_s} = \frac{1}{S'}\sum_{s=1}^{S'} \frac{1}{1-\varepsilon(1-L_\theta^\pi(s))}$.
Defining $f(x) = \frac{1}{1-x}$ and $\lambda_s = \varepsilon(1-L_\theta^\pi(s))$, we have that
\[
\lambda = \sum_{s=1}^{S'} \frac{1}{S'} f(\lambda_s)
.\]
We would like to get a bound that looks like $\lambda \leq f\left( \frac{1}{S'} \sum_{s=1}^{S'} \lambda_s \right)$.
This goal suggests applying Jensen's inequality, but since $f$ is convex for $x < 1$ it gives us an inequality in the wrong direction.
It turns out, however, that because $f$ is nearly linear in the sufficiently small interval of interest, we can obtain an inequality in the right direction with some error term of lower order.
Since $\lambda_s \in [0,\varepsilon]$ for all $s\in\{1,\dots,S'\}$, Lemma \ref{lem:reverse_jensen} give us
\begin{align*}
\lambda
&\leq f\left( \sum_{s=1}^{S'} \frac{\lambda_s}{S'} \right) + f(0) + f(\varepsilon) - 2f\left(\frac{\varepsilon}{2}\right) \\
&= \frac{1}{1 - \varepsilon(1 - L_\theta^\pi/S')} + 1 + \frac{1}{1-\varepsilon} - \frac{2}{1-\varepsilon/2} \\
&\leq \frac{1}{1 - \varepsilon(1 - L_\theta^\pi/S')} + \varepsilon^2,
\end{align*}
where the last inequality holds for $\varepsilon < \frac{1}{3}$.
Consequently,
\[
\rho_\theta^\pi \leq \frac{\lambda}{1 + \lambda} \leq \frac{\frac{1}{1 - \varepsilon(1 - L_\theta^\pi/S')} + \varepsilon^2}{1 + \frac{1}{1 - \varepsilon(1 - L_\theta^\pi/S')} + \varepsilon^2} \leq \frac{1 + \varepsilon^2}{2- \varepsilon(1 - L_\theta^\pi / S')}
.\]
\end{proof}
\begin{lem}[Gilbert-Varshamov Lemma {\citep[Lemma 4.7]{massart_concentration_2007}}] \label{lem:gilbert_varshamov}
Let $d \geq 8$.
There exists $\Omega_d \subset \{0,1\}^d$ such that $|\Omega_d| \geq 2^{d/8}$ and $\|\omega - \omega' \|_1 \geq d / 8$ for all $\omega \neq \omega' \in \Omega_d$.
\end{lem}
\begin{lem} \label{lem:maxkl}
For any $\theta, \theta' \in \Theta$, we have
\[
\textnormal{KL}(\P_{\theta,n} \,\|\, \P_{\theta',n}) \leq \left( \frac{S'}{16} - 1\right) \log 2
.\]
\end{lem}
\begin{proof}
Let $\theta,\theta' \in \Theta$.
By the construction of $\P_{\theta,n}$ and $\P_{\theta',n}$, we can decompose
\[
\text{KL}(\P_{\theta,n} \,\|\, \P_{\theta',n})
=
\sum_{s=0}^{S'} \sum_{a\in\{0,1\}} n(s,a) \text{KL}(P_\theta(\cdot\,|\,s,a)\,\|\, P_{\theta'}(\cdot\,|\,s,a))
.\]
Recalling our choice of $n$, we can further simplify
\[
\text{KL}(\P_{\theta,n} \,\|\, \P_{\theta',n})
=
\sum_{s=1}^{S'} \frac{2m}{S'} \left( \text{KL}(P_\theta(\cdot\,|\,s,0)\,\|\, P_{\theta'}(\cdot\,|\,s,0)) + \text{KL}(1_\theta(\cdot\,|\,s,1)\,\|\, P_{\theta'}(\cdot\,|\,s,1))\right)
,\]
where we remove the $s=0$ term from the sum because the data coming from state 0 has the same distribution for all possible MDPs.
Observing that
\[
\frac{2(p-q)^2}{p(1-p)}
=
\frac{2(\varepsilon/D)^2}{\left(\frac{1-\varepsilon}{D}\right) \left(\frac{D-1+\varepsilon}{D}\right)}
\leq
\frac{2\varepsilon^2}{\left(\frac{1}{2}\right)\left(\frac{D}{2}\right)} = \frac{8\varepsilon^2}{D}
,\]
we can apply Lemma \ref{lem:bernoulli_kl} to further simplify
\begin{align*}
\text{KL}(\P_{\theta,n} \,\|\, \P_{\theta',n})
& = \sum_{s=1}^{S'} \frac{2m}{S'} \left( \text{KL}(P_\theta(\cdot\,|\,s,0)\,\|\, P_{\theta'}(\cdot\,|\,s,0)) + \text{KL}(1_\theta(\cdot\,|\,s,1)\,\|\, P_{\theta'}(\cdot\,|\,s,1))\right) \\
&\leq 2m \left(\text{KL}\left(\text{Ber}(p) \,\|\, \text{Ber}(q)\right) + \text{KL}\left(\text{Ber}(q) \,\|\, \text{Ber}(p)\right) \right) \\
&\leq 2m \frac{8\varepsilon^2}{D} \\
&= 2m \frac{8 \cdot 2^{-16} \frac{TS}{m}}{T-2} \\
&\leq 2^{-10} S' \\
&\leq \left( \frac{S'}{16} - 1\right) \log 2.
\end{align*}
The final inequality holds due to the assumption that $S \geq 33 \implies S'\geq 32$.
\end{proof}
\begin{lem}[Local Fano's inequality {\cite[Proposition 15.12, Equation 15.34]{wainwright_high-dimensional_2019}}]
\label{lem:fano}
Let $\mathcal{P}$ be a class of distributions with parameter space $\Theta$, and let $\{\P_1,\dots,\P_N\}\subset \mathcal{P}$.
Letting $\theta(\P) \in\Theta$ denote the parameters of $\P$,
define $\delta = \min_{j\neq k} \| \theta(\P_j) - \theta(\P_k) \|_1$.
For any estimator $\hat{\theta}$, we have
\[
\sup_{\P\in\mathcal{P}} \underset{\mathcal{D}\sim\P}{\mathbb{E}}\left[ \left\| \hat{\theta}(\mathcal{D}) - \theta(\P) \right\|_1 \right]
\geq
\frac{\delta}{2} \left( 1 - \frac{\max_{j,k} \textnormal{KL}(\P_j \,\|\, \P_k) + \log 2}{\log N} \right)
.\]
\end{lem}
\begin{lem} \label{lem:bernoulli_kl}
For any $p,q\in\left(0,\frac{1}{2}\right]$ satisfying $p<q$, we have
\[
\textnormal{KL}\left(\textnormal{Ber}(p) \,\|\, \textnormal{Ber}(q)\right)
\leq
\textnormal{KL}\left(\textnormal{Ber}(q) \,\|\, \textnormal{Ber}(p)\right)
\leq
\frac{(p-q)^2}{p(1-p)}
,\]
which implies that
\[
\textnormal{KL}\left(\textnormal{Ber}(p) \,\|\, \textnormal{Ber}(q)\right)
+
\textnormal{KL}\left(\textnormal{Ber}(q) \,\|\, \textnormal{Ber}(p)\right)
\leq
\frac{2(p-q)^2}{p(1-p)}
.\]
\end{lem}
\begin{proof}
By Lemma 10 in \cite{li_settling_2023}, we have
\[
\text{KL}\left(\text{Ber}(p') \,\|\, \text{Ber}(q')\right)
\leq \text{KL}\left(\text{Ber}(q') \,\|\, \text{Ber}(p')\right)
\leq \frac{\left( p'-q' \right)^2}{p'(1-p')}
\]
for any $p',q'\in \left[\frac{1}{2},1\right)$ satisfying $p' > q'$.
The desired result follows immediately by taking $p'=1-p$ and $q'=1-q$, along with the observation that $\text{KL}\left(\text{Ber}(1-p) \,\|\, \text{Ber}(1-q)\right) = \text{KL}\left(\text{Ber}(p) \,\|\, \text{Ber}(q)\right)$.
\end{proof}
\begin{lem}[Theorem 1 in \cite{simic_global_2008}] \label{lem:reverse_jensen}
Let $I = [a,b]$ be a closed interval with $a,b\in\mathbb{R}, a<b$.
For some $n\in \mathbb{Z}^+$, let $x_1,\dots,x_n \in I$, and let $p_1,\dots,p_n>0$ satisfy $\sum_{i=1}^n p_i = 1$.
If $f:[a,b]\to\mathbb{R}$ is convex, then
\[
\sum_{i=1}^n p_i f(x_i) \leq f\left( \sum_{i=1}^n p_i x_i \right) + f(a) + f(b) - 2f\left( \frac{a+b}{2} \right)
.\]
\end{lem}
\begin{lem} \label{lem:recurrent_lb_gain_computation}
Suppose the underlying MDP is $(P_\theta, r)$.
Let $\pi$ be a stationary policy such that for each $s\neq 0$, if the current state is $s$ then the probability of transiting to state 0 after taking action according to $\pi$ is $\kappa_s$.
Then
\[
\rho_\theta^\pi = \frac{\frac{q}{S'}\sum_{s=1}^{S'} \frac{1}{\kappa_s}}{1 + \frac{q}{S'}\sum_{s=1}^{S'} \frac{1}{\kappa_s}}
.\]
\end{lem}
\begin{proof}
We first solve for $\mu_\theta^\pi(0)$ by considering the balance equations for the MDP $(P_\theta, r)$.
For each $s\neq 0$, we have
\[
\mu_\theta^\pi(s) = \frac{q}{S'} \mu_\theta^\pi(0) + (1-\kappa_s) \mu_\theta^\pi(s)
.\]
Rearranging gives us
\[
\mu_\theta^\pi(s) = \frac{q}{S'}\mu_\theta^\pi(0) \frac{1}{\kappa_s}
.\]
Since $\sum_{s=0}^{S'} \mu_\theta^\pi(s) = 1$, we have
\[
\mu_\theta^\pi(0)
= 1 - \sum_{s=1}^{S'} \mu_\theta^\pi(s)
= 1 - \mu_\theta^\pi(0)\frac{q}{S'}\sum_{s=1}^{S'} \frac{1}{\kappa_s}
.\]
We then solve for $\mu_\theta^\pi(0)$ to obtain
\[
\mu_\theta^\pi(0) = \frac{1}{1 + \frac{q}{S'}\sum_{s=1}^{S'} \frac{1}{\kappa_s}}
.\]
Since the reward is 0 in state 0 and 1 in all other states, we conclude that
\[
\rho^\pi_\theta = 1 - \mu_\theta^\pi(0) = \frac{\frac{q}{S'}\sum_{s=1}^{S'} \frac{1}{\kappa_s}}{1 + \frac{q}{S'} \sum_{s=1}^{S'} \frac{1}{\kappa_s}}
.\]
\end{proof}
\section{Deferred proofs and auxiliary lemmas}
\label{sec:deferred_proofs}
\subsection{Proof of Lemma \ref{lem:tope_monotonicity}}
\label{sec:tope_monotonicity_proof}
\begin{proof}[Proof of Lemma \ref{lem:tope_monotonicity}]
Letting $V, V' \in \R^\S$ satisfy $V \geq V'$ elementwise, we seek to show that
\begin{align*}
\Tope(V) \geq \Tope(V').
\end{align*}
Since this is an elementwise bound, we can fix arbitrary $s \in \S, a \in \A$ and show that $ \Tope(V)(s,a) \geq \Tope(V')(s,a)$. From here on, since $s, a$ are fixed, we abbreviate $\beta(s,a) \in \R$ as $\beta$ for notational convenience.
Consider the simpler function $\Mopm : \R^{\S} \to \R$ (which depends on our fixed $s, a$) defined as
\begin{align*}
\Mopm(V'') := \Phat_{sa} T_{\beta}( \Phat_{sa}, V'') - \max \left \{ \sqrt{\beta \Var_{\Phat_{sa}} \left[ T_{\beta}( \Phat_{sa}, V'') \right]} , \beta \spannorm{T_{\beta}( \Phat_{sa}, V'')} \right \}
\end{align*}
for any $V'' \in \R^{\S}$.
Note that
\begin{align*}
\Tope(V'')(s,a) &= r(s,a) +\gamma\max \left\{ \Phat_{sa} T_{\beta}( \Phat_{sa}, V'') - b(s,a, V''), \min_{s'}(V'')(s') \right \}\\
&= r(s,a) + \gamma \max \left\{\Mopm(V'') - \frac{5}{\ntot}, \min_{s'}(V'')(s') \right\}.
\end{align*}
Therefore, if we could show that
\begin{align}
\Mopm(V) \geq \Mopm(V'), \label{eq:mopm_monotonicity_key}
\end{align}
then since clearly $V \geq V'$ implies $\min_{s'}(V)(s') \geq \min_{s'}(V')(s')$, we could immediately conclude that
\begin{align*}
\Tope(V)(s,a)
&= r(s,a) + \gamma \max \left\{\Mopm(V) - \frac{5}{\ntot}, \min_{s'}(V)(s') \right\} \\
&\geq r(s,a) + \gamma \max \left\{\Mopm(V') - \frac{5}{\ntot}, \min_{s'}(V')(s') \right\} \\
&= \Tope(V')(s,a)
\end{align*}
as desired.
Thus we now focus on showing~\eqref{eq:mopm_monotonicity_key}.
First we can quickly handle the case that $\beta > 1$, since in this case for any $V'' \in \R^\S$ we have $T_{\beta}( \Phat_{sa}, V'') = \left(\min_{s '} V''(s')\right) \one$, and then
\begin{align*}
\Mopm(V) &= \Phat_{sa} T_{\beta}( \Phat_{sa}, V) - \max \left \{ \sqrt{\beta \Var_{\Phat_{sa}} \left[ T_{\beta}( \Phat_{sa}, V) \right]} , \beta \spannorm{T_{\beta}( \Phat_{sa}, V)} \right \} \\
&= \left(\min_{s '} V(s')\right) \Phat_{sa} \one - 0 = \min_{s '} V(s') \\
&\geq \min_{s '} V'(s') = \left(\min_{s '} V'(s')\right) \Phat_{sa} \one - 0 \\
&= \Phat_{sa} T_{\beta}( \Phat_{sa}, V') - \max \left \{ \sqrt{\beta \Var_{\Phat_{sa}} \left[ T_{\beta}( \Phat_{sa}, V') \right]} , \beta \spannorm{T_{\beta}( \Phat_{sa}, V')} \right \} \\
&= \Mopm(V'),
\end{align*}
confirming~\eqref{eq:mopm_monotonicity_key}. Now we can focus on the case that $\beta \leq 1$.
The fact that $\beta \leq 1$ means that the following expression for $T_\beta$ holds: for any $s' \in \S$ and $V'' \in \R^\S$, we have
\begin{align*}
T_\beta(\Phat_{sa}, V'')(s') = \min \left\{ V''(s') , Q_\beta(\Phat_{sa}, V'')\right\}
\end{align*}
where $Q_\beta(\Phat_{sa}, V'') = \sup \{V''(x) : x \in \S, \sum_{x' \in \S : V(x') \geq V(x)} \Phat_{sa}(x') \geq \beta \}$ is the $1 - \beta$ quantile of $V''$ with respect to $\Phat_{sa}$
(in words, we choose the largest $V''(x)$ such that $\Phat_{sa}$ places probability at least $\beta$ on states $x'$ with $V''(x') \geq V''(x)$). We will make use of the function $Q_\beta$ shortly.
We also make the useful definitions
\begin{align*}
\Mopsp(V) &:= \Phat_{sa} T_{\beta}( \Phat_{sa}, V) - \beta \spannorm{T_{\beta}( \Phat_{sa}, V)} \\
\Mopvar(V) &:= \Phat_{sa} T_{\beta}( \Phat_{sa}, V) - \sqrt{\beta \Var_{\Phat_{sa}} \left[ T_{\beta}( \Phat_{sa}, V) \right]}
\end{align*}
so that we can decompose $\Mopm$ as $\Mopm(V) = \min \left\{\Mopsp(V), \Mopvar(V) \right\}$.
To show~\eqref{eq:mopm_monotonicity_key}, it suffices to show that this holds when $V$ and $V'$ differ in only one coordinate, since then we could decompose $V = V' + \sum_{s' \in \S} e_{s'} e_{s'}^\top (V - V')$ and apply the inequalities $\Mopm\left(V' + \sum_{{s'} = 1}^{k-1} e_{s'} e_{s'}^\top (V - V') \right) \leq \Mopm\left(V' + \sum_{{s'} = 1}^{k} e_{s'} e_{s'}^\top (V - V') \right)$ for each $k = 1, \dots, S$.
Therefore we fix one state $x \in \S$ and try to show $\Mopm(V)$ is montonically non-decreasing as $V(x)$ increases (with the other entries of $V$ held constant). We will show this by using Lemma \ref{lem:analysis_fact_monotonic}, which says that if a univariate function is continuous and at all but a finite number of points has a non-negative right derivative, then it must be non-decreasing.
First we justify that $\Mopm$ is continuous. Since we have decomposed $\Mopm$ as the composition of many continuous functions, it suffices to check that $Q_\beta(\Phat_{sa}, V)$ is a continuous function of $V(x)$. This follows immediately from Lemma \ref{lem:quantile_continuity}, which shows $1$-Lipschitzness. (We remark that the $1-\beta$ quantile is well-known to be discontinuous in $\beta$, a fact which is irrelevant here since $\beta$ is fixed and we instead vary $V(x)$.)
We will now compute the right derivative at all values of $V(x)$ such that $V(x)$ is not equal to $V(s')$ for some other $s' \in \S$ with $s' \neq x$ (which is a finite set).
We define some new notation for this purpose. With respect to this fixed value of $V(x)$, let $\S_{>} = \{s' \in \S : V(s') > V(x)\}$ and $\S_{<} = \{s' \in \S : V(s') < V(x)\}$. Define a neighborhood of $V(x)$, the open interval $U := (\max_{s' \in \S_{<}} V(s'), \min_{s' \in \S_{>}} V(s'))$. Let $V' \in \R^\S$ have $V'(s')=V(s')$ for all $s'\neq x$, and we vary $V'(x)$ within the neighborhood $U$ of $V(x)$ in order to compute the (full/two-sided) derivatives $\frac{d \Mopsp(V')}{d V'(x)}\Big|_{V'(x) = V(x)}$ and $\frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)}$. Once we have computed these two derivatives, we will be able to compute the right derivative of $\Mopm(V')$, since if both $\Mopsp(V')$ and $\Mopvar(V')$ are differentiable at a point $V(x)$, then by Lemma \ref{lem:analysis_fact_min} the right derivative of $\Mopm(V')$ satisfies
\begin{align}
\frac{d \Mopm(V')}{d V'(x)}\Big|_{V'(x) = V(x)^+} &= \frac{d }{d V'(x)}\Big|_{V'(x) = V(x)^+} \left( \min\left\{ \Mopsp(V'), \Mopvar(V') \right \}\right) \nonumber \\
&= \begin{cases}
\frac{d \Mopsp(V')}{d V'(x)}\Big|_{V'(x) = V(x)} & \Mopsp(V) < \Mopvar(V) \\
\frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)} & \Mopsp(V) > \Mopvar(V) \\
\min \left \{ \frac{d \Mopsp(V')}{d V'(x)}\Big|_{V'(x) = V(x)}, \frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)}\right \} & \Mopsp(V) = \Mopvar(V)
\end{cases}. \label{eq:right_derivative_cases_Mop}
\end{align}
To compute the derivatives of $\Mopsp(V')$ and $\Mopvar(V')$, we also analyze the functions $Q_\beta(\Phat_{sa}, V')$ and $T_\beta(\Phat_{sa}, V')$ on the set $U$ (all considered as functions of $V'(x)$). For any set $\S' \subseteq \S$, let $\Phat_{sa}(\S') = \sum_{s' \in \S'}\Phat_{sa}(s')$. We define three possible cases depending on the (fixed) state $x$:
\begin{gather}
\beta \leq \Phat_{sa}(\S_{>}) \label{eq:deriv_case_1}\\
\Phat_{sa}(\S_{>}) < \beta \leq \Phat_{sa}(\S_{>}) + \Phat_{sa}(x) \label{eq:deriv_case_2}\\
\Phat_{sa}(\S_{>}) + \Phat_{sa}(x) < \beta .\label{eq:deriv_case_3}
\end{gather}
\begin{enumerate}
\item In case~\eqref{eq:deriv_case_1}, we have $Q_\beta(\Phat_{sa}, V') = Q_\beta(\Phat_{sa}, V)$ on the entire interval $U$ and also that for any $V'(x)\in U$, $Q_\beta(\Phat_{sa}, V) > V'(x)$ (since the $(1-\beta)$-percentile is achieved at some state $s' \in \S_{>}$), so $T_\beta(\Phat_{sa}, V')(x) = V'(x)$ and $T_\beta(\Phat_{sa}, V')(s') = T_\beta(\Phat_{sa}, V)(s')$ for all $s' \neq x$. Therefore
\begin{align*}
\frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} &= \begin{cases}
1 & s' = x \\
0 & \text{otherwise}
\end{cases}
\end{align*}
and
\begin{align*}
\frac{d \Mopsp(V')}{dV'(x)}\bigg|_{V'(x)=V(x)}
&=\frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta \spannorm{T_\beta(\Phat_{sa}, V')} \right) \\
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta Q_\beta(\Phat_{sa}, V') + \beta \min_{s'}V'(s') \right) \\
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta Q_\beta(\Phat_{sa}, V) + \beta \min_{s'}V'(s') \right) \\
&= \Phat_{sa}(x) + \beta \begin{cases}
1 & \S_{<} = \emptyset \\
0 & \text{otherwise}
\end{cases} \\
& \geq \Phat_{sa}(x) \geq 0.
\end{align*}
\item In case~\eqref{eq:deriv_case_2}, we have $Q_\beta(\Phat_{sa}, V') = V'(x)$ on the entire interval $U$. Thus $T_\beta(\Phat_{sa}, V') (s') = V'(x)$ if $s' \in \S_{>} \cup \{x\}$, and $T_\beta(\Phat_{sa}, V') (s') = V'(s') = V(s')$ for $s' \in S_{<}$. Thus
\begin{align*}
\frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} &= \begin{cases}
1 & s' \in \S_{>} \cup \{x\} \\
0 & \text{otherwise}
\end{cases}
\end{align*}
and
\begin{align*}
\frac{d \Mopsp(V')}{dV'(x)}\bigg|_{V'(x)=V(x)}
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta \spannorm{T_\beta(\Phat_{sa}, V')} \right) \\
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta Q_\beta(\Phat_{sa}, V') + \beta \min_{s'}V'(s') \right) \\
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta V'(x) + \beta \min_{s'}V'(s') \right) \\
&= \Phat_{sa}(\S_{>} \cup \{x\}) -\beta + \beta \begin{cases}
1 & \S_{<} = \emptyset \\
0 & \text{otherwise}
\end{cases} \\
& \geq \Phat_{sa}(\S_{>} \cup \{x\}) -\beta \geq 0.
\end{align*}
\item In case~\eqref{eq:deriv_case_3}, we have $Q_\beta(\Phat_{sa}, V') = Q_\beta(\Phat_{sa}, V)$ and also that $T_\beta(\Phat_{sa}, V')(x) = Q_\beta(\Phat_{sa}, V) < V'(x)$ (since $V'(x) < Q_\beta(\Phat_{sa}, V)$ in this case), so $T_\beta(\Phat_{sa}, V') = T_\beta(\Phat_{sa}, V)$ on the interval $U$. Also $\min_{s'} V'(s') < V'(x)$ on $U$, so $\min_{s'} V'(s') = \min_{s'} V(s')$ on $U$. Thus
\begin{align*}
\frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} &= 0
\end{align*}
for all $s' \in \S$, and
\begin{align*}
\frac{d \Mopsp(V')}{dV'(x)}\bigg|_{V'(x)=V(x)}
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V') - \beta Q_\beta(\Phat_{sa}, V') + \beta \min_{s'}V'(s') \right) \\
&= \frac{d }{dV'(x)}\bigg|_{V'(x)=V(x)} \left( \Phat_{sa} T_\beta(\Phat_{sa}, V) - \beta Q_\beta(\Phat_{sa}, V) + \beta \min_{s'}V(s') \right) \\
&= 0.
\end{align*}
\end{enumerate}
Next we calculate $ \frac{d \Mopvar(V')}{dV'(x)}\bigg|_{V'(x)=V(x)}$. First, letting $T \in \R^{\S}$, if $\Var_{\Phat_{sa}} \left[ T \right] \neq 0$ then (recalling $\Phat_{sa}$ is a row vector so $\Phat_{sa}^\top$ is a column vector)
\begin{align}
\nabla_T \sqrt{\Var_{\Phat_{sa}} \left[ T \right]} &= \frac{1}{2} \frac{1}{ \sqrt{\Var_{\Phat_{sa}} \left[ T \right]}} \nabla_T \left( \Phat T^{\circ 2} - (\Phat T)^{\circ 2} \right) \nonumber\\
&= \frac{1}{ \sqrt{\Var_{\Phat_{sa}} \left[ T \right]}} \left( \Phat_{sa}^\top \circ T - (\Phat_{sa} T) \Phat_{sa}^\top \right) \nonumber \\
&= \frac{1}{ \sqrt{\Var_{\Phat_{sa}} \left[ T \right]}} \Phat_{sa}^\top \circ \left( T - (\Phat_{sa} T) \one \right) \nonumber \\
&\leq \frac{\spannorm{T}}{ \sqrt{\Var_{\Phat_{sa}} \left[ T \right]}} \Phat_{sa}^\top \label{eq:var_deriv_bound}
\end{align}
where the final inequality is elementwise and uses the fact that for any $s'$, $T(s') - \Phat_{sa} T \leq \max_{s''} T(s'') - \min_{s''} T(s'') = \spannorm{T}$. Now we will combine this calculation with the chain rule to lower bound $\frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)}$. Note that in light of~\eqref{eq:right_derivative_cases_Mop}, we only need to bound $\frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)}$ when $\Mopsp(V) > \Mopvar(V)$ or equivalently when our fixed value of $V(x)$ satisfies
\begin{align}
\sqrt{\Var_{\Phat_{sa}} \left[ T_\beta(\Phat_{sa}, V) \right]} > \sqrt{\beta}\spannorm{T_\beta(\Phat_{sa}, V)}. \label{eq:condition_for_Mopvar}
\end{align}
Since we have already excluded the finite set of values of $V(x)$ where $V(x)$ is equal to $V(s')$ for some other state $s' \neq x$, the only way for $\Var_{\Phat_{sa}} \left[ T_\beta(\Phat_{sa}, V) \right] = 0$ is if $\Phat_{sa}(x) = 1$, but in that case we have $\spannorm{T_\beta(\Phat_{sa}, V)} = 0$ which contradicts~\eqref{eq:condition_for_Mopvar}. Therefore we can calculate that if $V(x)$ satisfies~\eqref{eq:condition_for_Mopvar}, we have
\begin{align*}
\frac{d \Mopvar(V')}{d V'(x)}\Big|_{V'(x) = V(x)} &= \frac{d }{d V'(x)}\Big|_{V'(x) = V(x)} \left( \Phat_{sa} T_{\beta}( \Phat_{sa}, V) - \sqrt{\beta \Var_{\Phat_{sa}} \left[ T_{\beta}( \Phat_{sa}, V) \right]} \right) \\
&= \sum_{s' \in \S}\left( \frac{\partial }{\partial T(s')}\Big|_{T(s') = T_\beta(\Phat_{sa}, V)(s')} \left(\Phat_{sa} T - \sqrt{\beta \Var_{\Phat_{sa}} \left[ T \right]} \right) \right) \cdot \frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} \\
& = \sum_{s' \in \S}\left( \Phat_{sa}(s') - \sqrt{\beta} \frac{\partial \sqrt{ \Var_{\Phat_{sa}} \left[ T \right]}}{\partial T(s')}\Big|_{T(s') = T_\beta(\Phat_{sa}, V)(s')} \right) \cdot \frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} \\
& \geq \sum_{s' \in \S}\left( \Phat_{sa}(s') - \sqrt{\beta} \frac{\spannorm{T_\beta(\Phat_{sa}, V)}}{\sqrt{\Var_{\Phat_{sa}}\left[ T_\beta(\Phat_{sa}, V)\right] }} \Phat_{sa}(s') \right) \cdot \frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} \\
& > \sum_{s' \in \S}\left( \Phat_{sa}(s') - \Phat_{sa}(s') \right) \cdot \frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} \\
&= 0
\end{align*}
where the first inequality step is using the fact that $\frac{d T_\beta(\Phat_{sa}, V' )(s')}{d V'(x)}\bigg|_{V'(x)=V(x)} \geq 0$ for all $s'$ (verified above in all three cases) and inequality~\eqref{eq:var_deriv_bound}, and the second inequality step uses~\eqref{eq:condition_for_Mopvar}.
\end{proof}
\subsection{Auxiliary lemmas}
\begin{lem} \label{lem:analysis_fact_monotonic}
If $f:\R\to\R$ is a continuous function that has a nonnegative right derivative for all but finitely many points, then $f$ is monotonically non-decreasing.
\end{lem}
\begin{proof}
We make the following claim:
for $a,b\in\R$ with $a<b$, if $f:[a,b]\to\R$ is continuous on $[a,b]$ and has a nonnegative right derivative on $(a,b)$, then $f$ is monotonically non-decreasing on $[a,b]$.
We first prove the lemma assuming that the claim holds.
Let $f:\R\to\R$ be a continuous function that has a nonnegative right derivative for all but finitely many points.
Let $x,y\in\R$ satisfy $x<y$, and denote by $a_1,\dots,a_{n-1}$ the points in $(x,y)$ where $f$ either is not right-differentiable or has negative right derivative.
Also denote $a_0 = x$ and $a_n = y$.
By the claim, $f$ is monotonically increasing on $[a_{i-1},a_i]$ for each $i=1,\dots,n$.
Hence $f(x)=f(a_0)\leq f(a_1) \leq \dots \leq f(a_n) = f(y)$.
Since $x$ and $y$ were arbitrary, we conclude that $f$ is monotonically increasing.
It remains to prove the claim.
Let $a,b\in\R$ with $a<b$, and let $f:[a,b]\to\R$ be continuous on $[a,b]$ with a nonnegative right derivative on $(a,b)$.
Suppose towards a contradiction that there exist $x,y\in[a,b]$ such that $x<y$ and $f(x) > f(y)$.
Since $f$ is continuous, we can assume that $x>a$ (if $x=a$ we have $x+\delta < y$ and $f(x+\delta) > f(y)$ for sufficiently small $\delta>0$).
Now, set $r:=\frac{f(y)-f(x)}{y-x}<0$ and
\[
z:= \inf\left\{ t\in(x,y] \,\Big|\, \frac{f(t)-f(x)}{t-x} < \frac{r}{2} \right\}
.\]
Consider the case where $z=x$.
$f$ has a nonnegative right derivative at $x$, so there exists $w\in (x,y]$ such that $\frac{f(t)-f(x)}{t-x} > \frac{r}{2}$ for all $t\in (x,w]$.
However, this implies a contradiction:
\[
z = \inf\left\{ t\in(x,y] \,\Big|\, \frac{f(t)-f(x)}{t-x} < \frac{r}{2} \right\} \geq w > x = z
.\]
We next consider the case where $z > x$.
Note that by continuity of $f$, the function $g(t):=\frac{f(t)-f(x)}{t-x}$ is continuous on $(x,y]$.
It follows that $g(z) = \frac{f(z)-f(x)}{z-x} = \frac{r}{2}$.
Indeed, if we had $g(z) > \frac{r}{2}$, then by continuity of $g$ there would exist $\delta>0$ such that $g(t) > \frac{r}{2}$ for $t\in[z,z+\delta]$, which would imply that $z \geq z+\delta$.
And by a similar argument, $g(z) < \frac{r}{2}$ would imply $z \leq z-\delta$.
At $z$ the right-derivative is nonnegative, so there exists $w\in(z,y]$ such that $\frac{f(t)-f(z)}{t-z} > \frac{r}{2}$ for all $t\in(z,w]$.
Consequently, for all $t\in(z,w]$, we have
\[
\frac{f(t)-f(x)}{t-x}
= \frac{1}{t-x}(f(t) - f(z) + f(z) - f(x))
> \frac{1}{t-x}\left(\frac{r}{2}(t-z) + (z-x) \right)
= \frac{r}{2}
,\]
which implies the following contradiction:
\[
z = \inf\left\{ t\in(x,y] \,\Big|\, \frac{f(t)-f(x)}{t-x} < \frac{r}{2} \right\} \geq w > z
.\]
\end{proof}
\begin{lem} \label{lem:analysis_fact_min}
Let $f,g:\R\to\R$ be differentiable at some $x\in\R$, and suppose $f(x) = g(x)$.
Then $\phi:\R\to\R$ defined by $\phi(t) = \min\{f(t),g(t)\}$ is right-differentiable at $x$, and its right derivative satisfies $\phi'_+(x) = \min\{f'(x), g'(x)\}$.
\end{lem}
\begin{proof}
We first consider the case where $f'(x) < g'(x)$.
Since $\lim_{h\to0} \frac{f(x+h)-f(x)}{h} < \lim_{h\to 0} \frac{g(x+h) - g(x)}{h}$, there exists some $\delta > 0$ such that $\frac{f(x+h)-f(x)}{h} < \frac{g(x+h) - g(x)}{h}$ for all $h\in(0,\delta)$.
Subsequently, since $f(x) = g(x)$, we have $f(x+h) < g(x+h)$ for all $h \in (0,\delta)$.
It follows that $\phi(x+h) = f(x+h)$ for all $h\in(0,\delta)$, and thus
\[
\lim_{h\to 0^+} \frac{\phi(x+h) - \phi(x)}{h}
=
\lim_{h\to 0^+} \frac{f(x+h) - f(x)}{h}
=
f'(x)
=
\min \{f'(x), g'(x)\}
.\]
Next, the case where $f'(x) > g'(x)$ is identical to the previous case except we swap the roles of $f$ and $g$.
Finally, we consider the case where $f'(x) = g'(x)$.
Here we can even show that $\phi$ is differentiable at $x$.
Let $\{h_n\}_{n\in\N}$ be a sequence such that $h_n\to 0$.
To show that $\frac{\phi(x+h_n) - \phi(x)}{h_n} \to f'(x)$, fix $\varepsilon > 0$.
Since $\frac{f(x+h_n) - f(x)}{h_n}\to f'(x)$ and $\frac{g(x+h_n) - g(x)}{h_n} \to g'(x)$, there exist $N_1, N_2\in\N$ such that
\[
n \geq N_1 \implies \left| \frac{f(x+h_n) - f(x)}{h_n} - f'(x) \right| \leq \varepsilon
\]
and
\[
n \geq N_2 \implies \left| \frac{g(x+h_n) - g(x)}{h_n} - g'(x) \right| \leq \varepsilon
.\]
Taking $N = \max\{N_1,N_2\}$, we have for all $n\geq \N$,
\begin{align*}
&\left| \frac{\phi(x+h_n) - \phi(x)}{h_n} - f'(x)\right| \\
&\qquad\leq \max \left\{ \left| \frac{f(x+h_n) - f(x)}{h_n} - f'(x) \right| , \left| \frac{g(x+h_n) - g(x)}{h_n} - g'(x) \right| \right\} \\
&\qquad\leq \max\{\varepsilon, \varepsilon\} = \varepsilon,
\end{align*}
where the first inequality holds due to $f(x)=g(x), f'(x)=g'(x)$, and the fact that for each $n$, either $\phi(x+h_n)=f(x+h_n)$ or $\phi(x+h_n) = g(x+h_n)$.
Thus, we have that $\frac{\phi(x+h_n) - \phi(x)}{h_n} \to f'(x)$.
Since the sequence $\{h_n\}_{n\in\N}$ was arbitrary, we conclude that
\[
\phi'(x) = \lim_{h\to 0} \frac{\phi(x+h) - \phi(x)}{h} = f'(x) = \min\{ f'(x), g'(x) \}
.\]
\end{proof}
\begin{lem}
\label{lem:quantile_continuity}
For any probability distribution $\mu \in \R^\S$ and any $\beta \in [0,1]$, the largest-$(1-\beta)$-quantile function
\begin{align*}
Q_\beta(\mu, V'') = \sup \{V''(x) : x \in \S, \sum_{x' \in \S : V(x') \geq V(x)} \mu(x') \geq \beta \}
\end{align*}
satisfies
\begin{align*}
\left|Q_\beta(\mu, V) - Q_\beta(\mu, V')\right| \leq \infnorm{V - V'}
\end{align*}
for any $V , V' \in\R^\S$.
\end{lem}
\begin{proof}
First, we note that the definition of $Q_\beta$ can be written equivalently as
\begin{align*}
Q_\beta(\mu, V'') = \sup \left\{\min_{s' \in \S'} V''(s') : \S' \subseteq \S \text{ and } \sum_{s' \in \S'} \mu(s') \geq \beta \right\}.
\end{align*}
Without loss of generality we can assume that $Q_\beta(\mu, V) \geq Q_\beta(\mu, V')$, so it suffices to lower-bound $Q_\beta(\mu, V')$.
By the definition of $Q_\beta(\mu, V)$ (and the fact that $\S$ is finite so the supremum within its definition is attained exactly), there exists some set $\S' \subseteq \S$ such that
\begin{align*}
Q_\beta(\mu, V) = \min_{s' \in \S'} V(s')
\end{align*}
and $\sum_{s' \in \S'} \mu(s') \geq \beta$.
Therefore since
\begin{align*}
V'(s') \geq V(s') - \infnorm{V - V'} \geq Q_\beta(\mu, V) - \infnorm{V - V'}
\end{align*}
for all $s' \in \S'$, we have that
\begin{align*}
Q_\beta(\mu, V'') \geq Q_\beta(\mu, V) - \infnorm{V - V'}
\end{align*}
as desired.
\end{proof}
\end{document}
\begin{thebibliography}{36}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
\providecommand{\doi}[1]{doi: #1}\else
\providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
\bibitem[Agarwal et~al.(2020)Agarwal, Kakade, and Yang]{agarwal_model-based_2020}
Alekh Agarwal, Sham Kakade, and Lin~F. Yang.
\newblock Model-{Based} {Reinforcement} {Learning} with a {Generative} {Model} is {Minimax} {Optimal}, April 2020.
\newblock URL \url{http://arxiv.org/abs/1906.03804}.
\newblock arXiv:1906.03804 [cs, math, stat] version: 3.
\bibitem[Bertsekas(2018)]{bertsekas_approximate_2018}
Dimitri~P. Bertsekas.
\newblock \emph{Approximate dynamic programming}.
\newblock Number volume 2 in Dynamic programming and optimal control / {Dimitri} {P}. {Bertsekas}, {Massachusetts} {Institute} of {Technology}. Athena Scientific, Belmont, Massachusetts, fourth edition, updated printing edition, 2018.
\newblock ISBN 978-1-886529-08-3 978-1-886529-44-1.
\bibitem[Cheikhi and Russo(2023)]{cheikhi_statistical_2023}
David Cheikhi and Daniel Russo.
\newblock On the {Statistical} {Benefits} of {Temporal} {Difference} {Learning}.
\newblock In \emph{Proceedings of the 40th {International} {Conference} on {Machine} {Learning}}, pages 4269--4293. PMLR, July 2023.
\newblock URL \url{https://proceedings.mlr.press/v202/cheikhi23a.html}.
\newblock ISSN: 2640-3498.
\bibitem[Chen and Jiang(2019)]{chen_informationtheoretic_2019}
Jinglin Chen and Nan Jiang.
\newblock Information-{Theoretic} {Considerations} in {Batch} {Reinforcement} {Learning}.
\newblock In \emph{Proceedings of the 36th {International} {Conference} on {Machine} {Learning}}, pages 1042--1051. PMLR, May 2019.
\newblock URL \url{https://proceedings.mlr.press/v97/chen19e.html}.
\bibitem[Durrett(2019)]{durrett_probability_2019}
Richard Durrett.
\newblock \emph{Probability: theory and examples}.
\newblock Cambridge series in statistical and probabilistic mathematics. Cambridge University Press, Cambridge, fifth edition edition, 2019.
\newblock ISBN 978-1-108-47368-2.
\bibitem[Farahmand et~al.(2010)Farahmand, Szepesvári, and Munos]{farahmand_error_2010}
Amir-massoud Farahmand, Csaba Szepesvári, and Rémi Munos.
\newblock Error {Propagation} for {Approximate} {Policy} and {Value} {Iteration}.
\newblock In \emph{Advances in {Neural} {Information} {Processing} {Systems}}, volume~23. Curran Associates, Inc., 2010.
\newblock URL \url{https://proceedings.neurips.cc/paper_files/paper/2010/hash/65cc2c8205a05d7379fa3a6386f710e1-Abstract.html}.
\bibitem[Gabbianelli et~al.(2023)Gabbianelli, Neu, Okolo, and Papini]{gabbianelli_offline_2023}
Germano Gabbianelli, Gergely Neu, Nneka Okolo, and Matteo Papini.
\newblock Offline {Primal}-{Dual} {Reinforcement} {Learning} for {Linear} {MDPs}, May 2023.
\newblock URL \url{http://arxiv.org/abs/2305.12944}.
\newblock arXiv:2305.12944 [cs].
\bibitem[Jin et~al.(2021)Jin, Yang, and Wang]{jin_is_2021}
Ying Jin, Zhuoran Yang, and Zhaoran Wang.
\newblock Is {Pessimism} {Provably} {Efficient} for {Offline} {RL}?
\newblock In \emph{Proceedings of the 38th {International} {Conference} on {Machine} {Learning}}, pages 5084--5096. PMLR, July 2021.
\newblock URL \url{https://proceedings.mlr.press/v139/jin21e.html}.
\newblock ISSN: 2640-3498.
\bibitem[Jin et~al.(2024)Jin, Gummadi, Zhou, and Blanchet]{jin_feasible_2024}
Ying Jin, Ramki Gummadi, Zhengyuan Zhou, and Jose Blanchet.
\newblock Feasible \${Q}\$-{Learning} for {Average} {Reward} {Reinforcement} {Learning}.
\newblock In \emph{Proceedings of {The} 27th {International} {Conference} on {Artificial} {Intelligence} and {Statistics}}, pages 1630--1638. PMLR, April 2024.
\newblock URL \url{https://proceedings.mlr.press/v238/jin24b.html}.
\newblock ISSN: 2640-3498.
\bibitem[Kearns and Singh(1998)]{kearns_finite-sample_1998}
Michael Kearns and Satinder Singh.
\newblock Finite-{Sample} {Convergence} {Rates} for {Q}-{Learning} and {Indirect} {Algorithms}.
\newblock In \emph{Advances in {Neural} {Information} {Processing} {Systems}}, volume~11. MIT Press, 1998.
\newblock URL \url{https://proceedings.neurips.cc/paper/1998/hash/99adff456950dd9629a5260c4de21858-Abstract.html}.
\bibitem[Kemeny and Snell(1976)]{kemeny_finite_1976}
John~G. Kemeny and J.~Laurie Snell.
\newblock \emph{Finite {Markov} chains}.
\newblock Undergraduate texts in mathematics. Springer-Verlag, New York, 1976.
\newblock ISBN 978-0-387-90192-3.
\bibitem[Li et~al.(2023)Li, Shi, Chen, Chi, and Wei]{li_settling_2023}
Gen Li, Laixi Shi, Yuxin Chen, Yuejie Chi, and Yuting Wei.
\newblock Settling the {Sample} {Complexity} of {Model}-{Based} {Offline} {Reinforcement} {Learning}, February 2023.
\newblock URL \url{http://arxiv.org/abs/2204.05275}.
\newblock arXiv:2204.05275 [cs, eess, math, stat].
\bibitem[Liu et~al.(2020)Liu, Swaminathan, Agarwal, and Brunskill]{liu_provably_2020}
Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill.
\newblock Provably {Good} {Batch} {Off}-{Policy} {Reinforcement} {Learning} {Without} {Great} {Exploration}.
\newblock In \emph{Advances in {Neural} {Information} {Processing} {Systems}}, volume~33, pages 1264--1274. Curran Associates, Inc., 2020.
\newblock URL \url{https://proceedings.neurips.cc//paper_files/paper/2020/hash/0dc23b6a0e4abc39904388dd3ffadcd1-Abstract.html}.
\bibitem[Massart(2007)]{massart_concentration_2007}
Pascal Massart.
\newblock \emph{Concentration inequalities and model selection: École d'{Ete} de {Probabilites} de {Saint}-{Flour} {XXXIII} - 2003}.
\newblock Number 1896 in Lecture notes in mathematics. Springer-Verlag, Berlin New York, 2007.
\newblock ISBN 978-3-540-48503-2.
\bibitem[Maurer and Pontil(2009)]{maurer_empirical_2009}
Andreas Maurer and Massimiliano Pontil.
\newblock Empirical {Bernstein} {Bounds} and {Sample} {Variance} {Penalization}, July 2009.
\newblock URL \url{http://arxiv.org/abs/0907.3740}.
\newblock arXiv:0907.3740 [stat] version: 1.
\bibitem[Munos(2007)]{munos_performance_2007}
Rémi Munos.
\newblock Performance {Bounds} in \${L}\_p\$‐norm for {Approximate} {Value} {Iteration}.
\newblock \emph{SIAM Journal on Control and Optimization}, 46\penalty0 (2):\penalty0 541--561, January 2007.
\newblock ISSN 0363-0129, 1095-7138.
\newblock \doi{10.1137/040614384}.
\newblock URL \url{http://epubs.siam.org/doi/10.1137/040614384}.
\bibitem[Neu and Okolo(2024)]{neu_dealing_2024}
Gergely Neu and Nneka Okolo.
\newblock Dealing with unbounded gradients in stochastic saddle-point optimization, June 2024.
\newblock URL \url{http://arxiv.org/abs/2402.13903}.
\newblock arXiv:2402.13903 [cs, math, stat] version: 2.
\bibitem[Ozdaglar et~al.(2024)Ozdaglar, Pattathil, Zhang, and Zhang]{ozdaglar_offline_2024}
Asuman Ozdaglar, Sarath Pattathil, Jiawei Zhang, and Kaiqing Zhang.
\newblock Offline {Reinforcement} {Learning} via {Linear}-{Programming} with {Error}-{Bound} {Induced} {Constraints}, December 2024.
\newblock URL \url{http://arxiv.org/abs/2212.13861}.
\newblock arXiv:2212.13861 [cs].
\bibitem[Pugh(2015)]{pugh_real_2015}
Charles~Chapman Pugh.
\newblock \emph{Real mathematical analysis}.
\newblock Undergraduate texts in mathematics. Springer, Cham Heidelberg, 2. ed edition, 2015.
\newblock ISBN 978-3-319-17770-0.
\bibitem[Puterman(1994)]{puterman_markov_1994}
Martin~L. Puterman.
\newblock \emph{Markov {Decision} {Processes}: {Discrete} {Stochastic} {Dynamic} {Programming}}.
\newblock Wiley {Series} in {Probability} and {Statistics}. Wiley, 1 edition, April 1994.
\newblock ISBN 978-0-471-61977-2 978-0-470-31688-7.
\newblock \doi{10.1002/9780470316887}.
\newblock URL \url{https://onlinelibrary.wiley.com/doi/book/10.1002/9780470316887}.
\bibitem[Rashidinejad et~al.(2022)Rashidinejad, Zhu, Ma, Jiao, and Russell]{rashidinejad_bridging_2022}
Paria Rashidinejad, Banghua Zhu, Cong Ma, Jiantao Jiao, and Stuart Russell.
\newblock Bridging {Offline} {Reinforcement} {Learning} and {Imitation} {Learning}: {A} {Tale} of {Pessimism}.
\newblock \emph{IEEE Transactions on Information Theory}, 68\penalty0 (12):\penalty0 8156--8196, December 2022.
\newblock ISSN 1557-9654.
\newblock \doi{10.1109/TIT.2022.3185139}.
\newblock URL \url{https://ieeexplore.ieee.org/document/9803237}.
\bibitem[Shi et~al.(2022)Shi, Li, Wei, Chen, and Chi]{shi_pessimistic_2022}
Laixi Shi, Gen Li, Yuting Wei, Yuxin Chen, and Yuejie Chi.
\newblock Pessimistic {Q}-{Learning} for {Offline} {Reinforcement} {Learning}: {Towards} {Optimal} {Sample} {Complexity}.
\newblock In \emph{Proceedings of the 39th {International} {Conference} on {Machine} {Learning}}, pages 19967--20025. PMLR, June 2022.
\newblock URL \url{https://proceedings.mlr.press/v162/shi22c.html}.
\bibitem[Simic(2008)]{simic_global_2008}
Slavko Simic.
\newblock On a global upper bound for {Jensen}'s inequality.
\newblock \emph{Journal of Mathematical Analysis and Applications}, 343\penalty0 (1):\penalty0 414--419, July 2008.
\newblock ISSN 0022247X.
\newblock \doi{10.1016/j.jmaa.2008.01.060}.
\newblock URL \url{https://linkinghub.elsevier.com/retrieve/pii/S0022247X08000814}.
\bibitem[Tuynman et~al.(2024)Tuynman, Degenne, and Kaufmann]{tuynman_finding_2024}
Adrienne Tuynman, Rémy Degenne, and Emilie Kaufmann.
\newblock Finding good policies in average-reward {Markov} {Decision} {Processes} without prior knowledge, May 2024.
\newblock URL \url{http://arxiv.org/abs/2405.17108}.
\newblock arXiv:2405.17108 [cs].
\bibitem[Uehara and Sun(2021)]{uehara_pessimistic_2021}
Masatoshi Uehara and Wen Sun.
\newblock Pessimistic {Model}-based {Offline} {Reinforcement} {Learning} under {Partial} {Coverage}.
\newblock October 2021.
\newblock URL \url{https://openreview.net/forum?id=tyrJsbKAe6}.
\bibitem[Wainwright(2019)]{wainwright_high-dimensional_2019}
Martin~J. Wainwright.
\newblock \emph{High-{Dimensional} {Statistics}: {A} {Non}-{Asymptotic} {Viewpoint}}.
\newblock Cambridge University Press, 1 edition, February 2019.
\newblock ISBN 978-1-108-62777-1 978-1-108-49802-9.
\newblock \doi{10.1017/9781108627771}.
\newblock URL \url{https://www.cambridge.org/core/product/identifier/9781108627771/type/book}.
\bibitem[Wang et~al.(2022)Wang, Wang, and Yang]{wang_near_2022}
Jinghan Wang, Mengdi Wang, and Lin~F. Yang.
\newblock Near {Sample}-{Optimal} {Reduction}-based {Policy} {Learning} for {Average} {Reward} {MDP}, December 2022.
\newblock URL \url{http://arxiv.org/abs/2212.00603}.
\newblock arXiv:2212.00603 [cs].
\bibitem[Wang et~al.(2023)Wang, Blanchet, and Glynn]{wang_optimal_2023}
Shengbo Wang, Jose Blanchet, and Peter Glynn.
\newblock Optimal {Sample} {Complexity} for {Average} {Reward} {Markov} {Decision} {Processes}.
\newblock October 2023.
\newblock URL \url{https://openreview.net/forum?id=jOm5p3q7c7}.
\bibitem[Xie et~al.(2021)Xie, Cheng, Jiang, Mineiro, and Agarwal]{xie_bellman-consistent_2021}
Tengyang Xie, Ching-An Cheng, Nan Jiang, Paul Mineiro, and Alekh Agarwal.
\newblock Bellman-consistent {Pessimism} for {Offline} {Reinforcement} {Learning}.
\newblock In \emph{Advances in {Neural} {Information} {Processing} {Systems}}, volume~34, pages 6683--6694. Curran Associates, Inc., 2021.
\newblock URL \url{https://proceedings.neurips.cc/paper/2021/hash/34f98c7c5d7063181da890ea8d25265a-Abstract.html}.
\bibitem[Yan et~al.(2023)Yan, Li, Chen, and Fan]{yan_efficacy_2023}
Yuling Yan, Gen Li, Yuxin Chen, and Jianqing Fan.
\newblock The {Efficacy} of {Pessimism} in {Asynchronous} {Q}-{Learning}.
\newblock \emph{IEEE Transactions on Information Theory}, 69\penalty0 (11):\penalty0 7185--7219, November 2023.
\newblock ISSN 1557-9654.
\newblock \doi{10.1109/TIT.2023.3299840}.
\newblock URL \url{https://ieeexplore.ieee.org/abstract/document/10196488}.
\bibitem[Yin and Wang(2021)]{yin2021towards}
Ming Yin and Yu-Xiang Wang.
\newblock Towards instance-optimal offline reinforcement learning with pessimism.
\newblock In A.~Beygelzimer, Y.~Dauphin, P.~Liang, and J.~Wortman Vaughan, editors, \emph{Advances in Neural Information Processing Systems}, 2021.
\newblock URL \url{https://openreview.net/forum?id=1XwPDFrJObw}.
\bibitem[Yin et~al.(2022)Yin, Duan, Wang, and Wang]{yin_nearoptimal_2022}
Ming Yin, Yaqi Duan, Mengdi Wang, and Yu-Xiang Wang.
\newblock Near-optimal {Offline} {Reinforcement} {Learning} with {Linear} {Representation}: {Leveraging} {Variance} {Information} with {Pessimism}, March 2022.
\newblock URL \url{http://arxiv.org/abs/2203.05804}.
\newblock arXiv:2203.05804 [cs].
\bibitem[Zhang and Xie(2023)]{zhang_sharper_2023}
Zihan Zhang and Qiaomin Xie.
\newblock Sharper {Model}-free {Reinforcement} {Learning} for {Average}-reward {Markov} {Decision} {Processes}, June 2023.
\newblock URL \url{http://arxiv.org/abs/2306.16394}.
\newblock arXiv:2306.16394 [cs].
\bibitem[Zurek and Chen(2025{\natexlab{a}})]{zurek_plug-approach_2025}
Matthew Zurek and Yudong Chen.
\newblock The plug-in approach for average-reward and discounted mdps: Optimal sample complexity analysis.
\newblock In Gautam Kamath and Po-Ling Loh, editors, \emph{Proceedings of The 36th International Conference on Algorithmic Learning Theory}, volume 272 of \emph{Proceedings of Machine Learning Research}, pages 1386--1387. PMLR, 24--27 Feb 2025{\natexlab{a}}.
\newblock URL \url{https://proceedings.mlr.press/v272/zurek25a.html}.
\bibitem[Zurek and Chen(2025{\natexlab{b}})]{zurek_span-agnostic_2025}
Matthew Zurek and Yudong Chen.
\newblock Span-{Agnostic} {Optimal} {Sample} {Complexity} and {Oracle} {Inequalities} for {Average}-{Reward} {RL}.
\newblock In \emph{Proceedings of {Thirty} {Eighth} {Conference} on {Learning} {Theory}}, pages 6156--6209. PMLR, July 2025{\natexlab{b}}.
\newblock URL \url{https://proceedings.mlr.press/v291/zurek25a.html}.
\bibitem[Zurek and Chen(2025{\natexlab{c}})]{zurek_span-based_2025}
Matthew Zurek and Yudong Chen.
\newblock Span-{Based} {Optimal} {Sample} {Complexity} for {Weakly} {Communicating} and {General} {Average} {Reward} {MDPs}.
\newblock \emph{Advances in Neural Information Processing Systems}, 37:\penalty0 33455--33504, January 2025{\natexlab{c}}.
\newblock URL \url{https://proceedings.neurips.cc/paper_files/paper/2024/hash/3acbe9dc3a1e8d48a57b16e9aef91879-Abstract-Conference.html}.
\end{thebibliography}