rest of the paper we call $C$ a generic constant which can sometimes change from line to line, but which only depends on $q$ (the number of spin states) and $p,\theta$, the two parameters appearing in the statement of Theorem \[thm:LDA\].

Upper bound in terms of local densities {#sec:upper_bound}
---------------------------------------

Our main goal here is to give an upper bound on the energy $E(\rho)$ by splitting $\rho$ into a sum of local densities. In the classical case, we have the exact subadditivity property (see [@LewLieSei-18 Lem. 2.5]) $$E_{\rm cl}(\rho_1+\rho_2){\leqslant}E_{\rm cl}(\rho_1)+E_{\rm cl}(\rho_2)$$ which considerably simplifies the analysis and was one of the main tools of our previous work [@LewLieSei-18]. In particular we immediately find an upper bound in the form $$E_{\rm cl}(\rho){\leqslant}\sum_kE_{\rm cl}(\rho\chi_k)$$ for a partition of unity $\chi_k$. In the quantum case this is not as easy. The first difficulty is that we cannot cut sharply and have to use a smooth partition of unity. This has the consequence that neighboring local densities overlap. But then, for two densities $\rho_1$ and $\rho_2$ with overlapping support, it is not obvious how to relate $E(\rho_1+\rho_2)$ with $E(\rho_1)$ and $E(\rho_2)$. This is due to the fermionic nature of the electrons which puts a 