# Dynamical large deviations for the boundary driven symmetric exclusion
process with Robin boundary conditions.

T. Franco  UFBA
Instituto de Matemática, Campus de Ondina, Av. Adhemar de Barros, S/N. CEP
40170-110
Salvador, Brasil<EMAIL_ADDRESS>,  P. Gonçalves  Center for Mathematical
Analysis, Geometry and Dynamical Systems, Instituto Superior Técnico,
Universidade de Lisboa, Av. Rovisco Pais, 1049-001 Lisboa, Portugal
<EMAIL_ADDRESS>,  C. Landim  IMPA, Estrada Dona Castorina 110,
CEP 22460 Rio de Janeiro, Brasil and CNRS UMR 6085, Université de Rouen,
France.
e-mail<EMAIL_ADDRESS>and  A. Neumann  UFRGS, Instituto de Matemática, Campus
do Vale, Av. Bento Gonçalves, 9500. CEP 91509-900, Porto Alegre, Brasil
<EMAIL_ADDRESS>
###### Abstract.

In this article, we consider a one-dimensional symmetric exclusion process in
weak contact with reservoirs at the boundary. In the diffusive time-scaling
the empirical measure evolves according to the heat equation with Robin
boundary conditions. We prove the associated dynamical large deviations
principle.

###### Contents

  1. 1 Introduction
  2. 2 Notation and Results
  3. 3 The rate functional $I_{[0,T]}(\,\cdot\,)$
  4. 4 Deconstructing the rate functional
  5. 5 $I_{[0,T]}(\,\cdot\,)$-density
  6. 6 Proof of Theorem 2.7
  7. 7 Weakly asymmetric exclusion with Robin boundary conditions
  8. A The Robin Laplacian
  9. B Initial-value problems with Robin boundary conditions

##  1\. Introduction

The investigation of the thermodynamic properties of stationary nonequilibrium
states of interacting particle systems has been proven to be an important step
in the understanding of nonequilibrium phenomena and a rich source of
mathematical problems [11, 5, 21].

In the context of lattices gases, the empirical measure is the only relevant
thermodynamical quantity in the macroscopic description of the system, and the
thermodynamical functionals, as the free energy, can be identified to the
large deviations rate functional.

While in equilibrium the stationary state is given by the Gibbs distribution
associated to the Hamiltonian, in nonequilibrium the construction of the
stationary state requires solving a dynamical-variational problem which
defines the so-called quasi-potential [19].

At the beginning of this century, Derrida, Lebowitz and Speer [14] considered
the one-dimensional symmetric exclusion process in strong contact with
reservoirs. In this context, the empirical measure evolves in the diffusive
time-scale according to the heat equation with Dirichlet boundary conditions
[22]. Expressing the stationary state as a product of matrices [12], they
obtained an explicit formula for the large deviations principle rate
functional of the empirical measure under the stationary state, the so-called
nonequilibrium free energy.

Later, [2] derived the Derrida-Lebowitz-Speer formula (in short DLS formula)
for the nonequilibrium free energy extending to infinite dimensions the
dynamical approach introduced in [19]. More precisely, they first proved a
dynamical large deviations principle for the empirical measure for symmetric
exclusion processes in strong contact with reservoirs [3]. Denote by
$I_{[0,T]}(u)$ the large deviations rate function of the dynamical large
deviations principle. Hence, $I_{[0,T]}(u)$ represents the cost of observing a
trajectory $u(t)$ in the time-interval $[0,T]$. Let $\bar{\rho}$ be the
stationary profile of the hydrodynamic equation, that is, the typical density
profile under the stationary state. Define the quasi-potential as

$V(\gamma)\;=\;\inf_{T>0}\inf_{u}I_{[0,T]}(u)\;,$

where the second infimum is carried over all trajectories $u(t)$ connecting
the stationary density profile $\bar{\rho}$ to a density profile $\gamma$ in
the time interval $[0,T]$: $u(0)=\bar{\rho}$, $u(T)=\gamma$. It is proven in
[2] that the quasi-potential $V$ coincides with the nonequilibrium free
energy, i.e., that it satisfies the DLS’ equations.

In the sequel, [8, 16] derived a large deviations principle for the empirical
measure under the stationary state from the dynamical one, with rate
functional given by the quasi-potential. This result was later extended to
weakly symmetric exclusion processes in strong contact with reservoirs [15, 7,
6, 4] and to reaction-diffusion models [25, 18].

It has long been understood that these results extend to boundary-driven one-
dimensional symmetric exclusion processes in weak contact with reservoirs
[10]. But only recently, this result appeared in [13] through the matrix
ansatz product method.

In this article, we accomplish the first step in the project of deriving the
large deviations principle for the empirical measure under the stationary
state, through the dynamical approach, for boundary-driven one-dimensional
symmetric exclusion processes in weak contact with reservoirs. The law of
large numbers has been obtained in [1, 20]. We prove here the dynamical large
deviations, while in the companion paper [9], it is shown that the quasi-
potential satisfies the DLS’ equations obtained in [13] for this model.

##  2\. Notation and Results

### The model

We consider one-dimensional, symmetric exclusion processes in a weak contact
with boundary reservoirs. Fix $N\geq 1$, and let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathfrak{e}}_{N}=1/N$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathfrak{r}}_{N}=1-(1/N)$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Lambda_{N}=\\{{\mathfrak{e}}_{N},\dots,(N-2)\,{\mathfrak{e}}_{N},{\mathfrak{r}}_{N}\\}$.
The state-space is represented by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Omega_{N}=\\{0,1\\}^{\Lambda_{N}}$
and the configurations by the Greek letters $\eta$, $\xi$ so that
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\eta_{x}$,
$x\in\Lambda_{N}$, represents the number of particles at site $x$ for the
configuration $\eta$. Here and below all notation introduced in the text and
not in displayed equations is indicated in blue.

Fix throughout this article,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}0<\alpha\leq\beta<1$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}A>0$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}B>0$.
The generator of the Markov process, represented by
${\mathscr{L}}_{N}={\mathscr{L}}^{\alpha,A,\beta,B}_{N}$, is given by

${\mathscr{L}}_{N}\;=\;L^{\rm lb}_{N}\;+\;L^{\rm bulk}_{N}\;+\;L^{\rm
rb}_{N}\;.$

In this formula, for every function $f:\Omega_{N}\to\mathbb{R}$,

$(L^{\rm
bulk}_{N}f)(\eta)\;=\;N^{2}\,\sum_{x\in\Lambda^{o}_{N}}[\,f(\sigma^{x,x+{\mathfrak{e}}_{N}}\eta)\,-\,f(\eta)\,]\;,$
(2.1)

where $\Lambda^{o}_{N}$ represents the interior of $\Lambda_{N}$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Lambda^{o}_{N}:=\Lambda_{N}\setminus\\{{\mathfrak{r}}_{N}\\}=\\{{\mathfrak{e}}_{N},\dots,(N-2)\,{\mathfrak{e}}_{N}\\}$,
and

$\begin{gathered}(L^{\rm
lb}_{N}f)(\eta)\;=\;\frac{N}{A}\,\big{[}\,(1-\eta_{{\mathfrak{e}}_{N}})\,\alpha\,+\,(1-\alpha)\,\eta_{{\mathfrak{e}}_{N}}\,\big{]}\big{[}\,f(\sigma^{{\mathfrak{e}}_{N}}\eta)\,-\,f(\eta)\,\big{]}\;,\\\
(L^{\rm
rb}_{N}f)(\eta)\;=\;\frac{N}{B}\,\big{[}\,(1-\eta_{{\mathfrak{r}}_{N}})\,\beta\,+\,(1-\beta)\,\eta_{{\mathfrak{r}}_{N}}\,\big{]}\big{[}\,f(\sigma^{{\mathfrak{r}}_{N}}\eta)\,-\,f(\eta)\,\big{]}\;.\end{gathered}$
(2.2)

From now on, we omit the subindex $N$ from ${\mathfrak{e}}_{N}$ and
${\mathfrak{r}}_{N}$. In the definitions above,

$(\sigma^{x,x+{\mathfrak{e}}}\eta)_{y}\;=\;\begin{cases}\eta_{y}&\mbox{ if
}y\neq x,x+{\mathfrak{e}}\\\ \eta_{x+{\mathfrak{e}}}&\mbox{ if }y=x\\\
\eta_{x}&\mbox{ if }y=x+{\mathfrak{e}}\end{cases}\quad\mbox{ and
}\quad(\sigma^{x}\eta)_{y}\;=\;\begin{cases}\eta_{y}&\mbox{ if }y\neq x\\\
1-\eta_{x}&\mbox{ if }y=x\;.\end{cases}$ (2.3)

For a metric space $\mathbb{X}$, denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}D([0,T],\mathbb{X})$,
$T>0$, the space of right-continuous functions $x\colon[0,T]\to\mathbb{X}$,
with left-limits, endowed with the Skorohod topology and its associated Borel
$\sigma$-algebra. The elements of $D([0,T],\Omega_{N})$ are represent by
${\boldsymbol{\eta}}(\cdot)$.

For a probability measure $\mu$ on $\Omega_{N}$, let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{P}_{\mu}$
be the measure on $D([0,T],\Omega_{N})$ induced by the continuous-time Markov
process associated to the generator ${\mathscr{L}}_{N}$ starting from $\mu$.
When the measure $\mu$ is the Dirac measure concentrated on a configuration
$\eta\in\Omega_{N}$, that is $\mu=\delta_{\eta}$, we represent
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{P}_{\delta_{\eta}}$
simply by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{P}_{\eta}$.
Expectation with respect to $\mathbb{P}_{\mu}$, $\mathbb{P}_{\eta}$ is denoted
by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{E}_{\mu}$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{E}_{\eta}$,
respectively.

### Hydrodynamic limit

Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathscr{M}$
the set of non-negative measures on $[0,1]$ with total mass bounded by $1$
endowed with the weak topology. Recall that this topology is metrisable and
that, with this topology, ${\mathscr{M}}$ is a compact space. For a continuous
function $F:[0,1]\to\mathbb{R}$ and a measure $\pi\in{\mathscr{M}}$, denote by
$\langle\pi,F\rangle$ the integral of $F$ with respect to $\pi$:

$\langle\pi,F\rangle\;=\;\int F(x)\,\pi(dx)\;.$

Given a configuration $\eta\in\Omega_{N}$, denote by $\pi=\pi(\eta)$ the
measure in ${\mathscr{M}}$ obtained by assigning a mass $N^{-1}$ to each
particle:

$\pi\;=\;\pi(\eta)\;=\;\genfrac{}{}{}{1}{1}{N}\sum_{x\in\Lambda_{N}}\eta_{x}\,\delta_{x}\;.$

The measure $\pi$ is called the _empirical measure_. Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\boldsymbol{\pi}}:D([0,T],\Omega_{N})\to
D([0,T],{\mathscr{M}})$ the map which associates to a trajectory
${\boldsymbol{\eta}}(\cdot)$ its empirical measure:

${\boldsymbol{\pi}}(t)\;=\;\pi({\boldsymbol{\eta}}(t))\;=\;\genfrac{}{}{}{1}{1}{N}\sum_{x\in\Lambda_{N}}\eta_{x}(t)\,\delta_{x}\;.$
(2.4)

For a probability measure $\mu$ in $\Omega_{N}$, let $\mathbb{Q}^{N}_{\mu}$ be
the measure on $D([0,T],{\mathscr{M}})$ given by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\mathbb{Q}^{N}_{\mu}=\mathbb{P}^{N}_{\mu}\,\circ\,{\boldsymbol{\pi}}^{-1}$.
The first result, due to [1], establishes the hydrodynamic behavior of the
empirical measure.

######  Theorem 2.1.

Fix $T>0$, a measurable density profile $\gamma\colon[0,1]\to[0,1]$, and a
sequence $\\{\nu^{N}\\}_{N\geq 1}$ of probability measures on $\Omega_{N}$
associated to $\gamma$ in the sense that

$\lim_{N\to\infty}\nu^{N}\Big{[}\,\Big{|}\,\langle\pi\,,\,H\rangle\,-\,\int_{0}^{1}\gamma(x)\,H(x)\,dx\,\Big{|}\,>\,\delta\,\Big{]}\;=\;0$
(2.5)

for all continuous functions $H\colon[0,1]\to\mathbb{R}$ and $\delta>0$. Then,
the sequence of probability measures $\mathbb{Q}^{N}_{\nu^{N}}$ converges
weakly to the probability measure $\mathbb{Q}$ concentrated on the trajectory
$\pi(t,dx)=u(t,x)\,dx$, where $u$ is the unique weak solution of the heat
equation with Robin boundary conditions

$\begin{cases}\partial_{t}u\,=\,\Delta u\\\ (\nabla
u)(t,0)\,=\,A^{-1}[\,u(t,0)-\alpha\,]\\\ (\nabla
u)(t,1)\,=\,B^{-1}[\,\beta-u(t,1)]\\\
u(0,\cdot)\,=\,\gamma(\cdot)\;.\end{cases}$ (2.6)

In this formula, $\nabla u$ stands for the partial derivative in space of $u$,
$\partial_{t}u$ for its partial derivative in time and $\Delta u$ for the
Laplacian of $u$ in the space variable. The definition of weak solutions of
equation (2.6) and the proof of uniqueness of weak solutions is provided in
Appendix B. It is also presented in [1].

### The energy

Denote by ${\mathscr{M}}_{\rm ac}$ the subset of ${\mathscr{M}}$ of all
measures which are absolutely continuous with respect to the Lebesgue measure
and whose density takes values in the interval $[0,1]$, that is,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathscr{M}}_{\rm
ac}=\\{\pi\in{\mathscr{M}}:\pi(dx)=\gamma(x)\,dx\;\;\text{and}\;\;0\,\leq\,\gamma(x)\,\leq\,1\,\\}$.

For $T>0$, let the energy ${\mathcal{Q}}_{[0,T]}:D([0,T],{\mathscr{M}}_{\rm
ac})\to[0,\infty]$ be given by

$\begin{split}&{\mathcal{Q}}_{[0,T]}(u)\;:=\;\sup_{G}{\mathcal{Q}}_{[0,T]}^{G}\\\
&\quad:=\;\sup_{G}\Big{\\{}\int_{0}^{T}dt\int_{0}^{1}u(t,x)\,(\nabla
G)(t,x)\;dx\;-\;\frac{1}{2}\int_{0}^{T}dt\int_{0}^{1}G(t,x)^{2}\;dx\,\Big{\\}}\;,\end{split}$
(2.7)

where the supremum is carried over all smooth functions
$G:[0,T]\times(0,1)\to\mathbb{R}$ with compact support.

######  Remark 2.2.

In this definition and below, for a functional $\Phi\colon
D([0,T],{\mathscr{M}}_{\rm ac})\to\mathbb{R}$, we often write $\Phi(u)$
instead $\Phi(\pi)$ when $\pi(t,dx)=u(t,x)\,dx$.

Clearly, the energy ${\mathcal{Q}}_{[0,T]}$ is convex and lower
semicontinuous. Moreover, if ${\mathcal{Q}}_{[0,T]}(u)$ is finite, $u$ has a
generalized space derivative, denoted by $\nabla u$, and

${\mathcal{Q}}_{[0,T]}(u)\;=\;\frac{1}{2}\int_{0}^{T}dt\,\int_{0}^{1}(\nabla
u_{t})^{2}\;dx\;\cdot$ (2.8)

Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm
ac})$ the trajectories in $D([0,T],{\mathscr{M}}_{\rm ac})$ with finite
energy.

### The rate functional.

For $T>0$ and positive integers $m,n$, denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}C^{m,n}([0,T]\times[0,1])$
the space of functions $G\colon[0,T]\times[0,1]\to\mathbb{R}$ with $m$
derivatives in time, $n$ derivatives in space which are continuous up to the
boundary. Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}C^{m,n}_{0}([0,T]\times[0,1])$
the functions $G$ in $C^{m,n}([0,T]\times[0,1])$ such that $G(t,0)=G(t,1)=0$
for all $t\in[0,T]$, and by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}C^{m,n}_{c}([0,T]\times(0,1))$
the functions in $C^{m,n}([0,T]\times[0,1])$ with compact support in
$[0,T]\times(0,1)$.

For $0<\varrho<1$, $D>0$, $0<a<1$, $M\in\mathbb{R}$, let

${\mathfrak{b}}_{\varrho,D}(a,M)\;=\;\frac{1}{D}\,\Big{\\{}[1-a]\,\varrho\,[e^{M}-1]\;+\;a\,[1-\varrho]\,[e^{-M}-1]\,\Big{\\}}\;.$
(2.9)

Fix a trajectory $\pi(t,dx)=u(t,x)\,dx\in
D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$. Then, for almost all
$t\in[0,T]$, $\int_{0}^{1}(\nabla u_{t})^{2}\;dx$ is finite, and therefore
$u(t,\cdot)$ is Hölder-continuous. In particular, $u(t,0)$ and $u(t,1)$ are
well defined for almost all $t$.

Denote by $\langle\,\cdot\,,\,\cdot\,\rangle$ the usual scalar product in
${\mathscr{L}}^{2}([0,1])$:
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\langle
f,g\rangle=\int_{0}^{1}f(x)g(x)dx$ for $f,g\in{\mathscr{L}}^{2}([0,1])$.
Recall the convention established in Remark 2.2. For each $H$ in
$C^{1,2}([0,T]\times[0,1])$, let $J_{T,H}\colon
D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})\longrightarrow\mathbb{R}$ be
the functional given by

$\displaystyle
J_{T,H}(u)\;=\;\big{\langle}u_{T},H_{T}\big{\rangle}\;-\;\langle
u_{0},H_{0}\rangle\;-\;\int_{0}^{T}\big{\langle}u_{t},\partial_{t}H_{t}\big{\rangle}\;dt$
(2.10) $\displaystyle\quad\;-\;\int_{0}^{T}\big{\langle}u_{t},\Delta
H_{t}\big{\rangle}\;dt\;+\;\int_{0}^{T}u_{t}(1)\,\nabla
H_{t}(1)\;dt\;-\;\int_{0}^{T}u_{t}(0)\,\nabla H_{t}(0)\;dt$
$\displaystyle\quad\;-\;\int_{0}^{T}\big{\langle}\sigma(u_{t}),\big{(}\nabla
H_{t}\big{)}^{2}\big{\rangle}\;dt$
$\displaystyle\quad\;-\;\int_{0}^{T}\Big{\\{}\,{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\;+\;{\mathfrak{b}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\,\Big{\\}}\,dt\;.$

In this formula and below,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\sigma(a)=a(1-a)$
stands for the mobility of the exclusion process. Since trajectories in
$D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$ have generalized space-
derivatives, we may integrate by parts the second line and write the
functional $J_{T,H}(\,\cdot\,)$ as

$\displaystyle J_{T,H}(u)$
$\displaystyle=\;\big{\langle}u_{T},H_{T}\big{\rangle}\;-\;\langle
u_{0},H_{0}\rangle\;-\;\int_{0}^{T}\big{\langle}u_{t},\partial_{t}H_{t}\big{\rangle}\;dt$
(2.11) $\displaystyle+\;\int_{0}^{T}\big{\langle}\nabla u_{t},\nabla
H_{t}\big{\rangle}\;dt-\;\int_{0}^{T}\big{\langle}\sigma(u_{t}),\big{(}\nabla
H_{t}\big{)}^{2}\big{\rangle}\;dt$
$\displaystyle-\;\int_{0}^{T}\Big{\\{}\,{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\;+\;{\mathfrak{b}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\,\Big{\\}}\,dt\;.$

We extend the definition of $J_{T,H}(\,\cdot\,)$ to $D([0,T],{\mathscr{M}})$
by setting

$J_{T,H}(\pi)\;=\;\infty\quad\text{if}\;\;\pi\,\not\in\,D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm
ac})\;.$

######  Remark 2.3.

This definition differs from the one presented in [7, 17, 20] in the context
of exclusion processes with Dirichlet boundary conditions. There, one defines
$J_{T,H}(\,\cdot\,)$ in $D([0,T],{\mathscr{M}}_{\rm ac})$ by an equation
similar to (2.10) with $u_{t}(0)$, $u_{t}(1)$ replaced by the densities
$\alpha$, $\beta$, respectively. Here, as the boundary values appear and are
not fixed by the dynamics, in the definition of the functional $J_{T,H}$, one
is forced to restrict the definition to trajectories with finite energy.
Otherwise, the boundary values of a density profile are not defined.

Let $I_{[0,T]}(\,\cdot\,)\colon D([0,T],{\mathscr{M}}_{\rm
ac})\longrightarrow[0,+\infty]$ be the functional defined by

$I_{[0,T]}(u)\;:=\;\sup_{H\in C^{1,2}([0,T]\times[0,1])}J_{T,H}(u)\;.$ (2.12)

Fix a density profile $\gamma$ in ${\mathscr{M}}_{\rm ac}$, and let
$I_{[0,T]}(\,\cdot\,|\gamma)\colon D([0,T],{\mathscr{M}})\to{\mathbb{R}}$ be
given by

$I_{[0,T]}(u|\gamma)\;=\;\left\\{\begin{aligned}
&I_{[0,T]}(u)\quad\text{if}\;\;u(0\,,\,\cdot\,)\,=\,\gamma(\,\cdot\,)\;\;\text{a.s.}\;,\\\
&\infty\quad\text{otherwise}\;.\end{aligned}\right.$ (2.13)

######  Theorem 2.4.

Fix $T>0$ and a measurable function $\gamma:[0,1]\to[0,1]$. The function
$I_{[0,T]}(\cdot|\gamma):D([0,T],\mathcal{M})\to[0,\infty]$ is convex, lower
semicontinuous and has compact level sets.

This result is proved in Section 3, where we also show, in Lemma 3.1, that any
path $\pi$ with finite rate function, $I_{[0,T]}(\pi|\gamma)<\infty$, is
weakly continuous in time. Moreover, Proposition 3.5 states that there exists
a finite constant $C_{0}$ such that

$\int_{0}^{T}dt\int_{0}^{1}\frac{[\nabla
u]^{2}}{\sigma(u)}\,dx\;\leq\;C_{0}\,\\{\,I_{[0,T]}(u)+1\,\\}$

for all $u$ in $D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$.

In Section 4, we obtain an explicit formula for the action functional.
Proposition 4.5 states that $I_{[0,T]}(\,\cdot\,)$ can be expressed as
$I^{(1)}_{[0,T]}(\,\cdot\,)+I^{(2)}_{[0,T]}(\,\cdot\,)$. The first term
provides the contribution to the rate function due to the evolution in the
interior of the interval $[0,1]$, while the second one the contribution due to
the evolution at the boundary.

In Section 5, we show that trajectories with finite rate function can be
approximated by smooth ones. The precise statement requires some notation.

######  Definition 2.5.

Given $\gamma\in{\mathscr{M}}_{\rm ac}$, let $\Pi_{\gamma}$ be the collection
of all paths $\pi(t,dx)=u(t,x)dx$ in $D([0,T],{\mathscr{M}}_{\rm ac})$ such
that

  * (a)

There exists ${\mathfrak{t}}>0$, such that $u$ follows the hydrodynamic
equation (2.6) in the time interval $[0,{\mathfrak{t}}]$. In particular,
$u(0,\cdot)=\gamma(\cdot)$.

  * (b)

For every $0<\delta\leq T$, there exists $\varepsilon>0$ such that
$\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all $(t,x)$ in
$[\delta,T]\times[0,1]$;

  * (c)

$u$ is smooth on $(0,T]\times[0,1]$.

Theorem 5.2 states that for all $\gamma:[0,1]\to[0,1]$, the set $\Pi_{\gamma}$
is $I_{[0,T]}(\cdot|\gamma)$-dense. This means that any trajectory $\pi$ in
$D([0,T],{\mathscr{M}})$ with finite rate function can be approximated by a
sequence of trajectories $\pi^{n}\in\Pi_{\gamma}$ in such a way that
$I_{[0,T]}(\pi^{n})$ converges to $I_{[0,T]}(\pi)$. This is one of the main
technical difficulties in the proof of the lower bound.

We also provide in Section 4 an explicit formula for the rate function of
trajectories in $\Pi_{\gamma}$. For $0<\varrho<1$, $D>0$, $0<a<1$,
$M\in\mathbb{R}$, let

$\displaystyle{\mathfrak{p}}_{\varrho,D}(a,M)\;=\;\frac{1}{D}\,\Big{\\{}[1-a]\,\varrho\,e^{M}\;-\;a\,[1-\varrho]\,e^{-M}\,\Big{\\}}\;,$
(2.14)
$\displaystyle{\mathfrak{c}}_{\varrho,D}(a,M)\;=\;\frac{1}{D}\,\Big{\\{}[1-a]\,\varrho\,[1-e^{M}+Me^{M}]\;+\;a\,[1-\varrho]\,[\,1-e^{-M}-Me^{-M}]\,\Big{\\}}\;.$

######  Proposition 2.6.

Fix a density profile $\gamma:[0,1]\to[0,1]$ and a trajectory $u$ in
$\Pi_{\gamma}$. Then, for each $t>0$, the elliptic equation

$\left\\{\begin{aligned} &\partial_{t}u\;=\;\Delta
u\,-\,2\,\nabla\\{\sigma(u)\ \nabla H\\}\;,\\\ &\nabla
u_{t}(1)\,-\,2\,\sigma(u_{t}(1))\,\nabla
H_{t}(1)\,=\,{\mathfrak{p}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\;,\\\
&\nabla u_{t}(0)\,-\,2\,\sigma(u_{t}(0))\,\nabla
H_{t}(0)\,=\,-\,{\mathfrak{p}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\;,\end{aligned}\right.$
(2.15)

has a unique solution, denoted by $H_{t}$. The function $H$ belongs to
$C^{1,2}([0,T]\times[0,1])$, and the rate functional $I_{[0,T]}(u)$ takes the
form

$\displaystyle I_{[0,T]}(u)$
$\displaystyle=\;\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,(\nabla
H_{t})^{2}\,dx\;+\;\int_{0}^{T}{\mathfrak{c}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\;dt$
(2.16)
$\displaystyle+\;\int_{0}^{T}{\mathfrak{c}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\;dt\;.$

### Dynamical large deviations principle.

The main result of this article reads as follows.

######  Theorem 2.7.

Fix $T>0$, $\gamma\in{\mathscr{M}}_{\rm ac}$ and let
$\\{\eta^{N}\\}_{N\in{\mathbb{N}}}$ be a sequence of configurations. Assume
that $\delta_{\eta^{N}}$ is associated to $\gamma$ in the sense of (2.5).
Then, the sequence of probability measures
$\\{{\mathbb{Q}}_{\eta^{N}}\\}_{N\geq 1}$ satisfies a large deviation
principle with speed $N$ and good rate function $I_{T}(\cdot|\gamma)$. Namely,
for each closed set ${\mathcal{C}}\subset D([0,T],{\mathscr{M}})$ and each
open set ${\mathcal{O}}\subset D([0,T],{\mathscr{M}})$

$\displaystyle\limsup_{N\to\infty}\frac{1}{N}\log{\mathbb{P}}^{N}_{\eta^{N}}\big{[}\,\pi^{N}\in{\mathcal{C}}\,\big{]}\;\leq\;-\,\inf_{\pi\in{\mathcal{C}}}I_{T}(\pi|\gamma)$
$\displaystyle\liminf_{N\to\infty}\frac{1}{N}\log{\mathbb{P}}^{N}_{\eta^{N}}\big{[}\,\pi^{N}\in{\mathcal{O}}\,\big{]}\;\geq\;-\,\inf_{\pi\in{\mathcal{O}}}I_{T}(\pi|\gamma)\;.$

######  Remark 2.8.

In contrast to [23, 7], the large deviations principle is formulated for the
empirical measure and not the empirical density. We follow [17] to show that
the rate function can be set as $+\infty$ for trajectories that do not belong
to $D([0,T],{\mathscr{M}}_{\rm ac})$.

##  3\. The rate functional $I_{[0,T]}(\,\cdot\,)$

In this section, we present some properties of the rate function
$I_{[0,T]}(\,\cdot\,)$ and prove Theorem 2.4. Fix, once for all, a measurable
density profile $\gamma:[0,1]\to[0,1]$.

Note: Throughout this article, given a function
$u:[0,T]\times[0,1]\to\mathbb{R}$, we represent by $u_{t}$ and $u(t)$ the
function defined on $[0,1]$ and such that $u_{t}(x)=u(t,x)$.

We start with two elementary bounds. The first estimate asserts that the cost
of a trajectory in a interval $[0,T]$ is bounded by the sum of its cost in the
intervals $[0,S]$ and $[S,T]$. Let
$\tau_{r}u:\mathbb{R}_{+}\times[0,1]\to\mathbb{R}$, $r>0$, be the function
defined by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\tau_{r}u(t,x)=u(t+r,x)$.
For all $\pi(t,dx)=u(t,x)\,dx$ in $D([0,T],{\mathscr{M}}_{\rm ac})$ and
$0<S<T$,

$I_{[0,T]}(u)\;\leq\;I_{[0,S]}(u)\;+\;I_{[0,T-S]}(\tau_{S}u)\;.$ (3.1)

The proof of this claim is elementary and left to the reader. It relies on the
fact that $\sup_{n}\\{a_{n}+b_{n}\\}\leq\sup_{n}a_{n}+\sup_{n}b_{n}$.

The second assertion states that the cost of a trajectory on a subinterval of
$[0,T]$ is bounded by its total cost. For all $\pi(t,dx)=u(t,x)\,dx$ in
$D([0,T],{\mathscr{M}}_{\rm ac})$ and $0<S<T$,

$I_{[0,S]}(u)\;\leq\;I_{[0,T]}(u)\;.$ (3.2)

To prove this claim, assume that $I_{[0,S]}(u)<\infty$, and fix
$\varepsilon>0$. The same argument applies to the case $I_{[0,S]}(u)=\infty$.
By definition of the rate function, there exists
$H:[0,S]\times[0,1]\to\mathbb{R}$ smooth such that

$I_{[0,S]}(u)\;\leq\;J_{S,H}(u)\;+\;\varepsilon\;.$

Let $\sigma_{n}:[0,T]\to[0,1]$, $n\geq 1$, be a sequence of smooth, monotone
functions such that $\sigma_{n}(t)=1$ for $0\leq t\leq S$ and
$\sigma_{n}(t)=0$ for $S+(1/n)\leq t\leq T$. Define the function
$H_{n}:[0,T]\times[0,1]\to\mathbb{R}$ as $H_{n}(t,x)=H(t,x)$, $0\leq t\leq S$
and $H_{n}(t,x)=H(S,x)\,\sigma_{n}(t)$, $S\leq t\leq T$. Then,

$J_{S,H}(u)\;=\;\lim_{n\to\infty}J_{T,H_{n}}(u)\;\leq\;I_{[0,T]}(u)\;,$

as claimed.

A similar argument yields that the cost of a trajectory $u$ in a time-interval
$[R,R+S]$ is bounded by the total cost. More precisely,

$I_{[0,S]}(\tau_{R}u)\;\leq\;I_{[0,T]}(u)\;.$ (3.3)

for all $S>0$, $R>0$ such that $R+S\leq T$.

The proof of the next result is similar to the ones of [3, Lemma 3.5], [17,
Lemma 4.1]. We present it here in sake of completeness.

######  Lemma 3.1.

Fix $T>0$ and $\gamma\in{\mathscr{M}}_{\rm ac}$. Let $u$ be a path in
$D([0,T],{\mathscr{M}}_{\rm ac})$ such that $I_{[0,T]}(u|\gamma)<\infty$. Then
$u(0,x)=\gamma(x)$. Moreover, for each $M>0$, $g$ in $C^{2}([0,1])$ and
$\varepsilon>0$, there exists $\delta>0$ such that

$\sup_{u:I_{T}(u|\gamma)\leq M}\,\sup_{|t-s|\leq\delta}\big{|}\,\langle
u_{t},g\rangle-\langle u_{s},g\rangle\,\big{|}\;\leq\;\varepsilon\;.$

In particular, $u$ belongs to $C([0,T],{\mathscr{M}}_{\rm ac})$.

###### Proof.

Fix $T>0$, $\gamma\in{\mathscr{M}}_{\rm ac}$ and $u$ in
$D([0,T],{\mathscr{M}}_{\rm ac})$ such that $I_{[0,T]}(u|\gamma)<\infty$. We
first show that $u(0,\cdot)=\gamma(\cdot)$.

As $I_{[0,T]}(u|\gamma)<\infty$, $u$ has finite energy. For $\delta>0$,
consider the function $H_{\delta}(t,x)=h_{\delta}(t)g(x)$, where
$h_{\delta}(t)=(1-\delta^{-1}t)^{+}$ and $g$ is a $C^{2}([0,1])$ function
which vanishes at the boundary of the interval $[0,1]$. Here $a^{+}$ stands
for the positive part of $a$. Of course, $H_{\delta}$ can be approximated by
smooth functions. Since $u$ is bounded and since $t\to u(t,\cdot)$ is right
continuous for the weak topology,

$\lim_{\delta\downarrow 0}J_{T,H_{\delta}}(u)\;=\;\langle
u(0),g\rangle-\langle\gamma,g\rangle\;.$

This proves that $u(0)=\gamma$ a.s. because $I_{[0,T]}(u|\gamma)<\infty$.

We turn to the second assertion of the lemma. Fix $g$ in $C^{2}([0,1])$ and
$0\leq s<t\leq T$ such that $t-s<1$. A convenient test function, depending
only on time and similar to the one proposed after equation (4.3) in [17],
yields that

$\begin{split}&\langle u(t)\,,\,g\rangle\,-\,\langle
u(s)\,,\,g\rangle\;\leq\;\frac{1}{a}\,I_{[0,T]}(u|\gamma)\\\
&\quad\;+\;C_{1}(\|\Delta g\|_{\infty},\|\nabla
g\|_{\infty})\,a\,(t-s)\;+\;C_{2}(A,B,\|g\|_{\infty})\,a\,(t-s)\,e^{a\|g\|_{\infty}}\end{split}$

for all $a>0$. The exponential term comes from the
${\mathfrak{b}}_{\varrho,D}$ contribution to $J_{T,H}$ in the definition
(2.10). Choose $a=-\,(1/2)\,(1+\|g\|_{\infty})\,\log(t-s)$ to get that there
exists a finite positive constant $C_{0}$, depending only on $A$, $B$, $g$,
such that

$\langle u(t)\,,\,g\rangle\,-\,\langle
u(s)\,,\,g\rangle\;\leq\;\frac{C_{0}}{\log(t-s)^{-1}}\,\big{\\{}\,I_{[0,T]}(u|\gamma)\,+\,1\,\big{\\}}\;.$

This completes the proof of the lemma. ∎

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{1}$
be the Sobolev space of measurable functions $G:[0,1]\to\mathbb{R}$ with
generalized derivatives $\nabla G$ in ${\mathscr{L}}^{2}([0,1])$.
${\mathcal{H}}^{1}$ endowed with the scalar product
$\langle\cdot,\cdot\rangle_{1}$, defined by

$\langle G\,,\,H\rangle_{1}\;=\;\langle G\,,\,H\rangle\;+\;\langle\nabla
G\,,\,\nabla H\rangle\;,$ (3.4)

is a Hilbert space. The corresponding norm is denoted by
$\|\cdot\|_{{\mathcal{H}}^{1}}$:

$\|G\|_{{\mathcal{H}}^{1}}^{2}\;:=\;\int_{0}^{1}|G(x)|^{2}\;dx\;+\;\int_{0}^{1}|\nabla
G(x)|^{2}\;dx\;.$

Recall from (A.12) that any function $\gamma$ in ${\mathcal{H}}^{1}$ has a
continuous version. Hereafter, we always replace $\gamma$ by its continuous
version $w$.

Consider the function $\phi:\mathbb{R}\to[0,\infty)$ defined by

$\begin{split}\phi(r)\;:=\;\begin{cases}\dfrac{1}{Z}\exp{\\{-\dfrac{1}{(1-r^{2})}\\}}\
&\text{ if }|r|<1\;,\\\ \ 0\ &\text{otherwise}\;,\end{cases}\end{split}$

where the constant $Z$ is chosen so that $\int_{\mathbb{R}}\phi(r)dr=1$. For
each $\delta>0$, let

$\phi^{\delta}(r)\;:=\;\dfrac{1}{\delta}\,\phi\Big{(}\dfrac{r}{\delta}\Big{)}\;,$
(3.5)

whose support is contained in $[-\delta,\delta]$.

Denote by $f*g$ the space or time convolution of two functions $f$, $g$:

$(f*g)(a)\;=\;\int f(a-b)\,g(b)\,db\;,$

where the integral runs over $\mathbb{R}$.

Throughout this section, we adopt the following notation. Recall from Appendix
A that we denote by $(P^{(R)}_{t}:t\geq 0)$ the semigroup associated to the
Robin Laplacian. For a bounded measurable function
$u:[0,T]\times[0,1]\to\mathbb{R}$, define the smooth approximation in space,
time and space-time by

$\displaystyle
u^{\varepsilon}(t,x)\;:=\;[\,P^{(R)}_{\varepsilon}u_{t}\,](x)\;,\quad
u^{\delta}(t,x)\;:=\;[u(\cdot,x)*\phi^{\delta}](t)\;=\;\int_{-\delta}^{\delta}u(t+r,x)\,\phi^{\delta}(r)\;dr\;,$
$\displaystyle
u^{\varepsilon,\delta}(t,x)\;:=\;[\,P^{(R)}_{\varepsilon}u^{\delta}_{t}\,](x)\;:=\;[\,P^{(R)}_{\varepsilon}u_{t}\,]^{\delta}(x)\;.$

In the above formulas, we extend the definition of $u$ to
$[-1,T+1]\times[0,1]$ by setting $u_{t}=u_{0}$ for $-1\leq t\leq 0$,
$u_{t}=u_{T}$ for $T\leq t\leq T+1$,

Note that we use the same notation, $u^{\varepsilon}$ and $u^{\delta}$, for
different objects. However, $u^{\varepsilon}$ and $u^{\delta}$ always
represent a smooth approximation of $u$ in space and time, respectively.
Moreover, the time-convolution commutes with the operator which explains the
identity in the last displayed equation.

We summarize some properties of $u^{\varepsilon}$ in the next result.

######  Lemma 3.2.

Let $u:[0,T]\times[0,1]\to\mathbb{R}$ be a function in
${\mathscr{L}}^{2}(0,T;{\mathcal{H}}^{1})$. Then, $u^{\varepsilon}$ and
$\nabla u^{\varepsilon}$ converge to $u$ and $\nabla u$ in
${\mathscr{L}}^{2}([0,T]\times[0,1])$, respectively. Moreover, if $u$ is
bounded in $[0,T]\times[0,1]$ and the application $t\mapsto\langle
u_{t},g\rangle$ is continuous in the time interval $[0,T]$ for any function
$g$ in $C^{\infty}([0,1])$, then, for each $\varepsilon>0$, $n\geq 1$,
$u^{\varepsilon}$ and $\nabla^{n}u^{\varepsilon}$ are uniformly continuous in
$[0,T]\times[0,1]$.

###### Proof.

Recall the notation introduced in Appendix A. As $u$ belongs to
${\mathscr{L}}^{2}(0,T;{\mathcal{H}}^{1})$ and the norms ${\mathcal{H}}^{1}$,
${\mathcal{H}}_{R}$ are equivalent,

$\int_{0}^{T}\|\,u_{t}\,\|^{2}_{{\mathcal{H}}_{R}}\,dt\;<\;\infty\;.$

This relation can be rewritten in terms of the eigenfunctions $(f_{k}:k\geq
1)$ of the Robin Laplacian as

$\int_{0}^{T}\sum_{k\geq 1}\lambda_{k}\;\langle
u_{t}\,,\,f_{k}\rangle^{2}\,dt\;<\;\infty\;.$ (3.6)

Since

$u_{t}\;=\;\sum_{k\geq 1}\langle u_{t}\,,\,f_{k}\rangle\,f_{k}\;,\qquad
u^{\varepsilon}_{t}\;=\;\sum_{k\geq 1}e^{-\lambda_{k}\varepsilon}\,\langle
u_{t}\,,\,f_{k}\rangle\,f_{k}\;,$

we have that

$\int_{0}^{T}\|\,u^{\varepsilon}_{t}-u_{t}\,\|^{2}_{2}\;dt\;=\;\int_{0}^{T}\sum_{k\geq
1}\big{[}\,e^{-\lambda_{k}\varepsilon}\,-\,1\,\big{]}^{2}\,\langle
u_{t}\,,\,f_{k}\rangle^{2}\;dt$

and, by (A.9),

$\displaystyle\int_{0}^{T}\|\,\nabla u^{\varepsilon}_{t}-\nabla
u_{t}\,\|^{2}_{2}\,dt$
$\displaystyle\leq\;C_{0}\,\int_{0}^{T}\|u^{\varepsilon}_{t}-u_{t}\|^{2}_{{\mathcal{H}}_{R}}\,dt$
$\displaystyle=\;C_{0}\,\int_{0}^{T}\sum_{k\geq
1}\lambda_{k}\,\big{[}\,e^{-\lambda_{k}\varepsilon}\,-\,1\,\big{]}^{2}\,\langle
u_{t}\,,\,f_{k}\rangle^{2}\,dt\;.$

By (3.6), the left-hand side of the previous two displayed equations vanish as
$\varepsilon\to 0$, which proves the first assertion of the lemma.

We turn to the second assertion. We may represent $u^{\varepsilon}$,
$\nabla^{n}u^{\varepsilon}$ as

$u^{\varepsilon}_{t}(x)\;=\;\sum_{k\geq 1}e^{-\lambda_{k}\varepsilon}\,\langle
u_{t}\,,\,f_{k}\rangle\,f_{k}(x)\;,\quad(\nabla^{n}u_{t}^{\varepsilon})(x)\;=\;\sum_{k\geq
1}e^{-\lambda_{k}\varepsilon}\,\langle
u_{t}\,,\,f_{k}\rangle\,(\nabla^{n}f_{k})(x)\;,$

The second assertion follows from these identities and from the two hypotheses
of the lemma. Indeed, the bound (A.5) on the eigenfunctions $f_{k}$ permits to
restrict the sum to a finite number of terms. ∎

For each $a>0$, define the functions $h_{a}$ and $\sigma_{a}$ on $[0,1]$ by

$\displaystyle
h_{a}(x)\;:=\;\dfrac{1}{2(1+2a)}\,\Big{\\{}(x+a)\log{(x+a)}+(1-x+a)\log{(1-x+a)}\Big{\\}}\;,$
$\displaystyle\sigma_{a}(x)\;:=\;(x+a)(1-x+a)\;.$

Note that $h_{a}^{\prime\prime}=(2\,\sigma_{a})^{-1}$.

Until the end of this section, $0<C_{0}<\infty$ represents a constant
independent of $\varepsilon$, $\delta$ and $a$ and that may change from line
to line.

Fix $T>0$ and a path $u$ in $D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$.
For a smooth function $G:[0,T]\times[0,1]\to\mathbb{R}$ and a bounded function
$H$ in ${\mathscr{L}}^{2}(0,T;{\mathcal{H}}^{1})$, define the functionals

$\begin{split}&L_{G}(u)\;=\;\langle u_{T},G_{T}\rangle\,-\,\langle
u_{0},G_{0}\rangle\,-\,\int_{0}^{T}\langle
u_{t},\partial_{t}G_{t}\rangle\;dt\;,\\\ &\quad
B^{1}_{H}(u)\;=\;\int_{0}^{T}\langle\nabla u_{t},\nabla
H_{t}\rangle\;dt\;-\;\int_{0}^{T}\langle\sigma(u_{t}),(\nabla
H_{t})^{2}\rangle\;dt\;,\\\ &\qquad
B^{2}_{H}(u)\;=\;\int_{0}^{T}\Big{\\{}\,{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\;+\;{\mathfrak{b}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\,\Big{\\}}\,dt\;.\end{split}$

By (2.10), for paths $u$ such that $u(0)=\gamma$,

$\sup_{H\in
C^{1,2}([0,T]\times[0,1])}\Big{\\{}L_{H}(u)+B_{H}^{1}(u)-B_{H}^{2}(u)\Big{\\}}\;=\;I_{[0,T]}(u|\gamma)\;.$

######  Lemma 3.3.

For $a>0$, $\varepsilon>0$, $\delta>0$, let
$H_{\varepsilon,\delta}=h_{a}^{\prime}(u^{\varepsilon,\delta})$,

$R^{\varepsilon,\delta}\;=\;L_{H_{\varepsilon,\delta}}(u^{\varepsilon,\delta})\;-\;L_{(H_{\varepsilon,\delta})^{\varepsilon,\delta}}(u)\;.$

Then, for any fixed $a>0$, $\varepsilon>0$, $R^{\varepsilon,\delta}$ converges
to $0$ as $\delta\downarrow 0$.

Warning: Until the end of Proposition 3.5 proof’s, we drop the dependence of
$H=H_{\varepsilon,\delta}=h_{a}^{\prime}(u^{\varepsilon,\delta})$ on
$\varepsilon$, $\delta$. Hence, $H$ always stands for
$H_{\varepsilon,\delta}$.

###### Proof of Lemma 3.3.

Recall that $C_{0}$ represents a constant independent of $\varepsilon$,
$\delta$ and $a$, that may change from line to line. As
$P^{(R)}_{\varepsilon}$ is a self-adjoint operator in
${\mathscr{L}}^{2}([0,1])$ and commutes with the time-derivative,

$\begin{split}L_{H}(u^{\varepsilon,\delta})&\;=\;\langle
u^{\delta}_{T},H_{T}^{\varepsilon}\rangle-\langle
u_{0}^{\delta},H_{0}^{\varepsilon}\rangle-\int_{0}^{T}\langle
u^{\delta}_{t},\partial_{t}H_{t}^{\varepsilon}\rangle\;dt\\\ &\;=\;\langle
u_{T},H_{T}^{\varepsilon,\delta}\rangle-\langle
u_{0},H_{0}^{\varepsilon,\delta}\rangle-\int_{0}^{T}\langle
u^{\delta}_{t},\partial_{t}H_{t}^{\varepsilon}\rangle\;dt\;+\;R_{1}^{\varepsilon,\delta}\;,\end{split}$

where

$R_{1}^{\varepsilon,\delta}:=R^{\varepsilon,\delta,T}-R^{\varepsilon,\delta,0}\quad\text{and}\quad
R^{\varepsilon,\delta,t}:=\langle
u_{t}^{\delta}-u_{t},H_{t}^{\varepsilon}\rangle+\langle
u_{t},H_{t}^{\varepsilon}-H^{\varepsilon,\delta}_{t}\rangle\;$

for $0\leq t\leq T$.

A simple computation yields that

$\int_{0}^{T}\langle
u_{t}^{\delta},\partial_{t}H_{t}^{\varepsilon}\rangle\;dt\;=\;\int_{0}^{T}\langle
u_{t},\partial_{t}H_{t}^{\varepsilon,\delta}\rangle\;dt\;+\;R_{2}^{\varepsilon,\delta}\;,$

where $|R_{2}^{\varepsilon,\delta}|\leq
C_{0}\delta\|\partial_{t}H^{\varepsilon}\|_{\infty}$. To conclude the proof,
it is enough to show that, for each fixed $a>0$, $\varepsilon>0$,
$R_{1}^{\varepsilon,\delta}$ and
$\delta\|\partial_{t}H^{\varepsilon}\|_{\infty}$ converge to zero as
$\delta\downarrow 0$.

We first prove that

$\lim_{\delta\downarrow 0}R^{\varepsilon,\delta,t}\;=\;0\quad\text{for}\quad
t=0\;\text{ and }\;t=T\;.$ (3.7)

We consider the case $t=T$, the argument being similar for $t=0$. As
$P^{(R)}_{t}$ is symmetric,

$R^{\varepsilon,\delta,T}\;=\;\langle
u_{T}^{\varepsilon,\delta}-u_{T}^{\varepsilon},H_{T}\rangle+\langle
u^{\varepsilon}_{T},H_{T}-H^{\delta}_{T}\rangle\;.$

By Lemma 3.2, for each $x\in[0,1]$, $u^{\varepsilon}(\cdot,x)$ is continuous.
Therefore, by definition of $H$, for any $(t,x)\in[0,T]\times[0,1]$,

$\displaystyle\lim_{\delta\downarrow
0}u^{\varepsilon,\delta}(t,x)\;=\;u^{\varepsilon}(t,x)\;,$
$\displaystyle\lim_{\delta\downarrow
0}H^{\delta}(T,x)\;=\;\lim_{\delta\downarrow
0}h_{a}^{\prime}(u^{\varepsilon,\delta})^{\delta}(T,x)\;=\;h_{a}^{\prime}(u^{\varepsilon})(T,x)\;=\;\lim_{\delta\downarrow
0}h_{a}^{\prime}(u^{\varepsilon,\delta})\;=\;\lim_{\delta\downarrow 0}H(T,x)$

because $h^{\prime}_{a}$ is bounded and continuous on $[0,1]$. Note that the
dependence on $\delta$ of the last term on the right-hand side is hidden, as
$H$ is actually $h_{a}^{\prime}(u^{\varepsilon,\delta})$. Claim (3.7) follows
from these results, from the boundedness of $u$ and $h^{\prime}_{a}$, and the
bounded convergence theorem.

It remains to show that $\delta\|\partial_{t}H^{\varepsilon}\|_{\infty}$
converges to $0$ as $\delta\downarrow 0$. An elementary computation gives
that, for any $t\in[0,T]$,

$\partial_{t}H^{\varepsilon}(t)\;=\;P^{(R)}_{\varepsilon}\Big{[}\,h^{\prime\prime}_{a}(u^{\varepsilon,\delta}(t))\,\int_{-\delta}^{\delta}u^{\varepsilon}(t-r)\,(\phi^{\delta})^{\prime}(r)\;dr\,\Big{]}\;.$

Since $\phi^{\delta}$ is a symmetric function, a change of variables shows
that

$\int_{-\delta}^{\delta}u^{\varepsilon}(t-r)\,(\phi^{\delta})^{\prime}(r)\;dr\;=\;\int_{0}^{\delta}\\{\,u^{\varepsilon}(t-r)\,-\,u^{\varepsilon}(t+r)\,\\}\,(\phi^{\delta})^{\prime}(r)\;dr\;.$

By Lemma 3.2, $u^{\varepsilon}$ is uniformly continuous on
$[-1,T+1]\times[0,1]$. On the other hand,
$\delta\int_{0}^{\delta}(\phi^{\delta})^{\prime}(r)\,dr=-\,\phi(0)$.
Therefore, the last expression multiplied by $\delta$ converges to $0$ as
$\delta\downarrow 0$ uniformly in $[0,T]\times[0,1]$. Since
$h^{\prime\prime}_{a}$ is uniformly bounded, by the bounded convergence
theorem, $\delta\|\partial_{t}H_{\varepsilon}\|_{\infty}$ converges to $0$ as
$\delta\downarrow 0$. ∎

######  Lemma 3.4.

There exists a positive constant $C_{0}<\infty$ such that

$\int_{0}^{T}dt\ \int_{0}^{1}\frac{(\nabla
u(t,x))^{2}}{\sigma_{a}(u(t,x))}\;dx\;\leq\;C_{0}\,B^{1}_{h_{a}^{\prime}(u)}(u)\;,\quad|B^{2}_{h_{a}^{\prime}(u)}(u)|\;\leq\;C_{0}$
(3.8)

for all $u\in D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$ and $0<a<1$.
Moreover, for each $u\in D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$ and
$i=1,2$,

$\lim_{\varepsilon\downarrow 0}\lim_{\delta\downarrow
0}B^{i}_{H^{\varepsilon,\delta}}(u)\;=\;B^{i}_{h_{a}^{\prime}(u)}(u)\;.$

###### Proof.

Let $u$ be a path in $D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$. We
first show that

$\lim_{\varepsilon\downarrow 0}\lim_{\delta\downarrow
0}B^{1}_{H^{\varepsilon,\delta}}(u)\;=\;B^{1}_{h_{a}^{\prime}(u)}(u)\;.$ (3.9)

By Lemma 3.2, $\nabla u^{\varepsilon}$ is uniformly continuous in
$[0,T]\times[0,1]$. Therefore, for any $(t,x)\in[0,T]\times[0,1]$,

$\displaystyle\lim_{\delta\downarrow 0}\nabla
u^{\varepsilon,\delta}(t,x)\;=\;\nabla u^{\varepsilon}(t,x)\;.$

Recall from the end of the Appendix B the definition of the semigroup
$P^{(M)}_{t}$. By (B.11) $\nabla
P^{(R)}_{\varepsilon}=P^{(M)}_{\varepsilon}\nabla$. Hence,

$\displaystyle\lim_{\delta\downarrow 0}\nabla
H^{\varepsilon,\delta}(t,x)\;=\;\lim_{\delta\downarrow
0}P^{(M)}_{\varepsilon}\Big{[}\,h_{a}^{\prime\prime}(u^{\varepsilon,\delta})\,\nabla
u^{\varepsilon,\delta}\,\Big{]}^{\delta}(t,x)\;=\;P^{(M)}_{\varepsilon}\big{[}\,h_{a}^{\prime\prime}(u^{\varepsilon}_{t})\,\nabla
u^{\varepsilon}_{t}\,\big{]}(x)\;.$

Hence, as $(\nabla u)(t,x)\,dx\,dt$ is a finite measure on $[0,T]\times[0,1]$,
by the bounded convergence theorem,

$\lim_{\delta\downarrow
0}B^{1}_{H^{\varepsilon,\delta}}(u)\;=\;\int_{0}^{T}\Big{\\{}\,\big{\langle}\,\nabla
u_{t}\,,\,G^{\varepsilon}_{t}\,\big{\rangle}\,-\,\big{\langle}\,\sigma(u_{t})\,,\,[\,G^{\varepsilon}_{t}\,]^{2}\big{\rangle}\,\Big{\\}}\;dt\;,$
(3.10)

where
$G^{\varepsilon}(t,x)=P^{(M)}_{\varepsilon}[\,h_{a}^{\prime\prime}(u^{\varepsilon}_{t})\,\nabla
u^{\varepsilon}_{t}\,](x)$.

On the one hand, since $P^{(M)}_{\varepsilon}$ is a contraction in
${\mathscr{L}}^{2}([0,1])$, $h_{a}^{\prime\prime}$ is bounded, and since, by
Lemma 3.2, $\nabla u^{\varepsilon}$ converges to $\nabla u$ in
${\mathscr{L}}^{2}([0,T]\times[0,1])$,

$\lim_{\varepsilon\downarrow 0}\int_{0}^{T}dt\
\int_{0}^{1}\big{\\{}\,P^{(M)}_{\varepsilon}\big{[}\,h_{a}^{\prime\prime}(u^{\varepsilon}_{t})\,\big{(}\nabla
u^{\varepsilon}_{t}-\nabla u_{t}\,\big{)}\,\big{]}\big{\\}}^{2}\;dx\;=\;0\;.$

Therefore, on the right-hand side of (3.10), in the formula for
$G^{\varepsilon}$ we may replace $\nabla u^{\varepsilon}_{t}$ by $\nabla
u_{t}$ at a cost that vanishes as $\varepsilon\to 0$.

Since $h_{a}^{\prime\prime}$ is Lipschitz continuous, by Lemma 3.2, as
$\varepsilon\downarrow 0$, $h_{a}^{\prime\prime}(u^{\varepsilon})$ converges
in measure to $h_{a}^{\prime\prime}(u)$. In other words, for any $b>0$, the
Lebesgue measure of the set
$\\{(t,x)\in[0,T]\times[0,1];|h_{a}^{\prime\prime}(u^{\varepsilon}(t,x))-h_{a}^{\prime\prime}(u(t,x))|\geq
b\\}$ converges to $0$ as $\varepsilon\downarrow 0$. Therefore, as $\nabla
u_{t}$ belongs to ${\mathscr{L}}^{2}([0,T]\times[0,1])$,

$\lim_{\varepsilon\downarrow
0}\int_{0}^{T}\big{\langle}h_{a}^{\prime\prime}(u^{\varepsilon}_{t})\,\big{[}\nabla
u_{t}\big{]}^{2}\big{\rangle}\;dt\;=\;\int_{0}^{T}\big{\langle}h_{a}^{\prime\prime}(u_{t})\,\big{[}\nabla
u_{t}\big{]}^{2}\big{\rangle}\;dt\;.$

In consequence, on the right-hand side of (3.10), in the formula for
$G^{\varepsilon}$ we may further replace
$h_{a}^{\prime\prime}(u^{\varepsilon})$ by to $h_{a}^{\prime\prime}(u)$.

To complete the proof of (3.9), it remains to recall that for any $f$ in
${\mathscr{L}}^{2}([0,1])$, $P^{(M)}_{\varepsilon}f$ converges in
${\mathscr{L}}^{2}([0,1])$ to $f$ as $\varepsilon\to 0$.

We turn to the proof that

$\lim_{\varepsilon\downarrow 0}\lim_{\delta\downarrow
0}\,B^{2}_{H^{\varepsilon,\delta}}(u)\;=\;B^{2}_{h_{a}^{\prime}(u)}(u)\;.$

We examine the boundary condition at $x=0$, the other one being similar.

By Lemma 3.2, $u^{\varepsilon}$ is uniformly continuous. Hence, as
$h_{a}^{\prime}$ is continuous in the interval $[0,1]$, as $\delta\to 0$,
$H^{\varepsilon,\delta}(t,0)$ converges to
$P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)$.
Therefore,

$\lim_{\delta\downarrow
0}\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{\varepsilon,\delta}(t,0)\,\big{)}\,dt\;=\;\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)\,\big{)}\,dt\;.$
(3.11)

To conclude the proof, we first replace on the right-hand side
$P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)$ by
$h_{a}^{\prime}(u^{\varepsilon}_{t}(0))$. Since $h_{a}^{\prime}$ is bounded,
there exists a finite constant $C_{1}=C_{1}(a,A,\alpha)$ such that

$\displaystyle\Big{|}\,\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)\,\big{)}\,dt\;-\;\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,h_{a}^{\prime}(u^{\varepsilon}_{t}(0))\,\big{)}\,dt\,\Big{|}$
$\displaystyle\quad\leq\;C_{1}\int_{0}^{T}\big{|}\,P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)\,-\,h_{a}^{\prime}(u^{\varepsilon}_{t}(0))\,\big{|}\,dt\;.$

By (A.7), Lemma A.3 and (A.9),

$\big{|}\,P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)\;-\;h_{a}^{\prime}(u^{\varepsilon}_{t}(0)\,)\,\big{|}\;\leq\;C_{0}\,\sqrt{A}\,\varepsilon^{1/5}\big{\|}\,h_{a}^{\prime}(u^{\varepsilon}_{t}\,)\,\big{\|}_{{\mathcal{H}}^{1}}$

for some finite constant $C_{0}$. Hence, the term on the right-hand side in
the penultimate displayed equation is bounded by

$C_{1}\,\varepsilon^{1/5}\,\int_{0}^{T}\big{\|}\,h_{a}^{\prime}(u^{\varepsilon}_{t}\,)\,\big{\|}_{{\mathcal{H}}^{1}}\,dt\;.$

By Lemma 3.2, $u^{\varepsilon}$ converges to $u$ in
${\mathscr{L}}^{2}(0,T,{\mathcal{H}}^{1})$. Since $h_{a}^{\prime}$ and
$h_{a}^{\prime\prime}$ are bounded, the previous integral is bounded uniformly
in $\varepsilon$. In particular, the previous expression vanishes as
$\varepsilon\to 0$.

It remains to estimate the right-hand side of (3.11) with
$P^{(R)}_{\varepsilon}[\,h_{a}^{\prime}(u^{\varepsilon}_{t})\,](0)$ replaced
by $h_{a}^{\prime}(u^{\varepsilon}_{t}(0))$. By (A.7) and since, by Lemma 3.2,
$u^{\varepsilon}$ converges to $u$ in
${\mathscr{L}}^{2}(0,T,{\mathcal{H}}^{1})$, $\lim_{\varepsilon\to
0}u^{\varepsilon}_{t}(0)\,=\,u_{t}(0)$. Hence, as $h_{a}^{\prime}$ is
continuous, and since, by (A.16), $u^{\varepsilon}$ is uniformly bounded, by
the bounded convergence theorem,

$\lim_{\varepsilon\to
0}\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,h_{a}^{\prime}(u^{\varepsilon}_{t}(0))\,\big{)}\,dt\;=\;\int_{0}^{T}{\mathfrak{b}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,h_{a}^{\prime}(u_{t}(0))\,\big{)}\,dt\;,$

which completes the proof of first assertion of the lemma.

We turn to the bounds (3.8). As $\sigma(x)\leq\sigma_{a}(x)$, for each
$\varepsilon>0$,

$\int_{0}^{T}\langle\nabla u^{\varepsilon}_{t}\,,\,\nabla
h_{a}^{\prime}(u^{\varepsilon}_{t})\rangle\;dt\;-\;\int_{0}^{T}\langle\sigma_{a}(u^{\varepsilon}_{t})\,,\,(\nabla
h_{a}^{\prime}(u^{\varepsilon}_{t}))^{2}\rangle\;dt\;\leq\;B^{1}_{h_{a}^{\prime}(u^{\varepsilon})}(u^{\varepsilon})\;.$

Compute the left-hand side to get that

$\frac{1}{4}\,\int_{0}^{T}dt\ \int_{0}^{1}\frac{(\nabla
u^{\varepsilon})^{2}}{\sigma_{a}(u^{\varepsilon})}\;dx\;\leq\;B^{1}_{h_{a}^{\prime}(u^{\varepsilon})}(u^{\varepsilon})\;.$

The arguments presented in the first part of the proof permit to let
$\varepsilon\to 0$ on both sides of this inequality and yield the first
estimate in (3.8).

To estimate $B^{2}_{h_{a}^{\prime}(u)}(u)$, note that

$\displaystyle{\mathfrak{b}}_{\varrho,D}\big{(}\,v\,,\,h_{a}^{\prime}(v)\,\big{)}\;=\;$
$\displaystyle\frac{1}{D}\,\Big{\\{}\,\varrho\,[1-v]\,\Big{[}\,\Big{(}\frac{v+a}{1+a-v}\Big{)}^{1/2+4a}\,-\,1\,\Big{]}\,+\,[1-\varrho]\,v\,\Big{[}\,\Big{(}\frac{1+a-v}{v+a}\Big{)}^{1/2+4a}\,-\,1\,\Big{]}\,\Big{\\}}\;.$

In particular, ${\mathfrak{b}}_{\varrho,D}$, as a function of $v$ and $a$ is
bounded: for all $0<\varrho<1$, $D>0$, there exists a finite constant
$C_{0}=C_{0}(\varrho,D)$ such that

$\sup_{0\leq
a<1}\sup_{v\in[0,1]}\big{|}\,{\mathfrak{b}}_{\varrho,D}\big{(}\,v\,,\,h_{a}^{\prime}(v)\,\big{)}\,\big{|}\;\leq\;C_{0}\;.$

The second inequality in (3.8) follows from this estimate and the definition
of $B^{2}_{h_{a}^{\prime}(u)}(u)$. ∎

######  Proposition 3.5.

There exists a constant $C_{0}>0$ such that

$\int_{0}^{T}dt\int_{0}^{1}\frac{|\nabla
u(t,x)|^{2}}{\sigma(u(t,x))}\;dx\;\leq\;C_{0}\,\\{\,I_{[0,T]}(u)\,+\,1\,\\}$

for any path $u$ in $D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$.

###### Proof.

We may assume, without loss of generality, that $I_{[0,T]}(u)$ is finite. By
the variational formula (2.12) and with the notation of Lemma 3.3,

$\displaystyle
L_{H}(u^{\varepsilon,\delta})+B^{1}_{H^{\varepsilon,\delta}}(u)-B^{2}_{H^{\varepsilon,\delta}}(u)-R^{\varepsilon,\delta}\;\leq\;I_{[0,T]}(u)\;,$
(3.12)

where, recall, $H$ stands for the function
$h_{a}^{\prime}(u^{\varepsilon,\delta})$.

Since $u^{\varepsilon,\delta}$ is smooth, an integration by parts yields that

$L_{H}(u^{\varepsilon,\delta})\;=\;\int_{0}^{1}h_{a}(u^{\varepsilon,\delta}_{T})\;dx\;-\;\int_{0}^{1}h_{a}(u^{\varepsilon,\delta}_{0})\;dx\;.$

There exists, therefore, a constant $C_{0}$, independent of $\varepsilon$,
$\delta$ and $a$, such that

$|L_{H}(u^{\varepsilon,\delta})|\;\leq\;C_{0}\;.$

In (3.12), let $\delta\downarrow 0$ and then $\varepsilon\downarrow 0$. It
follows from the previous bound, and from Lemmata 3.3 and 3.4 that

$B^{1}_{h^{\prime}_{a}(u)}(u)\;-\;B^{2}_{h^{\prime}_{a}(u)}(u)\;\leq\;I_{T}(u)\;+\;C_{0}\;.$

Thus, by (3.8),

$\int_{0}^{T}dt\ \int_{0}^{1}\frac{|\nabla
u(t,x)|^{2}}{\sigma_{a}(u(t,x))}\;dx\;\leq\;C_{0}\,\\{I_{T}(u)+1\\}\;.$

It remains to let $a\downarrow 0$ and to apply Fatou’s lemma. ∎

Note: Since the rate function is declared to be infinite on trajectories with
infinite energy, this result is not meant to show that a trajectory has finite
energy. Its interest lies on the fact that it provides a uniform bound of a
strong version of the energy for trajectories with rate function bounded by a
constant.

######  Corollary 3.6.

The density $u$ of a path $\pi(t,dx)=u(t,x)\,dx$ in
$D([0,T],{\mathscr{M}}_{\rm ac})$ is the weak solution of the initial-boundary
value problem (2.6) if, and only if $I_{T}(u|\gamma)=0$.

###### Proof.

Suppose that the density $u$ of a path $\pi(t,dx)=u(t,x)\,dx$ in
$D([0,T],{\mathscr{M}}_{\rm ac})$ is the weak solution of the initial-boundary
value problem (2.6). Then, by Lemma B.5, $u$ has finite energy. On the other
hand, by Definition B.3 and the equation following it, $u(0)=\gamma$ a.s. and
for any $G$ in $C^{1,2}([0,T]\times[0,1])$,

$\begin{split}J_{T,G}(u)\;=\;&-\,\int_{0}^{T}\langle\sigma(u_{t}),(\nabla
G_{t})^{2}\rangle\;dt\\\
&-\int_{0}^{T}\big{\\{}\,{\mathfrak{q}}_{\beta,B}(u_{t}(1),G_{t}(1))\,+\,{\mathfrak{q}}_{\alpha,A}(u_{t}(0),G_{t}(0))\,\big{\\}}\;dt\;,\end{split}$

where

${\mathfrak{q}}_{\varrho,D}(a,M)\;=\;\frac{1}{D}\,\Big{\\{}[1-a]\,\varrho\,\big{[}\,e^{M}\,-\,M\,-\,1\,\big{]}\;+\;a\,[1-\varrho]\,\big{[}\,e^{-M}\,+\,M\,-\,1\,\big{]}\,\Big{\\}}\;.$
(3.13)

Here we used the fact that $u-a$ can be written as $u(1-a)-(1-u)a$. As
${\mathfrak{q}}_{\varrho,D}(a,M)\geq 0$, $J_{T,G}(u)\leq 0$. Hence, the
supremum in the variational problem (2.12) is attained at $H=0$ and
$I_{[0,T]}(u)=0$. Since $u(0)=\gamma$, $I_{[0,T]}(u|\gamma)=0$.

On the other hand, if $I_{[0,T]}(u|\gamma)=0$, then, for any $G$ in
$C^{1,2}([0,T]\times[0,1])$ and $\varepsilon$ in $\mathbb{R}$,
$J_{T,\varepsilon G}(u)\leq 0$. Since $J_{T,0}(u)=0$, the derivative in
$\varepsilon$ of $J_{T,\varepsilon G}(u)$ at $\varepsilon=0$ is equal to $0$.
Therefore, by Definition B.3, the density $u$ is a weak solution of the
initial-boundary value problem (2.6). ∎

Let $E_{q}$, $q\geq 0$, be the level set of the rate function
$I_{[0,T]}(\cdot|\gamma)$:

$E_{q}\;:=\;\big{\\{}\,\pi\in
D([0,T],{\mathscr{M}})\,|\,I_{[0,T]}(\pi|\gamma)\,\leq\,q\,\\}\;.$

###### Proof of Theorem 2.4.

The rate function $I_{[0,T]}(\,\cdot\,|\,\gamma)$ is convex because the energy
${\mathcal{Q}}_{[0,T]}(\,\cdot\,)$ and the functionals $J_{T,H}(\,\cdot\,)$
are convex.

Let $\\{\pi^{n}:n\geq 1\\}$ be a sequence in $D([0,T],{\mathscr{M}})$ such
that $\pi^{n}$ converges to some element $\pi$ in $D([0,T],{\mathscr{M}})$. We
show that
$I_{[0,T]}(\pi|\gamma)\leq\liminf_{n\to\infty}I_{[0,T]}(\pi^{n}|\gamma)$. If
$\liminf I_{[0,T]}(\pi^{n}|\gamma)$ is equal to $\infty$, the conclusion is
clear. Therefore, we may assume that the set $\\{\pi^{n}:n\geq 1\\}$ is
contained in $E_{q}$ for some $q>0$. In particular, by definition of
$I_{[0,T]}(\,\cdot\,|\gamma)$ and by Lemma 3.1, $\pi^{n}(t,dx)=u^{n}(t,x)\,dx$
for some $u^{n}\in C([0,T],{\mathscr{M}}_{\rm ac})$ with finite energy.

Since $u^{n}$ belongs to $C([0,T],{\mathscr{M}}_{\rm ac})$ and
$\pi^{n}(t,dx)=u^{n}(t,x)\,dx$ converges to $\pi(t,dx)$ in
$D([0,T],{\mathscr{M}})$, $\pi(t,dx)=u(t,x)\,dx$ for some $u\in
C([0,T],{\mathscr{M}}_{\rm ac})$. Moreover, by the lower semicontinuity of the
energy $\mathcal{Q}_{[0,T]}$ and by Proposition 3.5,

$\mathcal{Q}_{[0,T]}(u)\;\leq\;\varliminf_{n\to\infty}\mathcal{Q}_{[0,T]}(u^{n})\;\leq\;C_{0}(q+1)\;<\;\infty$

for some finite constant $C_{0}$.

Claim 1: The sequence $\\{u^{n}:n\geq 1\\}$ converges to $u$ in
${\mathscr{L}}^{2}([0,T]\times[0,1])$.
Indeed, by the triangle inequality,

$\begin{split}&\frac{1}{3}\,\int_{0}^{T}\ \|u_{t}-u^{n}_{t}\|^{2}_{2}\ dt\\\
&\quad\;\leq\;\int_{0}^{T}\ \|u_{t}-u^{\varepsilon}_{t}\|^{2}_{2}\
dt\;+\;\int_{0}^{T}\ \|u_{t}^{\varepsilon}-u^{n,\varepsilon}_{t}\|^{2}_{2}\
dt\;+\;\int_{0}^{T}\ \|u_{t}^{n,\varepsilon}-u^{n}_{t}\|^{2}_{2}\
dt\;,\end{split}$

where $u_{t}^{\varepsilon}=P^{(R)}_{\varepsilon}u_{t}$,
$u_{t}^{n,\varepsilon}=P^{(R)}_{\varepsilon}u_{t}^{n}$. By Lemma A.2 and
(A.9), and since $\|u_{t}\|_{\infty}\leq 1$, the first and the last terms are
bounded by

$C_{0}\,\varepsilon^{2/3}\,\int_{0}^{T}\\{\,\|u_{t}\|^{2}_{{\mathcal{H}}^{1}}\,+\,\|u^{n}_{t}\|^{2}_{{\mathcal{H}}^{1}}\,\\}\,dt\;\leq\;C_{0}\,\varepsilon^{2/3}\,\\{\,q+T+1\,\\}\;.$

On the other hand,

$\int_{0}^{T}\
\|u_{t}^{\varepsilon}-u^{n,\varepsilon}_{t}\|^{2}_{2}\;dt\;\leq\;\int_{0}^{T}\sum_{k\geq
1}e^{-2\lambda_{k}\varepsilon}\,\langle
u^{n}_{t}-u_{t}\,,\,f_{k}\rangle^{2}\;dt\;.$

As $\pi^{n}$ converges to $\pi$ in $D([0,T],{\mathscr{M}})$, for all $g\in
C([0,1])$, $\langle u^{n}_{t}-u_{t}\,,\,g\rangle\to 0$ for almost all
$t\in[0,T]$. In particular, for every $\varepsilon>0$, the right-hand side of
the previous displayed equation vanishes as $n\to\infty$, which proves Claim
1.

Claim 2: We have that

$\lim_{n\to\infty}\int_{0}^{T}\big{\\{}\,|\,u_{t}(0)-u^{n}_{t}(0)\,|^{2}\,+\,|\,u_{t}(1)-u^{n}_{t}(1)\,|^{2}\,\big{\\}}\
dt\;=\;0\;.$ (3.14)

We consider the boundary $x=0$, the argument for $x=1$ being identical. The
proof is similar to the one of Claim 1 and relies on Lemma A.3 instead of
Lemma A.2. By the triangle inequality, the previous integral, for $x=0$ only
and divided by $3$, is bounded by

$\int_{0}^{T}|u_{t}(0)-u^{\varepsilon}_{t}(0)|^{2}\
dt\;+\;\int_{0}^{T}|u^{\varepsilon}_{t}(0)-u^{n,\varepsilon}_{t}(0)|^{2}\
dt\;+\;\int_{0}^{T}|u^{n,\varepsilon}_{t}(0)-u^{n}_{t}(0)|^{2}\ dt\;.$

As $u_{t}$, $u^{n}_{t}$ are continuous for almost all $t$ [because they have
finite energy], we may repeat the argument of Claim 1, using Lemma A.3 instead
of Lemma A.2, to show that the first and third integrals in the previous
equation are bounded by $C_{0}\,\varepsilon^{2/5}\,\\{\,q+T+1\,\\}$.

By (A.13), (A.5) and Schwarz inequality,

$\displaystyle|u^{\varepsilon}_{t}(0)-u^{n,\varepsilon}_{t}(0)|^{2}$
$\displaystyle\leq\;\sum_{k\geq 1}e^{-\lambda_{k}\varepsilon}\,\langle
u^{n}_{t}-u_{t}\,,\,f_{k}\rangle^{2}\sum_{k\geq 1}e^{-\lambda_{k}\varepsilon}$
$\displaystyle=\;C_{0}(\varepsilon)\,\sum_{k\geq
1}e^{-\lambda_{k}\varepsilon}\,\langle
u^{n}_{t}-u_{t}\,,\,f_{k}\rangle^{2}\;.$

At this point, we may repeat the arguments presented in Claim 1 to complete
the proof of Claim 2.

By Claims 1, 2 and (2.11), for any function $G$ in
$C^{1,2}([0,T]\times[0,1])$,

$\lim_{n\to\infty}J_{G}(\pi^{n})\;=\;J_{G}(\pi)\;.$ (3.15)

Therefore,
$I_{[0,T]}(\pi|\gamma)\leq\liminf_{n\to\infty}I_{[0,T]}(\pi^{n}|\gamma)$,
proving that $I_{[0,T]}(\,\cdot\,|\gamma)$ is lower semicontinuous.

The same argument shows that $E_{q}$ is closed in $D([0,T],{\mathscr{M}})$. By
Lemma 3.7 below, $E_{q}$ is relatively compact in $D([0,T],{\mathscr{M}})$.
Thus, $E_{q}$ is compact in $D([0,T],{\mathscr{M}})$, as claimed. ∎

The proof of the next result is similar to the one contained in the proof of
Theorem 4.2 in [7].

######  Lemma 3.7.

For each $q>0$, the set $E_{q}$ is relatively compact in
$D([0,T],{\mathscr{M}})$.

###### Proof.

Fix $q>0$ and let $\pi^{n}$ be a sequence in $E_{q}$. By Lemma 3.1,
$\pi^{n}(t,dx)=u^{n}(t,x)\,dx$ for some $u^{n}\in C([0,T],{\mathscr{M}}_{\rm
ac})$. Since $0\leq u^{n}(t,x)\leq 1$, there exists a subsequence, still
denoted by $(u^{n}:n\geq 1)$, which converges weakly in
${\mathscr{L}}^{2}([0,T]\times[0,1])$ to some trajectory $u$. by the lower
semicontinuity of ${\mathcal{Q}}_{[0,T]}$, ${\mathcal{Q}}_{[0,T]}(u)<\infty$.

The proofs of Claims 1 and 2 in Theorem 2.4 yield that $u^{n}$ converges
strongly to $u$ in ${\mathscr{L}}^{2}([0,T]\times[0,1])$ and that (3.14)
holds. Therefore, by (3.15) and the fact that $\pi^{n}$ belongs to $E_{q}$,
$I_{[0,T]}(\pi|\gamma)\leq\liminf_{n\to\infty}I_{[0,T]}(\pi^{n}|\gamma)\leq
q$. By Lemma 3.1, $u^{n}$, $u$ are uniformly weakly continuous in time. In
particular, strong convergence in ${\mathscr{L}}^{2}([0,T]\times[0,1])$
implies convergence in $C([0,T],{\mathscr{M}}_{\rm ac})$. ∎

##  4\. Deconstructing the rate functional

The main result of this section, stated in Proposition 4.5 below, shows that
the rate function $I_{[0,T]}(\,\cdot\,)$ can be decomposed as the sum of two
rate functions. The first one measures the cost of the trajectory due to its
evolution in the bulk, while the second one measures the costs due to the
boundary evolution. This decomposition of the rate function is the main tool
in the proof that any trajectory $u$ with finite rate function can be
approximated by a sequence of regular trajectories $(u^{n}:n\geq 1)$ in such a
way that $I_{[0,T]}(u^{n}\,|\gamma)\to I_{[0,T]}(u\,|\gamma)$, the content of
the next section.

### Weighted Sobolev spaces

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Omega_{T}$
be the cylinder $[0,T]\times[0,1]$. Fix a non-negative weight
$\kappa:\Omega_{T}\to\mathbb{R}_{+}$, and denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathscr{L}}^{2}(\kappa)$
the Hilbert space induced by the smooth functions in $C^{\infty}(\Omega_{T})$
endowed with the scalar product defined by

$\langle\\!\langle
G,H\rangle\\!\rangle_{\kappa}\;=\;\int_{0}^{T}dt\int_{0}^{1}\kappa_{t}\,\,G_{t}\,H_{t}\;dx\;.$

Above and hereafter, induced means that we first declare two functions $F$,
$G$ in $C^{\infty}(\Omega_{T})$ to be equivalent if $\langle\\!\langle
F-G,F-G\rangle\\!\rangle_{\kappa}=0$ and then we complete the quotient space
with respect to the scalar product.

Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}C^{\infty}_{K}(\Omega_{T})$
the space of smooth functions $H:\Omega_{T}\to\mathbb{R}$ with support
contained in $(0,T)\times(0,1)$. Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{1}(\kappa)$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{1}_{0}(\kappa)$
be the Hilbert spaces induced by the sets $C^{\infty}(\Omega_{T})$,
$C^{\infty}_{K}(\Omega_{T})$ endowed with the scalar products,
$\langle\\!\langle G,H\rangle\\!\rangle_{1,2,\kappa}$, $\langle\\!\langle
G,H\rangle\\!\rangle_{1,\kappa}$, respectively defined by

$\begin{gathered}\langle\\!\langle
G,H\rangle\\!\rangle_{1,2,\kappa}\;=\;\langle\\!\langle
G,H\rangle\\!\rangle_{\kappa}\;+\;\langle\\!\langle\nabla G,\nabla
H\rangle\\!\rangle_{\kappa}\;,\\\ \langle\\!\langle
G,H\rangle\\!\rangle_{1,\kappa}\;=\;\langle\\!\langle\nabla G,\nabla
H\rangle\\!\rangle_{\kappa}\;.\end{gathered}$

The Poincaré’s inequality yields that the norms induced by the scalar products
$\langle\\!\langle G,H\rangle\\!\rangle_{1,2,\kappa}$, $\langle\\!\langle
G,H\rangle\\!\rangle_{1,\kappa}$ are equivalent in
${\mathcal{H}}^{1}_{0}(\kappa)$.

Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\|\cdot\|_{\kappa}$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\|\cdot\|_{1,\kappa}$
the norm associated to the scalar product
$\langle\\!\langle\cdot,\cdot\rangle\\!\rangle_{\kappa}$,
$\langle\\!\langle\cdot,\cdot\rangle\\!\rangle_{1,\kappa}$, respectively. Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{-1}(\kappa)$
be the dual of ${\mathcal{H}}^{1}_{0}(\kappa)$; it is a Hilbert space equipped
with the norm $\|\cdot\|_{-1,\kappa}$ defined by

$\|L\|^{2}_{-1,\kappa}\;=\;\sup_{G\in
C_{K}^{\infty}(\Omega_{T})}\big{\\{}\,2\,L(G)\;-\;\|G\|^{2}_{1,\kappa}\,\big{\\}}\;.$
(4.1)

By Riesz’ representation theorem, an element $L$ of
${\mathcal{H}}^{-1}(\kappa)$ can be written as $L(H)=$$\langle\\!\langle\nabla
G\,,\,\nabla H\rangle\\!\rangle_{\kappa}$ for some $G$ in
${\mathcal{H}}^{1}_{0}(\kappa)$.

When $\kappa\equiv 1$, we represent ${\mathscr{L}}^{2}(\kappa)$,
${\mathcal{H}}^{1}(\kappa)$, ${\mathcal{H}}^{1}_{0}(\kappa)$,
${\mathcal{H}}^{-1}(\kappa)$ as
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathscr{L}}^{2}(\Omega_{T})$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{1}(\Omega_{T})$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{1}_{0}(\Omega_{T})$
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathcal{H}}^{-1}(\Omega_{T})$,
respectively. Next result is [7, Lemma 4.8]. It states that
${\mathcal{H}}^{-1}(\kappa)$ is formally the space $\\{\nabla
P:P\in{\mathscr{L}}^{2}(\kappa^{-1})\\}$. For an integrable function
$H:[0,1]\to\mathbb{R}$, let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\langle
H\rangle=\int_{0}^{1}H(x)\;dx$.

######  Lemma 4.1.

A linear functional $L:{\mathcal{H}}^{1}_{0}(\kappa)\to\mathbb{R}$ belongs to
${\mathcal{H}}^{-1}(\kappa)$ if, and only if, there exists $P$ in
${\mathscr{L}}^{2}(\kappa^{-1})$ such that
$L(H)=\int_{0}^{T}dt\int_{0}^{1}P_{t}\,\nabla H_{t}dx$ for every $H$ in
$C^{\infty}_{K}(\Omega_{T})$. In this case,

$\|L\|^{2}_{-1,\kappa}\;=\;\int_{0}^{T}\,\big{\\{}\,\langle
P_{t},P_{t}\rangle_{\kappa(t)^{-1}}\;-\;c_{t}\,\big{\\}}\;dt\;,$

where $c_{t}=\\{\,\langle P_{t}/\kappa_{t}\rangle^{2}\,/\,\langle
1/\kappa_{t}\rangle\,\\}\,{\mathbf{1}}\\{\langle
1/\kappa_{t}\rangle<\infty\\}$.

### Representation theorems

Until the end of this section,  $\pi(t,dx)=u(t,x)\,dx$ is a path in
$D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$. We assume that $u$ is
continuous on $\Omega_{T}$ and smooth in time, there exists $\varepsilon>0$
such that $\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all
$(t,x)\in\Omega_{T}$, and $I_{[0,T]}(u)<\infty$. These conditions are
fulfilled in sets of the form $[\delta,T]\times[0,1]$, $\delta>0$, by paths in
$\Pi_{3}$, a class of trajectories to be introduced in Section 5. As $u$ is
bounded away from $0$ and $1$, the spaces ${\mathscr{L}}^{2}(\sigma(u))$ and
${\mathscr{L}}^{2}(\Omega_{T})$ coincide, as well as, the other Hilbert spaces
introduced in the previous subsection with $\kappa=\sigma(u)$.

Denote by ${\mathfrak{W}}\colon C^{0,1}(\Omega_{T})\to\mathbb{R}$ the
functional given by

${\mathfrak{W}}(H)\;=\;\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,|\nabla
H_{t}|^{2}\,dx\;+\;\int_{0}^{T}\Psi(t,H_{t}(0),H_{t}(1))\;dt\;,$

where

$\Psi(t,M,N)\;=\;{\mathfrak{b}}_{\alpha,A}(u_{t}(0),M)\;+\;{\mathfrak{b}}_{\beta,B}(u_{t}(1),N)\;,$

and ${\mathfrak{b}}_{\varrho,D}(a,M)$ has been introduced in (2.9). For each
$0\leq t\leq T$, $(M,N)\mapsto\Psi(t,M,N)$ is a smooth, convex function which
takes negative values.

Fix a linear functional $L:C^{0,1}(\Omega_{T})\to\mathbb{R}$. Denote by
$L_{0}$ its restriction to $C^{0,1}_{0}(\Omega_{T})$:

$L_{0}(H)\;=\;L(H)\;,\quad H\,\in\,C^{0,1}_{0}(\Omega_{T})\;,$ (4.2)

where

$C^{0,1}_{0}(\Omega_{T})\;:=\;\big{\\{}\,H\in
C^{0,1}(\Omega_{T}):H(t,0)=H(t,1)=0\,,\,0\leq t\leq T\,\big{\\}}\;.$

Let $\Xi:\Omega_{T}\to\mathbb{R}$ the function given by

$\Xi(t,x)\;=\;\frac{1}{\int_{0}^{1}1/\sigma(u(t,y))\;dy}\,\int_{0}^{x}\frac{1}{\sigma(u(t,y))}\;dy\;.$
(4.3)

Note that $\Xi$ belongs to $C^{\infty,1}(\Omega_{T})$, and that $\Xi(t,0)=0$,
$\Xi(t,1)=1$ for all $0\leq t\leq T$. Let $\ell^{(0)}$, $\ell^{(1)}\colon
C([0,T])\to\mathbb{R}$ be the linear functionals given by

$\ell^{(0)}(h)\;=\;L\big{(}\,h(t)\,[1-\Xi(t,x)]\,\big{)}\;,\quad\ell^{(1)}(h)\;=\;L\big{(}\,h(t)\,\Xi(t,x)\,\big{)}\;.$
(4.4)

Note that the right-hand sides of the previous identities are well defined
because $\Xi$ belongs to $C^{0,1}(\Omega_{T})$.

Note: The definition of $\ell^{0}$, $\ell^{1}$ explains why we defined $L$ in
$C^{0,1}(\Omega_{T})$ and not in $C^{\infty,\infty}(\Omega_{T})$. For
$L\big{(}\,h(t)\,[1-\Xi(t,x)]\,\big{)}$ to make sense, we need the map
$(t,x)\mapsto h(t)\,[1-\Xi(t,x)]$ to belong to the domain of definition of
$L$.

Decompose a function $H\colon\Omega_{T}\to{\mathbb{R}}$ as
$H=H^{(0)}+H^{(1)}$, where

$H^{(1)}(t,x)\;=\;H(t,0)\;+\;[\,H(t,1)-H(t,0)\,]\;\Xi(t,x)\;.$ (4.5)

Note that $H^{(0)}(t,0)=H^{(0)}(t,1)=0$ for all $0\leq t\leq T$. In
particular, $H^{(0)}$ belongs to $C^{0,1}_{0}(\Omega_{T})$ so that
$L_{0}(H^{(0)})$ is well defined and $L_{0}(H^{(0)})=L(H^{(0)})$.

By linearity and the previous paragraph, $L(H)=L_{0}(H^{(0)})+L(H^{(1)})$. By
definition of $H^{(1)}$, $\ell^{0}$, $\ell^{1}$,
$L(H^{(1)})=L(\,H(t,0)\,[\,1-\Xi\,]\,)\,+\,L(\,H(t,1)\,\Xi\,)\;=\;\ell^{0}(H(\cdot,0))\,+\,\ell^{1}(H(\cdot,1))$,
Hence, for all $H$ in $C^{0,1}(\Omega_{T})$,

$L(H)\;=\;L_{0}(H^{(0)})\;+\;\ell^{0}(H(\cdot,0))\;+\,\ell^{1}(H(\cdot,1))\;.$

######  Lemma 4.2.

Let $L:C^{0,1}(\Omega_{T})\to\mathbb{R}$ be a linear functional. Then,

$\sup_{H\in
C^{0,1}(\Omega_{T})}\big{\\{}L(H)\,-\,{\mathfrak{W}}(H)\,\big{\\}}\;=\;S_{1}\;+\;S_{2}\;,$
(4.6)

where

$S_{1}\;=\;\sup_{G\in
C^{0,1}_{0}(\Omega_{T})}\big{\\{}\,L_{0}(G)\;-\;\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,|\nabla
G_{t}|^{2}\,dx\,\big{\\}}\;,$ (4.7)

and

$S_{2}\;=\;\sup_{h,g\in
C([0,T])}\big{\\{}\,\ell(g,h)\;-\;\int_{0}^{T}\zeta_{t}\,[\,h(t)-g(t)\,]^{2}\;dt\,-\,\int_{0}^{T}\Psi(t,g_{t},h_{t})\;dt\,\big{\\}}\;.$

In this formula,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\zeta_{t}=1/\langle
1/\sigma(u_{t})\rangle$ and
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\ell(g,h)=\ell^{(0)}(g)\,+\,\ell^{(1)}(h)$.

The first variational problem concerns the interior of $\Omega_{T}$, while the
second one the boundary of the cylinder $\Omega_{T}$.

###### Proof of Lemma 4.2..

Fix a linear functional $L:C^{0,1}(\Omega_{T})\to\mathbb{R}$. Write
$H=H^{(0)}+H^{(1)}$, as in (4.5). Since $H^{(0)}$ belongs to
$C^{0,1}_{0}(\Omega_{T})$, $L_{0}(H^{(0)})$ is well defined and
$L_{0}(H^{(0)})=L(H^{(0)})$.

By linearity, $L(H)=L_{0}(H^{(0)})+L(H^{(1)})$. On the other hand, an
elementary computation yields that $\nabla H^{(0)}$ and $\nabla H^{(1)}$ are
orthogonal in ${\mathscr{L}}^{2}(\sigma(u))$:

$\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,\nabla H^{(0)}_{t}\,\nabla
H^{(1)}_{t}\;dx\;=\;0\;.$

Therefore, the supremum appearing in (4.6) can be written as

$\displaystyle\sup_{H\in
C^{0,1}(\Omega_{T})}\Big{\\{}\,L_{0}(H^{(0)})\;-\;\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,|\nabla
H^{(0)}_{t}|^{2}\,dx$
$\displaystyle\quad\,+\;L(H^{(1)})\;-\;\int_{0}^{T}\zeta_{t}\,[\,H(t,1)-H(t,0)\,]^{2}\;dt\,-\,\int_{0}^{T}\Psi(t,H_{t}(0),H_{t}(1))\;dt\,\Big{\\}}\;.$

The first line depends only on $H^{(0)}$, while the second one only on
$H_{t}(0)$, $H_{t}(1)$. We may, therefore, split the supremum in two pieces.
Recall the definition of the functionals $\ell$ to rewrite the previous
supremum as

$\displaystyle\sup_{G\in
C^{0,1}_{0}(\Omega_{T})}\big{\\{}\,L_{0}(G)\;-\;\int_{0}^{T}dt\int_{0}^{1}\sigma(u_{t})\,|\nabla
G_{t}|^{2}\,dx\,\big{\\}}$ $\displaystyle+\;\sup_{h,g\in
C([0,T])}\big{\\{}\,\ell(g,h)\;-\;\int_{0}^{T}\zeta_{t}\,[\,h(t)-g(t)\,]^{2}\;dt\,-\,\int_{0}^{T}\Psi(t,g_{t},h_{t})\;dt\,\big{\\}}\;,$

as claimed. ∎

We apply Lemma 4.2 to the linear functionals appearing in the definition of
the rate functional $I_{[0,T]}(\,\cdot\,)$. Denote $L^{(\partial_{t})}$,
$L^{(\nabla)}:C^{0,1}(\Omega_{T})\to\mathbb{R}$ the linear functionals given
by

$L^{(\partial_{t})}(G)\;=\;\int_{0}^{T}\langle\,\partial_{t}u_{t},G_{t}\,\rangle\;dt\;,\quad
L^{(\nabla)}(H)\;=\;\int_{0}^{T}\langle\,\nabla u_{t},\nabla
H_{t}\,\rangle\;dt\;,$ (4.8)

and let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}{\mathfrak{L}}=L^{(\partial_{t})}+L^{(\nabla)}$.
Denote by ${\mathfrak{L}}_{0}$, ${\mathfrak{l}}^{0}$, ${\mathfrak{l}}^{1}$ the
linear functionals associated to ${\mathfrak{L}}$ by (4.2), (4.4), so that

$\begin{gathered}{\mathfrak{L}}_{0}(G)\;=\;\int_{0}^{T}\langle\,\partial_{t}u_{t},G_{t}\,\rangle\;dt\;+\;\int_{0}^{T}\langle\,\nabla
u_{t},\nabla G_{t}\,\rangle\;dt\;,\\\
{\mathfrak{l}}^{0}(g)\;=\;\int_{0}^{T}a(t)\,g(t)\;dt\;,\quad{\mathfrak{l}}^{1}(g)\;=\;\int_{0}^{T}b(t)\,\,g(t)\;dt\;,\end{gathered}$

where

$a(t)\;=\;\langle\,\partial_{t}u_{t},[1-\Xi_{t}]\,\rangle\;-\;\langle\,\nabla
u_{t},\nabla\Xi_{t}\,\rangle\;,\;\;b(t)\;=\;\langle\,\partial_{t}u_{t}\,,\,\Xi_{t}\,\rangle\;+\;\langle\,\nabla
u_{t},\nabla\Xi_{t}\,\rangle\;.$ (4.9)

With this notation,

${\mathfrak{L}}(H)\;=\;{\mathfrak{L}}_{0}(H^{(0)})\;+\;{\mathfrak{l}}^{0}(H(\cdot,0))\;+\;{\mathfrak{l}}^{1}(H(\cdot,1))\;.$
(4.10)

Denote by $\Upsilon_{t}\colon\mathbb{R}^{2}\to\mathbb{R}$, $0\leq t\leq T$,
the strictly convex map defined by

$\Upsilon_{t}(x,y)\;=\;\zeta_{t}\,[\,x-y\,]^{2}\,+\,{\mathfrak{b}}_{\alpha,A}(u_{t}(0),x)\,+\,{\mathfrak{b}}_{\beta,B}(u_{t}(1),y)\;,$

and let $\Phi_{t}:\mathbb{R}^{2}\to\mathbb{R}$, $t\geq 0$ be its Legendre
transform:

$\Phi_{t}(a,b)\;=\;\sup_{x,y\in\mathbb{R}}\big{\\{}\,a\,x\,+\,b\,y\;-\;\Upsilon_{t}(x,y)\,\big{\\}}\;.$
(4.11)

######  Lemma 4.3.

Under the hypotheses stated at the beginning of this subsection,

$I_{[0,T]}(u)\;=\;I^{(1)}_{[0,T]}(u)\;+\;I^{(2)}_{[0,T]}(u)\;,$

where

$I^{(1)}_{[0,T]}(u)\;=\;\frac{1}{4}\,\|\,{\mathfrak{L}}_{0}\,\|^{2}_{-1,\sigma(u)}\;,\quad
I^{(2)}_{[0,T]}(u)\;=\;\int_{0}^{T}\Phi_{t}(a_{t},b_{t})\;dt\;.$

###### Proof.

By definition of the rate functional $I_{[0,T]}$, given in (2.12),

$I_{[0,T]}(u)\;=\;\sup_{H\in
C^{0,1}(\Omega_{T})}\big{\\{}{\mathfrak{L}}(H)\,-\,{\mathfrak{W}}(H)\,\big{\\}}\;.$

Hence, by Lemma 4.2, (4.1) and the definition of ${\mathfrak{l}}^{0}$,
${\mathfrak{l}}^{1}$, given above (4.9),

$I_{[0,T]}(u)\;=\;I^{(1)}_{[0,T]}(u)\;+\;I^{(2)}_{[0,T]}(u)\;,$

where

$\begin{gathered}I^{(1)}_{[0,T]}(u)\;=\;\frac{1}{4}\,\|\,{\mathfrak{L}}_{0}\,\|^{2}_{-1,\sigma(u)}\;,\\\
I^{(2)}_{[0,T]}(u)\;=\;\sup_{h,g\in
C([0,T])}\big{\\{}\,{\mathfrak{l}}(g,h)\;-\;\int_{0}^{T}\Upsilon_{t}(g_{t},h_{t})\;dt\,\big{\\}}\end{gathered}$
(4.12)

and ${\mathfrak{l}}(g,h)={\mathfrak{l}}^{0}(g)+{\mathfrak{l}}^{1}(h)$. The
second term can be written as

$\displaystyle\sup_{h,g\in
C([0,T])}\int_{0}^{T}\big{\\{}\,a(t)\,g(t)\,+\,b(t)\,h(t)\;-\;\Upsilon_{t}(g_{t},h_{t})\,\big{\\}}\;dt\,$
$\displaystyle\quad=\;\int_{0}^{T}\sup_{x,y\in\mathbb{R}}\big{\\{}\,a(t)\,x\,+\,b(t)\,y\;-\;\Upsilon_{t}(x,y)\,\big{\\}}\;dt\;=\;\int_{0}^{T}\Phi_{t}(a_{t},b_{t})\;dt\;.$

This completes the proof of the lemma. ∎

The function $\Phi_{t}$ is convex and continuous. Moreover, $\Phi_{t}(a,b)\geq
0$ [take $x=y=0$ in the supremum] and
$\Phi_{t}(a,b)\leq\Phi^{0}_{t}(a)+\Phi^{1}_{t}(b)$, where $\Phi^{0}_{t}$,
$\Phi^{1}_{t}$ are the Legendre transform of
${\mathfrak{b}}_{\alpha,A}(u_{t}(0),\cdot)$,
${\mathfrak{b}}_{\beta,B}(u_{t}(1),\,\cdot\,)$, respectively:

$0\;\leq\;\Phi_{t}(a,b)\;\leq\;\Phi^{0}_{u_{t}(0)}(a)\;+\;\Phi^{1}_{u_{t}(1)}(b)\;,$

where

$\Phi^{0}_{u}(a)\;=\;a\,\ln\Big{\\{}\frac{\sqrt{a^{2}+4\,{\mathfrak{f}}_{0,u}\,{\mathfrak{g}}_{0,u}}\,+\,a}{2\,{\mathfrak{f}}_{0,u}}\,\Big{\\}}\,-\,\sqrt{a^{2}+4\,{\mathfrak{f}}_{0,u}\,{\mathfrak{g}}_{0,u}}\,+\,{\mathfrak{f}}_{0,u}\,+\,{\mathfrak{g}}_{0,u}\;,$

${\mathfrak{f}}_{0,u}=(1/A)\,[1-u]\,\alpha$,
${\mathfrak{g}}_{0,u}=(1/A)\,u\,[1-\alpha]$. The formula for $\Phi^{1}_{u}$ is
similar. One just needs to replace $A$, $\alpha$ by $B$, $\beta$,
respectively. In particular,

$0\;\leq\;\Phi_{t}(a,b)\;\leq\;C_{0}\,\\{1\,+\,|a|\,\ln^{+}|a|\,+\,|b|\,\ln^{+}|b|\,\\}\;,$
(4.13)

where $\ln^{+}x=0$ for $0<x\leq 1$ and $\ln^{+}x=\ln x$ for $x\geq 1$.

Note: It might be disconcerting that $\Phi_{t}(0,0)$ is not equal to $0$. This
is a consequence of the fact that ${\mathfrak{b}}_{\beta,B}(a,\cdot)$ takes
negative values. To remedy, one can add and subtract a linear term to
${\mathfrak{b}}_{\beta,B}(a,\cdot)$, transforming
${\mathfrak{b}}_{\beta,B}(a,\cdot)$ into ${\mathfrak{q}}_{\beta,B}(a,\cdot)$,
given by (3.13). In constrast with ${\mathfrak{b}}_{\beta,B}(a,\cdot)$,
${\mathfrak{q}}_{\beta,B}(a,\cdot)$ is nonnegative and attains its minimum at
$0$.

After these modifications, $\Phi_{t}$ becomes

$\Phi_{t}(a,b)\;=\;\widehat{\Phi}_{t}\Big{(}\,a\,+\,\frac{1}{A}\,[\alpha-
u_{t}(0)]\,,\,b\,+\,\frac{1}{B}\,[\beta-u_{t}(1)]\,\Big{)}\;,$

where

$\widehat{\Phi}_{t}(a,b)\;=\;\sup_{x,y\in\mathbb{R}}\Big{\\{}\,a\,x\,+\,b\,y\;-\;\zeta_{t}\,[\,x-y\,]^{2}\,-\,{\mathfrak{q}}_{\alpha,A}(u_{t}(0),x)\,-\,{\mathfrak{q}}_{\beta,B}(u_{t}(1),y)\,\Big{\\}}\;,$

and $\widehat{\Phi}_{t}(a,b)\geq\widehat{\Phi}_{t}(0,0)=0$.

Both functions $\Phi_{t}$ and $\widehat{\Phi}_{t}$ are convex and continuous.
As $\Phi_{t}$, $\widehat{\Phi}_{t}$ depend on the trajectory $u$, whenever we
wish to stress this dependence, we represent $\Phi_{t}(a,b)$,
$\widehat{\Phi}_{t}(a,b)$, by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Phi^{(u)}_{t}(a,b)$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\widehat{\Phi}^{(u)}_{t}(a,b)$,
respectively.

Lemma 4.3 decomposes the rate function as the sum of two independent
functionals. The first piece can still be simplified. This is the content of
the next result. Under the hypotheses of this subsection,
$\|\,L^{(\nabla)}_{0}\,\|^{2}_{-1,\sigma(u)}<\infty$. Since
$\int_{0}^{T}\Phi_{t}(a_{t},b_{t})\;dt$ is finite as well, it follows from the
previous lemma that

$I_{[0,T]}(u)\;<\;\infty\;\;\text{if, and only
if,}\;\;\|\,L^{(\partial_{t})}_{0}\,\|^{2}_{-1,\sigma(u)}\;<\;\infty\;.$
(4.14)

Suppose that $L^{(\partial_{t})}_{0}$ belongs to
${\mathcal{H}}^{-1}(\sigma(u))$. By Lemma 4.1, there exists $P$ in
${\mathscr{L}}^{2}(\sigma(u)^{-1})$ such that

$L^{(\partial_{t})}_{0}(H)\;=\;\int_{0}^{T}\langle\,P_{t}\,,\,\nabla
H_{t}\,\rangle\;dt$

for all $H$ in $C^{\infty}_{K}(\Omega_{T})$. This identity extends to
$C^{0,1}_{0}(\Omega_{T})$. Since $H_{t}$ vanishes at the boundary $x=0$,
$x=1$, the same identity holds if we replace $P_{t}$ by $P_{t}-c_{t}$ for some
function $c$ in ${\mathcal{L}}^{1}([0,T])$. By choosing the right constant
[that is $c_{t}=\langle P_{t}/\sigma(u_{t})\rangle/\langle
1/\sigma(u_{t})\rangle$], we may assume that $\langle
P_{t}/\sigma(u_{t})\rangle=0$ for almost all $0\leq t\leq T$. We denote by $M$
the element of ${\mathscr{L}}^{2}(\sigma(u)^{-1})$ satisfying this condition
and the previous displayed equation:

$L^{(\partial_{t})}_{0}(H)\;=\;\int_{0}^{T}\langle\,M_{s}\,,\,\nabla
H_{s}\,\rangle\;ds\;,\quad\int_{0}^{1}\frac{M_{t}}{\sigma(u_{t})}\;dx\;=\;0$
(4.15)

for all $H\in C^{0,1}_{0}(\Omega_{T})$ and almost all $0\leq t\leq T$.
Moreover, as $\langle M_{t}/\sigma(u_{t})\rangle=0$ for almost all $t$, by
Lemma 4.1,

$\|\,L^{(\partial_{t})}_{0}\,\|^{2}_{-1,\sigma(u)}\;=\;\int_{0}^{T}\,dt\int_{0}^{1}\frac{M_{t}^{2}}{\sigma(u_{t})}\;dx\;.$

######  Lemma 4.4.

Fix a trajectory satisfying the hypotheses stated at the beginning of this
section. Then,

$I^{(1)}_{[0,T]}(u)\;=\;\frac{1}{4}\,\int_{0}^{T}\big{\\{}\,\|\,M_{t}\,+\,\nabla
u_{t}\,\|^{2}_{\sigma(u_{t})^{-1}}\,-\,R_{t}\,\big{\\}}\;dt\;,$

where

$R_{t}\;=\;\big{\langle}\,\frac{\nabla
u_{t}}{\sigma(u_{t})}\,\big{\rangle}^{2}\,\frac{1}{\langle\sigma(u_{t})^{-1}\rangle}\;=\;\Big{\\{}\,\log\frac{u_{t}(1)}{1-u_{t}(1)}\,-\,\log\frac{u_{t}(0)}{1-u_{t}(0)}\,\Big{\\}}^{2}\,\frac{1}{\langle\sigma(u_{t})^{-1}\rangle}\;\cdot$

###### Proof.

As $I_{[0,T]}(u)$ is finite, by (4.14) and the paragraph preceding the
statement of the lemma, $L^{(\partial_{t})}_{0}$ belongs to
${\mathcal{H}}^{-1}(\sigma(u))$ and there exists $M$ in
${\mathscr{L}}^{2}(\sigma(u)^{-1})$ satisfying (4.15). Therefore, for all $H$
in $C^{0,1}_{0}(\Omega_{T})$,

${\mathfrak{L}}_{0}(H)\;=\;L^{(\nabla)}_{0}(H)\;+\;L^{(\partial_{t})}_{0}(H)\;=\;\int_{0}^{T}\langle\,M_{t}\,+\,\nabla
u_{t}\,,\,\nabla H_{t}\,\rangle\;dt\;.$

By Lemma 4.1,

$\|\,{\mathfrak{L}}_{0}\,\|^{2}_{-1,\sigma(u)}\;=\;\int_{0}^{T}\Big{\\{}\,\|\,M_{t}\,+\,\nabla
u_{t}\,\|^{2}_{\sigma(u_{t})^{-1}}\,-\,R_{t}\,\,\big{\\}}\;dt\;,$

where $R_{t}$ has been introduced in the statement of the lemma. This
completes the proof of the lemma. ∎

We summarize the last two results in the next proposition.

######  Proposition 4.5.

Fix a path $\pi(t,dx)=u(t,x)\,dx$ in $D([0,T],{\mathscr{M}}_{\rm ac})$. Assume
that $u$ is continuous on $\Omega_{T}$ and smooth in time, that there exists
$\varepsilon>0$ such that $\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all
$(t,x)\in\Omega_{T}$, and that $I_{[0,T]}(u)<\infty$. Then,

$I_{[0,T]}(u)\;=\;I^{(1)}_{[0,T]}(u)\;+\;I^{(2)}_{[0,T]}(u)\;,$

where Lemma 4.4 provides a formula for first term and Lemma 4.3 for the
second.

######  Remark 4.6.

In the statement of Proposition 4.5, we imposed many regularity assumptions on
$u$ because this is the context in which this result is applied in the next
section. The proof shows that they can be relaxed.

##  5\. $I_{[0,T]}(\,\cdot\,)$-density

In this section, we prove that any trajectory $\pi\in D([0,T],{\mathscr{M}})$
with finite rate function can be approximated by a sequence of smooth
trajectories $\\{\pi^{n}:n\geq 1\\}$ such that

$\pi^{n}\longrightarrow\pi\;\;\text{ and
}\;\;I_{[0,T]}(\pi^{n}|\gamma)\longrightarrow I_{[0,T]}(\pi|\gamma)\;.$

We follow an approach proposed in [28, 7, 17]. Here, and throughout this
section, $\gamma\colon[0,1]\to[0,1]$ is a fixed density profile. We first
introduce some terminology.

######  Definition 5.1.

A subset $A$ of $D([0,T],{\mathscr{M}})$ is said to be
$I_{[0,T]}(\cdot|\gamma)$-dense if for any $\pi$ in $D([0,T],{\mathscr{M}})$
such that $I_{[0,T]}(\pi|\gamma)<\infty$, there exists a sequence
$\\{\pi^{n}:n\geq 1\\}$ in $A$ such that $\pi^{n}$ converges to $\pi$ in
$D([0,T],{\mathscr{M}})$ and $I_{[0,T]}(\pi^{n}|\gamma)$ converges to
$I_{[0,T]}(\pi|\gamma)$.

######  Theorem 5.2.

For all $\gamma:[0,1]\to[0,1]$, the set $\Pi_{\gamma}$ is
$I_{[0,T]}(\cdot|\gamma)$-dense. If there exists $\varepsilon_{0}>0$ such that
$\varepsilon_{0}\leq\gamma\leq 1-\varepsilon_{0}$, condition (b) in Definition
2.5 can be replaced by the existence of $\varepsilon>0$ such that
$\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all $(t,x)\in[0,T]\times[0,1]$.

The proof of Theorem 5.2 is divided into several steps. Throughout this
section, denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}u^{(\gamma)}:[0,T]\times[0,1]\to[0,1]$
the unique weak solution of the boundary-initial valued problem (2.6) with
initial profile $u_{0}=\gamma$.

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Pi_{1}$
be the set of all paths $\pi(t,dx)=u(t,x)\,dx$ in
$D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$, whose density $u$ is a weak
solution of the Cauchy problem (2.6) in some positive time interval. In other
words, there exists $\delta>0$ such that $u_{t}=u^{(\gamma)}_{t}$ for $0\leq
t\leq\delta$.

######  Lemma 5.3.

The set $\Pi_{1}$ is $I_{[0,T]}(\cdot|\gamma)$-dense.

###### Proof.

Fix $\pi$ in $D([0,T],{\mathscr{M}})$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. By definition of the rate function, $\pi$
belongs to $D([0,T],{\mathscr{M}}_{\rm ac})$, $\pi(t,dx)=u(t,x)\,dx$, and
$\mathcal{Q}_{[0,T]}(u)<\infty$.

For each $\delta>0$, consider the path
$\pi^{\delta}(t,dx)=u^{\delta}(t,x)\,dx$ defined by

$\displaystyle u^{\delta}(t,x)\;=\;\begin{cases}u^{(\gamma)}(t,x)&\text{ if
}t\in[0,\delta]\;,\\\ u^{(\gamma)}(2\delta-t,x)&\text{ if
}t\in[\delta,2\delta]\;,\\\ u(t-2\delta,x)&\text{ if
}t\in[2\delta,T]\;.\end{cases}$

Claim A: The trajectory $\pi^{\delta}$ belongs to $\Pi_{1}$. Indeed, by
definition, $u^{\delta}$ is the weak solution of the Cauchy problem (2.6) in
the time-interval $[0,\delta]$. On the other hand, by definition of
$u^{\delta}$,
$\mathcal{Q}_{[0,T]}(u^{\delta})\,\leq\,2\,\mathcal{Q}_{[0,\delta]}(u^{(\gamma)})\,+\,\mathcal{Q}_{[0,T]}(u)$.
By Corollary 3.6, $\mathcal{Q}_{[0,\delta]}(u^{(\gamma)})<\infty$. On the
other hand, $\mathcal{Q}_{[0,T]}(u)$ is finite because
$I_{[0,T]}(\pi|\gamma)<\infty$. Therefore, $u^{\delta}$ has finite energy,
which completes the proof of Claim A.

It is clear that $\pi^{\delta}$ converges to $\pi$ in $D([0,T],{\mathscr{M}})$
as $\delta\downarrow 0$. To conclude the proof of the lemma it is enough to
show that $I_{[0,T]}(\pi^{\delta}|\gamma)$ converges to
$I_{[0,T]}(\pi|\gamma)$ as $\delta\downarrow 0$.

Since the rate function is lower semicontinuous,
$I_{[0,T]}(\pi|\gamma)\leq\liminf_{\delta\to
0}I_{[0,T]}(\pi^{\delta}|\gamma)$. To prove that $\limsup_{\delta\to
0}I_{[0,T]}(\pi^{\delta}|\gamma)\leq I_{[0,T]}(\pi|\gamma)$, decompose the
rate function $I_{[0,T]}(\pi^{\delta}|\gamma)$ into the sum of the
contributions on each time interval $[0,\delta]$, $[\delta,2\delta]$ and
$[2\delta,T]$.

Recall the notation introduced at the beginning of Section 3. By (3.1), (3.2),
since in the interval $[2\delta,T]$ $\pi^{\delta}$ is a time translation of
the path $\pi$,

$I_{[0,T]}(\pi^{\delta}|\gamma)\;\leq\;I_{[0,\delta]}(\pi^{\delta}|\gamma)\;+\;I_{[0,\delta]}(\tau_{\delta}u^{\delta}\,|\,u^{(\gamma)}_{\delta})\;+\;I_{[0,T]}(\pi|\gamma)\;.$

Since the density $u^{\delta}$ is a weak solution of the equation (2.6) on the
interval $[0,\delta]$, by Corollary 3.6, the first contribution is equal to
$0$. It remains to show that the second term on the right-hand side vanishes
as $\delta\to 0$.

Let $v^{\delta}=\tau_{\delta}u^{\delta}$. As
$v^{\delta}(t)=u^{(\gamma)}(\delta-t)$, the density $v^{\delta}$ solves the
backward heat equation: $\partial_{t}v^{\delta}\,=\,-\,\Delta v^{\delta}$.
Thus, by Definition B.1 and (2.11), for each $H$ in
$C^{1,2}([0,T]\times[0,1])$,

$\begin{split}J_{\delta,H}(v^{\delta})\;&=\;\int_{0}^{\delta}\big{\\{}\,2\,\langle\,\nabla
u^{(\gamma)}_{t}\,,\,\nabla
H_{t}\,\rangle\,-\,\langle\,\sigma(u^{(\gamma)}_{t})\,,\,(\nabla
H_{t})^{2}\,\rangle\big{\\}}\;dt\\\
&-\;\int_{0}^{T}\Big{\\{}\,\widehat{{\mathfrak{b}}}_{\alpha,A}\big{(}\,u^{(\gamma)}_{t}(0)\,,\,H_{t}(0)\,\big{)}\;+\;\widehat{{\mathfrak{b}}}_{\beta,B}\big{(}\,u^{(\gamma)}_{t}(1)\,,\,H_{t}(1)\,\big{)}\,\Big{\\}}\,dt\;,\end{split}$

where

$\widehat{{\mathfrak{b}}}_{\varrho,D}(a,M)\;=\;\frac{1}{D}\,\Big{\\{}[1-a]\,\varrho\,[e^{M}-1+M]\;+\;a\,[1-\varrho]\,[e^{-M}-1-M]\,\Big{\\}}\;.$

By Schwarz inequality, the first integral on the right-hand side is bounded
above by

$\int_{0}^{\delta}dt\ \int_{0}^{1}\frac{|\nabla
u^{(\gamma)}(t,x)|^{2}}{\sigma(u^{(\gamma)}(t,x))}\,dx\;.$

By (B.6), this expression vanishes as $\delta\to 0$. On the other hand,
maximizing $\widehat{{\mathfrak{b}}}_{\varrho,D}(a,M)$ over $M$ yields that
the second integral is bounded above by

$\displaystyle\int_{0}^{\delta}\Big{\\{}\,\frac{1}{B}\,[\,\beta-u^{(\gamma)}_{t}(1)\,]\,\log\frac{[1-u^{(\gamma)}_{t}(1)]\,\beta}{u^{(\gamma)}_{t}(1)\,[1-\beta]}\,+\,\frac{1}{A}\,[\,\alpha-u^{(\gamma)}_{t}(0)\,]\,\log\frac{[1-u^{(\gamma)}_{t}(0)]\,\alpha}{u^{(\gamma)}_{t}(0)\,[1-\alpha]}\,\Big{\\}}\,dt$
$\displaystyle\leq\;\int_{0}^{\delta}\Big{|}\,\frac{\beta-u^{(\gamma)}_{t}(1)}{B}\,\log\frac{[1-u^{(\gamma)}_{t}(1)]}{u^{(\gamma)}_{t}(1)}\,+\,\frac{\alpha-u^{(\gamma)}_{t}(0)}{A}\,\log\frac{[1-u^{(\gamma)}_{t}(0)]}{u^{(\gamma)}_{t}(0)}\,\Big{|}\,dt\;+\;C_{0}\delta$

for some finite constant $C_{0}=C_{0}(\alpha,\beta,A,B)$. By (B.6), this
expression vanishes as $\delta\to 0$.

Putting together the previous estimates shows that there exists a function
$c(\delta)$, independent of $H$, such that $\lim_{\delta\to 0}c(\delta)=0$ and

$J_{\delta,H}(\tau_{\delta}u^{\delta})\;\leq\;c(\delta)$

for all $H\in C^{1,2}([0,T]\times[0,1])$. This shows that $\lim_{\delta\to
0}I_{[0,\delta]}(\tau_{\delta}u^{\delta}\,|\,u^{(\gamma)}_{\delta})=0$, and
completes the proof of the lemma. ∎

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Pi_{2}$
be the set of all paths $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{1}$ with the property
that for every $\delta>0$ there exists $\varepsilon>0$ such that
$\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all
$(t,x)\in[\delta,T]\times[0,1]$.

######  Lemma 5.4.

The set $\Pi_{2}$ is $I_{T}(\,\cdot\,|\gamma)$-dense.

###### Proof.

Fix $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{1}$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. For each $0<\varepsilon<1$, define the path
$\pi^{\varepsilon}(t,dx)=u^{\varepsilon}(t,x)dx$ by
$u^{\varepsilon}=(1-\varepsilon)u+\varepsilon u^{(\gamma)}$.

Claim A: For each $0<\varepsilon<1$, the trajectory $\pi^{\varepsilon}$
belongs to $\Pi_{1}$. Since $\pi$ belongs to $\Pi_{1}$, by definition, there
exists $\delta>0$ such that $\pi^{\varepsilon}_{t}=\pi_{t}$ for $0\leq
t\leq\delta$. Therefore, $\pi^{\varepsilon}$ follows the hydrodynamic equation
in the time-interval $[0,\delta]$. On the other hand, by the convexity of the
energy,
$\mathcal{Q}_{[0,T]}(u^{\varepsilon})\leq\varepsilon\,\mathcal{Q}_{[0,T]}(u^{(\gamma)})+(1-\varepsilon)\,\mathcal{Q}_{[0,T]}(u)$.
Hence, by lemma B.5, $\mathcal{Q}_{[0,T]}(u^{\varepsilon})<\infty$. Therefore,
$\pi^{\varepsilon}$ belongs to $\Pi_{1}$, as claimed.

Claim B: For each $0<\varepsilon<1$, the trajectory $\pi^{\varepsilon}$
belongs to $\Pi_{2}$. By Theorem B.4, for every $\delta>0$ there exists
$\kappa>0$ such that $\kappa\leq u^{(\gamma)}_{t}\leq 1-\kappa$ for all
$\delta\leq t\leq T$. This property is inherited by $u^{\varepsilon}$ for a
different $\kappa=\kappa(\varepsilon)$ because $0\leq u\leq 1$, which proves
Claim B.

It is clear that $\pi^{\varepsilon}$ converges to $\pi$ in
$D([0,T],{\mathscr{M}})$ as $\varepsilon\downarrow 0$. Therefore, to conclude
the proof it is enough to show that $I_{[0,T]}(\pi^{\varepsilon}|\gamma)$
converges to $I_{[0,T]}(\pi|\gamma)$ as $\varepsilon\downarrow 0$. Since the
rate function is lower semicontinuous,
$I_{[0,T]}(\pi|\gamma)\leq\liminf_{\varepsilon\downarrow
0}I_{[0,T]}(\pi^{\varepsilon}|\gamma)$. On the other hand, as the rate
function $I_{[0,T]}(\,\cdot\,|\,\gamma)$ is convex, by Corollary 3.6,

$I_{[0,T]}(\pi^{\varepsilon}|\gamma)\;\leq\;(1-\varepsilon)\,I_{[0,T]}(\pi|\gamma)\;+\;\varepsilon\,I_{[0,T]}(u^{(\gamma)}|\gamma)\;\leq\;(1-\varepsilon)\,I_{[0,T]}(\pi|\gamma)\;.$

This completes the proof of the lemma. ∎

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Pi_{3}$
be the set of all paths $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{2}$ whose density $u$
is continuous in $(0,T]\times[0,1]$ and smooth in time: For all $x\in[0,1]$,
$u(x,\,\cdot\,)$ belongs to $C^{\infty}((0,T])$.

######  Lemma 5.5.

The set $\Pi_{3}$ is $I_{[0,T]}(\cdot|\gamma)$-dense.

###### Proof.

Fix $\pi(t,dx)=u(t,x)dx$ in $\Pi_{2}$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. Since $\pi$ belongs to the set $\Pi_{1}$, the
density $u$ solves the equation (2.6) in a time interval $[0,3\delta]$ for
some $\delta>0$. Let $\varphi:{\mathbb{R}}\to{\mathbb{R}}$ be a smooth,
nonnegative function such that

$\displaystyle\text{supp}\ \varphi\;\subset\;(0,1)\;\;\text{ and
}\;\;\int_{0}^{1}\varphi(s)\,ds\;=\;1\;.$

Set
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\varphi_{\varepsilon}(s)\,=\,\varepsilon^{-1}\varphi(s/\varepsilon)$.

Let $\chi:[0,T]\to[0,1]$ be a smooth, nondecreasing function such that

$\displaystyle\begin{cases}\chi(t)\;=\;0\ &\text{ if }\ t\in[0,\delta]\;,\\\
0\;<\chi(t)\;<1\ &\text{ if }\ t\in(\delta,2\delta)\;,\\\ \chi(t)\;=\;1\
&\text{ if }\ t\in[2\delta,T]\;,\end{cases}$ (5.1)

and set
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\chi_{n}(t)=\chi(t)/n$
for $n\geq 1$. Hence, $\chi_{n}(t)=1/n$ for $t\geq 2\delta$.

Let $\pi^{n}(t,dx)=u^{n}(t,x)\,dx$ where

$\displaystyle
u^{n}(t,x)\;=\;\int_{0}^{1}u(t+\chi_{n}(t)\,s)\,\varphi(s)\;ds\;=\;\int_{{\mathbb{R}}}u(t+s)\,\varphi_{\chi_{n}(t)}(s)\;ds\;.$

In the above formula, we extend the definition of $u$ to $[0,T+1]$ by setting
$u_{t}=u^{(u_{T})}_{t-T}$ for $T\leq t\leq T+1$. This means that on the
interval $[T,T+1]$, $u_{t}$ follows the hydrodynamic equation (2.6) starting
from the initial condition $u_{T}$. [If $w$ represents the solution of
equation (2.6) with $\gamma=u_{T}$, $u_{T+t}=w_{t}$ for $0\leq t\leq 1$].

Claim A: The trajectory $\pi^{n}$ belongs to $\Pi_{1}$ for all
$n>\delta^{-1}$.

Fix such $n\in{\mathbb{N}}$. By construction, the density $u^{n}$ coincides
with the solution $u^{(\gamma)}$ of the hydrodynamic in the time-interval
$[0,\delta]$. To estimate the energy of $u^{n}$, we consider the time-
intervals $[0,\delta]$, $[\delta,2\delta]$ and $[2\delta,T]$ separately. On
$[0,\delta]$, $u^{n}$ coincides with $u^{(\gamma)}$. Therefore, by Lemma B.5,
the energy of $u^{n}$ in this interval is bounded (uniformly in $n$). In the
interval $[\delta,2\delta]$, $u^{n}_{t}$ is a convex combination of $u_{t+s}$
for $0\leq s\leq 1/n\leq\delta$. Since $u$ coincides with $u^{(\gamma)}$ in
the interval $[\delta,3\delta]$, and since the solution is smooth in this
interval and bounded away from $0$ and $1$, the energy of $u^{n}$ in this
interval is bounded (uniformly in $n$). Finally, for $2\delta\leq t\leq T$,

$\displaystyle u^{n}(t,x)\;=\;\int_{0}^{1/n}u(t+s)\,\varphi_{1/n}(s)\;ds\;.$

By convexity of the energy,

$Q_{[2\delta,T]}(\pi^{n})\;\leq\;\int_{0}^{1/n}Q_{[2\delta,T]}(\tau_{s}\pi)\,\varphi_{1/n}(s)\;ds\;\leq\;Q_{[2\delta,T+1/n]}(\pi)\;.$

where the translation $\tau_{s}$ has been introduced in (3.1). This quantity
is finite because $u$ has finite energy and by Lemma B.5. This proves Claim A.

Claim B: The trajectory $\pi^{n}$ belongs to $\Pi_{3}$ for all
$n>\delta^{-1}$.

As $\pi$ belongs to $\Pi_{2}$, by construction, so does $\pi^{n}$. By
Definition B.3 and Theorem B.2, the function $u$ is smooth in the set
$(0,3\delta)\times[0,1]$. Therefore, by definition, the function $u^{n}$ is
smooth in time on $(0,T]\times[0,1]$. As $n>\delta^{-1}$, and since
$u=u^{(\gamma)}$ is continuous in $(0,3\delta)\times[0,1]$, by definition,
$u^{n}$ is continuous in $(0,2\delta)\times[0,1]$. We turn to the set
$[2\delta,T]\times[0,1]$. By convexity, for all $2\delta\leq t\leq T$,

$\displaystyle\int_{0}^{1}(\nabla
u^{n}_{t})^{2}\,dx\;\leq\;\int_{0}^{1/n}ds\,\varphi_{1/n}(s)\int_{0}^{1}[\,\nabla
u_{t+s}\,]^{2}\>dx$
$\displaystyle\quad\leq\;C_{n}\,\int_{t}^{t+(1/n)}ds\int_{0}^{1}[\,\nabla
u_{s}\,]^{2}\>dx\leq\;C_{n}\,\int_{0}^{T+1}ds\int_{0}^{1}[\,\nabla
u_{s}\,]^{2}\>dx$

for some finite constant $C_{n}$. The last integral is finite for two reasons.
By Lemma B.5, the integral restricted to $[T,T+1]$ is finite. The integral on
$[0,T]$ is finite because $\pi$ has finite energy as all elements of
$\Pi_{2}$. It follows from this bound and from its definition that $u^{n}_{t}$
is continuous on $[2\delta,T]\times[0,1]$, which proves Claim B.

It is clear that $\pi^{n}$ converges to $\pi$ in $D([0,T],\mathcal{M})$. It
remains to show that $I_{[0,T]}(\,u^{n}\,|\gamma)\to I_{[0,T]}(\,u\,|\gamma)$.
As the rate-function $I_{[0,T]}(\,\cdot\,|\gamma)$ is lower semicontinuous, we
turn to the bound $\limsup_{n\to\infty}I_{[0,T]}(\pi^{n}|\gamma)\leq
I_{[0,T]}(\pi|\gamma)$.

By (3.2), the cost of the trajectory $\pi^{n}$ in the interval $[0,T]$ is
bounded by the sum of its cost in the intervals $[0,\delta]$,
$[\delta,2\delta]$, $[2\delta,T]$. As $u^{n}=u$ in the time-interval
$[0,\delta]$, and as $u$ is the solution of the hydrodynamic equation in this
interval,

$I_{[0,\delta]}(\pi^{n}|\gamma)\;=\;0\;.$ (5.2)

Consider the contribution to $I_{[0,T]}(\pi^{n}|\gamma)$ of the piece of the
trajectory corresponding to the time interval $[2\delta,T]$. Recall the
definition of the functional $\tau_{t}$, introduced just above (3.1). Since
$\chi_{n}(t)=1/n$ in this interval, by the concavity of $\sigma(\cdot)$, for
any smooth function $H:[0,T-2\delta]\times[0,1]\to{\mathbb{R}}$,

$\displaystyle J_{T-2\delta,H}(\,\tau_{2\delta}u^{n}\,)$
$\displaystyle\leq\;\int\varphi_{1/n}(s)\,J_{T-2\delta,H}(\,\tau_{2\delta+s}u\,)\;ds$
$\displaystyle\leq\;\int\varphi_{1/n}(s)\,I_{[0,T-2\delta]}(\,\tau_{2\delta+s}u\,)\;ds\;.$

By (3.1), the right-hand side is bounded by

$\int\varphi_{1/n}(s)\,\big{\\{}\,I_{[0,T-2\delta-s]}(\,\tau_{2\delta+s}u\,)\;+\;I_{[0,s]}(\,\tau_{T}u\,)\,\\}\;ds\;.$

Since $u$ solves the hydrodynamic equation on the interval $[T,T+1]$, by
Corollary 3.6, $I_{[0,s]}(\,\tau_{T}u\,)=0$ for $s\leq 1$. Hence, by (3.3),
the previous integral is bounded by

$\int\varphi_{1/n}(s)\,I_{[0,T]}(\,u\,)\;ds\;\leq\;I_{[0,T]}(\,u\,\,)\;.$

Therefore, optimizing over $H$,

$I_{[0,T-2\delta]}(\,\tau_{2\delta}\pi^{n}\,)\;\leq\;I_{[0,T]}(\,u\,)\;.$
(5.3)

We turn to the contribution to $I_{[0,T]}(\pi^{n}|\gamma)$ of the piece of the
trajectory corresponding to the time interval $[\delta,2\delta]$. Since $u$
solves the hydrodynamic equation (2.6) on the time interval
$[\delta,3\delta]$, it is smooth in $(0,3\delta)\times[0,1]$. Hence, by
definition of $u^{n}$,

$\partial_{t}u^{n}(t,x)\;=\;\int_{{\mathbb{R}}}\partial_{t}u(t+s,x)\,\varphi_{\chi_{n}(t)}(s)\;ds\;+\;\int_{{\mathbb{R}}}u(t+s,x)\;\partial_{t}\varphi_{\chi_{n}(t)}(s)\;ds\;.$

As $u$ solves the hydrodynamic equation (2.6) on the time interval
$[\delta,3\delta]$, for any function $G$ in $C^{1,2}([0,T]\times[0,1])$,

$\displaystyle\langle u_{2\delta}^{n},G_{2\delta}\rangle\,-\,\langle
u_{\delta}^{n},G_{\delta}\rangle\,-\,\int_{\delta}^{2\delta}\langle
u_{t}^{n},\partial_{t}G_{t}\rangle\;dt\;=\;-\,\int_{\delta}^{2\delta}\langle\nabla
u^{n}_{t},\nabla G_{t}\rangle\;dt$
$\displaystyle\qquad+\;\int_{\delta}^{2\delta}\big{\\{}\,\frac{1}{B}\,[\beta-u^{n}_{t}(1)]\,G_{t}(1)\,+\,\frac{1}{A}\,[\alpha-u^{n}_{t}(0)]\,G_{t}(0)\,\big{\\}}\;dt\;+\;\int_{\delta}^{2\delta}\langle
r_{t}^{n},G_{t}\rangle\;dt\;,$

where

$r^{n}_{t}(x)\;=\;\int_{{\mathbb{R}}}u(t+s,x)\,\partial_{t}\varphi_{\chi_{n}(t)}(s)\;ds\;.$

Therefore,

$\displaystyle J_{\delta,G}(\tau_{\delta}u^{n})$
$\displaystyle\leq\;\int_{\delta}^{2\delta}\langle
r_{t}^{n},G_{t}\rangle\;dt\;-\;\int_{\delta}^{2\delta}dt\int_{0}^{1}\sigma(u^{n}_{t})\,[\nabla
G_{t}]^{2}\;dx$
$\displaystyle-\;\int_{\delta}^{2\delta}\big{\\{}\,{\mathfrak{q}}_{\beta,B}(u^{n}_{t}(1),G_{t}(1))\,+\,{\mathfrak{q}}_{\alpha,A}(u^{n}_{t}(0),G_{t}(0))\,\big{\\}}\;dt\;,$

where ${\mathfrak{q}}_{\varrho,D}(a,M)$ has been introduced in (3.13). Since
$u$ belongs to $\Pi_{2}$, there exists $\varepsilon>0$ such that
$\varepsilon\leq u(t,x)\leq 1-\varepsilon$ for all $\delta\leq t\leq T$,
$0\leq x\leq 1$. By Theorem B.4, this bound extends to $T\leq t\leq T+1$,
$0\leq x\leq 1$. By definition, it is inherited by $u^{n}$. Therefore, there
exists a positive constant $c_{0}=c_{0}(\varepsilon)$ such that

$\displaystyle J_{\delta,G}(\tau_{\delta}u^{n})$
$\displaystyle\leq\;\int_{\delta}^{2\delta}\langle
r_{t}^{n},G_{t}\rangle\;dt\;-\;c_{0}\int_{\delta}^{2\delta}dt\int_{0}^{1}[\nabla
G_{t}]^{2}\;dx$
$\displaystyle-\;c_{0}\,\int_{\delta}^{2\delta}\big{\\{}\,G_{t}(1)^{2}\,+\,G_{t}(0)^{2}\,\big{\\}}\;dt\;,$

Adding and subtracting $G_{t}(0)$ to $G_{t}$ in $\langle
r_{t}^{n},G_{t}\rangle$ yields, by Young’s inequality, that this scalar
product is bounded by
$(1/2A_{1})\langle(r_{t}^{n})^{2}\rangle+A_{1}\langle[G_{t}-G_{t}(0)]^{2}\rangle+A_{1}G_{t}(0)^{2}$
for all $A_{1}>0$. Hence, by choosing $A_{1}$ appropriately,

$J_{\delta,G}(\tau_{\delta}u^{n})\;\leq\;C_{0}\,\int_{\delta}^{2\delta}dt\int_{0}^{1}(r_{t}^{n})^{2}\;dx\;,$

so that

$I_{[0,\delta]}(\tau_{\delta}u^{n})\;\leq\;C_{0}\,\int_{\delta}^{2\delta}dt\int_{0}^{1}(r_{t}^{n})^{2}\;dx\;,$
(5.4)

It remains to show that $r^{n}(t,x)$ converges to $0$, as $n\to\infty$, in
${\mathscr{L}}^{2}[(\delta,2\delta)\times[0,1])$. Fix a point $(t,x)$ in this
set. Since
$\int_{{\mathbb{R}}}\partial_{t}\,\varphi_{\chi_{n}(t)}(s)\,ds\,=\,\partial_{t}\,\int_{{\mathbb{R}}}\varphi_{\chi_{n}(t)}(s)\,ds\,=\,0$,
$r^{n}(t,x)$ can be written as

$\int_{{\mathbb{R}}}[\,u(t+s,x)-u(t,x)\,]\,\partial_{t}\,\varphi_{\chi_{n}(t)}(s)\,ds\;.$

Since $u$ is Lipschitz continuous on $[\delta,3\delta]\times[0,1]$, there
exists a positive constant $C(\delta)>0$, depending only on $\delta$, such
that

$|\,u(t+s,x)-u(t,x)\,|\;\leq\;C(\delta)\,s\;,$

for any $(t,x)\in[\delta,2\delta]\times[0,1]$ and $s\in[0,\delta]$. Therefore
$r^{n}(t,x)$ is bounded above by

$C(\delta)\int_{{\mathbb{R}}}s\,\big{|}\,\partial_{t}\,\varphi_{\chi_{n}(t)}(s)\,\big{|}\,ds\;.$

By the change of variables $s^{\prime}=s/\chi_{n}(t)$,

$\int_{{\mathbb{R}}}s\,\big{|}\,\partial_{t}\,\varphi_{\chi_{n}(t)}(s)\,\big{|}\,ds\;\leq\;\frac{\|\,\chi^{\prime}\,\|_{\infty}}{n}\int_{0}^{1}\big{\\{}\,s\,\varphi(s)+s^{2}\,|\varphi^{\prime}(s)|\,\big{\\}}\,ds\;.$

Therefore, as $n\to\infty$, $r^{n}$ converges to $0$ uniformly in
$(\delta,2\delta)\times[0,1]$, and, by (5.4),

$\lim_{n\to\infty}I_{[0,\delta]}(\,\tau_{\delta}\pi^{n}\,)\;=\;0\;.$

By (3.1), (5.2), (5.3) and the previous estimate,
$\limsup_{n\to\infty}I_{[0,T]}(\,\pi^{n}\,|\,\gamma\,)\,\leq\,I_{[0,T]}(\,\pi\,|\,\gamma\,)$,
which completes the proof of the lemma. ∎

Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\Pi_{4}$
be the set of all paths $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{3}$ whose density
$u(t,\cdot)$ belongs to the space $C^{\infty}([0,1])$ for any $t\in(0,T]$.
Note that $\Pi_{4}=\Pi_{\gamma}$, introduced in Definition 2.5.

Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}(P^{(D)}_{t}:t\geq
0)$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}(P^{(N)}_{t}:t\geq
0)$ the semigroup associated to the Laplacian on $[0,1]$ with Dirichlet,
Neumann boundary conditions, respectively. The following property will be used
many times below. For all $s\geq 0$ and function $f$ in $C^{1}([0,1])$,

$\nabla P^{(D)}_{s}f\;=\;P^{(N)}_{s}\nabla f\;.$ (5.5)

To check this identity, fix $f$ in $C^{1}([0,1])$, and let
$u_{s}:=P^{(D)}_{s}f$. Clearly $u_{s}$ is the solution of the heat equation on
$[0,1]$ with boundary conditions $u_{s}(0)=u_{s}(1)=0$ and initial condition
$u_{0}=f$. Let $v_{s}:=\nabla u_{s}$, Then, $v_{s}$ solves the heat equation
on $[0,1]$ with boundary conditions $\nabla v_{s}(0)=\nabla v_{s}(1)=0$ and
initial condition $v_{0}=\nabla f$. Hence, $v_{s}$ can be represented as
$v_{s}=P^{(N)}_{s}\nabla f$, that is, $P^{(N)}_{s}\nabla f=v_{s}=\nabla
u_{s}=\nabla P^{(D)}_{s}f$, as claimed.

Fix $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{3}$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. Since $\pi$ belongs to the set $\Pi_{1}$, the
density $u$ solves the equation (2.6) in some time interval $[0,3\delta]$,
$\delta>0$. Recall the definition of the function $\chi_{n}(\cdot)$ introduced
in (5.1). Let $\pi^{n}(t,dx)=u^{n}(t,x)\,dx$, where

$u^{n}_{t}\;=\;w_{t}\;+\;P^{(D)}_{\chi_{n}(t)}[\,u_{t}-w_{t}\,]\;.$ (5.6)

In this formula, $w_{t}(\cdot)$ is the smooth function given by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}w_{t}(x)\,=\,u_{t}(0)\,+\,[\,u_{t}(1)\,-\,u_{t}(0)\,]\,x$.

######  Lemma 5.6.

Fix $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{3}$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. Define $u^{n}$, $n\geq 1$, by (5.6). For each
$n\geq 1$, $\pi^{n}(t,dx)=u^{n}(t,x)\,dx$ belongs to $\Pi_{4}$ and the
trajectory $u^{n}$ has finite energy.

###### Proof.

Claim A: The trajectory $\pi^{n}$ belongs to $\Pi_{1}$.

By definition, $u^{n}_{t}=u_{t}=u^{(\gamma)}_{t}$ for $0\leq t\leq\delta$. It
remains to estimate its energy. As $u^{n}_{t}=u^{(\gamma)}_{t}$ for $0\leq
t\leq\delta$, by Lemma B.5, the contribution to the total energy of the
evolution of $u^{n}$ in the time interval $[0,\delta]$ is bounded. We turn to
the contribution in the time interval $[\delta,T]$.

By definition and (5.5), $\nabla u^{n}_{t}=\nabla
w_{t}\,+\,P^{(N)}_{\chi_{n}(t)}\nabla[\,u_{t}-w_{t}\,]$, so that $(\nabla
u^{n}_{t})^{2}\leq 2\,(\nabla
w_{t})^{2}\,+\,2\,\\{\,P^{(N)}_{\chi_{n}(t)}\nabla[\,u_{t}-w_{t}\,]\,\\}^{2}$.
Therefore, as $\varepsilon(\delta)\leq u^{n}_{t}\leq 1-\varepsilon(\delta)$
for $\delta\leq t\leq T$,

$\displaystyle\int_{\delta}^{T}dt\int_{0}^{1}\frac{|\nabla
u^{n}_{t}|^{2}}{\sigma(u^{n}_{t})}\;dx\;\leq\;C_{0}(\varepsilon)\,\int_{\delta}^{T}dt\int_{0}^{1}|\nabla
u^{n}_{t}|^{2}\;dx$
$\displaystyle\;\;\;\leq\;C_{0}(\varepsilon)\,\int_{\delta}^{T}dt\int_{0}^{1}(\nabla
w_{t})^{2}\;dx\;+\;C_{0}(\varepsilon)\,\int_{\delta}^{T}dt\int_{0}^{1}\\{\,P^{(N)}_{\chi_{n}(t)}\nabla[\,u_{t}-w_{t}\,]\,\\}^{2}\;dx\;,$

where the constant $C_{0}(\varepsilon)$ changed from line to line. The first
term is bounded by the definition of $w_{t}$. As $P^{(N)}_{s}$ is a
contraction in ${\mathscr{L}}^{2}([0,1])$, the second term is bounded by

$C_{0}(\varepsilon)\,\int_{\delta}^{T}dt\int_{0}^{1}(\nabla
u_{t})^{2}\;dx\;+\;C_{0}(\varepsilon)\,\int_{\delta}^{T}dt\int_{0}^{1}(\nabla
w_{t})^{2}\;dx\;.$

The first term is bounded because $\pi_{t}(dx)=u(t,x)\,dx$ belongs to
$\Pi_{3}$. We already estimated the second one. This completes the proof of
Claim A.

Claim B: The trajectory $\pi^{n}$ belongs to $\Pi_{2}$. By Theorem B.4, and
since $\pi$ belongs to $\Pi_{2}$, for every $\delta^{\prime}>0$, there exists
$\varepsilon>0$ such that $\varepsilon\leq u_{t}\leq 1-\varepsilon$ for all
$t\in[\delta^{\prime},T]$. Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\varepsilon(\delta)$
the constant $\varepsilon$ when $\delta^{\prime}=\delta$. As $u^{n}_{t}=u_{t}$
for $0\leq t\leq\delta$, this property extends to $u^{n}_{t}$ in the interval
$[0,\delta]$: for every $0<\delta^{\prime}\leq\delta$, there exists
$\varepsilon>0$ such that $\varepsilon\leq u^{n}_{t}\leq 1-\varepsilon$ for
all $t\in[\delta^{\prime},\delta]$.

We turn to the interval $[\delta,T]$. Fix $\delta\leq t\leq T$. Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}v_{s}=v^{(t)}_{s}=w_{t}+P^{(D)}_{s}[u_{t}-w_{t}]$,
$s\geq 0$. Note that $u^{n}_{t}=v^{(t)}_{\chi_{n}(t)}$. By definition, $v$ is
the unique solution of the heat equation with Dirichlet boundary conditions:

$\left\\{\begin{aligned} &\partial_{s}v\;=\;\Delta v\;,\\\
&v_{s}(0)\,=\,u_{t}(0)\;,\;\;v_{s}(1)\,=\,u_{t}(1)\\\
&v(0,\cdot)=u_{t}(\cdot)\;.\end{aligned}\right.$

Here we used the fact that $w(t,0)=u(t,0)$, $w(t,1)=u(t,1)$ and that $\Delta
w_{t}=0$. By the maximum principle, for all $s\geq 0$, $\min_{0\leq x\leq
1}u_{t}(x)\leq\min_{0\leq x\leq 1}v_{s}(x)\leq\max_{0\leq x\leq
1}v_{s}(x)\leq\max_{0\leq x\leq 1}u_{t}(x)$. Hence, the bound
$\varepsilon(\delta)\leq u_{t}\leq 1-\varepsilon(\delta)$, which holds for all
$t\in[\delta,T]$ by definition of $\varepsilon(\delta)$, extends to
$v^{(t)}_{\chi_{n}(t)}=u^{n}_{t}$. Therefore, $\pi^{n}$ belongs to $\Pi_{2}$,
as claimed.

The condition $\Delta w_{t}=0$ selects $w_{t}$ among other possible choices.
More precisely, in principle one could define $w_{t}$ as
$w_{t}(x)\,=\,u_{t}(0)\,+\,[\,u_{t}(1)\,-\,u_{t}(0)\,]\,f(x)$ for any smooth
function $f(x)$ such that $f(0)=0$, $f(1)=1$. However, the proof that $u^{n}$
belongs to $\Pi_{2}$ is based on the maximum principle for the heat equation
with Dirichlet boundary conditions. For $v$ to be a solution we need $\Delta
w_{t}=0$ which imposes the choice $f(x)=x$.

It remains to examine the regularity in space and time of the trajectory
$u^{n}_{t}$. Since $u_{t}$ belongs to $\Pi_{3}$ and as the time-derivative
commutes with the operator $P^{(D)}_{s}$, by definition, the trajectory
$u^{n}_{t}$ also belongs to $\Pi_{3}$. Furthermore, as $w_{t}$ is smooth in
space, by Theorem B.4 and its equivalent version for the heat equation with
Dirichlet boundary conditions, $u^{n}_{t}\in C^{\infty}([0,1])$ for all
$0<t\leq T$, and $u^{n}_{t}$ belongs to $\Pi_{4}$. This completes the proof of
the lemma. ∎

######  Lemma 5.7.

The set $\Pi_{4}$ is $I_{[0,T]}(\cdot|\gamma)$-dense.

###### Proof.

Fix $\pi(t,dx)=u(t,x)\,dx$ in $\Pi_{3}$ such that
$I_{[0,T]}(\pi|\gamma)<\infty$. Keep in mind that $u$ is continuous in
$(0,T]\times[0,1]$. Define $u^{n}$, $n\geq 1$, by (5.6), and let
$\pi^{n}(t,dx)=u^{n}(t,x)\,dx$. By Lemma 5.6, $\pi^{n}$ belongs to $\Pi_{4}$.

By definition, $\pi^{n}$ converges to $\pi$ in $D([0,T],{\mathscr{M}})$.
Hence, by the lower semicontinuous of the rate function, it remains to show
that $\limsup_{n\to\infty}I_{[0,T]}(\pi^{n}|\gamma)\leq
I_{[0,T]}(\pi|\gamma)$.

By (3.1), the cost of the trajectory $\pi^{n}$ in the interval $[0,T]$ is
bounded by the sum of its cost in the intervals $[0,\delta]$, $[\delta,T]$:

$I_{[0,T]}(u^{n})\;\leq\;I_{[0,\delta]}(u^{n})\;+\;I_{[0,T-\delta]}(\tau_{\delta}u^{n})\;.$
(5.7)

As $u^{n}=u^{(\gamma)}$ in the time-interval $[0,\delta]$,

$I_{[0,\delta]}(u^{n})\;=\;0\;.$ (5.8)

We turn to the interval $[\delta,T]$. Recall the notation introduced in (3.1).
The cost of the trajectory in this interval is given by
$I_{[0,T-\delta]}(\tau_{\delta}\,u^{n})$. Let
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\widehat{\chi}_{n}(t)=\chi_{n}(t-\delta)$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}T_{\delta}=T-\delta$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}v=\tau_{\delta}\,u$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}v^{n}=\tau_{\delta}\,u^{n}$,
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\widehat{w}=\tau_{\delta}\,w$,
and observe that
$v^{n}_{t}=\widehat{w}_{t}+P^{(D)}_{\widehat{\chi}_{n}(t)}[v_{t}-\widehat{w}_{t}]$,
$0\leq t\leq T_{\delta}$. Moreover,

$\varepsilon(\delta)\;\leq\;v^{n}_{t}\;\leq\;1\,-\,\varepsilon(\delta)$ (5.9)

for $0\leq t\leq T_{\delta}$, where $\varepsilon(\delta)$ has been introduced
at the beginning of the proof of Lemma 5.6. With this notation,
$I_{[0,T-\delta]}(\tau_{\delta}u^{n})=I_{[0,T_{\delta}]}(v^{n})$.

By Lemma 4.3,
$I_{[0,T_{\delta}]}(v^{n})=I^{(1)}_{[0,T_{\delta}]}(v^{n})+I^{(2)}_{[0,T_{\delta}]}(v^{n})$.
We estimate each term of this sum separately. The next observation will be
useful in the argument.

Let $L^{(\partial_{t})}$, $L^{(\partial_{t})}_{0}$ be the functional
introduced in (4.8), (4.2) with $T$, $u_{t}$ replaced by $T_{\delta}$,
$v_{t}$, respectively. Keep in mind that these linear functionals depend on
the trajectory $u(\cdot,\cdot)$, that is, on $v$. Since
$I_{[0,T_{\delta}]}(v)=I_{[0,T-\delta]}(\tau_{\delta}\,u)\leq
I_{[0,T]}(u)<\infty$, by (4.14), (4.15), $L^{(\partial_{t})}_{0}$ belongs to
${\mathcal{H}}^{-1}(\sigma(v))$ and there exists $M$ in
${\mathscr{L}}^{2}(\sigma(v)^{-1})$ such that

$L^{(\partial_{t})}_{0}(H)\;=\;\int_{0}^{T_{\delta}}\langle\,M_{s}\,,\,\nabla
H_{s}\,\rangle\;ds\;,\quad\int_{0}^{1}\frac{M_{s}}{\sigma(v_{s})}\;dx\;=\;0$
(5.10)

for all $H$ in $C^{\infty}_{K}(\Omega_{T_{\delta}})$, and almost all $0\leq
s\leq T_{\delta}$.

We turn to $I^{(1)}_{[0,T_{\delta}]}(v^{n})$. By Lemma 4.3,
$I^{(1)}_{[0,T_{\delta}]}(v^{n})=(1/4)\|{\mathfrak{L}}_{0}\|^{2}_{-1,\sigma(v^{n})}$.
The linear functional ${\mathfrak{L}}_{0}$ introduced just below (4.8) is the
sum of $L^{(\partial_{t})}_{0}$ with $L^{(\nabla)}_{0}$. We first examine
$L^{(\partial_{t})}_{0}$.

The linear functional $L^{(\partial_{t})}_{0}$. By definition, since
$P^{(D)}_{s}$ is a symmetric operator in ${\mathscr{L}}^{2}([0,1])$, for every
$H\in C^{\infty}_{K}(\Omega_{T})$,

$\displaystyle\int_{0}^{T_{\delta}}\langle\,\partial_{t}v^{n}_{t}\,,\,H_{t}\,\rangle\,dt\;=\;\int_{0}^{T_{\delta}}\langle\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,,\,H_{t}\,\rangle\,dt$
$\displaystyle\quad\>+\;\int_{0}^{T_{\delta}}\langle\,\partial_{t}v_{t}\,,\,P^{(D)}_{\widehat{\chi}_{n}(t)}H_{t}\,\rangle\,dt\>+\;\int_{0}^{\delta}\widehat{\chi}^{\prime}_{n}(t)\,\langle\,\Delta
P^{(D)}_{\widehat{\chi}_{n}(t)}[\,v_{t}-\widehat{w}_{t}\,]\,,\,H_{t}\,\rangle\,dt\;.$

The last integral runs from $0$ to $\delta$ because
$\widehat{\chi}^{\prime}_{n}(t)$ vanishes for $t\geq\delta$.

As $(t,x)\mapsto(P^{(D)}_{\widehat{\chi}_{n}(t)}H_{t})(x)$ is a smooth
function which vanishes at $x=0$ and $x=1$, by (5.10), the second term on the
right-hand side is equal to the time integral of
$\langle\,M_{t}\,,\,\nabla\,P^{(D)}_{\widehat{\chi}_{n}(t)}H_{t}\,\rangle$. By
(5.5), this scalar product is equal to
$\langle\,M_{t}\,,\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla
H_{t}\,\rangle\,=\,\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,,\,\nabla
H_{t}\,\rangle$ because the operator $P^{(N)}_{\widehat{\chi}_{n}(t)}$ is
symmetric in ${\mathscr{L}}^{2}([0,1])$.

On the other hand, as $H_{t}$ vanishes at the boundary, an integration by
parts yields that the third term on the right-hand side is equal to

$-\,\int_{0}^{\delta}\widehat{\chi}^{\prime}_{n}(t)\,\langle\,\nabla
P^{(D)}_{\widehat{\chi}_{n}(t)}[\,v_{t}-\widehat{w}_{t}\,]\,,\,\nabla
H_{t}\,\rangle\,dt\;=\;-\,\int_{0}^{\delta}\widehat{\chi}^{\prime}_{n}(t)\,\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla[\,v_{t}-\widehat{w}_{t}\,]\,,\,\nabla
H_{t}\,\rangle\,dt\;,$

where we apllied the identity (5.5) once more.

In conclusion,

$\displaystyle\int_{0}^{T_{\delta}}\langle\,\partial_{t}v^{n}_{t}\,,\,H_{t}\,\rangle\,dt\;=\;\int_{0}^{T_{\delta}}\langle\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,,\,H_{t}\,\rangle\,dt$
(5.11)
$\displaystyle\quad\>+\;\int_{0}^{T_{\delta}}\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,,\,\nabla
H_{t}\,\rangle\,dt\;-\;\int_{0}^{\delta}\widehat{\chi}^{\prime}_{n}(t)\,\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla[\,v_{t}-\widehat{w}_{t}\,]\,,\,\nabla
H_{t}\,\rangle\,dt\;.$

We estimate the first and the last term on the right-hand side. By Young’s
inequality $xy\leq(1/2A_{1})x^{2}+(A_{1}/2)y^{2}$, $A_{1}>0$, the first term
on the right-hand side is bounded by

$\frac{1}{2A_{1}}\,\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;+\;\frac{A_{1}}{2}\,\int_{0}^{T_{\delta}}\langle\,H_{t}^{2}\,\rangle\,dt$

for all $A_{1}>0$. As $H_{t}$ vanishes at the boundary of $[0,1]$, by
Poincaré’s inequality and (5.9), this sum is bounded by

$\displaystyle\frac{1}{2A_{1}}\,\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;+\;C_{0}\,A_{1}\,\int_{0}^{T_{\delta}}\langle\,(\,\nabla
H_{t}\,)^{2}\,\rangle dt$
$\displaystyle\quad\leq\frac{1}{2A_{1}}\,\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;+\;C_{0}\,A_{1}\,\int_{0}^{T_{\delta}}dt\,\int_{0}^{1}\sigma(v^{n}_{t})\,(\,\nabla
H_{t}\,)^{2}\;dx$

for some finite constant $C_{0}=C_{0}(u)$ which may change from line to line.

Since $\widehat{\chi}^{\prime}_{n}(t)=(1/n)\,\chi^{\prime}(t-\delta)$, by
Young’s inequality, the third term on the right-hand side of (5.11) is bounded
by

$\frac{C_{0}}{n}\,\int_{0}^{\delta}\langle\,\\{\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla[\,v_{t}-\widehat{w}_{t}\,]\,\\}^{2}\,\rangle\,dt\;+\;\frac{1}{n}\,\int_{0}^{\delta}\langle\,(\,\nabla
H_{t}\,)^{2}\,\rangle\,dt$

for some finite constant $C_{0}$ which depends on $\chi(\cdot)$. As
$P^{(N)}_{s}$, $s\geq 0$, is a contraction in $L^{2}([0,1])$ and since
$\varepsilon(\delta)\leq v^{n}_{t}\leq 1-\varepsilon(\delta)$, this expression
is less than or equal to

$\frac{C_{0}}{n}\,\int_{0}^{\delta}dt\int_{0}^{1}[\,\nabla
v_{t}-\nabla\widehat{w}_{t}\,]^{2}\;dx\;+\;\frac{C_{1}}{n}\,\int_{0}^{\delta}dt\int_{0}^{1}\sigma(v^{n}_{t})[\,\nabla
H_{t}\,]^{2}\;dx$

for some finite constant $C_{1}=C_{1}(u)$. We turn to the linear functional
$L^{(\nabla)}_{0}$.

The linear functional $L^{(\nabla)}_{0}$. By definition of $v^{n}_{t}$,

$\int_{0}^{T_{\delta}}\langle\,\nabla v^{n}_{t}\,,\,\nabla
H_{t}\,\rangle\,dt\;=\;\int_{0}^{T_{\delta}}\langle\,(\,I\,-\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,)\,\nabla\widehat{w}_{t}\,,\,\nabla
H_{t}\,\rangle\,dt\>+\;\int_{0}^{T_{\delta}}\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}\,,\,\nabla H_{t}\,\rangle\,dt\;.$

For similar reasons to the ones presented above, the first term on the right-
hand side is bounded by

$\frac{1}{2A_{2}}\,\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,)\,\nabla\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;+\;C_{0}\,A_{2}\,\int_{0}^{T_{\delta}}dt\,\int_{0}^{1}\sigma(v^{n}_{t})\,(\,\nabla
H_{t}\,)^{2}\;dx$

for all $A_{2}>0$ and some finite constant $C_{0}=C_{0}(u)$.

The linear functional ${\mathfrak{L}}_{0}$. We are now in a position to
estimate
$I^{(1)}_{[0,T_{\delta}]}(v^{n})=(1/4)\|{\mathfrak{L}}_{0}\|^{2}_{-1,\sigma(v^{n})}$.
Let

$\begin{gathered}r_{1}(n)\;=\;\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;,\quad
r_{2}(n)\;=\;\frac{C_{0}}{n}\,\int_{0}^{\delta}dt\int_{0}^{1}[\,\nabla
v_{t}-\nabla\widehat{w}_{t}\,]^{2}\;dx\;,\\\
r_{3}(n)\;=\;\int_{0}^{T_{\delta}}\langle\,[\,(\,I\,-\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,)\,\nabla\widehat{w}_{t}\,]^{2}\,\rangle\,dt\;.\end{gathered}$

As both semigroups are continuous, $\lim_{n\to\infty}r_{j}(n)=0$ for $j=1$,
$3$. As $u$ (and, thus, $v$) has finite energy, by definition of
$\widehat{w}$, $\lim_{n\to\infty}r_{2}(n)=0$. Set
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}A_{j}=\sqrt{r_{j}(n)}=:c_{j}(n)$,
$j=1$, $3$, and $c_{2}(n):=r_{2}(n)$, to get from the bounds obtained above
that

$\displaystyle
2\,\int_{0}^{T_{\delta}}\langle\,\partial_{t}v^{n}_{t}\,,\,H_{t}\,\rangle\,dt\;+\;2\,\int_{0}^{T_{\delta}}\langle\,\nabla
v^{n}_{t}\,,\,\nabla
H_{t}\,\rangle\,dt\;-\;\int_{0}^{T_{\delta}}dt\,\int_{0}^{1}\sigma(v^{n}_{t})\,(\,\nabla
H_{t}\,)^{2}\;dx$
$\displaystyle\quad\leq\;2\,\int_{0}^{T_{\delta}}\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,,\,\nabla
H_{t}\,\rangle\,dt\;+\;2\,\int_{0}^{T_{\delta}}\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}\,,\,\nabla H_{t}\,\rangle\,dt$
$\displaystyle\quad-\;[1-\varepsilon_{n}]\,\int_{0}^{T_{\delta}}dt\,\int_{0}^{1}\sigma(v^{n}_{t})\,(\,\nabla
H_{t}\,)^{2}\;dx\;+\;c_{n}\;,$

where $c_{n}=\sum_{1\leq j\leq 3}c_{j}(n)$,
$\varepsilon_{n}=C_{0}\,[\,c_{1}(n)\,+\,c_{2}(n)\,+\,(1/n)\,]$ so that
$\lim_{n\to\infty}\varepsilon_{n}=0$. Note that $c_{n}$, $\varepsilon_{n}$ do
not depend on $H$. Hence, by definition of
$I^{(1)}_{[0,T_{\delta}]}(\,\cdot\,)$ and (4.1),

$I^{(1)}_{[0,T_{\delta}]}(v^{n})\;\leq\;\frac{1}{4(1-\varepsilon_{n})}\,\|\,L^{n}_{0}\,\|^{2}_{-1,\sigma(v^{n})}\;+\;c_{n}\;,$

where $L^{n}_{0}(H)=\int_{0}^{T_{\delta}}\langle
P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,+\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}\,,\,\nabla H_{t}\,\rangle\,dt$.

By Lemma 4.1, the first term on the right-hand side of the previous displayed
equation is equal to

$\frac{1}{4(1-\varepsilon_{n})}\,\int_{0}^{T_{\delta}}\Big{\\{}\int_{0}^{1}\frac{1}{\sigma(v^{n}_{t})}\,[\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,+\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}\,]^{2}\;dx\,-R^{n}_{t}\,\Big{\\}}\,dt\;,$

where
$R^{n}_{t}=\langle\,[P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}\,+\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}]/\sigma(v^{n}_{t})\,\rangle^{2}\,/\,\langle\,1/\sigma(v^{n}_{t})\rangle$.

Consider the limit, as $n\to\infty$, of the two previous displayed equations.
Since $\varepsilon_{n}\to 0$ and $c_{n}\to 0$ we may ignore these constants.
On the other hand, by (5.9),
$\varepsilon(\delta)\;\leq\;v^{n}_{t}\;\leq\;1\,-\,\varepsilon(\delta)$.
Therefore, as the semigroup $(P^{(N)}_{t}:t\geq 0)$ is continuous in
${\mathscr{L}}^{2}([0,1])$, we may replace in the previous equations
$P^{(N)}_{\widehat{\chi}_{n}(t)}\,M_{t}$,
$P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla v_{t}$ by $M_{t}$, $\nabla v_{t}$,
respectively, at a cost which vanishes as $n\to\infty$. Finally, as
$v^{n}_{t}\to v_{t}$ a.e., we conclude that

$\limsup_{n\to\infty}I^{(1)}_{[0,T_{\delta}]}(v^{n})\;\leq\;\frac{1}{4}\,\int_{0}^{T_{\delta}}\Big{\\{}\int_{0}^{1}\frac{1}{\sigma(v_{t})}\,[\,M_{t}\,+\,\nabla
v_{t}\,]^{2}\;dx\,-R^{\prime}_{t}\,\Big{\\}}\,dt\;,$

where $R^{\prime}_{t}=\langle\,[\,M_{t}\,+\,\nabla
v_{t}]/\sigma(v_{t})\rangle^{2}\,/\,\langle\,1/\sigma(v_{t})\rangle$. By
(5.10), this expression is equal to $R_{t}$, where $R_{t}\,=\,\langle\,\nabla
v_{t}/\sigma(v_{t})\rangle^{2}\,/\,\langle\,1/\sigma(v_{t})\rangle$. Hence, by
Lemma 4.4 [with $u_{t}$ replaced by $v_{t}$],

$\limsup_{n\to\infty}I^{(1)}_{[0,T_{\delta}]}(v^{n})\;\leq\;I^{(1)}_{[0,T_{\delta}]}(v)\;.$

We turn to $I^{(2)}_{[0,T_{\delta}]}(v^{n})$. By Lemma 4.3,

$I^{(2)}_{[0,T_{\delta}]}(v^{n})\;=\;\int_{0}^{T_{\delta}}\Phi^{v_{n}}(a^{n}_{t},b^{n}_{t})\;dt\;,$

where $a^{n}_{t}$, $b^{n}_{t}$ are given by (4.9), (4.3) with $u$ replaced by
$v^{n}$. To stress the dependence of $\Phi$ on $v_{n}$, we denoted this
functional by $\Phi^{v_{n}}$. However, as $v^{n}(t,1)=v(t,1)$,
$v^{n}(t,0)=v(t,0)$, $\Phi^{v_{n}}=\Phi^{v}$.

Let $\Xi^{n}$, $\Xi$ be given by (4.3) with $v^{n}$, $v$ in place of $u$,
respectively. As $v^{n}\to v$ almost everywhere, and since
$\varepsilon(\delta)\leq v^{n}\leq 1-\varepsilon(\delta)$, the continuous
function $\Xi^{n}$ converges to $\Xi$ pointwisely.

An elementary computation, similar to the one presented above when we examined
the rate function $I^{(1)}_{[0,T_{\delta}]}$, yields that

$\displaystyle a^{n}_{t}$
$\displaystyle=\;\langle\,(\,I\,-\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,)\,\partial_{t}\widehat{w}_{t}\,,\,1\,-\,\Xi^{n}_{t}\,\rangle\;-\;\langle\,(\,I\,-\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,)\,\nabla\widehat{w}_{t}\,,\,\nabla\Xi^{n}_{t}\,\rangle$
$\displaystyle\quad+\;\langle\,P^{(D)}_{\widehat{\chi}_{n}(t)}\,\partial_{t}v_{t}\,,\,1\,-\,\Xi^{n}_{t}\,\rangle\;-\;\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\,\nabla
v_{t}\,,\,\nabla\Xi^{n}_{t}\,\rangle$
$\displaystyle\quad\;+\;\widehat{\chi}_{n}^{\prime}(t)\,\langle\,v_{t}\,-\,\widehat{w}_{t}\,,\,\Delta
P^{(D)}_{\widehat{\chi}_{n}(t)}[1\,-\,\Xi^{n}_{t}]\,\rangle\;.$

Note that in the last term the operator $\Delta
P^{(D)}_{\widehat{\chi}_{n}(t)}$ is acting on $[1\,-\,\Xi^{n}_{t}]$ instead of
$v_{t}\,-\,\widehat{w}_{t}$, as in the first part of the proof. Here, we
simply used the fact that the semigroup $P^{(D)}_{r}$ is symmetric.

As $v_{t}\,-\,\widehat{w}_{t}$ vanishes at the boundary, an integration by
parts and (5.5) yield that the last term is equal to

$-\,\widehat{\chi}_{n}^{\prime}(t)\,\langle\,\nabla[v_{t}\,-\,\widehat{w}_{t}]\,,\,\nabla
P^{(D)}_{\widehat{\chi}_{n}(t)}[1\,-\,\Xi^{n}_{t}]\,\rangle\;=\;\widehat{\chi}_{n}^{\prime}(t)\,\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla[v_{t}\,-\,\widehat{w}_{t}]\,,\,\nabla\Xi^{n}_{t}\,\rangle\;,$

where we used that the semigroup $P^{(N)}_{s}$ is symmetric in
${\mathscr{L}}^{2}([0,1])$.

Since $\varepsilon(\delta)\leq v^{n}\leq 1-\varepsilon(\delta)$, there exists
a finite constant $C_{0}$ such that $|\,\Xi^{n}_{t}\,|\,\leq\,C_{0}$,
$|\,\nabla\Xi^{n}_{t}\,|\,\leq\,C_{0}$ for all $n\geq 1$, $0\leq t\leq
T_{\delta}$. Therefore, as
$\widehat{\chi}_{n}^{\prime}(t)\,=\,(1/n)\chi^{\prime}(t-\delta)$ and since
the operators $P^{(N)}_{s}$, $P^{(D)}_{s}$ are contractions in
${\mathscr{L}}^{2}([0,1])$, there exists a finite constant $C_{0}$ such that
$|\,a^{n}_{t}\,|^{2}\,\leq\,C_{0}\,\\{\,1\,+\,\langle\,(\partial_{t}v_{t})^{2}\,\rangle\,+\,\langle\,(\nabla
v_{t})^{2}\,\rangle\,\\}$ for all $n\geq 1$, $0\leq t\leq T_{\delta}$.
Moreover,

$\lim_{n\to\infty}\,\widehat{\chi}_{n}^{\prime}(t)\,\langle\,P^{(N)}_{\widehat{\chi}_{n}(t)}\nabla[v_{t}\,-\,\widehat{w}_{t}]\,,\,\nabla\Xi^{n}_{t}\,\rangle\;=\;0\;,$

and, as $\Xi^{n}_{t}\to\Xi_{t}$, $\nabla\Xi^{n}_{t}\to\nabla\Xi_{t}$ in
${\mathscr{L}}^{2}([0,1])$, for all $0\leq t\leq T_{\delta}$,

$\lim_{n\to\infty}a^{n}_{t}\;=\;a_{t}\;:=\;\langle\,\partial_{t}v_{t}\,,\,1\,-\,\Xi_{t}\,\rangle\;-\;\langle\,\nabla
v_{t}\,,\,\nabla\Xi_{t}\,\rangle\;.$ (5.12)

A similar bound and limit hold for the sequence $b^{n}_{t}$. Since $\Phi^{v}$
is continuous and the map
$t\mapsto\langle\,(\partial_{t}v_{t})^{2}\,\rangle\,+\,\langle\,(\nabla
v_{t})^{2}\,\rangle$ is integrable, by (4.13), (5.12) and the dominated
convergence theorem,

$\lim_{n\to\infty}\int_{0}^{T_{\delta}}\Phi^{v}(a^{n}_{t},b^{n}_{t})\;dt\;=\;\int_{0}^{T_{\delta}}\Phi^{v}(a_{t},b_{t})\;dt\;.$

By Lemma 4.3, the right-hand side is equal to $I^{(2)}_{[0,T_{\delta}]}(v)$.
Therefore,

$\lim_{n\to\infty}I^{(2)}_{[0,T_{\delta}]}(v^{n})\;=\;I^{(2)}_{[0,T_{\delta}]}(v)\;.$

Since $v^{n}=\tau_{\delta}u^{n}$, $v=\tau_{\delta}u$, adding together the
estimates on $I^{(1)}_{[0,T_{\delta}]}(v^{n})$ and
$I^{(2)}_{[0,T_{\delta}]}(v^{n})$, yield that

$\limsup_{n\to\infty}I_{[0,T_{\delta}]}(\tau_{\delta}u^{n})\;\leq\;I_{[0,T_{\delta}]}(\tau_{\delta}u)\;.$

By (3.3), this expression is bounded by $I_{[0,T]}(u\,|\,\gamma)$, which
completes the proof of the lemma in view of (5.7), (5.8). ∎

###### Proof of Theorem 5.2.

The first assertion follows from Lemma 5.7 and the definition of the set
$\Pi_{4}$.

Assume that there exists $\varepsilon_{0}>0$ such that
$\varepsilon_{0}\leq\gamma\leq 1-\varepsilon_{0}$. Fix $\pi\in
D([0,T],{\mathscr{M}})$ such that $I_{[0,T]}(\pi|\gamma)<\infty$. Let
$\pi^{n}(t,dx)=u^{n}(t,x)\,dx$ be the sequence in $\Pi_{\gamma}$ which
$I_{[0,T]}(\,\cdot\,|\gamma)$-approximates $\pi$ in the sense of Definition
5.1. Since $\pi^{n}$ belongs to $\Pi_{\gamma}$, there exists $\delta>0$ and
$\varepsilon>0$ such that $u^{n}_{t}=u^{(\gamma)}_{t}$ for $0\leq t\leq\delta$
and $\varepsilon\leq u^{n}(t,x)\leq 1-\varepsilon$ for all
$(t,x)\in[\delta,T]\times[0,1]$. By (B.4), there exists $\varepsilon_{1}>0$
such that $\varepsilon_{1}\leq u^{n}(t,x)\leq 1-\varepsilon_{1}$ for all
$(t,x)\in[0,\delta]\times[0,1]$. This completes the proof of the theorem. ∎

######  Remark 5.8.

The difference between the present context and [7] is that the rate function
is convex. We used this property to restrict our attention to trajectories
bounded away from $0$ and $1$ and smooth in time [that is to paths in
$\Pi_{3}$].

We conclude this section deriving the explicit formula for the rate functions
of trajectories in $\Pi_{\gamma}$.

###### Proof of Proposition 2.6.

As $u$ belongs to $\Pi_{\gamma}$, $u$ is smooth in $(0,T]\times[0,1]$, and for
each $0<t\leq T$, there exists $\delta=\delta(t)>0$ such that $\delta\leq
u(t,x)\leq 1-\delta$. Therefore, equation (2.15) is strictly elliptic and can
be solved explicitly. The solution $H$ inherits the smoothness from $u$. In
particular, it belongs to $C^{1,2}((0,T]\times[0,1])$.

As $u$ belongs to $\Pi_{\gamma}$, $u$ follows the hydrodynamic equation in a
time-interval $[0,{\mathfrak{t}}]$ for some ${\mathfrak{t}}>0$. Hence, for
$0<t\leq{\mathfrak{t}}$, the solution of (2.15) vanishes: $H(t,x)=0$ for all
$(t,x)\in[0,{\mathfrak{t}}]\times[0,1]$. Hence, $H$ actually belongs to
$C^{1,2}([0,T]\times[0,1])$.

We turn to the formula for the rate function. For a function $G$ in
$C^{1,2}([0,T]\times[0,1])$, let

$L_{T,G}(u)\;=\;\big{\langle}u_{T},G_{T}\big{\rangle}\;-\;\langle
u_{0},G_{0}\rangle\;-\;\int_{0}^{T}\big{\langle}u_{t},\partial_{t}G_{t}\big{\rangle}\;dt\;+\;\int_{0}^{T}\big{\langle}\nabla
u_{t},\nabla G_{t}\big{\rangle}\;dt\;.$

Multiply equation (2.15) by $G$, integrate over space and time, integrate by
parts in space, and recall the boundary conditions to get that

$\displaystyle L_{T,G}(u)$
$\displaystyle=\;2\,\int_{0}^{T}\big{\langle}\sigma(u_{t})\,\nabla
H_{t}\,,\,\nabla G_{t}\big{\rangle}\;dt$
$\displaystyle+\;\int_{0}^{T}\big{\\{}\,G_{t}(1)\,{\mathfrak{p}}_{\beta,B}\big{(}\,u_{t}(1)\,,\,H_{t}(1)\,\big{)}\;+\;G_{t}(0)\,{\mathfrak{p}}_{\alpha,A}\big{(}\,u_{t}(0)\,,\,H_{t}(0)\,\big{)}\,\big{\\}}\;dt\;.$

Insert this expression in (2.11) and add and subtract some terms to get that

$\displaystyle J_{T,G}(u)\;=$
$\displaystyle-\,\int_{0}^{T}\big{\langle}\sigma(u_{t})\,[\,\nabla
H_{t}\,-\,\nabla G_{t}\,]^{2}\big{\rangle}\;dt$
$\displaystyle-\;\frac{1}{A}\,\int_{0}^{T}[\,1-u_{t}(0)\,]\,\alpha\,\big{[}\,e^{G_{t}(0)}\,-\,e^{H_{t}(0)}\,-\,[G_{t}(0)-H_{t}(0)]\,e^{H_{t}(0)}\,\big{]}\;dt$
$\displaystyle-\;\frac{1}{A}\,\int_{0}^{T}u_{t}(0)\,(1-\alpha)\,\big{[}\,e^{-G_{t}(0)}\,-\,e^{-H_{t}(0)}\,-\,[G_{t}(0)-H_{t}(0)]\,e^{-H_{t}(0)}\,\big{]}\;dt$
$\displaystyle-\;{\mathfrak{B}}\;+\;{\mathbb{I}}_{[0,T]}(u)\;,$

where ${\mathbb{I}}_{[0,T]}(u)$ is the expression appearing on the right-hand
side of (2.16) and ${\mathfrak{B}}$ is a term similar to the second and third
lines of this formula with the left boundary conditions replaced by the right
ones. Since the expressions inside the integrals are all positive, the
supremum in $G$ is attained at $G=H$, so that

$I_{[0,T]}(u)\;=\;\sup_{G}J_{T,G}(u)\;=\;{\mathbb{I}}_{[0,T]}(u)\;,$

which completes the proof of the lemma. ∎

##  6\. Proof of Theorem 2.7

In this section, we prove the dynamical large deviations. The strategy is by
now classical and we just indicate the main steps. The main point here is that
the dynamics can be considered as a small perturbation of the exclusion
process with Neumann boundary conditions (the process induced by the generator
$L^{\rm bulk}_{N}$) because the boundary dynamics is speeded-up only by $N$.

The reversible stationary measures for the exclusion process with Neumann
boundary conditions are the uniform measures with a fixed total number of
particles. The grand canonical versions are the product Bernoulli measures
with a fixed density. For this reason, we take one of these measures as
reference measure.

There is an important difference between our model and the exclusion process
with Dirichlet boundary conditions. Recall the definition the functional
$J_{T,H}$ introduced in (2.10) and (2.11). For the sake of this discussion,
denote by $J^{\rm DBC}_{T,H}$ the corresponding functional in the context of
exclusion dynamics with Dirichlet boundary conditions [3, 7, 17, 20]. While
$J^{\rm DBC}_{T,H}$ is defined on the set $D([0,T],{\mathscr{M}}_{\rm ac})$,
in the present context, the functionals $J_{T,H}$ are defined only on the
subset $D_{{\mathcal{E}}}([0,T],{\mathscr{M}}_{\rm ac})$ of trajectories with
finite energy because only for such trajectories are the boundary densities
well defined. As a consequence, in the two-blocks estimate, the usual
empirical density,
$(2N\varepsilon+1)^{-1}\sum_{y\in\Lambda_{N},|y-x|<\varepsilon}\eta_{y}$
which, as a function of $x$, has jumps needs to be replaced by a smooth
approximation. See (6.1) below.

### A super-exponential estimate

We follow the proofs presented in [7, Section 3], [17, Section 6], [20].
Denote by
$\color[rgb]{.2,0.2,.8}\definecolor[named]{pgfstrokecolor}{rgb}{.2,0.2,.8}\nu_{N}$
the Bernoulli product measure on $\Omega_{N}$ with density $1/2$ and by
${\mathbb{D}}_{N}$ the Dirichlet form given by

${\mathbb{D}}_{N}(f)\;:=\;\langle\,-\,L^{\rm
bulk}_{N}f\,,\,f\,\rangle_{\nu_{N}}\;,\quad
f\colon\Omega_{N}\to{\mathbb{R}}_{+}\;.$

Next result is [7, Lemma 3.1] adapted to the present context. The proof is
elementary and left to the reader. It relies on a Schwarz inequality.

######  Lemma 6.1.

There exists a finite constant $C_{0}$, which only depends on the parameters
$\alpha$, $\beta$, $A$, $B$, such that

$\langle\,{\mathscr{L}}_{N}f\,,\,f\,\rangle_{\nu_{N}}\;\leq\;-\,{\mathbb{D}}_{N}(f)\;+\;C_{0}\,N\,E_{\nu_{N}}[\,f^{2}\,]$

for all $f\colon\Omega_{N}\to{\mathbb{R}}_{+}$.

Given a cylinder function $h$, that is a function on
$\\{0,1\\}^{{\mathbb{Z}}}$ depending on $\eta_{x}$, $x\in{\mathbb{Z}}$, only