  The electronic structures of supercells of CeO$_{2-\delta}$ have been
calculated within the Density Functional Theory (DFT). The equilibrium
properties such as lattice constants, bulk moduli and magnetic moments are well
reproduced by the generalized gradient approximation (GGA). Electronic
excitations are simulated by robust total energy calculations for constrained
states with atomic core- or valence-holes. Pristine ceria CeO$_2$ is found to
be a non-magnetic insulator with magnetism setting in as soon as oxygens are
removed from the structure. In the ground state of defective ceria, the Ce-$f$
majority band resides near the Fermi level, but appears at about 2 eV below the
Fermi level in photoemission spectroscopy experiments due to final state
effects. We also tested our computational method by calculating threshold
energies in Ce-M$_5$ and O-K x-ray absorption spectroscopy and comparing
theoretical predictions with the corresponding measurements. Our result that
$f$ electrons reside near the Fermi level in the ground state of oxygen
deficient ceria is crucial for understanding catalytic properties of CeO$_2$
and related materials.
