Differentiability of Lieb functional in electronic density functional theory