paper, one can then prove the estimate similar to  $$\begin{gathered}
 \left|E(\rho_1,...,\rho_q)- \int_{{\mathbb{R}}^3}e_{\rm UEG}\big(\rho_1(x),...,\rho_q(x)\big)\,dx\right|
 {\leqslant}{\varepsilon}\int_{{\mathbb{R}}^3}\big(\rho(x)+\rho(x)^2\big)\,dx\\
 +\frac{C(1+{\varepsilon})}{{\varepsilon}}\int_{{\mathbb{R}}^3}|\nabla\sqrt\rho(x)|^2\,dx+\frac{C}{{\varepsilon}^{4p-1}}\int_{{\mathbb{R}}^3}|\nabla\rho^\theta(x)|^p\,dx.
 \label{eq:LDA_main_estim_with_spin}\end{gathered}$$ It is only for simplicity of notation that we work with the total density $\rho=\sum_{\sigma=1}^q\rho_\sigma$.

A priori estimates on $T(\rho)$ and $E(\rho)$ {#sec:a_priori}
=============================================

Lower bounds on $E(\rho)$ in  are well known and will be recalled below. Upper bounds are somewhat difficult to derive due to the constraint that the quantum states considered need to have the exact given density $\rho$. In this section we prove an upper bound on the best kinetic energy and use it to derive an upper bound on $E(\rho)$. Because our bounds are of independent interest we work in this section in any dimension $d{\geqslant}1$. First we quickly recall the known lower bounds.

Known lower bounds
------------------

We recall that the Lieb-Thirring inequality [@LieThi-75; @LieThi-76; @LieSei-09] states that there exists a positive constant $c_{\rm LT}=c_{\rm LT}(d)>0$ such that $${{\rm Tr}\,}(-\Delta)\gamma{\geqslant}q^{-\frac2d}c_{\rm LT}\int_{{\mathbb{R}}^d} \rho_\gamma(x)^{1+\frac2d}\,dx
\label{eq:Lieb-Thirring}$$ for every self-adjoint operator $\gamma$ on $L^2({\mathbb{R}}^d,{\mathbb{C}}^q)$ such that $0{\leqslant}\gamma{\leqslant}1$. The best constant $c_{\rm LT}$ is unknown but has been conjectured to be the semi-classical constant $$c_{\rm TF}=\frac{ 4\pi^2 d}{(d+2)} \left( \dfrac{d}{| \mathbb{S}^{d-1} |} \right)^{\frac2d}
 \label{eq:c_TF}$$ in dimension $d{\geqslant}3$. In [@Nam-18], Nam has proved that $${{\rm 