\nonumber \\ &= c_{k+\kappa}+\gamma \left.\tensor*[^K]{\!Q}{_{\kappa+1}}\right|_{{\boldsymbol{u}}^*_{k+\kappa+1}}\label{Q_def1}
    \end{aligned}$$ where $$\begin{aligned}
            c_i&=c\left({\boldsymbol{x}}_{i}, {\boldsymbol{u}}_{i}, {\boldsymbol{r}}_{i}\right),\label{eq:c}\\
        \tensor*[^K]{\!Q}{_{\kappa}}&=Q_{K-\kappa}\left({\boldsymbol{x}}_{k+\kappa}, {\boldsymbol{u}}_{k+\kappa}, {\boldsymbol{r}}_{k+\kappa}, \dots, {\boldsymbol{r}}_{k+K}\right),\label{eq:Q}\\
                \tensor*[^K]{\!Q}{_{K}}&=c\left({\boldsymbol{x}}_{k+K},{\boldsymbol{u}}_{k+K},{\boldsymbol{r}}_{k+K}\right)\label{eq:QNN}.
    \end{aligned}$$ Here, $\kappa\in\mathbb{N}_0$, $\kappa < K$ denotes the time step on the current optimization horizon of length $K$ starting at $k$ and ${\boldsymbol{r}}_i={\boldsymbol{0}}$, $\forall i>k+N$ (see ). The notation $\left.c_i\right|_{{\boldsymbol{u}}_i^*}$ indicates that the optimal control ${\boldsymbol{u}}_i^*$ is applied in and $\left.\tensor*[^K]{\!Q}{_{\kappa+1}}\right|_{{\boldsymbol{u}}^*_{k+\kappa+1}}$ denotes that ${\boldsymbol{u}}_{k+\kappa+1}={\boldsymbol{u}}^*_{k+\kappa+1}$ in $\tensor*[^K]{\!Q}{_{\kappa+1}}$ (cf. ).

Therefore, $\tensor*[^K]{\!Q}{_{\kappa}}$ is the accumulated discounted cost from time step $k+\kappa$ to $k+K$ if the control ${\boldsymbol{u}}_{k+\kappa}$ is applied at time step $k+\kappa$ and the optimal controls ${\boldsymbol{u}}^*_{k+\kappa+1}, \dots, {\boldsymbol{u}}^*_{k+K}$ minimizing the cost-to-go are applied thereafter while the reference is provided on a moving horizon of length $N$. With the finite horizon cost function defined as $$\begin{aligned}
\label{eq:JkK}
\tensor*[^K]{\!J}{_k} = \sum_{i=k}^{k+K}\gamma^{i-k}\frac{1}{2}\left({\boldsymbol{e}}_i^\intercal{\boldsymbol{Q}}{\boldsymbol{e}}_i + {\boldsymbol{u}}_i^\intercal{\boldsymbol{R}}{\boldsymbol{u}}_i\right)\end{aligned}$$ the subsequent Lemma \[lemmauQisuJ\] follows.

\[lemmauQisuJ\] The control ${\boldsymbol{u}}_k$ minimizing the reference-dependent Q-function $\tensor*[^K]{\!Q}{_{0}}$ is a solution for ${\boldsymbol{u}}_k^*$ minimizing $\tensor*[^K]{\!J}{_k}$.

With and $$\begin{aligned}
\label{eq:minuQ}
    \min_{{\boldsymbol{u}}_k}\tensor*[^K]{\!Q}{_{0}}&=\left.c_k\right|_{{\boldsymbol{u}}^*_k}+\gamma \left.\tensor*[^K]{\!Q}{_{1}}\right|_{{\boldsymbol{u}}^*_{k+1}}\nonumber \\ &=\left.\tensor*[^K]{\!Q}{_{0}}\right|_{{\boldsymbol{u}}^*_k}=\sum_{i=k}^{k+K}\gamma^{i-k}\left.c_i\right|_{{\boldsymbol{u}}^*_i}
    \end{aligned}$$ follows $$\begin{aligned}
    \min_{{\boldsymbol{u}}_{k}, \dots, {\boldsymbol{u}}_{k+K}}\tensor*[^K]{\!J}{_k}&=\sum_{i=k}^{k+K}\gamma^{i-k}\left.c_i\right|_{{\boldsymbol{u}}^*_i}=\left.\tensor*[^K]{\!Q}{_{0}}\right|_{{\boldsymbol{u}}^*_k}.
    \end{aligned}$$

Taking the limit $$\begin{aligned}
\lim_{K\rightarrow\infty}\tensor*[^K]{\!J}{_k}=J_k\end{aligned}$$ yields $J_k$ (cf. ). With the Q-function $\tensor*[^K]{\!Q}{_{0}}$ defined according to Definition \[def:Q\] and as a result of Lemma \[lemmauQisuJ\], Problem \[problem1\] is equivalent to the following Problem \[problem2\].

\[problem2\] Given 