Equality from Legendre transformation Let $Q$ be a manifold. I recall that for a $\dot{q}$-uniformly convex Lagrangian $\mathcal{L}:\mathbb{R}\times TQ\rightarrow\mathbb{R}$, the Legendre transformation
\begin{equation*}
    \begin{array}{rcl}
        \mathbb{L}:\mathbb{R}\times TQ & \rightarrow&\mathbb{R}\times T^*Q \\
        (t,q,\dot{q}) & \mapsto&(t,q,p),
    \end{array}
\end{equation*}
where
\begin{equation*}
    p_k(t,q,\dot{q}):=\dfrac{\partial\mathcal{L}}{\partial \dot{q}^k}(t,q,\dot{q}).
\end{equation*}
is a global diffeomorphism.
Moreover, the Hamiltonian is related to the Lagrangian through the Legendre transformation
\begin{equation}
\label{definition Hamiltonian from Lagrangian}
    H(t,q,p):=\sup_{\dot{q}\in\mathbb{R}^n}\big(p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})\big).
\end{equation}
Thus in general we have
\begin{equation}
p_j\dot{q}^j\leq H(t,q,p)+\mathcal{L}(t,q,\dot{q}).
\end{equation}
My question is the following: how can we prove that equality holds $p_j\dot{q}^j=H(t,q,p)+\mathcal{L}(t,q,\dot{q})$ $\iff$ $p$ and $\dot{q}$ are related through the Legendre transformation?.
 A: I think I've solved the problem.
$\Rightarrow)$ Since by hypothesis $\mathcal{L}$ is $\dot{q}$-uniformly convex and $p_j\dot{q}^j$ is linear, the map
$$\dot{q}\mapsto p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})$$
is uniformly concave. This means that for fixed $(t,q,p)$ there exists a unique $\dot{q}=\dot{q}(t,q,p)$ in which that map attains its $sup$:
\begin{equation*}
    p_j\dot{q}^j(t,q,p)-\mathcal{L}(t,q,\dot{q}(t,q,p))=\sup_{\dot{q}\in\mathbb{R}^n}\big(p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})\big)=H(t,q,p).
\end{equation*}
So, the derivative of the previous equation with respect to $\dot{q}$ calculated in $\dot{q}(t,q,p)$ must vanish, as it is a $sup$:
\begin{equation*}
    0=\dfrac{\partial}{\partial \dot{q}^j}|_{\dot{q}(t,q,p)}\big(p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})\big)=p_j-\dfrac{\partial\mathcal{L}}{\partial\dot{q}^j}(t,q,\dot{q}(t,q,p)).
\end{equation*}
This shows that $p$ and $\dot{q}$ are related through the Legendre transformation.
$\Leftarrow$) Assume now that $p$ and $\dot{q}$ are related through the Legendre transformation, which means that $p(t,q,p)=\dfrac{\partial\mathcal{L}}{\dot{q}}(t,q,p)$, then we have
\begin{equation*}
\begin{split}
     &\dfrac{\partial}{\partial\dot{q}}\bigg(p(t,q,\dot{q})\cdot\dot{q}-\mathcal{L}(t,q,\dot{q})\bigg)=\dfrac{\partial}{\partial\dot{q}}\bigg(\dfrac{\partial\mathcal{L}}{\dot{q}}(t,q,\dot{q})\cdot\dot{q}\bigg)-\dfrac{\partial}{\partial\dot{q}}\bigg(\mathcal{L}(t,q,\dot{q})\bigg)\\
     &=\dfrac{\partial}{\partial\dot{q}}\bigg(\mathcal{L}(t,q,\dot{q})\bigg)-\dfrac{\partial}{\partial\dot{q}}\bigg(\mathcal{L}(t,q,\dot{q})\bigg)=0.
\end{split}
\end{equation*}
So $p(t,q,\dot{q})\cdot\dot{q}-\mathcal{L}(t,q,\dot{q})$ is a critical value, but as in the first part, the map $\dot{q}\mapsto p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})$ is concave, so it must be a sup. In other words we have
\begin{equation*}
    p(t,q,\dot{q})\cdot\dot{q}-\mathcal{L}(t,q,\dot{q})=\sup_{\dot{q}} \big(p_j\dot{q}^j-\mathcal{L}(t,q,\dot{q})\big)=H(t,q,p).
\end{equation*}
