[proofplan]
The proof has two directions. First assume the pointwise classical equation holds; if a $C^1$ [test function](/page/Test%20Function) touches $u$ from above or below, then $u-\phi$ has an interior local extremum, so the first-derivative criterion for an interior extremum forces the time derivative and spatial gradient of $\phi$ to agree with those of $u$ at the contact point. Substituting this common first-order jet into the classical equality gives the required viscosity inequality, in fact with equality. Conversely, if $u$ is a viscosity solution, test with $\phi=u$ at an arbitrary point; the difference $u-\phi$ is identically zero, so it has both a local maximum and a local minimum, yielding both inequalities and hence equality.
[/proofplan]
[step:Show that a classical solution satisfies both viscosity inequalities]
Assume that
\begin{align*}
F(t,x,u(t,x),\partial_t u(t,x),\nabla_x u(t,x)) = 0
\end{align*}
for every $(t,x) \in Q$.
Let $(t_0,x_0) \in Q$. Let $V \subset \mathbb{R} \times \mathbb{R}^n$ be an open neighbourhood of $(t_0,x_0)$, and let
\begin{align*}
\phi: V \to \mathbb{R}
\end{align*}
be a $C^1$ test function. Since $Q$ is open and $(t_0,x_0) \in Q \cap V$, there exists $\rho > 0$ such that the open Euclidean ball $B((t_0,x_0),\rho)$, defined by
\begin{align*}
B((t_0,x_0),\rho) = \{(s,y) \in \mathbb{R} \times \mathbb{R}^n : |(s,y)-(t_0,x_0)| < \rho\},
\end{align*}
satisfies
\begin{align*}
B((t_0,x_0),\rho) \subset Q \cap V.
\end{align*}
Define
\begin{align*}
w: B((t_0,x_0),\rho) \to \mathbb{R}
\end{align*}
by
\begin{align*}
w(t,x) = u(t,x)-\phi(t,x).
\end{align*}
Then $w$ is $C^1$ on $B((t_0,x_0),\rho)$.
Suppose first that $u-\phi$ has a local maximum at $(t_0,x_0)$ relative to $Q \cap V$. After decreasing $\rho$ if necessary, $w$ has a local maximum at $(t_0,x_0)$ in the [open set](/page/Open%20Set) $B((t_0,x_0),\rho)$. Let $e_0=(1,0,\dots,0) \in \mathbb{R}^{n+1}$ and, for each $j \in \{1,\dots,n\}$, let $e_j \in \mathbb{R}^{n+1}$ be the coordinate vector whose spatial $j$-th component is $1$ and whose other components are $0$. For each coordinate direction $e_j$ with $j \in \{0,1,\dots,n\}$, the one-variable map $s \mapsto w((t_0,x_0)+s e_j)$ is $C^1$ for all sufficiently small $s$ and has a local maximum at $s=0$. Hence its derivative at $0$ is zero, so every first partial derivative of $w$ at $(t_0,x_0)$ is zero. Therefore
\begin{align*}
\partial_t u(t_0,x_0)-\partial_t \phi(t_0,x_0) = 0
\end{align*}
and
\begin{align*}
\nabla_x u(t_0,x_0)-\nabla_x \phi(t_0,x_0) = 0.
\end{align*}
Thus
\begin{align*}
\partial_t \phi(t_0,x_0) = \partial_t u(t_0,x_0)
\end{align*}
and
\begin{align*}
\nabla_x \phi(t_0,x_0) = \nabla_x u(t_0,x_0).
\end{align*}
Substitution into the assumed classical equality at $(t_0,x_0)$ gives
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) = 0.
\end{align*}
In particular,
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) \le 0.
\end{align*}
Hence $u$ is a viscosity subsolution.
The same coordinate-direction argument applies when $u-\phi$ has a local minimum at $(t_0,x_0)$ relative to $Q \cap V$: every first partial derivative of $w$ at the contact point is again zero, so the first-order jets of $u$ and $\phi$ agree at $(t_0,x_0)$, and the classical equality gives
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) = 0.
\end{align*}
Therefore
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) \ge 0.
\end{align*}
Hence $u$ is a viscosity supersolution. Therefore $u$ is a viscosity solution.
[guided]
Assume that $u$ satisfies the classical equation pointwise:
\begin{align*}
F(t,x,u(t,x),\partial_t u(t,x),\nabla_x u(t,x)) = 0
\end{align*}
for every $(t,x) \in Q$.
We must prove the two viscosity inequalities. Fix an arbitrary point $(t_0,x_0) \in Q$, an arbitrary open neighbourhood $V \subset \mathbb{R} \times \mathbb{R}^n$ of $(t_0,x_0)$, and an arbitrary $C^1$ test function
\begin{align*}
\phi: V \to \mathbb{R}.
\end{align*}
Because $Q$ is open and $V$ is open, the contact point is an interior point of $Q \cap V$. Thus there is a number $\rho > 0$ such that the Euclidean ball $B((t_0,x_0),\rho)$, defined by
\begin{align*}
B((t_0,x_0),\rho) = \{(s,y) \in \mathbb{R} \times \mathbb{R}^n : |(s,y)-(t_0,x_0)| < \rho\},
\end{align*}
satisfies
\begin{align*}
B((t_0,x_0),\rho) \subset Q \cap V.
\end{align*}
This reduction to an actual open ball is what lets us use one-variable derivatives along the Euclidean coordinate directions $(t,x)$.
Define the difference function
\begin{align*}
w: B((t_0,x_0),\rho) \to \mathbb{R}
\end{align*}
by
\begin{align*}
w(t,x) = u(t,x)-\phi(t,x).
\end{align*}
Since both $u$ and $\phi$ are $C^1$ on this ball, $w$ is $C^1$ there.
Suppose first that $\phi$ touches $u$ from above in the viscosity sense, meaning that $u-\phi$ has a local maximum at $(t_0,x_0)$ relative to $Q \cap V$. By shrinking $\rho$ if needed, this becomes a local maximum of $w$ on the open ball $B((t_0,x_0),\rho)$. We now prove directly that all first partial derivatives vanish at the contact point. For the time direction, the one-variable map $s \mapsto w(t_0+s,x_0)$ is $C^1$ for all sufficiently small $s$ and has a local maximum at $s=0$, so its derivative at $0$ is zero. For each spatial index $i \in \{1,\dots,n\}$, the one-variable map $s \mapsto w(t_0,x_0+s e_i)$ is also $C^1$ for all sufficiently small $s$ and has a local maximum at $s=0$, where $e_i \in \mathbb{R}^n$ is the $i$-th coordinate vector. Hence
\begin{align*}
\partial_t w(t_0,x_0) = 0
\end{align*}
and, for each spatial index $i \in \{1,\dots,n\}$,
\begin{align*}
\partial_{x_i} w(t_0,x_0) = 0.
\end{align*}
Using the definition $w=u-\phi$, this gives
\begin{align*}
\partial_t u(t_0,x_0)-\partial_t \phi(t_0,x_0) = 0
\end{align*}
and, for each $i \in \{1,\dots,n\}$,
\begin{align*}
\partial_{x_i}u(t_0,x_0)-\partial_{x_i}\phi(t_0,x_0) = 0.
\end{align*}
Equivalently,
\begin{align*}
\partial_t \phi(t_0,x_0) = \partial_t u(t_0,x_0)
\end{align*}
and
\begin{align*}
\nabla_x \phi(t_0,x_0) = \nabla_x u(t_0,x_0).
\end{align*}
Now evaluate the assumed classical equation at the contact point $(t_0,x_0)$:
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t u(t_0,x_0),\nabla_x u(t_0,x_0)) = 0.
\end{align*}
Because the first derivatives of $u$ and $\phi$ agree at the contact point, this is the same as
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) = 0.
\end{align*}
In particular the left-hand side is less than or equal to $0$, which is exactly the viscosity subsolution inequality.
The supersolution inequality is obtained from the identical coordinate-direction argument at a local minimum. If $u-\phi$ has a local minimum at $(t_0,x_0)$, then the same function $w=u-\phi$ has an interior local minimum after restricting to a sufficiently small ball. Applying the preceding one-variable argument to $s \mapsto w(t_0+s,x_0)$ and to $s \mapsto w(t_0,x_0+s e_i)$ for each spatial index gives
\begin{align*}
\partial_t \phi(t_0,x_0) = \partial_t u(t_0,x_0)
\end{align*}
and
\begin{align*}
\nabla_x \phi(t_0,x_0) = \nabla_x u(t_0,x_0).
\end{align*}
Substituting these equalities into the classical equation gives
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t \phi(t_0,x_0),\nabla_x \phi(t_0,x_0)) = 0.
\end{align*}
In particular the left-hand side is greater than or equal to $0$, which is the viscosity supersolution inequality. Since the point and test function were arbitrary, $u$ is both a viscosity subsolution and a viscosity supersolution, hence a viscosity solution.
[/guided]
[/step]
[step:Use $u$ itself as the test function to recover the classical equality]
Conversely, assume that $u$ is a viscosity solution. Fix an arbitrary point $(t_0,x_0) \in Q$. Since $Q$ is open, there exists $\rho > 0$ such that
\begin{align*}
B((t_0,x_0),\rho) \subset Q.
\end{align*}
Use the test function
\begin{align*}
\phi: B((t_0,x_0),\rho) \to \mathbb{R}
\end{align*}
defined by
\begin{align*}
\phi(t,x) = u(t,x).
\end{align*}
This map is $C^1$ because $u \in C^1(Q)$. The difference $u-\phi$ is identically zero on $B((t_0,x_0),\rho)$, so it has both a local maximum and a local minimum at $(t_0,x_0)$.
Since $u$ is a viscosity subsolution, applying the subsolution inequality to this test function gives
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t u(t_0,x_0),\nabla_x u(t_0,x_0)) \le 0.
\end{align*}
Since $u$ is a viscosity supersolution, applying the supersolution inequality to the same test function gives
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t u(t_0,x_0),\nabla_x u(t_0,x_0)) \ge 0.
\end{align*}
Combining the two inequalities yields
\begin{align*}
F(t_0,x_0,u(t_0,x_0),\partial_t u(t_0,x_0),\nabla_x u(t_0,x_0)) = 0.
\end{align*}
Because $(t_0,x_0) \in Q$ was arbitrary, the classical equation holds at every point of $Q$.
[/step]