  We study the mean-field phase diagram of the two-dimensional (2D) Hubbard
model in the Lieb lattice allowing for spin and charge density waves. Previous
studies of this diagram have shown that the mean-field magnetization
surprisingly deviates from the value predicted by Lieb's theorem
\cite{Lieb1989} as the on-site repulsive Coulomb interaction ($U$) becomes
smaller \cite{Gouveia2015}. Here, we show that in order for Lieb's theorem to
be satisfied, a more complex mean-field approach should be followed in the case
of bipartite lattices or other lattices whose unit cells contain more than two
types of atoms. In the case of the Lieb lattice, we show that, by allowing the
system to modulate the magnetization and charge density between sublattices,
the difference in the absolute values of the magnetization of the sublattices,
$m_{\text{Lieb}}$, at half-filling, saturates at the exact value $1/2$ for any
value of $U$, as predicted by Lieb. Additionally, Lieb's relation,
$m_{\text{Lieb}}=1/2$, is verified approximately for large $U$, in the $n \in
[2/3,4/3]$ range. This range includes not only the ferromagnetic region of the
phase diagram of the Lieb lattice (see Ref.~\onlinecite{Gouveia2015}), but also
the adjacent spiral regions. In fact, in this lattice, below or at
half-filling, $m_{\text{Lieb}}$ is simply the filling of the quasi-flat bands
in the mean-field energy dispersion both for large and small $U$.
