A Certified Reduced Basis Method for Linear Parametrized Parabolic Optimal Control Problems in Space-Time Formulation

Abstract: In this work, we propose to efficiently solve time dependent parametrized optimal control problems governed by parabolic partial differential equations through the certified reduced basis method. In particular, we will exploit an error estimator procedure, based on easy-to-compute quantities which guarantee a rigorous and efficient bound for the error of the involved variables. First of all, we propose the analysis of the problem at hand, proving its well-posedness thanks to Nečas - Babuška theory for distributed and boundary controls in a space-time formulation. Then, we derive error estimators to apply a Greedy method during the offline stage, in order to perform, during the online stage, a Galerkin projection onto a low-dimensional space spanned by properly chosen high-fidelity solutions. We tested the error estimators on two model problems governed by a Graetz flow: a physical parametrized distributed optimal control problem and a boundary optimal control problem with physical and geometrical parameters. The results have been compared to a previously proposed bound, based on the exact computation of the Babuška inf-sup constant, in terms of reliability and computational costs. We remark that our findings still hold in the steady setting and we propose a brief insight also for this simpler formulation.

\section{Space-Time discretization: the High Fidelity problem}
\label{FEM}
This Section deals with the discretization of the optimality system \eqref{global}. The space-time approximation is a very intuitive approximation strategy already employed in several works, see e.g. \cite{Glas2017, HinzeStokes, hinze2008optimization, HinzeNS, Langer2020, yano2014space, yano2014space1, urban2012new}. First of all, we prove the well-posedness of the discretized problem indipendently from the discretization in time. With respect to space discretization,  we will employ the Finite Element (FE) approximation.
Then, we will present the algebraic structure of the all-at-once space-time problem for time dependent and for steady governing equations. The whole framework will be denoted as \emph{high-fidelity approximation}, in contrast with the \emph{reduced approximation}, which will be treated in Section \ref{sec_ROM}.

\subsection{{Space-time discretization} and well-posedness}
To solve the discretized version of \eqref{global}, first of all we define the FE function space $Y^{N_h} =
 Y \cap\Cal X_{1}$, where
$$
 \mathcal X_1 = \{ s \in C^0(\overline \Omega) \; : \; s |_{K} \in \mbb P^1, \; \; \forall K \in \Cal T  \},
$$
where $K$ is an element of a triangularization $\Cal T$ of the spatial domain $\Omega$ and $\mathbb P^1$ is the space of polynomials of degree at most one.  We can now define the {semi-discrete} function spaces
 $ \Cal Y^{N_h} = \Big \{
y \in L^2(0,T; Y^{N_h}) \;\; \text{s.t.} \;\;  \dt{y} \in L^2(0,T; {(Y^{N_h})}^{\ast})\Big \}$
and  $\Cal Q^{N_h} = L^2(0,T; Y^{N_h})$.
 {After a further discretization of the time interval $[0,T]$ (more details will be provided in the next subsection), the corresponding space-time discrete spaces are denoted by $\Cal Y^{N_h}_{N_t}$ and $\Cal Q^{N_h}_{N_t}$, respectively, where $N_t$ denotes the cardinality of the time discretization. We remark that}, regardless of the time discretizion scheme, at the discrete level $\Cal Y^{N_h}_{N_t} = \Cal Q^{N_h}_{N_t}$ Indeed, it is clear that  $\Cal Y^{N_h}_{N_t} \subset \Cal Q^{N_h}_{N_t}$, by definition. {Moreover}, it is also straightforward to show that $\Cal Q^{N_h}_{N_t} \subset \Cal Y_{N_t}^{N_h}$: for $y \in \Cal Q^{N_h}_{N_t}$, its time derivative will be approximated by composition of functions in $Y^{N_h}$ (i.e. solutions at different time steps). This leads to $ \displaystyle \dt{y} \in \Cal Q^{N_h}_{N_t} \subset L^2(0,T; {(Y^{N_h})}^{\ast})_{N_t}$, exploiting
$$
Y^{N_h} \hookrightarrow  Y \hookrightarrow H \hookrightarrow Y\dual \hookrightarrow  (Y^{N_h})\dual.
$$
Namely, $\Cal Q^{N_h}_{N_t} \subset \Cal Y_{N_t}^{N_h}$, then $\Cal Y^{N_h}_{N_t} = \Cal Q_{N_t}^{N_h}$. \\
For the sake of clarity, from now on, we will consider the space-time discretized space $\Cal Q \disc := \Cal Q_{N_t}^{N_h} = \Cal Y\disc := \Cal Y^{N_h}_{N_t}$, of dimension $\Cal N = N_h \cdot N_t$. Furthermore, we will use the same space also for the adjoint variable. In other words, there is no difference between space-time state and adjoint space and $\Cal Q \disc$. The discretized problem is: given $\bmu \in \Cal P$ and observation $y_{\text{d}}\disc\in \Cal Q \disc$, find the pair $(y\disc, q\disc) \in \Cal Q \disc \times \Cal Q \disc$ such that

\begin{equation}
\label{global_FE}
\Cal B((y\disc, p\disc), (z, q); \bmu) =\big \la \Cal F(\bmu), (z, q)\big \ra \quad \forall (z, q) \in \Cal Q\disc \times \Cal Q\disc.
\end{equation}
We now prove the well-posedness of the space-time problem \eqref{global_FE} {which, as in the continous case, requires an application of the} Ne\v{c}as-Babu\v{s}ka theorem {by assuring both a discrete} inf-sup stability condition in the discretized space $\Cal Q \disc$ and a continuity property {of the discrete system. Since the latter is directly inherited from the continuous system\footnote{Since $\Cal Y \disc = \Cal Q \disc$, the norms $\norm{\cdot}_{\Cal Y}$ and  $\norm{\cdot}_{\Cal Q}$ are equivalent.}, in the following Lemma we focus on proving} the inf-sup stability condition with respect to the discretized spaces.
\begin{lemma}[{Discrete} Surjectivity of $\Cal B \dual$] The bilinear form \eqref{global_FE} {satisfies} the following inf-sup stability condition: {there exists $\beta\disc(\bmu) > 0$ such that}
\label{lemma_surj_FE}
\begin{equation}
\label{surj_FE}
\beta_{\Cal B}\disc(\bmu) \eqdot \inf_{(y,p) \in (\Cal Q \disc\times \Cal Q\disc)\setminus \{(0,0)\}}\sup_{(z,q) \in  (\Cal Q\disc \times \Cal Q\disc)\setminus \{(0,0)\}} \frac{\Cal B((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}} \geq \beta\disc(\bmu) > 0.
\end{equation}
\end{lemma}

\begin{proof}
\underline{Case 1}. First of all, we consider the case $\Omega_u = \Omega_{\text{obs}}$.
In this case choosing
$(z,q) \equiv (\alpha y,p)$ and applying the usual relation $c(p, y; \bmu) = m(y, p; \bmu)$, \eqref{s_T} and the coercivity of the state equation, we obtain
\begin{align*}
\label{u_equal_obs}
\nonumber
\sup_{(z,q) \in (\Cal Q \disc \times \Cal Q \disc)\setminus \{(0,0)\}}
\frac{\Cal B((y,p), (z,q); \bmu)}{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}}
& \geq \frac{\Cal B((y,p), (\alpha y,p); \bmu)}{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{\alpha y}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}}\\
& = \frac{ \alpha c_S(\bmu)\norm{y(T)}^2_H + \alpha \gamma_a(\bmu)\norm{y}_{\Cal Q}^2 + c_S(\bmu)\norm{p(0)}^2_H + \gamma(\bmu) \norm{p}_{\Cal Q}^2}{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\\
& \geq \frac{\min \{\alpha \gamma_a(\bmu), \gamma_a(\bmu) \} (\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2)}{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2} \\ \nonumber
& \geq \alpha \gamma_a(\bmu).
\end{align*}
\underline{Case 2. }We now deal with the case $\Omega_u \neq \Omega_{\text{obs}}$. Furthermore, without loss of generality, we assume $\Omega_{\text{obs}}$ a proper subset of the whole spatial domain\footnote{Also for the FE case the arguments of Footnote \ref{foot_1} and Remark \ref{remark_omega_u} hold. }. In this case we consider $\kappa \in \Cal Y\disc = \Cal Q \disc$, solution to problem \eqref{auxiliary_kappa} with $c_y = 1$. Choosing $(z,q) = (y, p + \kappa)$ and {recalling} properties \eqref{w_kappa}, the following holds:
\begin{align*}
\nonumber
\sup_{(z,q) \in (\Cal Q \disc \times \Cal Q \disc)\setminus \{(0,0)\}}
\frac{\Cal B((y,p), (z,q); \bmu)}{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}}
&  \geq \frac{\Cal B((y,p), (y, p + \kappa); \bmu)}{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{y}_{\Cal Q}^2 + 2(\norm{p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2})} \\
& = \frac{ c_S(\bmu)\norm{y(T)}^2_H +  \gamma_a(\bmu)\norm{y}_{\Cal Q}^2 + c_S(\bmu)\norm{p(0)}^2_H + \gamma(\bmu) \norm{p}_{\Cal Q}^2}{ \sqrt{2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2}} \\
& \quad +  \frac{ \displaystyle \intTime{m(y,p;\bmu)} - \frac{1}{\alpha}\intTime{ c(p, y; \bmu)}}{ \sqrt{2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2}} \\
&  \quad + \frac{ \displaystyle  \intTime{m(y, \kappa; \bmu)} + \intTime{s(\kappa, p; \bmu)} + \intTime{a(\kappa, p; \bmu)}}{ \sqrt{2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2}} \\
&\geq  \frac{ \gamma_a(\bmu)(\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2)}{ \sqrt{2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2}}.
\end{align*}
To complete the proof, we need the following upper bound for some $\bar c > 0$:
\begin{equation*}
 \norm{\kappa}_{\Cal Q} \leq \bar c \norm{y}_{\Cal Q}.
\end{equation*}
{Towards this goal}, we can use relation \eqref{leq_kappa}, with $c_y = 1$ leading to $\displaystyle \bar c = \frac{c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}$.
Finally, this {results in} the following estimate:
\begin{equation*}
\label{last_u_not_obs}
\sup_{(z,q) \in (\Cal Q \disc \times \Cal Q \disc)\setminus \{(0,0)\}}
\frac{\Cal B((y,p), (z,q); \bmu)}{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}}
\geq \frac{\gamma_a(\bmu)}{\sqrt{2(\max\{ 1, \bar c ^2\})}}.
\end{equation*}
Since the proved relations does not depend on the choice of $(y,p) \in \Cal Q \times \Cal Q$, then the inf-sup condition \eqref{surj_FE} for both the cases.
\end{proof}
We now have all the ingredients to prove the well-posedness of the space-time discretized problem \eqref{global_FE}, indeed, the finite dimensional Ne\v cas-Babu\v ska holds due to continuity of \eqref{global_FE} and Lemma \ref{lemma_surj_FE}. We remark that there is no need to prove a finite dimensional {equivalent to} \eqref{inj}  (the interested reader may refere to \cite{Babuska1971,xu2003some}), since at the discrete level \eqref{surj_FE} is equivalent to
\begin{equation*}
 \inf_{(z,q) \in (\Cal Q \disc\times \Cal Q\disc)\setminus \{(0,0)\}}\sup_{(y,p) \in  (\Cal Q\disc \times \Cal Q\disc)\setminus \{(0,0)\}} \frac{\Cal B((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{\Cal Q}^2 + \norm{p}_{\Cal Q}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}}.
\end{equation*}
As a conseguence we can state the following theorem:
\begin{theorem}
\label{theorem_right}
For a given $\bmu \in \Cal P$ and observation $y_{\text{d}} \in \mathcal Y_{\text{obs}}\disc$, the problem \eqref{global_FE} has a unique solution in $(y, p) \in \Cal Q\disc \times \Cal Q \disc$.
\end{theorem}
\begin{remark}[Steady Case]
In the steady cases, we deal with a standard FE discretization, i.e. $\Cal N = N_h$. In this case, the optimization problem reads: given $\bmu \in \Cal P$, and an observation in
$Y_{\text{obs}}^{N_h}$, find the pair $(y,p) \in Y^{N_h} \times Y^{N_h}$ such that
\begin{equation}
\label{global_s_FE}
\Cal B_s((y,p), (z,q)) = \left \la \Cal F_s (\bmu), (z,q) \right \ra  \quad \forall (z,q) \in  Y^{N_h} \times Y^{N_h}.
\end{equation}
Also in this case we can prove the following theorem:
\begin{theorem}
\label{s_FE}
For a given $\bmu \in \Cal P$ and for a given observation $y_{\text{d}} \in Y_{\text{obs}}^{N_h}$, problem \eqref{global_s_FE} has a unique solution $(y,p) \in Y^{N_h} \times Y^{N_h}$.
\end{theorem}
\begin{proof}
Once again, the statement is a simple consequence of the Ne\v cas-Babu\v ska theorem: indeed, the continuity is directly inherited from the continuous formulation of the bilinear forms at hand and, furthermore, we can use the same arguments of Lemma \ref{lemma_surj_s} in order to define
\begin{align*}
\label{surj_s_FE}
\beta_{{\Cal B}_s}^{N_h}(\bmu) \eqdot \inf_{(y, p) \in  (Y^{N_h}\times  Y^{N_h})\setminus \{(0,0)\}}\sup_{(z, q) \in ( Y^{N_h} \times  Y^{N_h})\setminus \{(0,0)\}} \frac{\Cal B_s((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{Y}^2 + \norm{p}_{Y}^2}\sqrt{\norm{z}_{Y}^2 + \norm{q}_{Y}^2}},\\
\end{align*}
and prove that $\beta_{{\Cal B}_s}^{N_h} \geq \beta_s^{N_h}(\bmu) > 0.$
\end{proof}
\end{remark}
To conclude, we recall that Remark \ref{remark_omega_u_s} is valid also at the high-fidelity level.
In the next Section we are going to analyse the algebraic structure {corresponding to the space-time discretization}.
\subsection{Space-Time All-At-Once Algebraic System}
We now specify the algebraic {formulation of the space-time discretization}. We recall that we used a space FE approximation using $\mathbb P^1-\mathbb P^1$ pair for state and adjoint variables. {For what concerns} time discretization,  we divide the time interval $[0,T]$ in $N_t$ equispaced subintervals of length $\Delta t$. With $t_k = k\Delta t$ for $k = 0, \dots, N_t$, we will refer to a generic time instance. As already specified, at each time we can consider the variables $y\disc_k$ and $p\disc_k$ in $Y^{N_h}$ {to be} represented through FE basis functions $\{\phi^i\}_{i=1}^{N_h}$ as follows
$$
y\disc_k = \sum_{1}^{N_h}y^{i}_k \phi^{i}, \hspace{1cm}
p\disc_k = \sum_{1}^{N_h}p^{i}_k \phi^{i}.
$$
We now define the space-time state and adjoint vectors  $\mathsf y = [\bar y_1, \dots, \bar y_{N_t}]^T$ and $\mathsf p = [\bar p_1, \dots, \bar p_{N_t}]^T$. In the same fashion, let $\mathsf y_0 = [\bar y_0, 0, \dots, 0]^T$, $\mathsf y_d = [\bar {y_d}_1, 0, \dots, \bar {y_d}_{N_t}]^T$ and $\mathsf f = [\bar f_1, \dots, \bar f_{N_t}]^T$ be the space-time vectors describing the state initial condition, the desired solution profile and the forcing term, respectively. In other words, $\bar y_k$ and $\bar p_k$ are the column vectors of the FE element coefficients of the state and adjoint variable  at time $t_k, k=1, \dots, N_{t}$. The same notation is used for all the known quantities, as the initial state condition, forcing term and observations. We aim to recast the optimality system \eqref{global_FE} in the classical saddle point structure already presented \cite{HinzeStokes, Stoll1, Stoll, Strazzullo2}, with the necessary modifications due to the elimination of the direct computation of the control  variable. \\
For the sake of clarity, we focus our attention to the state equation. {First}, we introduce $\mathsf S(\bmu)$ and $\mathsf D_a(\bmu)$, which are defined as $\mathsf S(\bmu)_{ij} = s(\phi_j, \phi_i; \bmu)$ and $\mathsf D_a(\bmu)_{ij}:= a(\phi_j, \phi_i; \bmu)$, for $i,j = 1, \dots, N_h$, respectively. For the sake of notation, a {subscript} will indicate the restriction of the matrix to the domain considered, $\mathsf M_{\Omega_{\text{obs}}(\bmu)}$ is the mass matrices restricted to the observation domain, for example. Furthermore with $\mathsf C_u(\bmu)$ we indicate the matrix which satisfies $\mathsf {C_{u}(\bmu)}_{ij} = c(\phi_j \chi_{\Omega_u}, \phi_i; \bmu)$, for $i,j = 1, \dots, N_h$. With respect to time we perform a backward Euler time discretization, moving forward in time.
If we analyse a single time instance, we have to solve
\begin{equation}
\mathsf S(\bmu) \bar y_k + \Delta t \mathsf D_a(\bmu) \bar y_k - \frac{\Delta t}{\alpha} \mathsf C_{u}(\bmu) \bar p_k= \mathsf S(\bmu) \bar y_{k-1}  + \bar f_k \Delta t
\spazio \text{for } 1 \leq k \leq N_t.
\end{equation}
{Thus}, the system to be solved is
\begin{equation}
\label{test}
\underbrace{
\begin{bmatrix}
\mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu) &  & & \\
- \mathsf S(\bmu) & \mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu) &  & \\
& - \mathsf S(\bmu) & \mathsf S(\bmu)+ \Delta t \mathsf D_a(\bmu) &  & \\
&  & \ddots & \ddots & \\
&  &  & -\mathsf S(\bmu) & \mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu) \\
\end{bmatrix}
}_{\mathsf K(\bmu)}
\begin{bmatrix}
\bar y_1\\
\bar y_2\\
\bar y_3 \\
\vdots \\
\bar y_{N_t}
\end{bmatrix}
$$
$$
\qquad \qquad \qquad
\qquad \qquad \qquad
- \frac{\Delta t}{\alpha}
\begin{bmatrix}
\mathsf C_{u}(\bmu) &  & & \\
& \mathsf C_{u}(\bmu)   &  & \\
&  & \mathsf C_{u}(\bmu)   &  & \\
&  &  &  \ddots & \\
&  &  &  & \mathsf C_{u}(\bmu)  \\
\end{bmatrix}
\begin{bmatrix}
\bar p_1\\
\bar p_2\\
\bar p_3 \\
\vdots \\
\bar p_{N_t}
\end{bmatrix}
\hspace{-1mm}= \hspace{-1mm}
\begin{bmatrix}
\mathsf S(\bmu)\bar y_0 + \Delta t \bar f_1\\
0 + \Delta t  \bar f_2\\
0 + \Delta t  \bar f_3\\
\vdots \\
0 + \Delta t  \bar f_{N_t}
\end{bmatrix}.
\end{equation}
The space-time state equation can be written in compact form as
\begin{equation}
\mathsf K(\bmu) \mathsf  y - \frac{\Delta t}{\alpha} \mathsf C(\bmu) \mathsf p = \mathsf S(\bmu) \mathsf y_0 + \Delta t  \mathsf f,
\end{equation}
where $\mathsf C(\bmu)$ is the block-diagonal matrix which entries are given by $\mathsf C_u(\bmu)$ of dimension  $ \mathbb R^{N_h  \cdot N_t} \times \mathbb R^{N_h  \cdot  N_t}$. A similar argument can be applied in order to discretize the adjoint equation. Indeed, at each time instance it can be written as follows:
\begin{equation}
\mathsf S(\bmu) \bar p_{k-1}  = \mathsf S(\bmu) \bar p_k  + \Delta t ( - \mathsf M_{\text{obs}}(\bmu) \bar y_{k-1} - \mathsf D_a(\bmu)^T \bar p_{k-1} + \mathsf M_{\text{obs}}(\bmu) \bar y_{d_{k-1}} )
\spazio \text{for } 1< k \leq N_t.
\end{equation}
Namely, for the adjoint equation we perform a forward Euler method which, due to the backward parabolic equation, is equivalent to an implicit scheme. Once again, we focus on the algebraic all-at-once system for this specific equation, that has the following form:
\begin{equation*}
\underbrace{
\begin{bmatrix}
\mathsf S(\bmu)+ \Delta t \mathsf D_a(\bmu)^T & - \mathsf S(\bmu)& & \\
&\mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu)^T & - \mathsf S(\bmu)  & \\
&  & \ddots & \ddots  & \\
&  &  & \mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu)^T & - \mathsf S(\bmu) \\
&  &  &  & \mathsf S(\bmu) + \Delta t \mathsf D_a(\bmu)^T \\
\end{bmatrix}
}_{\mathsf K(\bmu)^T}
\begin{bmatrix}
\bar p_1\\
\bar p_2\\
\bar p_3 \\
\vdots \\
\bar p_{N_t}
\end{bmatrix}
$$
$$
+
\Delta t
\begin{bmatrix}
\mathsf M_{\text{obs}}(\bmu)&  & & \\
& \mathsf M_{\text{obs}}(\bmu)&  & \\
&  & \mathsf M_{\text{obs}}(\bmu) &  & \\
&  &  & \ddots & \\
&  &  &  & \mathsf M_{\text{obs}}(\bmu) \\
\end{bmatrix}
\begin{bmatrix}
\bar y_1\\
\bar y_2\\
\bar y_3 \\
\vdots \\
\bar y_{N_t}
\end{bmatrix}
=
\begin{bmatrix}
\Delta t \mathsf M_{\text{obs}}(\bmu)\bar y_{d_1} \\
\Delta t \mathsf M_{\text{obs}}(\bmu)\bar y_{d_2} \\
\Delta t \mathsf M_{\text{obs}}(\bmu)\bar y_{d_3} \\
\vdots \\
\Delta t \mathsf M_{\text{obs}}(\bmu) \bar y_{d_{N_t}}
\end{bmatrix}.
\end{equation*}
\no Then, in a more compact notation, the adjoint system becomes:
\begin{equation}
\mathsf K(\bmu)^T \mathsf p + \Delta t \mathsf M(\bmu) \mathsf y = \Delta t \mathsf M(\bmu) \mathsf y_d,
\end{equation}
$\mathsf M(\bmu) \in \mathbb R^{N_h  \cdot N_t} \times \mathbb R^{N_h  \cdot  N_t}$ is the block-diagonal matrix which entries are given by $\mathsf M_{\text{obs}}(\bmu)$.
If we combine the information given by the two equations, we  end up with the following all-at-once system:
\begin{equation}
\label{one_shot}
\begin{bmatrix}
\Delta t  \mathsf M(\bmu) &  \mathsf {K}(\bmu)^T  \\
\mathsf K(\bmu) & -\frac{\Delta t}{\alpha} \mathsf C(\bmu) \\
\end{bmatrix}
\begin{bmatrix}
\mathsf y \\
\mathsf p \\
\end{bmatrix}
=
\begin{bmatrix}
\Delta t \mathsf {M(\bmu)} \mathsf y_d \\
\mathsf {S(\bmu)} \mathsf y_0 + \Delta t \mathsf f \\
\end{bmatrix}.
\end{equation}

It is well-known in literature that optimal control problems solved through Lagrangian formulation result in saddle point structures, see e.g \cite{bader2015certified,dede2010reduced,gerner2012certified,karcher2014certified,karcher2018certified,kunisch2008proper,negri2015reduced,negri2013reduced} for steady problems and for time dependent cases, see e.g. \cite{ HinzeStokes, hinze2008optimization, HinzeNS, Stoll1, Stoll, Strazzullo2}. Also in the no-control framework, we see that the structure is preserved. \\
In this Section we have shown that in order to solve the all-at-once space-time optimization in a parametrized setting, for a given $\boldsymbol \bmu \in \Cal P$, we have to deal with a system which global dimension is $2\Cal N$. If we consider a context where the optimal solution is studied for several parameters, the {required} computational resources grows and {solving} the problem can {result in an unbearable amount of time}, due to the high dimensionality of discretized space-time structure presented, which drastically increases if mesh refinement has to be performed in space and/or in time. \\
In the next Section, in order to manage the issue of the high computational costs, we propose {to use the certified} reduced basis (RB) method as a strategy to reliably solve \ocp s in a smaller amount of time. After a general introduction of the basic ideas behind RB methods, we propose a certified error estimator specifically built for such parabolic optimal control problems in order to apply a greedy algorithm in the reduction  procedure.

\section{RB for parabolic time dependent \ocp s}
\label{sec_ROM}
This Section describes reduced approximation for time dependent \ocp s exploiting a greedy algorithm as presented in
\cite{hesthaven2015certified, RozzaHuynhPatera2008}. First of all, we will introduce the main framework of RB and its applicability thanks to the affine assumption. Then we will provide a new error estimator suited for both time dependent and steady problems. Finally, we will briefly present the reduced saddle point optimization problem and the \emph{aggregated space strategy}  following the approach {already} exploited in {previous} literature, see e.g. \cite{bader2015certified,dede2010reduced,gerner2012certified,karcher2014certified,karcher2018certified,kunisch2008proper,negri2015reduced,negri2013reduced}.
All the concepts will be presented for the time dependent scenario: indeed, the steady case complies with the more general formulation.
\subsection{Reduced Problem Formulation}
\label{off_on}
In Section \ref{problem}, we presented linear quadratic time dependent \ocp s in no-control framework \eqref{global}. For the sake of clarity, in this Section we will always  make the parameter dependence explicit: this will help us in being clearer in describing the RB fundamentals. \\
First of all, we define the \textit{solution manifold}
$$
\mathcal M = \{ (y(\boldsymbol{\mu}), p(\boldsymbol{\mu}))\;| \; \boldsymbol{\mu} \in \Cal P\},
$$
namely {containing the optimal solution to \eqref{global} when the parameter changes in $\Cal P$}. We assume that  $\Cal M$ is smooth in the parameter space $\Cal P$. Furthermore, we can consider the space-time discretized solution manifold, which is analogously defined as$$
\mathcal M \disc= \{ (y\disc(\boldsymbol{\mu}), p\disc(\boldsymbol{\mu}))\;| \; \boldsymbol{\mu} \in \Cal P\}.
$$
It is clear that, if the high-fidelity space-time discretization is refined enough,  the manifold solution $\mathcal M\disc$ is a reliable discretized representation of $\mathcal M$. Our aim is to approximate the behaviour of $\mathcal M \disc$ through RB approach. Reduced strategies are based on the construction of a surrogate space $\Cal Q_N \times \Cal Q_N \subset \Cal Q \disc \times \Cal Q \disc \subset \Cal Y_0 \times \Cal Y_T$, which has the property of low-dimensionality. The main feature of  the reduced space is that it is spanned by some properly chosen \emph{snapshots}, i.e. high-fidelity solutions computed for some values of the parameter $\bmu \in \Cal P$. {Once the reduced spaces are built}, a Galerkin projection is performed in order to find the optimal solution for a given parameter realization.
In other words, {after} a possibly costly reduced space construction phase, the RB strategy allows to solve a low dimensional system at each new parametric instance, in a space of dimension $N \ll \Cal N$.
In our case, the reduced optimality system for a given observation reads: given $\bmu \in \Cal P$ find the optimal pair $(y_N(\bmu), p_N(\bmu)) \in \Cal Q_N \times \Cal Q_N$ such that
\begin{equation}
\label{RB_OCP}
\Cal B((y_N(\boldsymbol{\mu}), p_N(\boldsymbol{\mu})),(z, p); \bmu) =
\la \Cal F(\bmu), (z, q) \ra \qquad \forall (z, q) \in \Cal Q_N \times \Cal Q_N,
\end{equation}
It is clear that the presented approach is convenient only if you can solve \eqref{RB_OCP} rapidly and independently from the value $\Cal N$. Indeed, it is necessary to divide the {reduced} space construction and the solution process in two separate steps:
\begin{itemize}
\item[$\small{\circ}$]an \emph{offline phase} where the reduced spaces are built and stored. This part of the process can be possibly expensive, but it is performed only once.
\item[$\small{\circ}$] An \emph{online phase} which solves the reduced system at each new parameter evaluation. In other words, the Galerkin projection in \eqref{RB_OCP} can be performed for several values of $\bmu \in \Cal P$  in a small amount of time.
\end{itemize}
We now discuss an important assumption which will guarantee the efficient applicability of RB construction and solving phases: the \emph{affine decomposition} of the problem at hand. In other words, the forms we deal with can be written in the following way:
\begin{equation}
\begin{matrix}
&  \Cal B((y,p), (z,q); \boldsymbol{\mu}) =\displaystyle  \sum_{l=1}^{Q_\Cal{B}} \Theta_\Cal{B}^l(\boldsymbol{\mu})\Cal{B}^l((y,p),(z,q)), &
& \qquad  \la \Cal F(\boldsymbol{\mu}), (z,q) \ra =\displaystyle  \sum_{l=1}^{Q_{\Cal F}} \Theta_{\Cal F}^l(\boldsymbol{\mu})\la \Cal {F}^l, (z, q) \ra, \\
\end{matrix}
\end{equation}
for some integers $Q_\Cal{B}$ and $Q_{\Cal F}$, with $\Theta_\Cal{B}^l,$ and $\Theta_{\Cal{F}^l}$ $\boldsymbol{\mu}-$dependent smooth functions and $\Cal B^l$ and $ \Cal F^l$ bilinear form and functional depending on $\bmu$.
\\This assumption is necessary in order apply the already described offline-online concept. Indeed, this particular structure allows us to assemble and store all the $\bmu-$independent quantities in the offline stage, and to exploit them in the basis construction. Then, in the online phase, for a given parameter, all the $\bmu$-dependent quantities are computed and system \eqref{RB_OCP} is assembled and solved. {Thanks to} this process, the online phase guarantees a rapid study of several parametric instances. \\We still need to describe explicitly how to  construct the reduced function spaces: it will be the content of the next Section.

\subsection{Greedy Algorithm and space construction for OCP($\boldsymbol{\mu}$)s}

\label{Greedysec}
In this Section we present the algorithm we used in order to build the reduced spaces. We rely on \emph{greedy algorithm}, see \cite{buffa2012priori,hesthaven2015certified} for a general introduction. {For time dependent problems, the vast majority of the reduced basis literature relies on the POD-Greedy algorithm \cite{haasdonk2008reduced, hesthaven2015certified}, that is usually called upon to deal with the compression of solution instances coming from a time stepping scheme. Instead, in the present space-time formulation, we are going to extend what has been already done for the space-time formulation of} parabolic problems in \cite{urban2012new,yano2014space, yano2014space1} to time dependent linear parabolic \ocp s. \\
The greedy approach is an iterative technique based on the idea to add new information to the reduced spaces at each {enrichment step by adding a suitably} chosen snapshot. At each iteration a high fidelity solution of the optimality system \eqref{global_FE} (or \eqref{global_s_FE} for the steady case) is needed, i.e. in order to build a $N-$dimensional reduced space, $N$ space-time (or steady) solutions must be evaluated. Before describing the algorithm, let us define the global error $e$ between the continuous optimality system and the reduced one, i.e.
\begin{equation}
\label{global_error}
e := (y\disc - y_N, p\disc - p_N).
\end{equation}
In order to efficiently apply the greedy algorithm, we have to \emph{estimate} the norm of the global error \eqref{global_error} independently from the high fidelity dimension\footnote{We are assuming that the space-time discretization is a good approximation of the continuous solution, so that we can consider directly the quantity \eqref{global_error} not paying in accuracy with respect to the continuous model.}: in other words we need a quantity $\Delta_N(\bmu)$ that does not depend on $\Cal N$ such that
\begin{equation}
\label{estimation}
\norm{e}_{\Cal Q \times \Cal Q} \leq \Delta_N(\bmu).
\end{equation}
In the next Section we will provide an explicit expression for $\Delta_N(\bmu)$. For now, we just assume to already have such an estimator.
The first step is to choose a discrete subset of parameters $\mathcal P_h \subset \mathcal P$ of cardinality $N_{\text{max}} = |\mathcal P_h|$. When the finite parameter space $\mathcal P_h$ is large enough, a sampling over the solutions is a good representation of $\mathcal M \disc$.
Now we have all the ingredients in order to build our spaces. First of all, we fix a tolerance $\tau$ and we initialize the reduced spaces $\Cal Q_N^y = \text{span}\{y\disc(\bmu_0)\}$ and $\Cal Q_N^p = \text{span}\{p\disc(\bmu_0)\}$ for a initial $\bmu_0$.
The $n-$th step of the process we choose the parameter
\begin{equation}
\bmu_{n} = \arg \max_{\mu \in \Cal P_h} \Delta_N(\bmu),
\end{equation}
and then we enrich the spaces with the snapshots related to the new {selected} parameter, i.e. \\
$\Cal Q_N^y = \text{span}\{y\disc(\bmu_0), \dots, y\disc(\bmu_n)\}$ and \\ $\Cal Q_N^p = \text{span}\{p\N(\bmu_0)\dots, p\N(\bmu_n)\}$. We proceed with the iterations until the estimator for a picked parameter verifies $\Delta_N(\bmu)\leq \tau$. \\
At the end of the algorithm, we will be provided by two spaces which seperatly describe state and adjoint variables. We remark that in order to have the space-time formulation well-posed, the state and adjoint space must be discretized through the same technique. It is intuitive to assert that the Greedy procedure does not lead to the same space for state and adjoint, since the snapshots for those variables can span different function spaces. In order to guarantee the existence of a unique reduced optimal solution, we have to ensure the following reduced inf-sup stability condition
\begin{equation*}
\label{infsup_reduced}
\beta_N(\bmu) \eqdot \inf_{(y_N, p_N) \in \Cal Q_N \times \Cal Q_N \{(0, 0)\}} \sup_{(z_N, q_N) \in \Cal Q_N \times \Cal Q_N \{(0, 0)\}} \frac{\Cal B((y_N, p_N), (z_N, q_N); \bmu)}{\sqrt{\norm{y_N}_{\Cal Q}^2 + \norm{p_N}_{\Cal Q}^2} \sqrt{\norm{z_N}_{\Cal Q}^2 + \norm{q_N}_{\Cal Q}^2}}  > 0,
\end{equation*}
where $\Cal Q_N$ is {a space to be determined. In particular}, we employ the aggregated space technique, an approach exploited for saddle point problem arising in {PDE($\bmu$)-}constrained optimization \cite{bader2015certified,dede2010reduced,gerner2012certified,karcher2014certified,karcher2018certified,kunisch2008proper,negri2015reduced,negri2013reduced}. It consists in the definition of the reduced space
\begin{equation}
\Cal Q_N = \Cal Q_N^y \cup \Cal Q_N^p,
\end{equation}
that will be {employed} in the representation of both the state and the adjoint variables, i.e.
given $\bmu \in \Cal P$, $y_N(\bmu) \in \Cal Q_N$ and $p_N(\bmu) \in \Cal Q_N$.
Even if this strategy increases the dimension of the reduced problem from $2N$ to $ 4N$, for time consuming problems such as parametrized time-dependent \ocp s, it is still convenient solve several reduced problems {as opposed} to the space-time discretization counterpart.
The next Section presents a specific estimator  $\Delta_N(\bmu)$, which can be used both for time dependent and steady \ocp s.
\subsection{Rigorous a posteriori error estimate}
\label{error_estimate}
In the context of RB method, an a posteriori error estimate is needed in order to rely on an {reliable} reduction algorithm. Indeed, it guarantees:
\begin{itemize}
\item[\small $\circ$]a bound for the sampling strategy over the parametric space $\Cal P$ in the offline phase;
\item[\small $\circ$] for every $\bmu \in \Cal P$, it provides a bound to the error between reduced optimal solution and truth approximation in the online phase.
\end{itemize}
The main point of our analysis lays on an a posteriori error estimate which complies with the classical
Brezzi's and Ne{\v c}as-Babu{\v s}ka stability theories \cite{Babuska1971, boffi2013mixed, necas} which are well known in the context of steady \ocp s, e.g. see \cite{negri2015reduced, negri2013reduced}. \\
As already specified, our aim is to build a posteriori error bound $\Delta_N(\bmu)$ which is $\Cal N-$indipendent and verifies:
\begin{equation}
\norm{e}_{\Cal Q \times \Cal Q} = \sqrt{\norm{ y\disc  - y_N}_{\Cal Q}^2 + \norm{ p\disc - p_N}_{\Cal Q}^2}
\leq \Delta_N(\bmu),
\end{equation}
so that the error bound is fast to compute. \\
At the space-time {discrete} level, we have {that the inf-sup condition \eqref{surj_FE} is} verified and, {after application of} the Ne\v cas- Babu\v ska theorem, we have the following stability estimate on the solution:
\begin{equation}
\label{stability_solution}
\sqrt{\norm{y \disc}^2_{\mathcal Q} + \norm{p\disc}^2_{\mathcal Q} }\leq \frac{1}{\beta_{\Cal B}\disc(\bmu)}\norm{\Cal F(\bmu)}_{(\Cal Q \times \Cal Q)\dual.}
\end{equation}
As we will briefly see, the discrete inf-sup constant $\beta_{\Cal B} \disc(\bmu)$ plays a very important role in the {construction} of the a posteriori error estimate. \\
Another essential element in the definition of the error estimator is the computation of the dual norm of the residual $\Cal R  \in  {(\Cal Q \disc \times \Cal Q \disc)}\dual$
\begin{equation}
\Cal R((z, q); \bmu) = \Cal B((y_N, q_N), (z, q); \bmu) - \la \Cal F(\bmu), (z, q) \ra
\spazio \forall (z, q) \in {\Cal Q \disc \times \Cal Q \disc}.
\end{equation}
Now by definition and by the stability estimate of the Ne\v cas- Babu\v ska thereom, one can easily prove the following inequality:
$$
\norm{e}_{\Cal Q \times \Cal Q} \leq \frac{\norm{\Cal R}_{(\Cal Q \times \Cal Q)\dual}}{\beta_{\Cal B} \disc(\bmu)} \spazio \forall \bmu \in \Cal P,
$$
since it is easy to show that
\begin{equation}
\label{B_cal_e}
\Cal B(e, (z, q); \bmu) = \Cal R((z, q); \bmu).
\end{equation}
The main {issue in the practical application of the} estimate is to find an effective way to compute the inf-sup constant $\beta_{\Cal B}\disc(\bmu)$. Let us suppose to have at one's disposal a lover bound $\beta^{LB}(\bmu)>0$ such that
$\beta_{\Cal B}\disc(\bmu) \geq \beta^{LB}(\bmu)$. Then the error estimate becomes:
\begin{equation}
\label{error}
\norm{e}_{\Cal Q \times \Cal Q} \leq \frac{\norm{\Cal R}_{(\Cal Q \times \Cal Q)\dual}} {\beta^{LB}(\bmu)}
\eqdot \Delta_N(\bmu)  \spazio \forall \bmu \in \Cal P, \spazio \forall N = 1, \dots, N_{\text{max}}.
\end{equation}
We now will give an analytical formulation to the lower bound $\beta^{LB}(\bmu)$.
\begin{theorem}
\label{th_lb}
Let us suppose that a space-time \ocp $\;$ is well-posed. Then we obtain the a lower bound for $\beta^{\Cal N}_{\Cal B} (\bmu)$ of the form:
\begin{equation}
\label{bounds}
\beta^{LB}(\bmu) =
\begin{cases}
\displaystyle \alpha \gamma_a(\bmu) & \quad \text{for } \quad \Omega_u = \Omega_{\text{obs}}, \\
\displaystyle \frac{\gamma_a(\bmu) }{\sqrt{2\max\left \{1,\left(\frac{c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}\right)^2\right \} }} & \quad \Omega_u \neq \Omega_{\text{obs}} \text{ assuming } \Omega_{\text{obs}} \neq \Omega,\\
\displaystyle \frac{\gamma_a(\bmu) }{\sqrt{2\max\left \{1,\left (\frac{c_m(\bmu)c_{\text{obs}}}{\alpha \gamma_a(\bmu)}\right)^2\right \} }}& \quad \Omega_u \neq \Omega_{\text{obs}} \text{ assuming } \Omega_{u} \neq \Omega.\\
\end{cases}
\end{equation}
\end{theorem}
\begin{proof}
The statement is a consequence of Theorem \ref{theorem_right} and the stability estimate \eqref{stability_solution}, applied to the problem \eqref{B_cal_e}.
\end{proof}
It is clear that $\beta^{LB}(\bmu)$ is very fast to be computed for a given $\bmu \in \Cal P$ due to the nature of all the constants involved, which are independent from the space-time formulation. Furthermore, it is well known that the computation of the dual norm of the residual can be efficiently evaluated thanks to the affine assumption {by means of suitable Riesz representers} \cite{negri2015reduced, negri2013reduced,RozzaHuynhPatera2008}. We recall that we recover all the cases since at least one between control and observation domain must be different from $\Omega$ to be $\Omega_u \neq \Omega_{\text{obs}}$.
\begin{remark}[The steady case]
All the arguments on this Section can be applied to steady linear \ocp s. In this case, the reduced problem reads: given $\bmu \in \Cal P$ find the optimal pair $(y_N(\bmu), p_N(\bmu)) \in Y_N \times Y_N$ such that
\begin{equation}
\label{RB_OCP_s}
\Cal B_s((y_N(\boldsymbol{\mu}), p_N(\boldsymbol{\mu})),(z, p), \bmu) =
\la \Cal F_s(\bmu), (z, q) \ra \spazio  \forall (z, q) \in Y_N \times  Y_N,
\end{equation}
with $Y_N \subset Y^{N_h}$. It is well known, that there exists a positive inf-sup steady stability constant $\beta_{\Cal B_s}\disc (\bmu)$ and  under the affine decomposition assumption, one can efficiently apply the greedy algorithm thanks to the following inequality \cite{negri2013reduced}:
\begin{equation*}
\norm{e}_{Y \times Y} \leq \frac{\norm{\Cal R}_{(Y \times Y)\dual}}{\beta_s^{LB}(\bmu)} \spazio \forall \bmu \in \Cal P.
\end{equation*}
{As a special case, one further} original contribution of this work is to {derive a novel} lower bound $\beta_s^{LB}(\bmu)$, {that allows to avoid having to rely on algorithms like the successive constraint methods} \cite{huynh2010natural}. Indeed, we obtain the a lower bound for $\beta_{\Cal B_s} \disc (\bmu)$ of the form:
\begin{equation}
\label{bounds}
\beta_s^{LB}(\bmu) =
\begin{cases}
\displaystyle \alpha \gamma_a(\bmu) & \quad \text{for } \quad \Omega_u = \Omega_{\text{obs}}, \\
\displaystyle \frac{\gamma_a(\bmu) }{\sqrt{2\max\left \{1,\left (\frac{c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}\right )^2\right \}}} & \quad \Omega_u \neq \Omega_{\text{obs}} \text{ assuming } \Omega_{\text{obs}} \neq \Omega.\\
\displaystyle \frac{\gamma_a(\bmu) }{\sqrt{2\max \left \{1,\left (\frac{c_c(\bmu)c_{\text{obs}}}{\alpha \gamma_a(\bmu)} \right )^2\right \}}} & \quad \Omega_u \neq \Omega_{\text{obs}} \text{ assuming } \Omega_{u} \neq \Omega,\\
\end{cases}
\end{equation}
as a consequence of Lemma \ref{lemma_surj_s} and Theorem \ref{s_FE}.
\end{remark}
In the next Section we will test the proposed error estimators both for time dependent and steady \ocp s governed by Graetz flows with distributed and boundary control.

\section{\ocp s governed by a Graetz flow}
\label{results}
In this Section we will validate our estimator for \ocp s in two different parametrized setting: one dealing only with physical parameters, the other one with both physical and  geometrical parametrization. The numerical tests, which are inspired by \cite{karcher2018certified, negri2013reduced, Strazzullo2}, are presented in their unsteady and steady version. For both the tests, we define $Y = H^1_0(\Omega_{\Gamma_D})$, as the functions which have $H^1$ regularity over $\Omega$ and are null on $\Gamma_D$, that will indicate the portion of the boundary where Dirichlet boundary conditions are applied. Finally, for the control space we consider $U = L^2(\Omega_u)$, while the observation space is $Y_{\text{obs}} = L^2(\Omega_{\text{obs}})$. Furthermore, in the numerical experiments, the spatial orizontal and vertical coordinates will be indicated with $x_1$ and $x_2$, respectively. \\Let us start with the physical parametrization experiments.
\subsection{Physical Parametrization}
This Section deals with an \ocp $\;$ governed by a Graetz flow with physical parametrization. We will solve the problem in $\Omega$, represented in Figure \eqref{dominio_1}, where the observation domain is $\Omega_{\text{obs}} = \Omega_1 \cup \Omega_2$, with $\Omega_1 = [0.2, 0.8]\times [0.3, 0.7]$ and $\Omega_2 = [1.2, 2.5]\times [0.3, 0.7]$ For this test case, the control is distributed, i.e. $\Omega_u = \Omega$.
\begin{figure}[H]

\begin{center}
\begin{tikzpicture}

\draw (0,0) -- (7.5,0) -- (7.5,3) -- (0,3) -- (0,0);
\filldraw[color=gray!60, fill=gray!10, thick](0.6,0.9) -- (2.4, 0.9) -- (2.4, 2.1) -- (0.6, 2.1) -- (0.6,0.9);
\filldraw[color=gray!60, fill=gray!10, thick](3.6,0.9) -- (7.49, 0.9) -- (7.49, 2.1) -- (3.6, 2.1) -- (3.6,0.9);
\filldraw[color=blue!60, fill=gray!10, very thick](0,0) -- (3.,0);
\filldraw[color=blue!60, fill=gray!10, very thick](0,0) -- (0.,3);
\filldraw[color=blue!60, fill=gray!10, very thick](0,3) -- (3.,3);
\filldraw[color=red!60, fill=gray!10, very thick, dashed](3,3) -- (7.5,3);
\filldraw[color=red!60, fill=gray!10, very thick, dashed](3,0) -- (7.5,0);

\node at (1.5,1.5){$\Omega_1$};
\node at (5.5,1.5){$\Omega_2$};
\node at (-.5,1.5){\color{blue}{$\Gamma_{D_1}$}};
\node at (5.5,3.3){\color{red}{$\Gamma_{D_2}$}};
\node at (7.8,1.5){\color{black}{$\Gamma_{N}$}};

\node at (0,-.3){\color{black}{$(0,0)$}};
\node at (3,-.3){\color{black}{$(1,0)$}};
\node at (7.5,-.3){\color{black}{$(2.5,0)$}};

\node at (0,3.3){\color{black}{$(0,1)$}};
\node at (3,3.3){\color{black}{$(1,1)$}};
\node at (7.5,3.3){\color{black}{$(2.5,1)$}};
\end{tikzpicture}
\end{center}
\caption{Domain $\Omega$. \textit{Observation domain:} $\Omega_{\text{obs}} = \Omega_1 \cup \Omega_2$, \textit{Control domain:} $\Omega$. \textit{Blue solid line:} first Dirichlet boundary conditions. \textit{Red dashed line:} second Dirichlet boundary conditions.}
\label{dominio_1}
\end{figure}
 The parameter is $\bmu \eqdot (\mu_1, \mu_2, \mu_3) \in \Cal P = [3,20]\times [0.5,1.5]\times[1.5,2.5]$, where $\mu_1$ will represent the P\'eclet number of the \ocp $\;$ governed by advection-diffusion equation, while $\mu_2$ and $\mu_3$ will be our constant desired state $y_d$ in the subdomains $\Omega_1$ and $\Omega_2$, respectively. Namely, we want to change a heat source in order to reach the parametrized observation. Thus, we solve the following problem: given $\bmu \in \Cal P$, find the pair $(y,p) \in \Cal Y_0 \times\Cal Y_T$ such that
\begin{equation}
\label{test_1_time}
\tag{$P$}
\begin{cases}
\displaystyle y(\chi_{\Omega_1} + \chi_{\Omega_2})  - \dt{p} - \frac{1}{\mu_1}\Delta p - x_2(1 -x_2)\frac{\partial p}{\partial x_1} =
\mu_2 \chi_{\Omega_1} + \mu_3 \chi_{\Omega_2} & \text{ in } \Omega \times [0,T], \\
\displaystyle  \dt{y} - \frac{1}{\mu_1}\Delta y - x_2(1 -x_2)\frac{\partial y}{\partial x_1} - \frac{1}{\alpha}p =  0& \text{ in } \Omega \times [0,T], \\
y(0) = y_0  & \text{ in } \Omega , \\
p(T) = 0 & \text{ in } \Omega, \\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = 0 & \text{ on $\Gamma_N \times [0,T],$} \\
y = 1 \text{ and } p = 0 & \text{ on $\Gamma_{D_1} \times [0,T],$} \\
y = 2 \text{ and } p = 0 & \text{ on $\Gamma_{D_2} \times [0,T],$}
\end{cases}
\end{equation}
where $y_0$ is a null function verifying the boundary conditions,
$\Gamma_{D_1} = \partial \Omega \cap \{(x_1, x_2) \; |\; x_1 \leq 1\}$ and $\Gamma_{D_2} = \partial \Omega \cap \{(x_1, x_2) \; |\; 1 < x_1  < 2.5 \}$. Calling $\Gamma_D \eqdot \Gamma_{D_1} \cup \Gamma_{D_2}$, then $\Gamma_N = \partial \Omega \setminus \Gamma_D$, where $\Gamma_N$ Neumann boundary conditions have been applied, with $n$ normal outer vector with respect to the boundary.
Problem \eqref{test_1_time}, can be considered also in its steady version: given $\bmu \in \Cal P$, find the pair $(y,p) \in Y \times Y$ such that
\begin{equation}
\label{test_1}
\tag{$P_s$}
\begin{cases}
\displaystyle y(\chi_{\Omega_1} + \chi_{\Omega_2})  - \frac{1}{\mu_1}\Delta p - x_2(1 -x_2)\frac{\partial p}{\partial x_1} =
\mu_2 \chi_{\Omega_1} + \mu_3 \chi_{\Omega_2} & \text{ in } \Omega, \\
\displaystyle  - \frac{1}{\mu_1}\Delta y - x_2(1 -x_2)\frac{\partial y}{\partial x_1} - \frac{1}{\alpha}p =  0& \text{ in } \Omega, \vspace{2mm}\\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = 0 & \text{ on $\Gamma_N,$} \\
y = 1 \text{ and } = 0 & \text{ on $\Gamma_{D_1},$} \\
y = 2 \text{ and } p = 0 & \text{ on $\Gamma_{D_2}.$}
\end{cases}
\end{equation}
It is straightforward to notice that the system is affine decomposed.
Since the problem we are dealing with is a distributed control problem, following the bounds in \eqref{bounds}, we must consider
\begin{equation}
\label{quatities}
\beta^{LB}(\bmu) = \beta_s^{LB}(\bmu) = \displaystyle \frac{\gamma_a (\bmu) }{\sqrt{2\max\left \{1,\left (\frac{c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}\right )^2\right \}}}.
\end{equation}
We now explicit all the constants involved in the bound, which is valid both for the unsteady and the steady case. First of all, we recall that, as reported in \cite{quarteroni2008numerical}, for the problem at hand
\begin{equation}
\gamma_a(\bmu) \eqdot \frac{1}{\mu_1(1 + C_{\Omega}^2)},
\end{equation}
where $C_{\Omega}$ is the Poincar\'e constant which verifies $\norm{v}_{L^2(\Omega)} \leq C_{\Omega}\norm{v}_{H^1(\Omega)}$, for all $v \in H^1(\Omega)$.  For this specific case, $c_u = C_{\Omega}$. We still need to specify $c_c(\bmu)$. It is easy to observe that the continuity constant does not depend on $\bmu$ and $c_c \eqdot c_c(\bmu) = C_{\Omega}$, indeed:
\begin{equation}
\label{c_c}
|c(p,y; \bmu)|= \left | \intSpace{py} \right | \leq \norm{p}_{L^2(\Omega)}\norm{y}_{L^2(\Omega)}
\leq C_{\Omega}\norm{p}_{U}\norm{y}_{Y}.
\end{equation}
The value of $C_{\Omega}$ has been computed by solving the associated eigenvalue problem, which is still computationally feasible since it is parameter independent and it has to be evaluated only once. \\
For both the test cases, $\Cal P_h$ is given by $N_{\text{max}} = 225$ parameters uniformly distributed in $\Cal P$ and we consider $\tau = 1\cdot 10^{-4}$ as a tolerance for the greedy algorithm. In order to evaluate the performance of the proposed strategy, we show an average error analysis and average effectivity analysis over $100$ parameters with a uniform distribution in $\Cal P$. Furthermore, we recall that in order to spatial represent the pair $(y,p)$, we used $\mathbb P^1-\mathbb P^1$ elements, while for time discretization we chose $T = 5$ and $\Delta t = 1/6$, which leads to $N_t = 30$, making the tests comparable with \cite{Strazzullo2}.\\ We now separately present the numerical results for unsteady and steady case, respectively.

\subsubsection{Unsteady Case}
\label{sec:time_no_geo}
This Section tests the performance of the employment of the lower bound $\beta^{LB}_{\Cal B}$ to problem \eqref{test_1_time}, with fixed $\alpha = 0.01$. The exploited greedy algorithm reached the chosen tolerance $\tau$ with $N = 13$ which, with aggragated spaces technique, leads to a reduced space of dimension $4N = 52$: much less compared to the high fidelity one, with $\Cal N = N_h \cdot N_t = 272160$. This high difference in the systems dimensionality, allow us to reach huge \emph{speed up}, i.e. the number of reduced simulations which can be performed in a single realization of the high fidelity problem. In this case, averaging over $100$ parameters, we reach values around $2\cdot 10^4$. In Figure \ref{no_geo} we show some representative solutions for $t = 1s, 3s, 4.5s$, with $\alpha = 0.01$ and $\bmu = (15.0, 0.6, 1.8)$.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{off_y_unsteady_no_geo_1}
\caption{}
\label{fig:off_y_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{off_y_unsteady_no_geo_3}
\caption{}
\label{fig:off_y_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[scale = 0.18]{off_y_unsteady_no_geo_5}
\caption{}
\label{fig:off_y_5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{on_y_unsteady_no_geo_1}
\caption{}
\label{fig:on_y_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{on_y_unsteady_no_geo_3}
\caption{}
\label{fig:on_y_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[scale = 0.204]{on_y_unsteady_no_geo_5}
\caption{}
\label{fig:on_y_5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{off_p_unsteady_no_geo_1}
\caption{}
\label{fig:off_p_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{off_p_unsteady_no_geo_3}
\caption{}
\label{fig:off_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[scale = 0.18]{off_p_unsteady_no_geo_5}
\caption{}
\label{fig:off_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_unsteady_no_geo_1}
\caption{}
\label{fig:on_p_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_unsteady_no_geo_3}
\caption{}
\label{fig:on_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[scale = 0.18]{on_p_unsteady_no_geo_5}
\caption{}
\label{fig:on_p_5}
\end{subfigure}
\caption{Optimal high fidelity and reduced solutions with $\alpha = 0.01$ and $\bmu=(12.0, 1.0, 2.5)$. High fidelity state variable for $t = 1s, 3s, 4.5s$ in (a), (b), (c), respectively,  and reduced state variable for $t = 1s, 3s, 4.5s$ in (d), (e), (f). Analogously,  high fidelity adjoint variable in (f), (g), (h)  and reduced adjoint variable in (i), (j), (k), for $t = 1s, 3s, 4.5s.$}
\label{no_geo}
\end{figure}

We decided to focus only on state and adjoint variable, since the control can be recovered through relation \eqref{gradient_eq}. The reduced model is able to reproduce the high fidelity solution for all the time instances considered. Furthermore, we propose a performance comparison with respect to the use of the Babu\v ska inf-sup constant. Table \ref{tab:test_1_time} presents the average absolute and relative error
\begin{equation}
\label{eq:errors}
\norm{e}_{\text{abs}} \eqdot \sqrt{(
\norm{y^{\Cal N} - y_N}_{Y}^2 + \norm{p^{\Cal N} - p_N}_{Y}^2)} \quad \text{and}
\quad
\norm{e}_{\text{rel}} \eqdot \frac{\sqrt{(\norm{y^{\Cal N} - y_N}_{Y}^2 + \norm{p^{\Cal N} - p_N}_{Y}^2)}}{\sqrt{(\norm{y^{\Cal N}}_{Y}^2 + \norm{p^{\Cal N}}_{Y}^2)}},
\end{equation}
together with the effectivity $\eta \eqdot \Delta_N(\bmu)/\norm{e}_{\Cal Q\times \Cal Q}$ and the value of $\Delta_N(\bmu)$\footnote{\label{error_estimator}With abuse of notation we use $\Delta_N(\bmu)$ to describe both the \emph{exact error estimator}, given by the use of the Babu\v ska inf-sup constant $\beta_{\Cal B}^\Cal N(\bmu)$, and the \emph{surrogate error estimator}, derived by employing the lower bound $\beta^{LB}(\bmu).$}. It is clear that the lower bound $\beta^{LB}(\bmu)$ cannot give better results with respect to the exact computation of $\beta_{\Cal B}^{\disc}(\bmu)$. Still, exploiting the lower bound is of great convenience in the offline phase: indeed, the exact computation of the Babu\v ska inf-sup constant for a given $\bmu$ takes, in average, $9.7s$, while the computation of the value of the lower bound is performed in $0.09s$. Furthermore, the use of the lower bound very mildly affects the accuracy, since the errors are comparable between the two considered options.
An indicator of the effectivity of the new error bound is given also by Figure \ref{babu_vs_lb}, where the value of the two constants are compared with respect $\mu_1$, which is the only parameter affecting the left hand side of the system. We have to remark that the value of the penalization parameter $\alpha$ drastically changes the tightness of the lower bound: for higher $\alpha$, we have a bad approximation of the Babu\v ska inf-sup constant. This phenomenon is not new in literature, see, for example \cite{karcher2018certified}. We can observe a good approximation of $\beta_{\Cal B_s}^{N_h}$ in Figure \ref{fig:babu_lb_1_time}, while we lose precision for smaller values of the penalization parameter as depicted in Figure \ref{fig:babu_lb_2_time}.

\begin{table}[H]
\caption{Unsteady case: performance analysis for the problem \eqref{test_1_time} for $\alpha = 0.01$. Average error, estimators and effectivities exploiting the lower bound $\beta^{LB}(\bmu)$ and the Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}(\bmu)$, with respect to $N$.}
\label{tab:test_1_time}
\footnotesize{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{$N$} & \multicolumn{4}{c|}{$\beta^{LB}$}      & \multicolumn{4}{c|}{$\beta_{\Cal B}^{\Cal N}$}                         \\ \cline{2-9}
                     & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$            & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$   \\ \hline
1                    & 5.61e--1&4.37e+0     & 1.29e+2   & 2.96e+1 & 5.25e--1 & 4.46e+1 & 1.30e+1 & 2.91e+0 \\ \hline
3                    & 1.81e--1&5.84e--1    & 3.42e+1    & 5.86e+1 & 1.16e--1& 5.58e--1& 3.16e+0&5.67e+0\\ \hline
5                    & 3.13e--2&1.58e--1   & 7.25e+0   & 4.58e+1 & 3.84e--2& 1.99e--1& 9.03e--1&4.53e+0\\ \hline
7                    & 1.12e--3&4.98e--2  & 3.07e--1   & 6.17e+1 & 7.70e--3& 3.76e--2& 1.98e--1&5.26e+0\\ \hline
9                    & 4.36e--2&1.33e--2  & 6.38e--1  & 4.78e+1 & 3.42e--3 & 1.24e--2& 5.41e--2&4.36e+0\\ \hline
11                   & 1.46e--2&4.68e--3  & 2.23e--1  & 4.76e+1 & 1.19e--3& 4.06e--3& 2.11e--2&  5.21e+0\\ \hline
13                 & 3.90e--4&1.35e--3  & 7.32e--2  & 5.38e+1 & 3.53e--4& 1.26e--3& 6.46e--3&  5.10e+0\\ \hline
\end{tabular}
}
\end{table}

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{unsteady_no_geo_1}
\caption{}
\label{fig:babu_lb_1_time}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{unsteady_no_geo_2}
\caption{}
\label{fig:babu_lb_2_time}
\end{subfigure}
\hfill
\caption{Comparison of the value of the lower bound $\beta^{LB}$ with respect to the exact Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}$ for $\alpha = 1, 0.1$ and $\alpha = 0.01, 0.001$ in (a) and (b), respectively. The analysis has been performed varying the value of $\mu_1$.}
\label{babu_vs_lb}
\end{figure}

\subsubsection{Steady Case}
We report the results for the simulation of problem \eqref{test_1}. The high fidelity problem has dimension $\Cal N = N_h = 9072$. We performed a greedy algorithm which reached the tolerance $\tau$ after picking $N = 11$. In other words, the reduced system is much smaller with respect to the FE one, with a dimension of $4N = 44$, after the aggregated space procedure. The number $N$ is lower compared to the time dependent case: this is not surprising considering the simpler context of a steady problem. \\ We fixed $\alpha = 0.01$ and we propose a representative solution, obtained exploiting $\beta_s^{LB}$, in Figure \ref{s_no_geo} and an averaged performance analysis in Table \ref{tab:test_1}. The latter shows the performance of the greedy considering approach with respect an average absolute and relative error, given by
\begin{equation}
\label{eq:errors_s}
\norm{e}_{\text{abs}} \eqdot \sqrt{(\norm{y^{N_h} - y_N}_{Y}^2 + \norm{p^{N_h} - p_N}_{Y}^2)} \quad \text{and}
\quad
\norm{e}_{\text{rel}} \eqdot \frac{\sqrt{(\norm{y^{N_h} - y_N}_{Y}^2 + \norm{p^{N_h} - p_N}_{Y}^2)}}{\sqrt{(\norm{y^{N_h}}_{Y}^2 + \norm{p^{N_h}}_{Y}^2)}},
\end{equation}
respectively. The analysis has been carried out with the use of the lower bound and the Babu\v ska inf-sup constant and presents also a comparison of the effectivity value $\eta \eqdot \Delta_N(\bmu)/\norm{e}_{Y\times Y}$ and the error estimator itself\footnote{See footnote \ref{error_estimator}.}. As already specified for the time dependent test case, the lower bound cannot perform better with respect to the exact Babu\v ska inf-sup constant. Indeed, the latter is preferable in terms of estimator and effectivity. Nonetheless, the lower bound gives comparable results in the average error analysis and we underline that exploiting $\beta^{LB}_s$ is computationally convenient also in the steady case. Indeed, the computation of $\beta_s^{LB}$ approximately takes 0.09s, while the eigenvalue problem associated to $\beta_{\Cal B_s}^{N_h}$ is solved in $0.38s$ and we recall that the process must be repeated for the $N_{\text{max}}$ parameters of $\Cal P_h$. In other words, employing the surrogate error estimator guarantees a faster offline phase, also for less complicated problems.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{off_y_steady_no_geo}
\caption{}
\label{fig:off_y}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{on_y_steady_no_geo}
\caption{}
\label{fig:on_y}
\end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{off_p_steady_no_geo}
\caption{}
\label{fig:off_p}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_steady_no_geo}
\caption{}
\label{fig:on_p}
\end{subfigure}
\hfill
\caption{Optimal high fidelity and reduced solutions with $\alpha = 0.01$ and $\bmu=(15.0, 0.6, 1.8)$. High fidelity state variable in (a)  and reduced state variable in (b). Analogously,  high fidelity adjoint variable in (c)  and reduced adjoint variable in (d).}
\label{s_no_geo}
\end{figure}

 Furthermore, also in this case, the value of $\alpha$ highly influences the effectivity of the greedy procedure, as plots in Figure \ref{s_babu_vs_lb} show. If the value of $\alpha$ decreases, the effectivity increases, since the lower bound becomes a worse approximation of the Babu\v ska inf-sup constant, as already observed in Section \ref{sec:time_no_geo}. A good approximation of $\beta_{\Cal B_s}^{N_h}$ is shown in Figure \ref{fig:babu_lb_1_steady}, while we loose precision for smaller values of the penalization parameter as depicted in Figure \ref{fig:babu_lb_2_steady}. As in the time dependent case, we showed the comparison varying the value if $\mu_1$: indeed, the observation parameters $\mu_2$ and $\mu_3$, does not change the behaviour of the Babu\v ska inf-sup since they only affect the right hand side of the optimality system. The behaviour of the constants is very similar to the unsteady ones. The main reason is in the space-time formulation itself, which presents almost the same structure of the simpler steady problem. \\
Finally, speaking about the computational time gain of the reduced framework, also in the steady case we can observe a quite important speedup, which is around $80, 85$, independently from the value of $N$.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{steady_no_geo_1}
\caption{}
\label{fig:babu_lb_1_steady}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{steady_no_geo_2}
\caption{}
\label{fig:babu_lb_2_steady}
\end{subfigure}
\hfill
\caption{Comparison of the value of the lower bound $\beta^{LB}_s(\bmu)$ with respect to the exact Babu\v ska inf-sup constant $\beta_{\Cal B_s}^{N_h}(\bmu)$ for $\alpha = 1, 0.1$ and $\alpha = 0.01, 0.001$ in (a) and (b), respectively. The analysis has been performed varying the value of $\mu_1$.}
\label{s_babu_vs_lb}
\end{figure}

\begin{table}[H]
\caption{Steady case: performance analysis for the problem \eqref{test_1}. Avarage error, estimators and effectivities exploiting the lower bound $\beta_s^{LB}$ and the Babu\v ska inf-sup constant $\beta_s^{N_h}$, with respect to $N$.}
\label{tab:test_1}
\footnotesize{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{$N$} & \multicolumn{4}{c|}{$\beta^{LB}_s(\bmu)$}      & \multicolumn{4}{c|}{$\beta_{\Cal B_s}^{N_h}(\bmu)$}                         \\ \cline{2-9}
                     & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$            & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$   \\ \hline
1                    & 7.76e--1&6.08e--1     & 7.35e+1   & 1.20e+2 & 7.72e--1 & 5.57e--1 & 1.52e+1 & 2.73e+1 \\ \hline
3                    & 1.23e--1&4.85e--2    & 4.36e+1    & 1.75e+2 & 1.71e--1& 5.56e--2& 1.40e+0&2.52e+1\\ \hline
5                    & 3.83e--2&1.77e--2   & 5.61e+0   & 1.86e+1 & 4.76e--2& 1.84e--2& 3.91e--1&2.11e+1\\ \hline
7                    & 6.28e--3&1.92e--3  & 9.66e--1   & 2.11e+2 & 1.07e--2& 3.52e--3& 1.05e--1&2.98e+1\\ \hline
9                    & 1.59e--3&6.64e--4  & 1.44e--1  & 1.56e+2  & 5.07e--3 & 1.36e--3& 3.01e--2&2.21e+1\\ \hline
11                   & 9.30e--4&2.18e--4  & 7.27e--2  & 1.51e+2 & 1.45e--3& 2.19e--4& 6.88e--3&  3.14e+1\\ \hline
\end{tabular}
}
\end{table}
In the next Section we will show how the proposed lower bound performs in a more complex test case, where also geometrical parametrization is considered.

\subsection{Physical and Geometrical Parametrization} In this Section we propose a boundary \ocp $\;$ governed by a Graetz flow with physical and geometrical parametrization. As paramter dependent domain, we consider $\Omega(\bmu)$ depicted in Figure \ref{dominio_2}. In this case the observation domain is $\Omega_{\text{obs}} (\bmu)= \Omega_3(\bmu) \cup \Omega_4(\bmu)$, where $\Omega_1$ is the unit square, $\Omega_3(\bmu) = [1, 1 + \mu_2]\times [0.8, 1]$,  $\Omega_4(\bmu) = [1, 1 + \mu_2]\times [0., 0.2]$, while $\Omega_2(\bmu) = [1, 1 + \mu_2]\times [0.2, 0.8]$. The control domian is given by $\Gamma_C(\bmu) =[1, 1 + \mu_2] \times \{0\} \cup  [1, 1 + \mu_2] \times \{1\}.$

\begin{figure}[H]
\begin{center}
\begin{tikzpicture}

\draw (0,0) -- (7.5,0) -- (7.5,3) -- (0,3) -- (0,0);
\draw (3,0) -- (3, 3);
\draw (3,0.6) -- (7.5, 0.6);
\draw (3,2.4) -- (7.5, 2.4);
\filldraw[color=blue!60, fill=gray!10, very thick](0,0) -- (3.,0);
\filldraw[color=blue!60, fill=gray!10, very thick](0,0) -- (0.,3);
\filldraw[color=blue!60, fill=gray!10, very thick](0,3) -- (3.,3);
\filldraw[color=red!60, fill=gray!10, very thick, dashed](3,3) -- (7.5,3);
\filldraw[color=red!60, fill=gray!10, very thick, dashed](3,0) -- (7.5,0);

\node at (1.5,1.5){$\Omega_1$};
\node at (5.2,1.5){$\Omega_2(\bmu)$};
\node at (5.2,2.7){$\Omega_3(\bmu)$};
\node at (5.2,0.3){$\Omega_4(\bmu)$};

\node at (-.5,1.5){\color{blue}{$\Gamma_{D}$}};
\node at (5.5,3.3){\color{red}{$\Gamma_{C}(\bmu)$}};
\node at (8.2,1.5){\color{black}{$\Gamma_{N}(\bmu)$}};

\node at (0,-.3){\color{black}{$(0,0)$}};
\node at (3,-.3){\color{black}{$(1,0)$}};
\node at (7.5,-.3){\color{black}{$(1 + \mu_2,0)$}};

\node at (0,3.3){\color{black}{$(0,1)$}};
\node at (3,3.3){\color{black}{$(1,1)$}};
\node at (7.5,3.3){\color{black}{$(1 + \mu_2,1)$}};

\end{tikzpicture}
\end{center}
\caption{Domain $\Omega$. \textit{Observation domain:} $\Omega_{\text{obs}}(\bmu) = \Omega_3(\bmu)\cup \Omega_4(\bmu)$, \textit{Control domain:} $\Gamma_C(\bmu)$ (red dashed line). \textit{Blue solid line:} Dirichlet boundary conditions. The reference domain $\Omega$ is given by $\mu_2 = 1$.}
\label{dominio_2}
\end{figure}

 The parameter is $\bmu \eqdot (\mu_1, \mu_2, \mu_3) \in
\Cal P = [6.0, 20.0] \times [1.0, 3.0] \times [0.5, 3.0]$, where $\mu_1$, as the previous test case, represents the P\'eclet number, $\mu_2$ is a geometrical parameter which stretches the length of the right part of the domain, $\mu_3$ is a constant desired state $y_d$ observed in $\Omega_{\text{obs}}(\bmu)$. Here, we control the Neumann conditions in order to achieved the desired observation. The problem reads as follows: given $\bmu \in \Cal P$, find the pair $(y,p) \in \Cal Y_0 \times\Cal Y_T$ such that
\begin{equation}
\label{test_2_time}
\tag{$P^g$}
\begin{cases}
\displaystyle y\chi_{\Omega_{\text{obs}}(\bmu)}  - \dt{p} - \frac{1}{\mu_1}\Delta p - x_2(1 -x_2)\frac{\partial p}{\partial x_1} =
\mu_3 \chi_{\Omega_{\text{obs}}(\bmu)}  & \text{ in } \Omega(\bmu) \times [0,T], \\
\displaystyle  \dt{y} - \frac{1}{\mu_1}\Delta y - x_2(1 -x_2)\frac{\partial y}{\partial x_1} - \frac{1}{\alpha}p\chi_{\Omega_u} =  0& \text{ in } \Omega(\bmu) \times [0,T], \\
y(0) = y_0  & \text{ in } \Omega(\bmu) , \\
p(T) = 0 & \text{ in } \Omega(\bmu), \\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = 0 & \text{ on $\Gamma_N(\bmu) \times [0,T],$} \\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = u & \text{ on $\Gamma_C(\bmu) \times [0,T],$}\\
y = 1 \text{ and } p = 0 & \text{ on $\Gamma_{D} \times [0,T],$} \\
\end{cases}
\end{equation}
where $y_0 = 0$ in $\Omega(\bmu)$ and satisfies the boundary conditions of the state variable,
$\Gamma_{D} = \partial \Omega(\bmu) \cap \{(x_1, x_2) \; |\; x_1 \leq 1\}$ is the Dirichlet boundary domain, while $\Gamma_N(\bmu) = \partial \Omega(\bmu) \setminus \Gamma_D \cup \Gamma_C(\bmu)$, is the Neumann boundary.
Also for this case, we can focus our attention on the steady version, i.e.: given $\bmu \in \Cal P$, find the pair $(y,p) \in Y \times Y$ such that
\begin{equation}
\label{test_2}
\tag{$P_s^g$}
\begin{cases}
\displaystyle y  - \frac{1}{\mu_1}\Delta p - x_2(1 -x_2)\frac{\partial p}{\partial x_1} =
\mu_3 \chi_{\Omega_{\text{obs}}(\bmu)} & \text{ in } \Omega(\bmu), \\
\displaystyle  - \frac{1}{\mu_1}\Delta y - x_2(1 -x_2)\frac{\partial y}{\partial x_1} - \frac{1}{\alpha}p =  0& \text{ in } \Omega(\bmu), \vspace{2mm}\\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = 0 & \text{ on $\Gamma_N(\bmu),$} \\
\displaystyle \frac{1}{\mu_1}\frac{\partial y}{\partial n} = u & \text{ on $\Gamma_C(\bmu),$} \\
y = 1 \text{ and } = 0 & \text{ on $\Gamma_{D},$} \\
\end{cases}
\end{equation}
For this test case, since $\Omega_{\text{obs}}(\bmu)\neq \Omega$, we decided to exploit the lower bound \eqref{quatities} for $\alpha = 0.07$, both for the unsteady and the steady case, for consistency with respect to the previous test case. We analyzed also other values of the penalization parameters and the last bound of \eqref{bounds}: we postpone the analysis in Remark \ref{remark_bounds}.
We will give the exact form of the involved quantities after the tracing back of the domain, since every step of the greedy algorithm is performed in the reference domain $\Omega$ given by $\mu_2 = 1$, the interested reader can find the details in \cite{tesi}. We underline that the choice of the reference parameter affect the value of the constants $c_u$ and $c_{\text{obs}}$ but, for the sake of notation, we will omit the parameter dependency.
In this case,
\begin{equation}
\gamma_a(\bmu) \eqdot \min \left \{ \frac{1}{\mu_1}, \frac{1}{\mu_1\mu_2}, \frac{\mu_2}{\mu_1}, 1\right \}\frac{1}{(1 + C_{\Omega}^2)},
\end{equation}
where $C_{\Omega}$ is the Poincar\'e associated to the reference domain.  Furthermore, we can give an explicit definition of $c_u = C_{\Gamma_C}$, i.e. the \emph{trace constant} satisfying $\norm{p}_{\Gamma_C} \leq C_{\Gamma_C}\norm{p}_{H_1(\Omega)}$, once again we refer to \cite{quarteroni2008numerical}. We remark that the Poincar\'e and the trace constants can be evaluated directly through the resolution of an eigenvalue problem which has to be performed only once since defined in the reference domain $\Omega$. In other words, their exact computation does not impact the offline performance of the reduced space building procedure. Furthermore, following the same strategy of \eqref{c_c}, we obtain that $c_c(\bmu) = C_{\Gamma_C}$. For the space-time discretization we exploited $\mathbb P^1-\mathbb P^1$ elements and $N_t = 30$ in the time interval $[0, T] = [0.,5.]$, i.e. $\Delta t = 1./6.$, in order to compare our results with \cite{Strazzullo2}.
Also for this test case, we perform a greedy algorithm on $\Cal P_h$ of cardinality $N_{\text{max}} = 225$ picked through an uniform distribution on $\Cal P$. The tolerance has been chosen as $\tau = 1\cdot 10^{-4}$. For the steady and the unsteady case, we propose a performance analysis over $100$ parameters with a uniform distribution in $\Cal P$. The results for the unsteady and the steady case follow.

\subsubsection{Unsteady Case}
\label{sec:time_geo}
This section deals with problem \eqref{test_2_time}, with fixed $\alpha = 0.07$, to which we applied the greedy algorithm using the lower bound \eqref{quatities}. To achieve the tolerance $\tau$, the offline phase took $N = 19$. Once again, exploiting the aggragated spaces strategy, we ended up with a reduced space of global dimension $4N = 76$. The problem at hand, due to the boundary control and the geometrical parametrization, needs a greater number of basis with respect to the previous example. Still, the global reduced dimension is convenient compared to the high fidelity dimension $\Cal N = N_h \times N_t = 310980$. This is the reason we reach, also in this case, a good speed up around the value of $3 \cdot 10^4$ for all $N$, obtained averaging over $100$ parameters uniformly distributed in $\Cal P$. Figure \ref{geo} shows representative high fidelity and reduced state and adjoint solutions for $t = 1s, 3s, 4.5s$, with $\alpha = 0.07$ and $\bmu = (15.0, 1.5, 2.5)$. The reduced solutions recover the high-fidelity behaviour. The same is for the control variable, represented in Figure \ref{fig:u_1} for $x_2 = 1$ (we omitted $x_2 = 0$, due to the symmetry of the problem): the two solutions visually coincide for all the time instances.

\begin{table}[H]
\caption{Unsteady case: performance analysis for the problem \eqref{test_2_time} for $\alpha = 0.07$. Average error, estimators and effectivities exploiting the lower bound $\beta^{LB}(\bmu)$ and the Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}(\bmu)$, with respect to $N$.}
\label{tab:test_2_time}
\footnotesize{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{$N$} & \multicolumn{4}{c|}{$\beta^{LB}(\bmu)$}      & \multicolumn{4}{c|}{$\beta_{\Cal B}^{\Cal N}(\bmu)$}                         \\ \cline{2-9}
                     & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$            & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$   \\ \hline
1                    & 5.61e--1&7.16e+0     & 3.05e+4   & 4.27e+3 & 6.62e--1 & 1.51e+1 & 7.68e+1 & 5.08e+1 \\ \hline
3                    & 2.10e--1&2.26e+0    & 5.44e+3    & 2.40e+3 & 2.75e--1& 3.64e--1& 1.96e+1&5.41e+1\\ \hline
5                    & 8.66e--2&8.92e--1   & 1.99e+3   &  2.23e+3 & 8.01e--2& 1.33e--1& 3.89e+0&2.91e+1\\ \hline
7                    & 3.88e--2&4.11e--1  & 6.79e+2   & 1.65e+3 & 4.57e--2& 7.03e--2& 3.89e+0&2.76e+1\\ \hline
9                    & 2.46e--2&2.68e--1  &  4.99e+2  & 1.91e+3 & 2.17e--2 & 3.71e--2& 1.94e+0&2.84e+1\\ \hline
11                   & 1.09e--2&1.11e--1  & 1.95e+2  & 1.76e+3 & 9.06e--3& 1.65e--2& 1.05e+0&  2.76e+1\\ \hline
13                 & 7.16e--3&7.83e--2  & 1.40e+2  & 1.79e+3 & 5.98e--3& 9.39e--3& 4.59e--1&  2.82e+1\\ \hline
15                 & 4.60e--3&4.93e--2  & 1.08e+2  & 2.20e+3 & 4.26e--3& 6.61e--3& 2.65e--1&  3.34e+1\\ \hline
17                 & 2.48e--3&2.46e--2  & 4.65e+1  & 1.88e+3 & 2.36e--3& 4.01e--3& 1.11e--1&  2.76e+1\\ \hline
19                 & 1.72e--3&1.16e--2  & 3.14e+1  & 1.93e+3 & 1.73e--3& 4.81e--3& 6.97e--2&  2.55e+1\\ \hline

\end{tabular}
}
\end{table}
The performance of the greedy algorithm is also evaluated in Table \ref{tab:test_2_time}. It represents the average errors defined in \eqref{eq:errors}
together with the effectivity and the error estimator\footnote{See footnote \ref{error_estimator}} with respect to the Babu\v ska inf-sup constant $\beta_{\Cal B}^\Cal N(\bmu)$ and the lower bound. In this case, we lose a lot in effectivity, but we recall that computing $225$ Babu\v ska inf-sup constants is quite expensive compared to the evaluation of the value of $\beta^{LB}(\bmu)$. Indeed, the first constant, in this case, takes around $8.6s$ to be computed, in average, while, as already said, $\beta^{LB}(\bmu)$ is computed in $0.09s$.
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=0.93\textwidth]{off_y_unsteady_geo_1_1}
\caption{}
\label{fig:off_y_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{off_y_unsteady_geo_3}
\caption{}
\label{fig:off_y_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{off_y_unsteady_geo_5}
\caption{}
\label{fig:off_y_5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{on_y_unsteady_geo_1}
\caption{}
\label{fig:on_y_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{on_y_unsteady_geo_3}
\caption{}
\label{fig:on_y_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{on_y_unsteady_geo_5}
\caption{}
\label{fig:on_y_5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{off_p_unsteady_geo_1}
\caption{}
\label{fig:off_p_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{off_p_unsteady_geo_3}
\caption{}
\label{fig:off_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{off_p_unsteady_geo_5}
\caption{}
\label{fig:off_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_unsteady_geo_1}
\caption{}
\label{fig:on_p_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_unsteady_geo_3}
\caption{}
\label{fig:on_p_3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_unsteady_geo_5}
\caption{}
\label{fig:on_p_5}
\end{subfigure}
\caption{Optimal high fidelity and reduced steady control variables with $\alpha = 0.07$ and $\bmu= (15.0, 1.5, 2.5)$. High fidelity state variable for $t = 1s, 3s, 4.5s$ in (a), (b), (c), respectively,  and reduced state variable for $t = 1s, 3s, 4.5s$ in (d), (e), (f). Analogously,  high fidelity adjoint variable in (f), (g), (h)  and reduced adjoint variable in (i), (j), (k), for $t = 1s, 3s, 4.5s.$}
\label{geo}
\end{figure}
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{Control_unsteady_geo}
\caption{}
\label{fig:u_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{Control_steady_geo}
\caption{}
\label{fig:u_3}
\end{subfigure}
\caption{Optimal high fidelity and reduced control variable for the unsteady and steady case with $\alpha = 0.07$. \textit{Unsteady}: the solutions are presented for $t=1s, 3s, 4.5s$ and $\bmu= (15.0, 1.5, 2.5)$ in (a). \textit{Staedy}: $\bmu= (12.0, 2, 2.5)$ in (b). In both cases the high fidelity and the reduced solutions coincide.}
\label{c_geo}
\end{figure}
Furthermore, the relatives error of the two approaches (first and fifth columns of Table \ref{tab:test_2_time}) are totally comparable.
However, we can see how $\beta^{LB}(\bmu)$ suffers the approximation in Figure \ref{babu_vs_lb_2}, where the two constants are compared with respect to the value of $\mu_1$ for several values of $\alpha$, with $\mu_2 = 2$ fixed. In this case, the addition of the geometrical parametrization, influences the bound, which worsens not only for lower values of $\alpha$, but also for greater values of $\mu_2$, as we can observe from Figure \ref{babu_vs_lb_2_1}.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{unsteady_geo_1}
\caption{}
\label{fig:babu_lb_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{unsteady_geo_2}
\caption{}
\label{fig:babu_lb_2}
\end{subfigure}
\hfill
\caption{Comparison of the value of the lower bound $\beta^{LB}(\bmu)$ with respect to the exact Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}(\bmu)$ for $\alpha = 1, 0.1$ and $\alpha = 0.01, 0.001$ in (a) and (b), respectively. The analysis has been performed varying the value of $\mu_1$ and fixing $\mu_2 = 2$.}
\label{babu_vs_lb_2}
\end{figure}
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{unsteady_geo_1_1}
\caption{}
\label{fig:babu_lb_1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.49\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{unsteady_geo_2_1}
\caption{}
\label{fig:babu_lb_2}
\end{subfigure}
\hfill
\caption{Comparison of the value of the lower bound $\beta^{LB}(\bmu)$ with respect to the exact Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}(\bmu)$ for $\alpha = 1, 0.1$ and $\alpha = 0.01, 0.001$ in (a) and (b), respectively. The analysis has been performed varying the value of $\mu_1$ and fixing $\mu_2 = 1$.}
\label{babu_vs_lb_2_1}
\end{figure}

\subsubsection{Steady Case}
We briefly describe the performance of the lower bound $\beta^{LB}_s(\bmu)$ for the problem \eqref{test_2}. The problem with initial dimension of $\Cal N = N_h = 10366$ is reduced to $4N = 40$. In Figure \ref{s_geo} we present some representative solutions for state and adjoint variable (the control is recovered through \eqref{gradient_eq} and represented in Figure \ref{fig:u_3}) while an averaged performance analysis is considered in table Table \ref{tab:test_2_s}, where errors \eqref{eq:errors_s} are shown, together with an effectivity and error estimator behaviours\footnote{See footnote \ref{error_estimator}.}. Also in this case, in terms of effectivity, by definition, the Babu\v ska inf-sup constant gives better results, but once again it pays in the offline basis construction, since the computation of the exact value $\beta^{N_h}_{\Cal B_s}(\bmu)$ take, averagely, $0.8s$. As in the time dependent, the effectivity is linked to the value of the penalization parameter as well as the value of $\mu_2$. For the sake of brevity we do not show the plots of the two constants varying $\alpha$ and $\mu_1$, since they are similar to Figure \ref{babu_vs_lb_2} and Figure \ref{babu_vs_lb_2_1}. In terms of computational time needed for a reduced simulation, we reach a speed up of 135, averagely.
\begin{table}[H]
\caption{Steady case: performance analysis for the problem \eqref{test_2}. Avarage error, estimators and effectivities exploiting the lower bound $\beta_s^{LB}(\bmu)$ and the Babu\v ska inf-sup constant $\beta_s^{N_h}(\bmu)$, with respect to $N$.}
\label{tab:test_2_s}
\footnotesize{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{$N$} & \multicolumn{4}{c|}{$\beta^{LB}_s(\bmu)$}      & \multicolumn{4}{c|}{$\beta_{\Cal B_s}^{N_h}(\bmu)$}                         \\ \cline{2-9}
                     & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$            & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$   \\ \hline
2                    & 3.16e--1&3.16e--1   & 3.25e+3   & 1.01e+4 & 5.82e--1&5.57e--1 & 1.01e+4&3.72e+1\\ \hline
4                    & 5.69e--2&5.69e--2    & 4.53e+2  & 7.95e+3 & 6.67e--2& 4.93e--2& 7.95e+3&2.39e+1\\ \hline
6                    & 1.52e--2&1.52e--2  & 1.11e+2  & 7.32e+3 & 2.72e--2& 1.52e--2& 7.32e+3&3.22e+1\\ \hline
8                    &5.23e--3 &4.95e--3  & 3.40e+1  & 6.88e+3 & 7.33e--3& 4.54e--3& 6.88e+3&3.13e+1\\ \hline
10                   & 2.03e--3&1.89e--3  & 1.25e+1 & 6.78e+3 & 4.63e--3& 2.65e--3& 6.78e+3&3.78e+1\\ \hline
\end{tabular}
}
\end{table}
\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{off_y_steady_geo}
\caption{}
\label{fig:off_y}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{on_y_steady_geo}
\caption{}
\label{fig:on_y}
\end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{off_p_steady_geo}
\caption{}
\label{fig:off_p}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\hspace{3mm}\includegraphics[width=\textwidth]{on_p_steady_geo}
\caption{}
\label{fig:on_p}
\end{subfigure}
\hfill
\caption{Optimal high fidelity and reduced solutions with $\alpha = 0.07$ and $\bmu=(12.0, 2.0, 2.5)$. High fidelity state variable in (a)  and reduced state variable in (b). Analogously, high fidelity adjoint variable in (c)  and reduced adjoint variable in (d).}
\label{s_geo}
\end{figure}

\begin{remark}[Other $\alpha$, other $\beta^{LB}(\bmu)$ ]
\label{remark_bounds}
We performed other tests in the geometrical parametritazion. First of all, we tried several values of $\alpha$ and the results proved what is represented in Figures \ref{babu_vs_lb_2} and \ref{babu_vs_lb_2_1}. Namely, the effectivity increases when $\alpha$ is smaller. We reached the value of $10^5$ with $\alpha = 0.01, 0.008$. \\
Furthermore, we tried to understand how the bound
\begin{equation}
\label{other}
\beta^{LB}(\bmu) = \beta_s^{LB}(\bmu) = \displaystyle \frac{\gamma_a (\bmu) }{\sqrt{2\max\left \{1,\left (\frac{c_m(\bmu)c_{\text{obs}}}{\alpha \gamma_a(\bmu)}\right )^2\right \}}},
\end{equation}
performs with respect to \eqref{quatities}. We recall that for this specific test case, we can use \eqref{other}, since the control is not distributed. We still need to specify $c_m(\bmu)$ and $c_{\text{obs}}$. It is easy to prove that  $c_m(\bmu) = C_{\Omega}\mu_2$. Then, both the constants can be approximated by an eigenvalue problem solved only once before the offline phase. Fixing $\alpha = 0.07$, bound \eqref{other} performs better than \eqref{quatities}, with lower effectivities both for steady and unsteady problem. All the results have been reported in Table \ref{tab:last}. The values of $\beta^{LB}(\bmu)$ must be compared to Table \ref{tab:test_2_time}. We gain an order of magnitude for $\eta$ with the new bound. The same happens for $\beta^{LB}_s(\bmu)$: indeed, compared with Table \ref{tab:test_2_s}, we see that the new effectivities remains around $2 \cdot 10^3$. For both the test case, the errors remain comparable. The better sharpness of \eqref{other}, can be observe also in Figures \ref{babu_vs_lb_2_1_obs}, where the new lower bound and the Babu\v ska inf-sup constant are depicted for $\alpha = 0.07$ and $\mu_2 = 1$ (to be compared with Figure \ref{babu_vs_lb_2_1}). Once again we reported only the time dependent case for the sake of brevity, since the steady case presents the same features.
\begin{table}[H]
\caption{Unsteady case: performance analysis for the problem \eqref{test_2_time} and \eqref{test_2} for $\alpha = 0.07$. Average error, estimators and effectivities exploiting the lower bounds $\beta^{LB}(\bmu)$ and  $\beta^{LB}_s(\bmu)$ given by \eqref{other}. (B.T.) Below tolerance $\tau$.
}
\label{tab:last}
\footnotesize{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{$N$} & \multicolumn{4}{c|}{$\beta^{LB}(\bmu)$}      & \multicolumn{4}{c|}{$\beta_s^{LB}(\bmu)$}                         \\ \cline{2-9}
                     & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$            & $\norm{e}_{\text{rel}}$ &$\norm{e}_{\text{abs}}$ & $\Delta_N(\bmu)$    & $\eta$   \\ \hline
2                    & 4.23e--1&4.33e+0   & 3.689e+3   & 8.51e+2 &2.99e--1 &2.90e--1 & 6.53e+2&2.24e+3\\ \hline
4                    & 1.45e--1&1.50e+0    & 1.01e+3  & 6.70e+2 & 6.36e--2& 5.35e--2& 1.12e+2&2.10e+3\\ \hline
6                    & 5.24e--2&5.36e--1  & 2.67e+2  & 4.98e+2 & 3.01e--2& 2.04e--2& 3.99e+1&1.95e+3\\ \hline
8                    &2.80e--2 &2.94e--1  & 1.58e+2  & 5.40e+2 & 7.60e--3& 6.21e--3& 2.56e+1&2.01e+3\\ \hline
10                   & 1.38e--2&1.41e--1  & 6.83e+1 & 4.84e+2 & \multicolumn{4}{c|}{B.T.}\\ \hline
12                  & 9.49e--3&9.21e--2  & 4.32e+1 & 4.69e+2 & \multicolumn{4}{c|}{B.T.}                         \\ \hline
14                   & 5.12e--3&5.24e--2  & 3.01e+1 & 5.74e+2 &\multicolumn{4}{c|}{B.T.}\\ \hline
16                   & 3.78e--3&3.85e--2  & 2.12e+1 & 5.52e+2 & \multicolumn{4}{c|}{B.T.}\\ \hline
18                   & 2.57e--3&2.41e--2  & 1.52e+1 & 6.32e+2 & \multicolumn{4}{c|}{B.T.}\\ \hline
20                  & 1.25e--3&1.21e--2  & 8.42e+0 & 6.93e+2 & \multicolumn{4}{c|}{B.T.}\\ \hline
22                   & 9.07e--4&8.64e--3  & 6.30e+0 & 7.28e+2 &\multicolumn{4}{c|}{B.T.}\\ \hline
\end{tabular}
}
\end{table}
\end{remark}

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{unsteady_geo_1_obs}
\caption{}
\label{fig:babu_lb_1_obs}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\vspace{2mm}
\includegraphics[width=\textwidth]{unsteady_geo_2_obs}
\caption{}
\label{fig:babu_lb_2_obs}
\end{subfigure}
\hfill
\caption{Comparison of the value of the lower bound \eqref{other} with respect to the exact Babu\v ska inf-sup constant $\beta_{\Cal B}^{\Cal N}(\bmu)$ for $\alpha = 1, 0.1$ and $\alpha = 0.01, 0.001$ in (a) and (b), respectively. The analysis has been performed varying the value of $\mu_1$ and fixing $\mu_2 = 1$.}
\label{babu_vs_lb_2_1_obs}
\end{figure}

\section*{Acknowledgements}
We acknowledge the support by European Union Funding for Research and Innovation -- Horizon 2020 Program -- in the framework of European Research Council Executive Agency: Consolidator Grant H2020 ERC CoG 2015 AROMA-CFD project 681447 ``Advanced Reduced Order Methods with Applications in Computational Fluid Dynamics''. We also acknowledge the PRIN 2017  ``Numerical Analysis for Full and Reduced Order Methods for the efficient and accurate solution of complex systems governed by Partial Differential Equations'' (NA-FROM-PDEs) and the INDAM-GNCS project ``Tecniche Numeriche Avanzate per Applicazioni Industriali''.
The computations in this work have been performed with RBniCS \cite{rbnics} library, developed at SISSA mathLab, which is an implementation in FEniCS \cite{fenics} of several reduced order modelling techniques; we acknowledge developers and contributors to both libraries.

\bibliographystyle{plain}

\section{Conclusions}
\label{conclusions}
In this work we presented a formulation for \ocp s governed by linear parabolic equations. We proposed a well-posedness analysis of the problem both at the continuous and at  the discrete space-time level. We underline that classical discretization techniques may be too costly in order to deal with the task of optimization for several parameters. Then, we relied on greedy algorithm, extending the known literature of steady case to unsteady ones. The main novelty is given by the proposed new error bound, made by quantities which are known a priori. The strength of the bound  is its great versatility, indeed it is valid for very general governing equations and control (from distributed to boundary ones). Furthermore, it is valid also for steady elliptic problems: at the best of our knowledge this is an improvement too, since the literature often relies on very expensive approximations algorithm \cite{negri2013reduced}. At the space-time level, the proposed greedy algorithm not only assures a rapid and reliable online phase, but lightens the offline phase of such expensive problem formulation, which, to the best of our knowledge, was performed though standard Proper Orthogonal Decomposition approach \cite{Strazzullo2}. The performance have been tested through a distributed \ocp $\;$ and a boundary \ocp, with physical and geometrical parametrization. We reach high speed up values, due to the high-dimensionality of the all-at-once space-time \ocp s. This is a first step towards the applicability of ROM for \ocp s in very real-time context, where time evolution optimization is required. \\
Finally, we conclude with some perspectives related to the proposed estimator. First of all, the bound could be sharpened in order to achieve better results in terms of effectivities. A natural and interesting step could be the extension to more complicated state equations, like Stokes equations. This will enlarge the applicability of the greedy algorithm in space-time formulation in several fields: biomedical, industrial, environmental... Indeed, the main goal is to provide a very general tool to be used in real time contexts for different applications with the purpose of planning and management action.

\section{Introduction}
\label{intro}

In several applications, optimal control problems (OCP($\boldsymbol{\mu}$)s) governed by parametrized partial differential equations (PDE($\boldsymbol{\mu}$)s) can be a versatile tool to better model physical phenomena. A parameter $\boldsymbol{\mu} \in \mathcal P \subset \mathbb R^d$ can represent physical or geometrical configurations and \ocp s respond to the need of parametric studies of controlled systems, where the underlying PDE($\boldsymbol{\mu}$)s is steered to a desired state in order to achieve a specific goal. Even though on one hand optimal control is a great modelling tool, on the other \ocp s are challenging, not only to analyse theoretically but also to deal with in a numerical setting.
Indeed, even if they have been exploited in several research fields, from shape optimization, see e.g. \cite{delfour2011shapes,makinen,mohammadi2010applied}, to fluid dynamics, see e.g. \cite{dede2007optimal,negri2015reduced,optimal,de2007optimal}, from heamodynamics {\cite{Ballarin2017,LassilaManzoniQuarteroniRozza2013a,ZakiaMaria,Zakia}} to environmental applications \cite{quarteroni2005numerical,quarteroni2007reduced,Strazzullo1,Strazzullo3,ZakiaMaria},
classical discretization techniques may result in unbearable simulations, which can limit their applicability in many query contexts, where several parametric instances must be studied, possibly in a small amount of time. Furthermore, the computational complexity drastically grows when the governing equation involves time evolution.\\
Time optimization arises in many applications and it has been studied for several PDE($\bmu$)s, see e.g. \cite{HinzeStokes,Iapichino2,leugering2014trends,seymen2014distributed,Stoll1,Stoll}, due to its great potential in terms of a mathematical model. The goal of this work is to propose a reduced basis (RB) approach to deal with the study for several values of $\bmu \in \mathcal P$ in a low-dimensional framework reducing the computational costs of multiple simulations \cite{hesthaven2015certified,prud2002reliable,RozzaHuynhManzoni2013,RozzaHuynhPatera2008}.
Concerning the employment of reduced techniques to \ocp s, the interested reader may refer to several papers as \cite{bader2016certified,bader2015certified,dede2010reduced,gerner2012certified,Iapichino1,karcher2014certified,karcher2018certified,kunisch2008proper,negri2015reduced,negri2013reduced,quarteroni2007reduced, Strazzullo2}, where the reduction has been implemented through different methodology for a wide range of governing equations.\\
In particular, we seek to extend the approach presented in \cite{negri2013reduced} for steady \ocp s to quadratic optimization models constrained to linear time dependent PDE($\bmu$)s in a space-time framework. In \cite{negri2013reduced}, a bound for the combined error of state, adjoint and control variable is proposed. However, the strategy is based on an expensive computation of a lower bound to the Babu\v ska inf-sup constant of the optimality system. We remark that the computational costs in order to find the surrogate of the Babu\v ska inf-sup constant is
prohibitive even at the steady level. Our main effort is to avoid this issue, building a new global error estimator which can be efficiently evaluated during the basis construction for time dependent problems too. To the best of our knowledge, the main contributions and findings can be summarized as follows:
\begin{itemize}
\item[$\circ$] we exploit the space-time formulation of \cite{Strazzullo2}, to build a analytical framework suited to the goal of building an error estimator for \ocp s governed by parabolic problems. We propose an analysis of the well-posedness of the problem at the continuous and discrete level, dealing with both distributed and boundary controls.
\item[$\circ$] We build a new a posteriori lower bound for the Babu\v ska inf-sup constant based on quantities which can be inexpensive to compute. This allowed us to naturally extend the RB approach of \cite{negri2013reduced} also to time dependent problems, lightening the offline costs needed to build the reduced space.
\item[$\circ$] All the findings have been mirrored for the steady \ocp s, from the analytical to the numerical point of view, proposing our lower bound as an improvement to the approach followed in \cite{negri2013reduced}.
\end{itemize}
The RB method has been tested on two Graetz flow models, with physical and geometrical parametrization and distributed and boundary controls. Moreover, we compared the lower bound performances to the ones obtained with the employment of the Babu\v ska inf-sup constant, in terms of reliability and sharpness.
This work is outlined as follows. In Section \ref{gen_problem}, we introduced the theoretical space-time formulation for \ocp s proposed in \cite{Strazzullo2}. We adapt it to the structure proposed in \cite{Langer2020}, and generalizing the space-time techniques of \cite{urban2012new}, we proved the well-posedness of the optimality system at the continuous level. Section \ref{FEM} introduces the space-time discretized system. All the findings of Section \ref{gen_problem} have been recast to the finite-dimensional framework. Furthermore, we briefly described the algebraic system we dealt with, following the all-at-once strategy of \cite{HinzeStokes, Stoll1, Stoll}. RB procedure is presented in Section \ref{sec_ROM}. First, we briefly introduce the Greedy approach following \cite{hesthaven2015certified}, then we present the bound already exploited in \cite{negri2013reduced}. Finally, we propose a new lower bound for the Babu\v ska inf-sup constant. Section \ref{results} shows the numerical results for two test cases based on Graetz flows: a distributed \ocp $\,$ with physical parametrization and a boundary \ocp $\,$ with also geometrical parameters. Conclusions follow in Section \ref{conclusions}.

\section{Problem Formulation}
\label{gen_problem}
This Section aims at introducing linear quadratic \ocp s, governed by parabolic equations.  The main goal is to generalize and apply the space-time structure already presented for parabolic equations in \cite{urban2012new, yano2014space, yano2014space1} and distributed optimal control problems in \cite{HinzeStokes, HinzeNS, hinze2008optimization, Langer2020} to parametrized \ocp s governed by time dependent PDE($\bmu$)s with a general analysis of the well-posedness of the problem. First of all, we will focus our attention to time dependent problems, but then we will provide a well-posedness analysis also for steady \ocp s, since our fundings are still valid (with very few modifications) in the steady case.

\subsection{Time Dependent \ocp s: Problem Formulation}
\label{problem}
In this Section we introduce the continuous formulation of \ocp s governed by a parabolic state equation. We deal with a parametrized setting, where the parameter $\bmu \in \Cal P \subset \mathbb R^p$ could represent physical or geometrical features, with {$p \in \mathbb{N}$}.
Let {$\Omega \subset \mathbb R^n$, $n = 1, 2, 3$} be an open and bounded regular domain. The evolution of the system is studied in the time interval $[0,T]$ {for some $T > 0$}. Furthermore, we consider two separable Hilbert spaces $Y$ and $H$ {defined over $\Omega$, which} verify $Y \hookrightarrow H \hookrightarrow Y\dual$, and another possibly different Hilbert space $U$ over the \emph{control domain $\Omega_u \subset \overline \Omega$}.
Let  $\Cal U = L^2(0,T; U)$ be {the} \emph{control space}, while
$$
\Cal Y_0 :=
\displaystyle \Big \{
y \in L^2(0,T; Y) \;\; \text{s.t.} \;\;  \dt{y} \in L^2(0,T; Y\dual) \text{ such that } y(0) = 0
\Big \}
$$ is the \emph{state space}.
 {We endow $\Cal Y_0$ and $\Cal U$ with the following norms}, respectively:
\begin{align*}
\norm{y}_{\Cal Y_0}^2 & = \intTime{\norm{y}_Y^2} +  \intTime{\parnorm{\dt y}_{Y\dual}^2} \qquad \text{and} \qquad
 \norm{u}_{\Cal U}^2 = \intTime{\norm{u}_U^2}.
\end{align*}
Furthermore, let us define the space $\Cal Q := L^2(0,T; Y)$. The aim of an \ocp $\,$is to {steer} a PDE($\bmu$) solution to a desired observation $y_d(\bmu) \in L^2(0,T; Y_{\text{obs}})$, with $Y\subseteq Y_{\text{obs}}$. Furthermore, we also assume $Y \subseteq U$. These latter assumptions guarantee that there exists positive (possibly) parameter dependent\footnote{In the applications we will present in Section \ref{results}, these constant are {parameter dependent due to shape parametrization}.} constants $c_{\text{obs}}$ and $c_{u}$ such that
\begin{align}
\label{Y_in_Y_obs}
\norm{y}_{Y_{\text{obs}}} \leq c_{\text{obs}} \norm{y}_Y, \hspace{1cm} \forall y \in Y, \\
\label{Y_in_U}
\norm{y}_{U} \leq c_u\norm{y}_Y, \hspace{1cm} \forall y \in Y.
\end{align}
{In the following we assume that $Y, H$ and $U$ are contained in $L^2(\Omega)$. This is typically the case for the parabolic optimal control problem that we aim to tackle in this work}. The formulation of \ocp s reads as follows: for a given $\bmu \in \Cal P$ and forcing term
$f \in L^2(0,T; L^2({\Omega}))$, find the pair
$(y,u) :=(y(\bmu), u(\bmu)) \in \Cal Y_0 \times \Cal U$ which solves
\begin{equation}
\label{eq_functional}
\min_{(y,u) \in \Cal Y_0 \times \Cal U}
J((y,u); \bmu) = \frac{1}{2} \intTime{m(y - y_d(\bmu), y - y_d(\bmu); \bmu)}
+ \alf \intTime{n(u,u; \bmu)},
\end{equation}
governed by
\begin{equation}
\label{eq_time_strong}
\begin{cases}
\displaystyle {S(\bmu)} \dt {y} + {D}_a(\bmu)y = C(\bmu)u + {f(\bmu)} & \text{in } {\Omega} \times [0,T], \\
\displaystyle y = {g(\bmu)} & \text{on  } {\Gamma_D} \times [0,T], \\
 \displaystyle \dn{y} = 0 & \text{on  } {\Gamma_N} \times [0,T], \\
y(0) = 0 & \text{in } {\Omega}.
\end{cases}
\end{equation}
{Here,
\begin{itemize}
\item[\small $\circ$] $D_a(\bmu): Y \rightarrow Y\dual$ is a general differential state operator,
\item[\small $\circ$] $S(\bmu): Y\dual \rightarrow Y\dual$ is a function representing the time evolution,
\item[\small $\circ$]  $C(\bmu): U \rightarrow Y\dual$ is an operator describing the control action,
\item[\small $\circ$] $f(\bmu)$ denotes external sources,
\item[\small $\circ$] $\Gamma_D$ is the portion of the boundary $\partial \Omega$ where Dirichlet boundary conditions are applied, and $g(\bmu)$ represents Dirichlet data,
\item[\small $\circ$]$\Gamma_N$ is the portion of the boundary $\partial \Omega$ where Neumann boundary conditions are applied,
\item[\small $\circ$] $m(\cdot, \cdot; \bmu) \goesto {Y}{Y}{\mathbb R}$, associated to the operator $M(\bmu): Y \rightarrow Y\dual$, and $n(\cdot, \cdot; \bmu) \goesto {U}{U}{\mathbb R}$, associated to the operator $N(\bmu): U \rightarrow U\dual$, are two bilinear forms we will describe later in the work.
\end{itemize}
A notable case, which will be covered in the numerical test cases in Section \ref{results}, is the one in which $\bmu$ contains geometrical parameters: without loss of generality, in our presentation we assume to have already traced back the problem to the \emph{reference domain} $\Omega$, and that $S(\bmu)$, ${D}_a(\bmu)$, $C(\bmu)$, $M(\bmu)$, $N(\bmu)$, and $f(\bmu)$ encode suitable pulled back operators, see e.g.\ \cite{RozzaHuynhPatera2008}. We underline that in the following the control operator $C(\bmu)$ and $S(\bmu)$ will always be (the trace back of) the identity map. This is indeed a very common scenario, and does not limit the practical applicability of the resulting \ocp. As a consequence, $S(\bmu)$ and $C(\bmu)$ are self-adjoint and, in case of geometrical parametrization, of the form
\begin{equation}
\label{actual_forms}
\sum_{i}^{Q_S}c_S^i(\bmu)\chi_{\Omega^i_S} \quad \text{and}
\quad \sum_{i}^{Q_C}c_C^i(\bmu)\chi_{\Omega^i_C},
\end{equation}
respectively, for $Q_S, Q_C \in \mathbb N$ and $c_S^i(\bmu), c_C^i(\bmu)$ positive constants related to the trace back of indicator functions $\chi_{\Omega_S^i}, \chi_{\Omega_C^i}$ which verify
\begin{equation*}
\bigcup_{i}^{Q_S} \Omega_S^i = \Omega \quad \text{ and } \quad \bigcup_{i}^{Q_C} \Omega_C^i = \Omega_u.
\end{equation*} For the sake of generality, from now on we will always work with the formulation \eqref{actual_forms}.
Moreover,  we assume the following for the bilinear forms appearing in the functional \eqref{eq_functional}:
\begin{enumerate}
\item[(a)] \label{m_hyp} $m(\cdot, \cdot; \bmu) \goesto {Y}{Y}{\mathbb R}$ is a continuous with constant $c_m(\bmu)$, symmetric and positive semidefinite bilinear form, defined by (possibly tracing back) the $L^2$ scalar product over the \emph{observation domain} $\Omega_{\text{obs}} \subseteq \Omega$,
\item[(b)] \label{n_hyp} $n(\cdot, \cdot; \bmu) \goesto {U}{U}{\mathbb R}$ is (possibly the trace back of) the scalar product of $U$ restricted to $\Omega_u$ thus the action of $N(\bmu)$ is equivalent to the one of $C(\bmu)$.
\end{enumerate}
Finally, $0 < \alpha \leq 1$ is a fixed \emph{penalization parameter}. We remark that the role of $\alpha$ influences the value of the control variable $u$: the larger is $\alpha$, the more the control will weight in the functional \eqref{eq_functional} and the less will act on the system.}\\
 The problem at hand can be recast in weak formulation as follows: given $\bmu \in \Cal P$ find the pair $(y,u) \in {\Cal Y_0} \times \Cal U$ which verifies
\begin{equation}
\label{eq_time_weak}
\begin{cases}
\displaystyle \intTime{s(y, q; \bmu)}
+ \intTime {a (y, q; \bmu)} =
\intTime{c(u ,q; \bmu)}
+\intTime{ \la G(\bmu), q \ra_{Y\dual, Y}} & \forall q \in \Cal Q, \\
y(0) = 0  & \text{in } \Omega,
\end{cases}
\end{equation}
where $a \goesto{Y}{Y}{\mathbb R}$ and $c \goesto{U}{Y}{\mathbb R}$ are the bilinear forms associated to ${D}_a(\bmu)$ and $C(\bmu)$, respectively.
$ G(\bmu) \in Y\dual $ is a continuous functional including forcing and boundary terms deriving from the weak state equation and
\begin{equation}
\label{time}
s(y, q; \bmu) = \left \la {S(\bmu)} \dt{y}, q\right \ra_{Y\dual Y}
\end{equation}
Furthermore, we make two other assumptions on the problem structure, i.e.
\begin{enumerate}
\item[(c)] \label{coercivity_a} $a(\cdot, \cdot; \bmu)$ is continuous and coercive of constants $c_a(\bmu)$ and $\gamma_a(\bmu)$, respectively,
\item[(d)] \label{continuity_of_c} $c(\cdot, \cdot; \bmu)$ is continuous of constant $c_c(\bmu)$.
\end{enumerate}
We remark that hypotheses (c) and (d) ensure the existence of a unique $y \in \Cal Y_0$, solution {to} \eqref{eq_time_weak}, for a given $u \in \Cal U$ and $\bmu \in \Cal P$. \\
 The weak \ocp $\;$ has the following form:  given $\bmu \in \Cal P$, find the pair $(y,u) \in \Cal Y_0 \times \Cal U$ which satisfies
\begin{equation}
\label{general_problem}
\min_{(y, u) \in \Cal Y_0 \times \Cal U} J((y, u); \bmu) \spazio \text{such that \eqref{eq_time_weak} holds}.
\end{equation}
The proposed problem can be solved through a Lagrangian approach. {To this end}, we define an \emph{adjoint variable}
$p :=p(\bmu) \in \Cal Y_T$, where
$$
\Cal Y_T = \displaystyle \Big \{
p \in L^2(0,T; Y) \;\; \text{s.t.} \;\;  \dt{p} \in L^2(0,T; Y\dual) \text{ such that } p(T) = 0
\Big \},
$$
is the \emph{adjoint space}, endowed with the same norm of $\Cal Y_0$. For the sake of clarity, we underline that we have chosen to work with the Hilbert space $Y$ also for the adjoint variable, rather then another Hilbert space, say $P$. The assumption $P \equiv Y$ is needed in order to guarantee the well-posedness of the problem at hand.
In order to solve the minimization problem
\eqref{general_problem} we build the following Lagrangian functional:
\begin{equation}
\label{functional}
\Lg (y,u,p; \bmu) = J((y, u); \bmu)
+ \displaystyle \intTime{s(y, p; \bmu)}
+ \intTime {a (y, p; \bmu)} - \intTime{c(u,p; \bmu)}
- \intTime{ \la G(\bmu), p \ra_{Y\dual, Y}}.
\end{equation}
In order to find the optimal pair $(y,u)$, we differentiate with respect to state, control and adjoint variables, obtaining the following optimization system:
 given $\bmu \in \Cal P$, find $(y, u, p) \in \Cal Y_0 \times \Cal U \times \Cal Y_T$
\begin{equation}
\label{optimality_system}
\begin{cases}
D_y\Lg(y, u, p; \bmu)[z] = 0 & \forall z \in \Cal Q,\\
D_u\Lg(y, u, p; \bmu)[v] = 0 & \forall v \in \Cal U,\\
D_p\Lg(y, u, p; \bmu) [q]= 0 & \forall q \in \Cal Q.\\
\end{cases}
\end{equation}
In the end, the optimality system
\eqref{optimality_system}, in strong formulation, reads: for a given $\bmu$ find $(y,u,p) \in \Cal Y_0 \times \Cal U \times \Cal Y_T$ such that
\begin{equation}
\label{strong_form_optimality_system}
\begin{cases}
\displaystyle M(\bmu)y \chi_{\Omega_{\text{obs}}} - S(\bmu)\dt{p} + D_a(\bmu)\dual p =
M(\bmu)y_d & \text{ in } \Omega \times [0,T], \\
\alpha N(\bmu)u -  C(\bmu)p\chi_{\Omega_u} = 0 & \text{ in } \Omega \times [0,T], \\
\displaystyle S(\bmu) \dt{y} + D_a (\bmu)y -C(\bmu) u = f (\bmu)& \text{ in } \Omega \times [0,T], \\
y(0) = y_0  & \text{ in } \Omega , \\
p(T) = 0 & \text{ in } \Omega, \\
\text{boundary conditions} & \text{ on $\partial{\Omega} \times [0,T],$}
\end{cases}
\end{equation}
where $D_a(\bmu)^\ast$ is the dual operator associated to $D_a(\bmu)$, while $\chi_{\Omega_{\text{obs}}}$ and $\chi_{\Omega_u}$ are the indicator functions of the observation domain $\Omega_{\text{obs}}$ and the control domain $\Omega_u$, respectively. The first equation of system \eqref{strong_form_optimality_system} is known as \emph{adjoint equation}, the second one as \emph{optimality equation} and the third one as \emph{state equation}. Exploiting the \emph{optimality equation}
\begin{equation}
\label{gradient_eq}
\alpha N(\bmu)u - C(\bmu)p\chi_{\Omega_u} = 0 \text{ in } \Omega \times [0,T],
\end{equation}
and thanks to the assumption that $C(\bmu)$ and  $N(\bmu)$ both represent (the possible trace back) $L^2$ scalar product over the the control domain,
 we can recast \eqref{strong_form_optimality_system} as: given $\bmu \in \Cal P$, find the pair $(y,p) \in \Cal Y_0 \times \Cal Y_T$ such that the following system is verified
\begin{equation}
\label{no_u}
\begin{cases}
\displaystyle M(\bmu)y \chi_{\Omega_{\text{obs}}}  - S(\bmu) \dt{p} + D_a(\bmu)\dual p =
 M(\bmu)y_d & \text{ in } \Omega \times [0,T], \\
\displaystyle  S(\bmu)\dt{y} +  D_a (\bmu)y - \frac{1}{\alpha}C(\bmu)p\chi_{\Omega_u} =  f & \text{ in } \Omega \times [0,T], \\
y(0) = y_0  & \text{ in } \Omega , \\
p(T) = 0 & \text{ in } \Omega, \\
\text{boundary conditions} & \text{ on $\partial{\Omega} \times [0,T].$}
\end{cases}
\end{equation}

We will refer to \eqref{no_u}, as \emph{no-control} framework (because the control variable is eliminated from the optimality system), see e.g \cite{Langer2020}, opposed to classical optimality system used, for example, in \cite{karcher2014certified,karcher2018certified,negri2015reduced,negri2013reduced,quarteroni2007reduced, Strazzullo2}\footnote{We remind that the control variable can be recovered in post-processing thanks to relation \eqref{gradient_eq}.}.\\Equivalently, the proposed system \eqref{no_u} in a mixed variational formulation reads: given $\bmu \in \Cal P$, find the pair $(y,p) \in \Cal Y_0 \times \Cal Y_T$ such that
\begin{equation}
\label{global}
\Cal B((y, p), (z, q); \bmu) =\big \la \Cal F(\bmu), (z, q)\big \ra \quad \forall (z, q) \in \Cal Q \times \Cal Q.
\end{equation}
with
\begin{align}
\label{cal_B}
\Cal B((y, p), (z, q); \bmu) = \intTime{ s(y, z; \bmu)}
+ & \intTime{a(y, z; \bmu)} - \frac{1}{\alpha}\intTime{c(p, z; \bmu)}  \\ \nonumber
& + \intTime{m(y, q; \bmu)} - \intTime{s(p, q; \bmu)}+ \intTime{a(q, p; \bmu)}.
\end{align}
and
\begin{equation}
\big \la \Cal F(\bmu), (z, q) \big \ra = \intTime{m(y_d, q; \bmu)} + \intTime{\big \la G(\bmu) , z \big \ra}.
\end{equation}
In order to prove  the well-posedness of \eqref{global}, we want to exploit the Ne\v{c}as-Babu\v{s}ka theorem \cite{necas}. It is clear that, for a given $\bmu \in \Cal P$ and $y_d \in L^2(0,T; Y_{\text{obs}})$, $\Cal F(\bmu) \in (\Cal Q \times \Cal Q)\dual$ is a linear continuous functional and thanks to assumptions (a), (c), (d) and definition \eqref{time}, the bilinear form \eqref{cal_B} is continuous, indeed there exists a positive constant $c_{\Cal B}(\bmu)$ such that:
\begin{equation}
\label{continuity_B}
\Cal B((y,p), (z,q); \bmu) \leq c_{\Cal B} (\bmu) \sqrt{\norm{y}_{\Cal Y_0}^2 + \norm{p}_{\Cal Y_T}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}.
\end{equation}
{In order to recover} the hypotheses of the Ne\v{c}as-Babu\v{s}ka theorem, we will present two lemmas on the injectivity and surjectivity properties of \eqref{cal_B}. The first one proves the surjectivity of ajoint of the bilinear form \eqref{cal_B}. {The proof combines ideas from \cite[Proposition 2.2]{urban2012new} for the parabolic state equations and \cite{Langer2020} for distributed \ocp s}.
\begin{lemma}[Surjectivity of $\Cal B \dual$] The bilinear form \eqref{cal_B} {satisfies} the following inf-sup stability condition: {there exists $\beta(\bmu) > 0$ such that}
\label{lemma_surj}
\begin{equation}
\label{surj}
\beta_{\Cal B}(\bmu){\;\vcentcolon=\;} \inf_{(y,p)  \in (\Cal Y_0 \times \Cal Y_T)\setminus \{(0,0)\}}\sup_{(z,q)  \in (\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \frac{\Cal B((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{\Cal Y_0}^2 + \norm{p}_{\Cal Y_T}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}} \geq \beta(\bmu).
\end{equation}
\end{lemma}
\begin{proof}
Let us consider $0 \neq (y, p) \in \Cal Y_0 \times \Cal Y_T$ and let us define
\begin{equation}
z_y =  (D_a(\bmu)\dual)^{-1} \dt{y} \quad \text{and} \quad q_p =  - D_a(\bmu)^{-1} \dt{p}.
\end{equation}
\underline{Case 1}. We focus {first} on the case $\Omega_u = \Omega_{\text{obs}}$. \\
In this context,  $c(\cdot, \cdot, \bmu) \equiv m(\cdot, \cdot; \bmu)$, thanks to their definition as the $L^2$ scalar product over control and observation domain, respectively. Indeed, if the two domains coincide, the two $L^2$ products will and, thus, the two bilinear forms will act in the same way. \\
Furthermore, it is clear that $(\alpha c_py + c_{z_y}z_y, c_{p}p + q_p) \in \Cal Q \times \Cal Q$, {where the positive constants $c_{z_y}$ and $c_p$ will be determined afterwards}. Thus, we can state the following:
\begin{align*}
\sup_{(z,q)\in (\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu)&  \geq \Cal B((y,p), (\alpha c_p y + c_{z_y}z_y, c_p p + q_p); \bmu) \\ \nonumber
& \geq \alf c_p c_S(\bmu)\norm{y(T)}_{H}^2 + \alpha c_p \gamma_a(\bmu) \norm{y}_{\Cal Q}^2 - c_p\intTime{c(p, y;  \bmu)}\\ \nonumber
& \quad + c_{z_y}s(y, z_y; \bmu) + c_{z_y}\intTime{a(y, z_y; \bmu)} - \frac{c_{z_y}}{\alpha}\intTime{c(p, z_y;  \bmu)} \\ \nonumber
&  \quad \qquad \quad + c_p \intTime{m(y, p; \bmu)} + \frac{c_S(\bmu)}{2}\norm{p(0)}_H^2 + c_p \gamma_a(\bmu)\norm{p}^2_{\Cal Q}  \\ \nonumber
& \quad \quad \quad \quad    + \intTime{m(y, q_p;  \bmu)} - s(p, q_p;  \bmu) + \intTime{a(q_p, p;  \bmu)},
\end{align*}
where we have exploited the coercivity of $a(\cdot, \cdot; \bmu)$ and the relation
\begin{align}
\label{s_T}
\intTime{s(w, w; \bmu)} = \half
\intTime{\sum_i^{Q_S}c_S^i(\bmu)\chi_{\Omega_S^i}\dt{\norm{w(t)}^2_{H}}}& \geq \underbrace{\min_i \{c_s^i(\bmu) \}}_{c_S(\bmu)}\left ( \half \norm{w(T)}_{H}^2 - \half  \norm{w(0)}_{H}^2 \right ) & \\ \nonumber
& \geq  c_S(\bmu)\half \norm{w(T)}^2_H
& w \in \Cal Y_0,
\end{align}
which reads, analogously,  $\displaystyle - s(w, w; \bmu) \geq c_S(\bmu) \half \norm{w(0)}$ for $w\in \Cal Y_T$. Furthermore, we can observe that
\begin{equation}
\label{a_z_y}
a(y, z_y; \bmu) = \Big \la D_a(\bmu)y, (D_a(\bmu)\dual)^{-1}\dt{y} \Big \ra_{Y\dual Y} = \Big \la y, \dt{y} \Big \ra_{Y\dual Y} = \half \dt{\norm{y(t)}^2_{H}},
\end{equation}
and
\begin{equation}
\label{a_q_p}
a(q_p, p; \bmu) = - \Big \la D_a(\bmu)(D_a(\bmu))^{-1}\dt{p}, p \Big \ra_{Y\dual Y} = - \Big \la \dt{p}, p \Big \ra_{Y\dual Y} =- \half \dt{\norm{p(t)}^2_{H}},
\end{equation}
which result in {non negative} quantities, exploiting the same argument of \eqref{s_T}.
Furthermore, we recall that $m(y, p; \bmu) = c(	p, y; \bmu)$ {because} observation and control domains coincide.
{Exploiting the inequalities}
\begin{equation}
\label{s_z_y}
s(y, z_y; \bmu) = \sum_i^{Q_S}c_S^i(\bmu)\chi_{\Omega_{S}^i} a(z_y, z_y; \bmu) \geq c_S(\bmu) \gamma_a(\bmu)\norm{z_y}^2_Y,
\end{equation}
and
\begin{equation}
\label{s_q_p}
-s(p, q_p; \bmu) = \sum_i^{Q_S}c_S^i(\bmu)\chi_{\Omega_{S}^i} a(q_p,q_p; \bmu) \geq c_S(\bmu) \gamma_a(\bmu)\norm{q_p}^2_Y,
\end{equation}
the Young's inequality and the continuity assumption (d), we can state that
\begin{align*}
\sup_{(z,q)\in (\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu)&  \geq \alpha c_p\gamma_a(\bmu)\norm{y}_{\Cal Q}^2
+ c_{z_y}c_S(\bmu)\gamma_a(\bmu)\norm{z_y}^2_{\Cal Q}- \frac{c_c(\bmu)c_{z_y}}{\alpha}\intTime{\norm{p}_U \norm{z_y}_Y} \\ \nonumber
&  \quad \quad     + c_p \gamma_a(\bmu)\norm{p}_{\Cal Q}^2 - c_m(\bmu)\intTime{\norm{y}_{Y}\norm{q_p}_{Y}} + c_S(\bmu) \gamma_a(\bmu)\norm{q_p}_{\Cal Q}^2 \\
&\geq  \frac{\alpha c_p\gamma_a(\bmu)}{2}\norm{y}_{\Cal Q}^2+ \Big( \frac{\alpha c_p\gamma_a(\bmu)}{2} - \frac{c_m(\bmu)}{2\eta_2}\Big )\norm{y}_{\Cal Q}^2 \\
& \quad \quad +
 \frac{c_{z_y}c_S(\bmu)\gamma_a(\bmu)}{2}\norm{z_y}_{\Cal Q}^2+ \Big( \frac{c_{z_y}c_S(\bmu)\gamma_a(\bmu)}{2} - \frac{c_c(\bmu)c_{z_y}\eta_1}{2\alpha}\Big )\norm{z_y}_{\Cal Q}^2
 \\
& \quad \quad \quad \quad +
\frac{c_{p}\gamma_a(\bmu)}{2}\norm{p}_{\Cal Q}^2+ \Big( \frac{c_{p}\gamma_a(\bmu)}{2} - \frac{c_c(\bmu)c_{z_y}c_u(\bmu)}{2\alpha\eta_1}\Big )\norm{p}_{\Cal Q}^2\\
& \quad \quad \quad \quad  \quad \quad +
\frac{c_S(\bmu)\gamma_a(\bmu)}{2}\norm{q_p}_{\Cal Q}^2+ \Big( \frac{c_S(\bmu)\gamma_a(\bmu)}{2} - \frac{c_m(\bmu)\eta_2}{2}\Big )\norm{q_p}_{\Cal Q}^2,
\end{align*}
for some positive $\eta_1$ and $\eta_2$, and $c_u(\bmu)$ is the constant of \eqref{Y_in_U}. Choosing
\begin{equation*}
\eta_1 = \frac{\alpha c_S(\bmu)\gamma_a(\bmu)}{c_c(\bmu)}, \quad  c_{z_y} = \frac{c_p c_S(\bmu) \gamma_a(\bmu)^2 \alpha^2}{c_c(\bmu)^2c_u(\bmu)}, \quad \eta_2 = \frac{\gamma_a(\bmu)c_S(\bmu)}{c_m(\bmu)}, \; \text{ and } \; c_p = \frac{c_m(\bmu)^2}{c_S(\bmu)\gamma_a(\bmu)^2 \alpha},
\end{equation*}
it holds
\begin{align*}
\sup_{(z,q)\in(\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu) & \geq  \frac{ c_m(\bmu)^2}{2c_S(\bmu)\gamma_a(\bmu)}\norm{y}_{\Cal Q}^2+
 \frac{c_m(\bmu)^2 c_S(\bmu)\gamma_a(\bmu)\alpha}{2c_c(\bmu)^2c_u(\bmu)}\norm{z_y}_{\Cal Q}^2\\
& \quad \quad + \frac{c_{m}(\bmu)^2}{2 c_S(\bmu)\gamma_a(\bmu)\alpha}\norm{p}_{\Cal Q}^2 +
\frac{c_S(\bmu)\gamma_a(\bmu)}{2}\norm{q_p}_{\Cal Q}^2. \\
\end{align*}
We now use that
\begin{equation}
\label{D_continuity}
\displaystyle \parnorm{\dt{y}}_{Y \dual} = \norm{ D_a(\bmu)\dual z_y} \leq c_a(\bmu)\norm{z_y}_Y
\quad \text{ and } \quad
\displaystyle \parnorm{\dt{p}}_{Y \dual} = \norm{ - D_a(\bmu)q_p} \leq c_a(\bmu)\norm{q_p}_Y,
\end{equation}
thus,
\begin{align*}
\sup_{(z,q)\in(\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu)& \geq
\min \Big \{
\frac{ c_m(\bmu)^2}{2c_S(\bmu)\gamma_a(\bmu)},
 \frac{c_m(\bmu)^2 c_S(\bmu)\gamma_a(\bmu)\alpha}{2c_c(\bmu)^2c_u(\bmu)c_a(\bmu)^2}, \frac{c_S(\bmu)\gamma_a(\bmu)}{2c_a(\bmu)^2}
\Big \}
(\norm{y}_{\Cal Y_0}^2 +
\norm{p}_{\Cal Y_T}^2). \\
\end{align*}
Taking into account the denominator of \eqref{surj} and defining
\begin{equation}
\beta_a(\bmu) :=  \inf_{\phi\in Y\setminus \{0\}} \sup_{\psi \in Y \setminus \{0\}} \frac{a(\psi, \phi; \bmu)}{\norm{\phi}_Y\norm{\psi}_Y},
\end{equation}
we have, being $\alpha \leq 1$,
$$
\begin{aligned}
\sqrt{\norm{\alpha c_py + c_{z_y}z_y}_{\Cal Q}^2 + \norm{c_{p}p + q_p}_{\Cal Q}^2}
& \leq \sqrt{2(\alpha^2 c_p^2 \norm{y}_{\Cal Q}^2 + c_{z_y}^2 \norm{z_y}_{\Cal Q}^2
+ c_p^2 \norm{p}_{\Cal Q}^2 + \norm{q_p}_{\Cal Q}^2)}\\ \nonumber
& \leq \sqrt{
\begin{aligned}
2\Big (\alpha^2 c_p^2 \norm{y}_{\Cal Q}^2 & + \frac{c_{z_y}^2}{\beta_a(\bmu)^2} \intTime{\parnorm{\dt{y}}_{Y\dual}^2}
\\ & \qquad+ c_p^2 \norm{p}_{\Cal Q}^2 + \frac{1}{\beta_a(\bmu)^2}\intTime{\parnorm{\dt{p}}_{Y\dual}^2\Big )}
\end{aligned}
}\\
& \leq \sqrt{2\max \Big \{ c_p^2, \frac{c_{z_y}^2}{\beta_a(\bmu)^2} , \frac{1}{\beta_a(\bmu)^2} \Big \}
(\norm{y}_{\Cal Y_0}^2+ \norm{p}_{\Cal Y_T}^2)}.
\end{aligned}
$$
Finally, since the proposed estimates do not depend on the choice of $(y,p) \in \Cal Y_0 \times \Cal Y_T$, relation \eqref{surj} holds with
\begin{equation*}
\label{surj_caso_1}
\beta(\bmu) = \frac{\min \Big \{
\frac{ c_m(\bmu)^2}{2 c_S(\bmu)\gamma_a(\bmu)},
 \frac{c_m(\bmu)^2 c_S(\bmu)\gamma_a(\bmu)\alpha}{2c_c(\bmu)^2 c_u(\bmu)c_a(\bmu)^2}, \frac{c_S(\bmu)\gamma_a(\bmu)}{2c_a(\bmu)^2}
\Big \}}{\sqrt{2\max \Big \{ c_p^2, \frac{c_{z_y}^2}{\beta_a(\bmu)^2} , \frac{1}{\beta_a(\bmu)^2} \Big \} }}.
\end{equation*}
\underline{Case 2}. We work now with the assumption $\Omega_u \neq \Omega_{\text{obs}}$. We assume at least one of the two between the control and the observation domain is not $\Omega$, say $\Omega_{\text{obs}}$, since they must be different\footnote{\label{foot_1}The choice has been driven by the problem at hand in Section \ref{results}. The generalization to $\Omega_{\text{obs}} = \Omega$ and $\Omega_u \neq \Omega$ is postponed to Remark \ref{remark_omega_u}.}. We will show that also in this case inequality \eqref{surj} holds. {Towards this goal}, we define $\kappa:= \kappa(\bmu) \in \mathcal Y_0$ solution of the following auxiliary problem for a given $\bmu \in \Cal P$, a positive constant $c_y$ and a given $y \in \Cal Q$:
\begin{equation}
\label{auxiliary_kappa}
\begin{cases}
\displaystyle \intTime{s(\kappa, r; \bmu)} + \intTime{a(\kappa, r; \bmu)} = - \intTime{m(y,r; \bmu)}
+ \frac{c_y}{\alpha}\intTime{c(r, y; \bmu)} &  \forall r \in \Cal Q, \\
\kappa(0) = 0 & \text{in } \Omega, \\
\kappa \equiv 0 & \text{in } \Omega_{\text{obs}}.
\end{cases}
\end{equation}
We notice that the parabolic problem is well posed thanks to the continuity properties of $m(y, r; \bmu)$ and $c(r, y; \bmu)$ and the preserved continuity and coercivity of $a(\cdot, \cdot; \bmu)$ in $\Omega \setminus \Omega_{\text{obs}}$. Let us consider the element $(c_y y + c_{z_y}z_y, p + q_p + \kappa) \in \Cal Q \times\Cal Q$, where $c_y$, and $c_{z_y}$ are, once again, two positive constants to be determined. Thus, it holds
\begin{align*}
\sup_{(z,q)\in (\Cal Q \times \Cal Q) \setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu)&  \geq \Cal B((y,p), (c_y y + c_{z_y}z_y, p + q_p + \kappa); \bmu) \\ \nonumber
& \geq c_S(\bmu) \frac{c_y}{2}\norm{y(T)}_{H}^2 + c_y\gamma_a(\bmu) \norm{y}_{\Cal Q}^2 - \frac{c_y}{\alpha}\intTime{c(p, y;  \bmu)}\\ \nonumber
& \qquad + c_{z_y}s(y, z_y; \bmu) + c_{z_y}\intTime{a(y, z_y; \bmu)} - \frac{c_{z_y}}{\alpha}\intTime{c(p, z_y;  \bmu)} \\ \nonumber
&  \qquad \quad + \intTime{m(y, p; \bmu)} + \frac{c_S(\bmu)}{2}\norm{p(0)}_{H}^2 + \gamma_a(\bmu)\norm{p}^2_{\Cal Q}  \\ \nonumber
& \qquad \quad \quad   + \intTime{m(y, q_p;  \bmu)} - \intTime{s(p, q_p;  \bmu)} + \intTime{a(q_p, p;  \bmu)} \\ \nonumber
& \qquad \qquad \quad  \quad    + \intTime{m(y, \kappa;  \bmu)} - \intTime{s(p, \kappa;  \bmu) }+ \intTime{a(\kappa, p;  \bmu)} \\
\end{align*}
{Thanks to the definition of $\kappa$ in \eqref{auxiliary_kappa}} it holds:
\begin{equation}
\label{w_kappa}
-\intTime{s(\kappa, p; \bmu)} = \intSpace{\kappa(0)p(0)} -\intSpace{ \kappa(T)p(T)} + \intTime{s(\kappa, p; \bmu)} = \intTime{s(\kappa,p; \bmu)},
\end{equation}
and $m(y, \kappa; \bmu) = 0$,
{which combined with \eqref{s_T}, \eqref{a_z_y}, \eqref{a_q_p}, \eqref{s_z_y}, \eqref{s_q_p}, hypotheses (a), (c) and (d), implies}
\begin{align*}
\sup_{(y,p) \in (\Cal Q \times \Cal Q)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu)&  \geq c_y\gamma_a(\bmu)\norm{y}^2_{\Cal Q} + c_{z_y}c_S(\bmu)\gamma_a(\bmu)\norm{z_y}^2_{\Cal Q} - \frac{c_c(\bmu)c_{z_y}}{\alpha}\intTime{\norm{p}_U \norm{z_y}_Y} \\  \nonumber
&  \quad \quad \quad    + \gamma_a(\bmu)\norm{p}_{\Cal Q}^2 - c_m(\bmu)\intTime{\norm{y}_{Y}\norm{q_p}_{Y}} + c_S(\bmu)\gamma_a(\bmu)\norm{q_p}_{\Cal Q}^2 \\
&\geq  \frac{c_y\gamma_a(\bmu)}{2}\norm{y}_{\Cal Q}^2+ \Big( \frac{c_y\gamma_a(\bmu)}{2} - \frac{c_m(\bmu)}{2\eta_2}\Big )\norm{y}_{\Cal Q}^2 \\
& \quad \quad +
 \frac{c_{z_y}c_S(\bmu)\gamma_a(\bmu)}{2}\norm{z_y}_{\Cal Q}^2+ \Big( \frac{c_{z_y}c_S(\bmu)\gamma_a(\bmu)}{2} - \frac{c_c(\bmu)c_{z_y}\eta_1}{2\alpha}\Big )\norm{z_y}_{\Cal Q}^2
 \\
& \quad \quad \quad \quad +
\frac{\gamma_a(\bmu)}{2}\norm{p}_{\Cal Q}^2+ \Big( \frac{\gamma_a(\bmu)}{2} - \frac{c_c(\bmu)c_{z_y}c_u(\bmu)}{2\alpha\eta_1}\Big )\norm{p}_{\Cal Q}^2\\
& \quad \quad \quad \quad  \quad \quad +
\frac{c_S(\bmu)\gamma_a(\bmu)}{2}\norm{q_p}_{\Cal Q}^2+ \Big( \frac{c_S(\bmu)\gamma_a(\bmu)}{2} - \frac{c_m(\bmu)\eta_2}{2}\Big )\norm{q_p}_{\Cal Q}^2,
\end{align*}
for some positive $\eta_1$ and $\eta_2$, deriving from the application of Young's inequality. Choosing
\begin{equation*}
\eta_1 = \frac{\alpha c_S(\bmu)\gamma_a(\bmu)}{c_c(\bmu)}, \quad  c_{z_y} = \frac{c_S(\bmu)\gamma_a(\bmu)^2 \alpha^2}{c_c(\bmu)^2c_u(\bmu)}, \quad \eta_2 = \frac{c_S(\bmu)\gamma_a(\bmu)}{c_m(\bmu)}, \; \text{ and } \; c_y = \frac{c_m(\bmu)^2}{c_S(\bmu)\gamma_a(\bmu)^2 \alpha},
\end{equation*}
and exploiting \eqref{D_continuity}, it holds
\begin{align*}
\sup_{(z,q) \in \Cal Q \times \Cal Q} \Cal B((y,p), (z, q); \bmu)\geq
\min \Big \{
\frac{ c_m(\bmu)^2}{2c_S(\bmu)\gamma_a(\bmu)},
 \frac{c_S(\bmu)\gamma_a(\bmu)^3\alpha^2}{2c_c(\bmu)^2 c_u(\bmu) c_a(\bmu)^2}, \frac{c_S(\bmu)\gamma_a(\bmu)}{2c_a(\bmu)^2}, \frac{\gamma_a(\bmu)}{2}
\Big \}
(\norm{y}_{\Cal Y_0}^2 +
\norm{p}_{\Cal Y_T}^2). \\
\end{align*}
Now we want to give an estimate to the denominator \eqref{surj}. {To this end}, we notice that, with $r = \kappa$ in \eqref{auxiliary_kappa} and exploting relation \eqref{s_T}, the following inequality holds:
\begin{align}
\label{leq_kappa}
\gamma_a(\bmu) \norm{\kappa}_\Cal{Q}^2 & \leq \frac{c_y c_c(\bmu)c_u}{\alpha} \norm{\kappa}_{\Cal Q}\norm{y}_{\Cal Q} \Rightarrow
\norm{\kappa}_\Cal{Q} \leq  \frac{c_y c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)} \norm{y}_{\Cal Q}.
\end{align}
This relation allows us to state that
$$
\begin{aligned}
\sqrt{\norm{\alpha c_y y + c_{z_y}z_y}_{\Cal Q}^2 + \norm{c_p + q_p + \kappa}_{\Cal Q}^2}
& \leq \sqrt{2(c_y^2 \norm{y}_{\Cal Q}^2 + c_{z_y}^2 \norm{z_y}_{\Cal Q}^2
+ \norm{p}_{\Cal Q}^2 + \norm{q_p}_{\Cal Q}^2 + \norm{\kappa}_{\Cal Q}^2)}\\ \nonumber
& \leq \sqrt{2\max \left \{ c_y^2, \frac{c_{z_y}^2}{\beta_a(\bmu)^2} , \frac{1}{\beta_a(\bmu)^2},
\left ( \frac{c_y c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}\right )^2\right \}
(\norm{y}_{\Cal Y_0}^2+ \norm{p}_{\Cal Y_T}^2)}.
\end{aligned}
$$
Finally, also for this case, we have proven the surjectivity condition \eqref{surj} with
\begin{equation}
\label{surj_caso_2}
\beta(\bmu) = \frac{\min \Big \{
\frac{ c_m(\bmu)^2}{2c_S(\bmu)\gamma_s(\bmu)},
 \frac{c_S(\bmu)\gamma_a(\bmu)^3\alpha^2}{2c_c(\bmu)^2 c_u(\bmu) c_a(\bmu)^2}, \frac{c_S(\bmu)\gamma_a(\bmu)}{2c_a(\bmu)^2}, \frac{\gamma_a(\bmu)}{2}
\Big \}}{\sqrt{2\max \left \{ c_y^2, \frac{c_{z_y}^2}{\beta_a(\bmu)^2} , \frac{1}{\beta_a(\bmu)^2},
\left ( \frac{c_y c_c(\bmu)c_u}{\alpha \gamma_a(\bmu)}\right )^2\right \}}} > 0.
\end{equation}
\end{proof}
We just proved that the surjectivity inequality \eqref{surj} holds for linear time dependent \ocp s governed by parabolic equations, independently {on} the choice of control and observation domain. To guarantee the well-posedness of the optimality system \eqref{global}, we still need the following lemma, which together with Lemma \ref{lemma_surj}, will allow us to prove existence and {uniqueness} of the optimal solution of the \ocp.
\begin{lemma}[Injectivity of $\Cal B\dual$] The bilinear form \eqref{cal_B} {satisfies} the following inf-sup stability condition:
\label{lemma_inj}
\begin{equation}
\label{inj}
\inf_{(z,q)\in (\Cal Q \times \Cal Q)\setminus \{(0,0)\}}\sup_{(y,p)\in (\Cal Y_0 \times \Cal Y_T)\setminus \{(0,0)\}} \frac{\Cal B((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{\Cal Y_0}^2 + \norm{p}_{\Cal Y_T}^2}\sqrt{\norm{z}_{\Cal Q}^2 + \norm{q}_{\Cal Q}^2}} > 0.
\end{equation}
\end{lemma}
\begin{proof}
First of all, we need to divide the proof in two cases, one dealing with $\Omega_u = \Omega_{\text{obs}}$ and otherwise.\\
\underline{Case 1.} Let us focus our attention on $\Omega_u = \Omega_{\text{obs}}$. As already said, by definition, for every $r, w \in Y$, the bilinear forms $m(r, w; \bmu)$ and $c(w, r; \bmu)$ coincide. It is clear that
\begin{equation*}
\label{inj_prova}
\sup_{(y,p)\in(\Cal Y_0 \times \Cal Y_T)\setminus \{(0,0)\}} \Cal B((y,p), (z, q); \bmu) \geq \Cal B((1/ \alpha)\bar y,\bar p ), (z, q); \bmu ),
\end{equation*}
where the variable $\bar y \in \Cal Y_0$ and $, \bar p \in \Cal Y_T$ have been chosen with the following properties:
\begin{equation}
\label{time_derivative}
\dt{\bar y} = z  \quad \text{and} \quad \dt{\bar p} = - q.
\end{equation}
Thus, we have that
\begin{align}
\label{inj_prova_2}
\Cal B((1/\alpha)\bar y,\bar p ), (z, q); \bmu ) & = \frac{1}{\alpha} \intTime{ s(\bar y, z; \bmu)} + \intTime{\frac{1}{\alpha}a(\bar y, z; \bmu)} - \frac{1}{\alpha}\intTime{ c(\bar p, z; \bmu)}\\ \nonumber
& \quad \quad  + \frac{1}{\alpha}\intTime{m(\bar y, q; \bmu)} - \intTime{s(\bar p, q; \bmu)} + \intTime{a(q, \bar p; \bmu)}.
\end{align}
Thanks to \eqref{time_derivative}, we notice that:
\begin{align}
s(\bar y, z; \bmu) \geq c_S(\bmu)\norm{z}^2_{\Cal Q} \quad \text{and} \quad - s(\bar p, q; \bmu)  \geq c_S(\bmu)\norm{q}^2_{\Cal Q}.
\end{align}
Furthermore, from the definition of $c(\cdot, \cdot, \bmu)$ and $m(\cdot, \cdot, \bmu)$, the time boundary conditions for state and adjoint variables and the assumption $\Omega_u = \Omega_{\text{obs}}$, we obtain the following relation
\begin{equation}
- \intTime{c(\bar p, z; \bmu)} = - \intTimeSpace{\sum_i^{Q_C}c_C(\bmu)^i\chi_{\Omega_{C}^i}\bar p\dt{\bar y}} =  \intTimeSpace{\sum_i^{Q_C}c_C(\bmu)^i\chi_{\Omega_{C}^i}\bar y\dt{\bar p}} = -\intTime{m(\bar y, q; \bmu)}.
\end{equation}
Thus, exploiting the {aforementioned} properties, it holds
\begin{align*}
\Cal B((1/ \alpha)\bar y,\bar p ), (z, q); \bmu ) & \geq \frac{c_S(\bmu)}{\alpha} \norm{z}_{\Cal Q}^2 + \frac{1}{\alpha}\intTime{a(\bar y, \dt{\bar y}; \bmu)}  + \norm{q}^2_{\Cal Q} - \intTime{a(\dt{\bar p}, \bar p; \bmu)}.
\end{align*}
Assuming that the time derivative commutes with the bilinear form operators\footnote{This is always the case for the Hilbert spaces considered in Section \ref{results}.}, finally we prove that
\begin{align*}
\Cal B((1/ \alpha)\bar y,\bar p ), (z, q); \bmu ) & \geq
\frac{c_S(\bmu)}{\alpha} \norm{z}_{\Cal Q}^2 + \frac{1}{2\alpha}\intTime{\dt{a(\bar y, \bar y; \bmu)}}  + c_S(\bmu)\norm{q}^2_{\Cal Q} - \half \intTime{\dt{a({\bar p}, \bar p; \bmu)}} \\ \nonumber
& \geq \frac{c_S(\bmu)}{\alpha} \norm{z}_{\Cal Q}^2  + \frac{\gamma_a(\bmu)}{2\alpha} \norm{y(T)}^2_Y + c_S(\bmu)\norm{q}^2_{\Cal Q} + \frac{\gamma_a(\bmu)}{2}\norm{p(0)}_{Y}^2 > 0.
\end{align*}
Since the inequality does not depend on $z$ and $q$, we have proved \eqref{inj}. \\
\underline{Case 2.} Let us suppose $\Omega_u \neq \Omega_{\text{obs}}$\footnote{See Footnote \ref{foot_1}.}. This allows us to consider $\Omega_{\text{obs}} \neq \Omega$. Thus, if we consider $\bar y$ as \eqref{time_derivative} and the indicator function $\chi_{\Omega \setminus \Omega_{\text{obs}}}$, it is clear that $m(\bar y \chi_{\Omega \setminus \Omega_{\text{obs}}}, q) = 0$ for all $q \in \Cal Q$, by definition. Then, the following holds:
\begin{align}
\label{inj_caso_2}
\Cal B((\bar y \chi_{\Omega \setminus \Omega_{\text{obs}}},0), (z, q); \bmu ) & = s(\bar y \chi_{\Omega \setminus \Omega_{\text{obs}}}, z; \bmu) +\intTime{ a(\bar y \chi_{\Omega \setminus \Omega_{\text{obs}}}, z; \bmu)} \\ \nonumber
& \geq \norm{z\chi_{\Omega\setminus \Omega_{\text{obs}}}}_{\Cal Q}^2 + \frac{\gamma_a({\bmu})}{2}\norm{y(T)}_{Y}^2,
\end{align}
following the same arguments of Case 1. Since \eqref{inj_caso_2} is not dependent on the choice of the test functions, inequality \eqref{inj} is verified also in this case.
\end{proof}
Thanks Lemma \ref{lemma_surj} and Lemma \ref{lemma_inj}, we can exploit Ne\v{c}as-Babu\v{s}ka theorem and we can now state the following well-posedness result:
\begin{theorem}
For a given $\bmu \in \Cal P$ and observation $y_{\text{d}} \in L^2(0,T; Y_{\text{obs}})$, the problem \eqref{global} has a unique solution pair $(y, p) \in \Cal Y_0 \times \Cal Y_T$.
\end{theorem}
\begin{remark}[$\Omega_{\text{obs}} = \Omega$, time dependent \ocp s]
\label{remark_omega_u}In all the proofs, guided by the test cases at hand in Section \ref{results}, we have chosen $\Omega_{\text{obs}}\neq \Omega$. Lemma \ref{lemma_surj} and Lemma \ref{lemma_inj} still hold when $\Omega_{\text{obs}} = \Omega$, while the $ \Omega_u \subset \overline \Omega$. We {outline} the idea of proofs for the sake of clarity, even if it is similar to the cases already analysed in the two Lemmas.
\begin{itemize}
\item[{$\small{\circ}$}] \underline{Lemma \ref{lemma_surj}}. One can consider $(c_y y + c_{z_y}z_y + \kappa, p + q_p) \in \Cal Q \times\Cal Q$, where $\kappa \in \mathcal Y_T$ is the solution of the following backward parabolic problem: given $\bmu \in \Cal P$ and $p \in \Cal Q$
\begin{equation}
\label{auxiliary_kappa_back}
\begin{cases}
\displaystyle -\intTime{ s(\kappa, r; \bmu)} + \intTime{a(r, \kappa; \bmu)} = - \intTime{m(p,r; \bmu)}
+ \frac{c_y}{\alpha}\intTime{c(r, p; \bmu)} &  \forall r \in \Cal Q, \\
\kappa(T) = 0 & \text{in } \Omega, \\
\kappa \equiv 0 & \text{in } \Omega_{u}.
\end{cases}
\end{equation}
The inf-sup condition is still verified with the following $\bmu-$dependent constant:
\begin{equation}
\beta(\bmu) =
\frac{
\min \Big \{
\frac{ c_m(\bmu)^2}{2c_S(\bmu)\gamma_s(\bmu)},
 \frac{c_S(\bmu)\gamma_a(\bmu)^3\alpha^2}{2c_c(\bmu)^2 c_u(\bmu) c_a(\bmu)^2}, \frac{c_S(\bmu)\gamma_a(\bmu)}{2c_a(\bmu)^2}, \frac{\gamma_a(\bmu)}{2}
\Big \}}{\sqrt{2\max \left \{ c_y^2, \frac{c_{z_y}^2}{\beta_a(\bmu)^2} , \frac{1}{\beta_a(\bmu)^2},
\left ( \frac{c_m(\bmu)c_{\text{obs}}}{\gamma_a(\bmu)}\right )^2\right \}}},
\end{equation}
having applied
\begin{equation}
\label{kappa_remark}
\gamma_a(\bmu)\norm{\kappa}_Y \leq c_m(\bmu)c_{\text{obs}}\norm{p}_Y,
\end{equation}
where we have followed the same arguments of \eqref{leq_kappa}, with $m(\kappa, p; \bmu)$ as right hand side, exploiting \eqref{Y_in_Y_obs}.
\item[{$\small{\circ}$}] \underline{Lemma \ref{lemma_inj}}. In this case, the inequality \eqref{inj} holds choosing $(0, \bar p \chi_{\overline \Omega \setminus \Omega_u})$ with $\bar p$ as in \eqref{time_derivative}.
\end{itemize}
\end{remark}

\subsection{Steady \ocp s: Problem Formulation}
We want to provide a steady interpretation for the concepts {presented} in {the previous} Section. First of all, the variables are $y, p \in Y$, and $u \in U$, while $y_\text{d} \in Y_{\text{obs}}$. No time integration is considered, i.e. the integration domain is only given by the reference domain $\Omega$. We define $\Cal B_s \goesto{(Y \times Y)}{(Y \times Y)}{\mathbb R}$ as
\begin{equation*}
\label{B_s}
\Cal B_s((y,p), (z,q); \bmu) = a(y, z; \bmu) - \frac{1}{\alpha}c(p, z; \bmu) + m(y, q ;\bmu) + a(q, p; \bmu),
\end{equation*}
and the right hand side as
\begin{equation*}
\label{F_s}
\left \la \Cal F_s (\bmu), (z,q) \right \ra = m(y_d, q;\bmu) + \left \la G (\bmu), z \right \ra
\end{equation*}
The global steady problem reads:  given $\bmu \in \Cal P$, find the pair $(y,u) \in Y \times Y$ such that
\begin{equation}
\label{global_s}
\Cal B_s((y,p), (z,q); \bmu) = \left \la \Cal F_s (\bmu), (z,q) \right \ra  \quad \forall (z,q) \in Y \times Y.
\end{equation}
As in the time dependent case, we would like to use the Ne\v{c}as-Babus\v{k}a theorem to prove the well-posedness of such a optimality system. {Towards this goal we can once again prove the inequalities corresponding to Lemma \ref{lemma_surj} and Lemma \ref{lemma_inj} in the steady case}. The arguments are not so different from the time dependent scenario; they are less involved, but we report them for the sake of completeness.
\begin{lemma}[Surjectivity of $\Cal B_s\dual$]
\label{lemma_surj_s}
The bilinear form \eqref{global_s} {satisfies} the following inf-sup stability condition: {there exists $\beta_s(\bmu) > 0$ such that}
\begin{equation}
\label{surj_s}
\beta_{{\Cal B}_s}(\bmu) \eqdot
\inf_{(y, p) \in (Y \times Y)\setminus \{(0,0)\}}\sup_{(z, q) \in (Y \times Y)\setminus \{(0,0)\}} \frac{\Cal B_s((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{Y}^2 + \norm{p}_{Y}^2}\sqrt{\norm{z}_{Y}^2 + \norm{q}_{Y}^2}} \geq \beta_s(\bmu).
\end{equation}
\end{lemma}
\begin{proof}
\underline{Case 1.} Let us suppose $\Omega_u = \Omega_{\text{obs}}$, as in {Lemma \ref{lemma_surj}}\footnote{\label{foot_2}Also in this case, the assumption is made in order to comply with Section \ref{results}. We postpone the generalization to $\Omega_{\text{obs}} = \Omega$ and $\Omega_u \neq \Omega$  to Remark \ref{remark_omega_u_s}.}. It is clear that, choosing $z = \alpha y$ and $q = p$ leads to
\begin{equation}
\label{estimate_1}
\sup_{(y,p)\in (Y \times Y)\setminus \{(0,0)\}} \frac{\Cal B_s((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{Y}^2 + \norm{p}_{Y}^2}\sqrt{\norm{z}_{Y}^2 + \norm{q}_{Y}^2}} \geq
\alpha \gamma_a(\bmu),
\end{equation}
since under the assumption of coincidence of control and observation domain $c(p, y;\bmu)$ is the same of $m(y,p;\bmu)$. For the arbitrariness of $y$ and $p$, the inf-sup condition \eqref{surj_s} holds. \\
\underline{Case 2.} We now consider $\Omega_u \neq \Omega_{\text{obs}}$, assuming $\Omega_{\text{obs}} \neq \Omega$\footnote{See Footnote \ref{foot_2}.}. Choosing $z = y$ and $q = p + \kappa$, {given $\bmu \in \Cal P$, we define $\kappa$ as the solution to the following equation}
\begin{equation}
\begin{cases}
\label{kappa_s}
\displaystyle a(\kappa,r;\bmu) = - m(y, r; \bmu) + \frac{1}{\alpha} c(r, y; \bmu)  & \forall r \in L^2(\Omega), \\
\kappa \equiv 0 & \text{in } \Omega_{\text{obs}}.
\end{cases}
\end{equation}
Thanks to \eqref{kappa_s}, it is easy to prove that
$\displaystyle \norm{\kappa}_Y \leq \frac{c_c(\bmu)c_u}{\alpha\gamma_a(\bmu)} \norm{y}_Y$,using the same strategy already presented in Lemma \ref{lemma_surj}. Thus, \eqref{surj_s} holds with
\begin{equation*}
\label{surj_kappa_ok}
\beta_s(\bmu) = \frac{\gamma_a(\bmu)}{\sqrt{\left (2\max \left \{1, \left ( \frac{c_c(\bmu)c_u}{\alpha\gamma_a(\bmu)} \right )^2 \right \} \right )}} > 0.
\end{equation*}
\end{proof}
The proof of  the steady version of \eqref{inj} is quite straightforward too.
\begin{lemma}[Injectivity of ${\Cal B}_s\dual$] The bilinear form \eqref{cal_B} {satisfies} the following inf-sup stability condition:
\label{lemma_inj_s}
\begin{equation}
\label{inj_s}
\inf_{(z, q) \in (Y \times Y)\setminus \{(0,0)\}}\sup_{(y, p) \in (Y \times Y)\setminus \{(0,0)\} } \frac{\Cal B_s((y,p), (z, q); \bmu)}
{ \sqrt{\norm{y}_{Y}^2 + \norm{p}_{Y}^2}\sqrt{\norm{z}_{Y}^2 + \norm{q}_{Y}^2}} > 0.
\end{equation}
\end{lemma}
\begin{proof}
Also the proof of this lemma is divided in two cases. \\
\underline{Case 1}. First of all, we consider $\Omega_u = \Omega_{\text{obs}}$. In this case we can apply the same arguments of Case 1 of Lemma \ref{lemma_surj_s} choosing $y = \alpha z$ and $p = q$, obtaining the same estimate \eqref{estimate_1} where the supremum is considered for all the pair $(y,p) \in Y \times Y$, which already proves \eqref{inj_s} \\
\underline{Case 2.} Now, we suppose $\Omega_u \neq \Omega_{\text{obs}}$ and, once again, $\Omega_{\text{obs}} \neq \Omega$ is our choice without loss of generality\footnote{See Footnote \ref{foot_2}.}. To prove the inequality \eqref{inj_s}, we choose $p = 0$ and $y = z\chi_{\Omega \setminus \Omega_{\text{obs}}}$ to obtain
\begin{equation*}
\sup_{(y,p) \in (Y \times Y)\setminus \{(0,0)\}} \Cal B_s((y,p), (z, q); \bmu) \geq \gamma_a(\bmu)\norm{z\chi_{\Omega \setminus \Omega_{\text{obs}}}}_{Y}^2,
\end{equation*}
which proves the statement.
\end{proof}
Furthermore, the continuity of $\mathcal B_s(\cdot, \cdot; \bmu)$ is trivial due to the continuity of the various considered bilinear forms. In other words, exploiting the continuity of $\mathcal B_s(\cdot, \cdot, \bmu)$ and $\Cal F_s(\bmu)$ combined with Lemma \ref{lemma_surj_s} and Lemma \ref{lemma_inj_s}, we can apply the Ne\v{c}as-Babu\v{s}ka theorem and as a consequence we state the following theorem.
\begin{theorem}
For a given $\bmu \in \Cal P$ and for a given observation $y_{\text{d}} \in Y_{\text{obs}}$, problem \eqref{global_s} has a unique solution $(y,p) \in Y \times Y$.
\end{theorem}
\begin{remark}[$\Omega_{\text{obs}} = \Omega$, steady \ocp s]
\label{remark_omega_u_s}Also for the steady case, we have chosen $\Omega_{\text{obs}}\neq \Omega$ {in compliance with the test cases that} we will present in Section \ref{results}. As we already did in the time dependent case, we can prove Lemma \ref{lemma_surj_s} and Lemma \ref{lemma_inj_s} also for an observation in the whole spatial domain and $\Omega_{u}\neq \Omega$.
\begin{itemize}
\item[{$\small{\circ}$}] \underline{Lemma \ref{lemma_surj_s}}. We can consider the element  $z = y + \kappa$ and $q = p$, where $\kappa$ is the solution of
\begin{equation*}
\begin{cases}
\label{kappa_s_u}
\displaystyle a(r, \kappa;\bmu) = - m(r, p; \bmu) + \frac{1}{\alpha} c(p, r; \bmu)  & \forall r \in L^2(\Omega), \\
\kappa \equiv 0 & \text{in } \Omega_{u},
\end{cases}
\end{equation*}
for a given $\bmu \in \Cal P$ and $p \in Y$. Thanks to the properties of continuity and coercivity of the bilinear form considered, we have that
$\displaystyle \norm{\kappa}_Y \leq \frac{c_m(\bmu)c_{\text{obs}}}{\gamma_a(\bmu)} \norm{y}_Y$, following the same arguments Lemma \ref{lemma_surj_s}. Thus,
the relation \eqref{surj_s} is still verified with
\begin{equation*}
\beta_s(\bmu) =
\frac{\gamma_a(\bmu)}{\sqrt{\left (2\max \left \{1, \left ( \frac{c_m(\bmu)c_{\text{obs}}}{\alpha\gamma_a(\bmu)} \right )^2 \right \} \right )}} > 0,
\end{equation*}
since relation \eqref{kappa_remark} also holds in this case.
\item[{$\small{\circ}$}] \underline{Lemma \ref{lemma_inj_s}}. To prove \eqref{inj_s} we simply consider $y = 0$ and $p = q\chi_{\overline \Omega \setminus \Omega_u}$.
\end{itemize}
\end{remark}
The analysis we made had the only purpose to prove the well-posedness of the problem at hand. In other words, we now can think about a discretization in order to simulate {the optimality system} for a given parameter $\bmu \in \Cal P$. In the next Section, we will deal with the concept of \emph{high-fidelity} approximation of the system, adapting the space-time formulation proposed in \cite{Glas2017, HinzeStokes, hinze2008optimization, HinzeNS, urban2012new, yano2014space, yano2014space1} to the no-control saddle point structure of \cite{Langer2020}.