Solution (source code)

= Solution

A standard form of <Varadhan's integral theorem> is as follows. Let $\mu_L$ be <probability measures> on a <Polish space> $E$ satisfying a <large deviation principle> with speed $L\to\infty$ and <good rate function> $I$. If $F:E\to\mathbb R$ is <continuous> and bounded above, then
$$
\boxed{\lim_{L\to\infty}\frac1L\log\int_Ee^{LF(x)}\,\mu_L(dx)
=\sup_{x\in E}\{F(x)-I(x)\}.}
$$
The usual bounded-<continuous> version follows immediately. If $F$ is unbounded above, the same conclusion holds under the additional exponential tail condition
$$
\lim_{M\to\infty}\limsup_{L\to\infty}
\frac1L\log\int_{\{F>M\}}e^{LF(x)}\,\mu_L(dx)=-\infty.
$$
This is the <exponential tail extension of Varadhan's lemma>. A convenient sufficient hypothesis is
$$
\limsup_{L\to\infty}\frac1L\log\int_Ee^{\gamma LF(x)}\,\mu_L(dx)<\infty
\quad\text{for some }\gamma>1.
$$
An integrability hypothesis is essential for general unbounded functions; the ordinary <large deviation principle> alone does not control arbitrarily large exponential weights.

For example, let $X^L=L$ with probability $e^{-L^2}$ and $X^L=0$ otherwise. It satisfies the <large deviation principle> at speed $L$ with rate zero at zero and infinite elsewhere. But for $F(x)=x^2$, $\mathbb E e^{LF(X^L)}\geq e^{L^3-L^2}$, whose logarithmic rate diverges, while $\sup(F-I)=0$. This shows why the tail hypothesis cannot simply be omitted.

For the lower bound, fix $x$ with $I(x)<\infty$ and $\varepsilon>0$. By <continuity> choose an <open set> $G$ containing $x$ on which $F(y)\geq F(x)-\varepsilon$. Then
$$
\int e^{LF}\,d\mu_L\geq
e^{L(F(x)-\varepsilon)}\mu_L(G).
$$
Apply the open-set lower bound of the <large deviation principle>:
$$
\liminf_{L\to\infty}\frac1L\log\int e^{LF}\,d\mu_L
\geq F(x)-\varepsilon-\inf_GI
\geq F(x)-\varepsilon-I(x).
$$
Let $\varepsilon\downarrow0$ and take the <supremum> over $x$ to obtain the required lower bound. This argument also applies when $F$ is not bounded above.

For the upper bound, suppose $F\leq M$ and set $S=\sup_E(F-I)$, which is finite. Choose a large $K$ and partition $[-K,M]$ into finitely many closed intervals $[a_j,a_j+\varepsilon]$ of length at most $\varepsilon$. The preimages
$$
C_j=\{x:a_j\leq F(x)\leq a_j+\varepsilon\}
$$
are <closed sets>. The overlapping endpoints do not matter for an upper estimate. Split off the lower tail and bound each remaining exponential weight:
$$
\int e^{LF}\,d\mu_L
\leq e^{-LK}+
\sum_j e^{L(a_j+\varepsilon)}\mu_L(C_j).
$$
For a finite sum of nonnegative terms the upper logarithmic rate is at most the largest of their upper logarithmic rates. Applying the closed-set upper bound gives
$$
\limsup_{L\to\infty}\frac1L\log\int e^{LF}\,d\mu_L
\leq
\max\left\{-K,\ \max_j\left(a_j+\varepsilon-\inf_{C_j}I\right)\right\}.
$$
For $x\in C_j$, $a_j+\varepsilon\leq F(x)+\varepsilon$, hence every inner term is at most $S+\varepsilon$. Empty preimages contribute no term. Let $K\to\infty$ and then $\varepsilon\downarrow0$ to get the upper bound $S$. Together with the lower bound this proves the bounded-above theorem.

For the unbounded extension, put $F_M=\min(F,M)$. This is <continuous> and bounded above, so the proved result applies, with
$$
S_M=\sup_x\{F_M(x)-I(x)\}\uparrow
S=\sup_x\{F(x)-I(x)\}.
$$
The full integral is at most the integral with $F_M$ plus the integral on $\{F>M\}$. The upper logarithmic rate is therefore at most the larger of $S_M$ and the tail rate. The tail hypothesis and then $M\to\infty$ give the upper bound $S$; the earlier local argument gives the lower bound. If $S=+\infty$, that lower argument already yields the asserted infinite limit.

Finally, the sufficient exponential-moment condition really implies the required tail estimate: on $F>M$,
$$
e^{LF}\leq e^{-(\gamma-1)LM}e^{\gamma LF}.
$$
After integration the upper logarithmic rate is bounded by a finite constant minus $(\gamma-1)M$, which tends to $-\infty$. This completes the statement and proof of <Varadhan's lemma>, including the hypotheses needed for the unbounded version.