A density-functional theory that treats all states of an electronic system
on the same footing is introduced. The corresponding Kohn-Sham formalism ca
n be applied to ground and excited states alike, does not suffer from a v-r
epresentability problem, and represents a rigorous formal basis for the com
mon, but so far unjustified practice to heat excited states by Kohn-Sham me
thods. The presented density-functional theory emerges from a generalizatio
n of the constrained-search procedure. The new Kohn-Sham formalism is based
on generalized adiabatic connections introduced hen. The possible topologi
es of those generalized adiabatic connections are discussed. A density-base
d stationarity principle and a density theorem that represents a more gener
al counterpart of the Hohenberg-Kohn theorem are presented. A method to tak
e into account exactly exchange interactions in the presented Kohn-Sham for
malism is introduced, implemented, and applied to atoms. [S1050-2947(99)011
05-1].