Deterministic function that gives Snell envelope I am studying for an exam and would love some hint on this review problem.

Suppose the discrete-time process $(S_t)_{0 \leq t \leq T}$ have $i.i.d.$ increments. Fix a measurable function $f:\mathbb{R} \to \mathbb{R}$ and define $Z_t = f(S_t)$, suppose $Z$ is integrable. Let $U$ be the Snell envelope of $Z$. Show that exists a deterministic function $V$ such that $U_t = V(t, S_t)$.

This is the second part of the problem. Previously I have shown that for a Snell envelope $U$ of $Z$, $U$ is a martingale if $Z$ is a submartingale, $U =Z$ almost surely if $Z$ is a supermartingale, and that $U$ is a supermartingale almost directly from definition. I would like some help on the existence of $V$.
I am thinking of dividing the increments of $S$ into different cases (positive, zero, and negative expectation) as this makes $S$ into sub, super and true martingales.
 A: Notice that the Snell envelope can be constructed as $U_T=Z_T$ and for $0\leqslant t\leqslant T-1$,
$$\tag{*}
U_t=\max\left\{Z_t,\mathbb E\left[U_{t+1}\mid\mathcal F_t\right]\right\},
$$
where $\mathcal F_t$ is the $\sigma$-algebra generated by $S_k,0\leqslant k\leqslant t$, which is the general formula. Note that $\mathcal F_t$ is generated by the i.i.d. vector $(S_0,S_1-S_0,\dots,S_t-S_{t-1})$.
Note that $U_T=Z_T=f(S_T)$ hence we can define $v(T,x)=f(x)$.
Also,
$$
U_{T-1}=\max\left\{Z_{T-1},\mathbb E\left[Z_T\mid\mathcal F_{T-1}\right]\right\}= \max\left\{f\left(S_{T-1}\right),\mathbb E\left[f\left(S_{T}\right)\mid\mathcal F_{T-1}\right]\right\}.
$$
Using the property $\mathbb E[g(U,V)\mid U]=G(U)$ with $G(u)=\mathbb E[g(u,V)]$ valid for independent random vectors $U$ and $V$, we get that $\mathbb E\left[f\left(S_{T}\right)\mid\mathcal F_{T-1}\right]=G(S_{T-1})$ with $G(x)=\mathbb E[f(x+S_1-S_0)]$ hence
$U_{T-1}=v(T-1,S_{T-1})$ with $v(T-1,x)=\max\{f(x),g(x)\}$.
Now suppose that $v(T,\cdot),\dots,v(t_0+1,\cdot )$ are functions such that $v(t,S_t)=U_t$ for each $t\in\{t_0+1,\dots,T\}$. Then
$$
U_{t_0}=\max\left\{Z_{t_0}\mathbb E\left[U_{t_0+1}\mid\mathcal F_{t_0}\right]\right\}=\max\left\{f(S_{t_0}),\mathbb E\left[v(t_0+1,S_{T_0+1})\mid\mathcal F_{t_0}\right]\right\}
$$
and since $\mathbb E\left[v(t_0+1,S_{T_0+1})\mid\mathcal F_{t_0}\right]=H(S_{T_0})$ with $H_{t_0}(x)=\mathbb E\left[v(t_0+1,x+S_1-S_0)\right]$, we can take $v(t_0,x)=\max\{f(x),H_{t_0}(x)\}$.
