\subsection{Peak Estimation LMI}

\label{sec:peak_lmi}
The peak estimation problem \eqref{eq:peak_meas} may be approximated through a moment LMI. 


Let $(y^0, y^p)$ represent moment sequences up to order $2d$ of the measures $\mu$, and $y$ be moment sequences up to order $2(d + \textrm{deg}(f) -1)$ of the occupation measure $\mu$.
The Liouville equation in \eqref{eq:peak_meas_flow} induces a linear relation between the moment sequences $(y^0, y, y^p)$ for the test function $x^\alpha t^\beta$,
\begin{equation}
\label{eq:liou_mom_lmi}
    \inp{x^\alpha t^\beta}{ {\delta_0 \otimes} \mu_0} + \inp{\Lie_f( x^\alpha t^\beta)}{\mu} - \inp{x^\alpha t^\beta}{\mu_p} = 0.
\end{equation}
The expression $\textrm{Liou}_{\alpha \beta}(y^0, y, y^p)$ is defined as this expression at the test function $x^\alpha t^\beta$.
The degree-$d$ moment-LMI relaxation of program  \eqref{eq:peak_meas} is, 
\begin{subequations}
\label{eq:peak_lmi}
\begin{align}
    p^*_d = & \textrm{max} \quad \textstyle\sum_{\alpha} p_\alpha y_{\alpha 0}^p. \label{eq:peak_lmi_obj} \\
    & \textrm{Liou}_{\alpha \beta}(y^0, y, y^p) = 0 \quad \textrm{by \eqref{eq:liou_mom_lmi}} \forall (\alpha, \beta) \in \N^{n+1}_{\leq 2d} \label{eq:peak_lmi_flow}\\
    & y^0_0 = 1 \\
    & \M_d(y^0), \M_d(y), \M_d(y^p) \succeq 0 \label{eq:peak_lmi_psd} \\
    &\M_{d - d_{0i}}(g_{0i} y^0) \succeq 0  \label{eq:peak_lmi_init} & &\forall i = 1, \ldots, N_c^0\\ 
    &\M_{d - d_i}(g_{i} y) \succeq 0 & & \forall i = 1, \ldots, N_c \label{eq:peak_lmi_peai} \\ 
    &\M_{d - d_i}(g_{i} y^p) \succeq 0 & &\forall i = 1, \ldots, N_c \\ 
    &\M_{d-2}(t(T-t)y),   \ \M_{d-2}(t(T-t)y^p) {\; \succeq \;} 0. \label{eq:peak_lmi_supp2}
\end{align}
\end{subequations}

The formulation in \eqref{eq:peak_lmi} assumes that $X = \{g_i(x)\geq 0 \mid \ i = 1, \ldots, N_c\}$ and $X_0 = \{g_{0i}(x)\geq 0 \mid \ i = 1, \ldots, N_c^0\}$ are both compact (Archimedean) basic semialgebraic sets. Constraints \eqref{eq:peak_lmi_psd}-\eqref{eq:peak_lmi_supp2} enforce that $(y^0, y, y^p)$ are moments corresponding to representing measures $\mu_0 \in \Mp{X_0}$ and $\mu, \mu_p \in \Mp{[0, T] \times X}$. These representing measures may not satisfy the infinite-dimensional Liouville equation in constraint \eqref{eq:peak_meas_flow}, only a finite number of induced Liouville constraints are included in \eqref{eq:peak_lmi_flow}. 

The upper bounds $p_d^*$ will tend towards $P^*$ as $d\rightarrow \infty$ given that $X_0$ and $[0, T] \times X$ are each compact. By theorem C.20 of \cite{lasserre2009moments}, the degree-$d$ LMI problem \eqref{eq:peak_lmi} is strongly dual to the degree-$d$ SOS relaxation of \eqref{eq:peak_cont}. This duality justifies the name Moment-SOS hierarchy, where the `hierarchy' is posed over increasing degree $d$.

% \subsection{Previous Content}

% % The conditions that $y$ are the moments of a nonnegative measure supported over a semialgebraic set $\K$ is dual to the Psatz requirements 


% The infinite moment matrix $\M(y)$ and localizing matrices $\M(g_{k} y)$ for each inequality constraint are indexed by multi-indices $(\alpha, \beta)$, and have the forms,  
% \begin{equation}
%     \M(y)_{\alpha \beta} = y_{\alpha + \beta}, \quad \M(g_{k} y)_{\alpha \beta}  =  \textstyle\sum_{\gamma} g_{k \gamma} y_{\alpha + \beta + \gamma}.
% \end{equation}

% The problem of recovering a probability distribution from a restricted set of moments


% \urg{previous content}
% Infinite-dimensional LPs may be defined over nonnegative measures $\mu$, such as 
% \begin{equation}
% \label{eq:meas_program} p^* =  \max_{\mu \in \Mp{X}} \inp{c}{\mu}, \qquad  \mathcal{A}(\mu) = b.
% \end{equation}
% In program \eqref{eq:meas_program}, $c \in \R[x] \subset C(X)$ is a cost, and $\mathcal{A}, b$ define a set of affine constraints in the moments of $\mu$. 
% % Nonconvex polynomial optimization problems may be reformulated into the form of the convex infinite-dimensional LP in  \eqref{eq:meas_program} \cite{lasserre2009moments}. 
% The $\alpha$-moment of a measure $\mu$ is the scalar quantity $y_\alpha = \inp{x^\alpha}{\mu}$.
% A measure $\mu$ from \eqref{eq:meas_program} may be parameterized by an infinite sequence of moments $y = \{y_\alpha \mid \ \forall \alpha \in \N^n\} $ such that $\inp{p}{\mu} = \sum_{\alpha} p_\alpha y_\alpha$ for all  $p \in \R[x]$.  
% Problem \eqref{eq:meas_program} may be expressed as a linear program in the infinite number of moments $y_\alpha$, which
% must be truncated into a problem with a finite number of variables and constraints for tractable optimization. The moment-sum-of-squares (SOS) hierarchy uses  the moment sequence $y_\alpha$ with degree $\abs{\alpha} \leq d$ for some bound $d$ as variables. Refer to \cite{lasserre2009moments} for all material in this subsection. 

% Let $X = \{x \mid g_k(x) \geq 0\}$ be a basic semialgebraic set with $N_c$ constraints where each $g_k(x)$ has degree $d_k$, and $\alpha, \beta, \gamma \in \N^m$ be a set of multi-indices. 


% % define $\M_d(y)$ as the Moment Matrix of degree $d$ and $\M_{d - d_k}(g_{k} y)$ as the localizing matrices for each inequality constraint.   Precise definitions of $\M(y)$ and $\M(g_X y)$ are in \cite{lasserre2009moments}.
% % \new{(Didier: Should we define formally the moment and localizing matrices, or just refer to the literature ?)}
% The degree-$d$ relaxation of problem \eqref{eq:meas_program} is:
% \begin{subequations}
% \begin{align}
% \label{eq:mom_program}
%     p^*_d &=  \ \max_{y} \textstyle\sum_\alpha c_\alpha y_\alpha, \qquad  A(y) = b_y \\
%     & \M_d(y) \succeq 0, \; \M_{d - d_k}(g_{k} y) \succeq 0  \; \forall i = 1, \ldots, N_c.
% \end{align}
% \end{subequations}
% % \mid_{k=1}^{N_c}

% The truncated moment matrix $\M_d(y)$ and localizing matrices $\M_{d-d_k}(g_k y)$ contain moments of up to order $2d$. The expression $A(y)=b_y$ in problem \eqref{eq:mom_program} imposes the affine condition $\mathcal{A}(\mu) = b$ on entries of the moment sequence $y$.
% The optima of relaxations $p^*_{d} \geq p^*_{d+1} \geq p^*_{d+2} \ldots$ are a sequence of upper bounds to the true optimum $p^*$. 
% % For a polynomial optimization problem, the sequence of upper bounds will converge to $p^*$ at a finite degree $d$
% This sequence will converge as $d \rightarrow \infty$ if $X$ is compact, or more specifically an Archimedean condition holds \cite{lasserre2009moments}. The size of $\M_d(y)$ (size of the PSD matrix variable of an LMI absent other structure) with $n$ variables at degree $d$ is $\binom{n+d}{d}$.
% % The time complexity of LMI solvers are generally polynomial in the size of the PSD matrix variable, which results in combinatorially scaling runtime as $d$ increases.
% % As the performance of LMI solvers is generally polynomial in the size of the PSD matrix variable, the moment-SOS hierarchy [TODO]... 
% % increases as $O(n^d)$, and the complexity of solving \eqref{eq:mom_program} scales combinatorially as $O(n^{6d})$ }.
% % This is verified by a `flat extension' of moment matrices, which is a condition that ensures  the rank $\M_{\delta}(y)$ does not increase as the degree $\delta \leq d$ increases \cite{lasserre2009moments}. A moment sequence

% A measure is `rank-$r$ atomic' if it is supported on a set of $r$ discrete points called `atoms'. A moment matrix $\M_d(y)$ possesses a representing measure $\mu$ if the moments of $\mu$ up to order $2d$ agree with the entries of $\M_d(y)$. 
% A necessary but not sufficient condition for a rank-$r$ atomic measure $\mu$ to exist is that $\M_d(y)$ has rank $r$. The sufficient condition requires the existence of a flat extension, in which the rank of truncated moment matrices is preserved as $d$ increases \cite{laurent2009generalized}.
% % $y$ has a representing measure $\mu$ supported at $r$ points in $X$ if 
% % \old{each $\M_{d - d_k}(g_k) \succeq 0$,}
% % $\M_{d}(y)$ has rank $r$ and the flat extension holds. 
% % Each of the $r$ support points are called `atoms', and $\mu$ is therefore an rank-$r$ atomic measure. 
% The $r$ atoms may be recovered by a Cholesky decomposition of $\M_d(y)$, or by reading entries of $y_\alpha$ if $r=1$ \cite{henrion2005detecting}.

% % When $\mu$ is rank-1 atomic, the location of the only atom may} 
% % and coordinates of $\mu$'s support can 
% % be read from the moment sequence $y_{\alpha}$.
% % for $\abs{\alpha} \leq 1$ if $\M_d(y)$ is rank-1.
