1 Introduction

Ground-state density functional theory (DFT) [3,4,5,6] has proven to be very successful for studying ground-state properties of atoms, molecules and materials. As excitations are also very important for a lot of applications, the extension of the theory to excited states has turned out to be essential. Nowadays, most of the excited-state calculations are done with time-dependent (TD) DFT [7,8,9]. However, current TDDFT adiabatic implementations can exhibit failures, for example, in describing degeneracy or double excitations. In fact, excited states can be treated time-independently and stationary-state theories do exist [1, 2, 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33].

The first rigorous generalization of density functional theory for excited states was developed by Theophilou [10] and was later enlarged into the theory of unequally weighted ensembles of excited states by Oliveira et al. [11]. However, the ensemble theories are complicated by the requirement that a whole ensemble of states has to be considered. Therefore, we concentrated on individual excited states. We proposed a variational theory [12, 13]. The Levy–Nagy constrained-search functional [12, 13] is complicated by the fact that it requires a bifunctional approach that utilizes not only the density of the given state but also the external potential (or the ground-state density). (Nevertheless, approximate functionals for this bifunctional approach and the ensemble theory have been developed for and applied to atomic and molecular systems [21,22,23,24, 30, 33].)

On the other hand, a theory was proposed for Coulomb systems [15, 34] that has recently been expanded and made viable by proving the existence of a universal excited-state variational functional, for the sum of the kinetic and electron–electron repulsion energies, of arbitrary densities [1, 2]. In the first paper of the series [1], we showed that the Coulomb density is special because it determines not only its Hamiltonian but also the degree of excitation. Unlike existing formulations, additional functions and indices are not required and the equations of excited-state density functional theory strongly resemble those of ground-state theory. In the second paper of the series [2], we formalized the Kohn–Sham version of the theory.

Though our earlier papers [1, 2] can be applied degenerate excited states as well, in this third paper of the series we propose a generalization applying subspaces instead of wave functions in the constraint search [5] definition of functionals. The motivation of the extension of our theory is that using subspace densities instead of pure-state densities can result in functionals with more favorable properties, such as continuity and differentiability, and could perhaps be more easily approximated.

2 Generalized Hohenberg–Kohn theorems and constrained searches

The ground-state electron density is sufficient in principle to determine all molecular properties of a Coulomb system. This can be simply understood following Bright Wilson’s argument [35]: A well-known theorem of quantum mechanics, Kato’s theorem [36], leads to [37, 38]

$$ Z_{\beta } = -\frac{1}{2\varrho (r)} \left. \frac{\partial {{{\bar{\varrho }}}(r)}}{\partial r} \right| _{r=R_{\beta }}, $$
(1)

where the partial derivatives are taken at the nuclei \(\beta \) and \({{\bar{\varrho }}}(r)\) is the angular average of the density. So the cusps of the density tell us where the nuclei are (\(R_{\beta }\)) and what the atomic numbers \(Z_{\beta }\) are. On the other hand, the integral of the density gives us the number of electrons:

$$ N = \int \varrho (\mathbf{r}) \mathrm{d}{} \mathbf{r}. $$
(2)

Kato’s theorem is valid not only for the ground state but also for the excited states [39,40,41,42]). So, if the density of an excited state is known, we can write the Hamiltonian

$$ {{\hat{H}}}^\mathrm{{Coul}} = {\hat{T}} + {\hat{V}}_{ee} + \sum _{i=1}^N v^\mathrm{{Coul}}(\mathbf{r}_i), $$
(3)

where \({\hat{T}}\) and \({\hat{V}}_{ee}\) are the kinetic energy and the electron–electron energy operators and

$$ v^\mathrm{{Coul}}(\mathbf{r}) =\sum _{\beta =1}^M -Z_{\beta }/|\mathbf{r}-\mathbf{R}_{\beta }| $$
(4)

and solve in principle its eigenvalue problem.

We proved the theorem [Theorem 1 in paper [1]: “Let \(\varrho (\mathbf{r})\) is the electron density of a Coulomb system, that is, a system whose external potential can be written in the form of (4)]. Then, \(\varrho (\mathbf{r})\) is not a stationary wave function for any other Coulomb external potential.” Note that this theorem is valid for degenerate states as well.

Now we make the following extension. We introduce subspaces and subspace densities instead of the wave functions and densities. We suppose that the new quantities will be more appropriate in case of degenerate states.

Instead of considering the wave functions, it is possible to take subspaces of wave functions belonging to the same energy. The subspace S is spanned by a set of wave functions of the given energy E. The dimension of the subspace is equal to the degeneracy g. The subspace density of the kth excited state is given by

$$ \varrho _k = N \sum ^{g_k}_{\gamma =1} \eta _k^{\gamma } \int |\Psi ^{\gamma }_k|^2 \mathrm{d}s_1 \mathrm{d}{} \mathbf{x_2}\ldots \mathrm{d}\mathbf{x_N}, $$
(5)

where the wave functions \(\Psi ^{\gamma }_k\) (\(\gamma =1. \ldots ,g_k\)) all have the energy \(E_k\). The weighting factors \(\eta _k^{\gamma }\) should satisfy the conditions

$$ 1 = \sum ^{g_k}_{\gamma =1} \eta _k^{\gamma } $$
(6)

and

$$ \eta _k^{\gamma } \ge 0. $$
(7)

In principle, any set of weighting factors \(\eta _k^{\gamma }\) satisfying conditions (6) and (7) can be used.

Theorem 1

The subspace density \(\varrho _k\) belonging to the kth excited state determines the Hamiltonian, the subspace \(S_k\) and the eigenvalue \(E_k\).

Proof of Theorem 1

Kato’s theorem is valid for any state, that is for any eigenfunction \(\Psi ^{\gamma }_k\) and the corresponding density \(\varrho _k^{\gamma }\):

$$ \left. \frac{\partial {{{\bar{\varrho }}}}_k^{\gamma }(r)}{\partial r} \right| _{r=R_{\beta }} = - 2 Z_{\beta } \varrho _k^{\gamma }(r=R_{\beta }). $$
(8)

Multiplying Eq. (8) with the weighting factor \(w_k^{\gamma }\) and summing for all j, we obtain that Kato’s theorem is valid for the subspace density \(\varrho _k\), too:

$$ \left. \frac{\partial {{{\bar{\varrho }}}}_k(r)}{\partial r} \right| _{r=R_{\beta }} = - 2 Z_{\beta } \varrho _k(r=R_{\beta }). $$
(9)

Therefore from the subspace density, the Hamiltonian (3), the subspace \(S_k\) and the eigenvalue \(E_k\) can be readily obtained. The integral of the subspace density gives us the number of electrons N.

As it was emphasized in [1], theorem 1 alone is not enough to establish an excited-state theory because it still allows that two different excited states of the same Hamiltonian have the same subspace density. There exists, however, a relation that excludes this possibility. This relation governs the asymptotic decay of the electron density \(\varrho _k^{\gamma }\) constructed from the wave function \(\Psi ^{\gamma }_k\):

$$ \varrho _k^{\gamma }(r \rightarrow \infty ) \sim r^{2 \left( \frac{Z-N+1}{\sqrt{2I_k}}-1\right) } \hbox {e}^{-2r\sqrt{2I_k}} \; , $$
(10)

where \(I_k\) is the vertical ionization potential of the N-electron system:

$$ I_k = E_1^{N-1} - E_k . $$
(11)

The limit in Eq. (10) is independent of \(\gamma \), that is, the asymptotic decay of the subspace electron density is the same:

$$ \lim _{r \rightarrow \infty } \frac{\partial \ln {{{{\bar{\varrho }}}}_k(r)}}{\partial r} = - \sqrt{8(E_1^{N-1} - E_k)} \; , $$
(12)

where \(E_1^{N-1}\) is the ground-state energy of the \(N-1\) electron system. As \(E_1^{N-1}\) is independent of k, no other subspace density has the same energy. If the subspace density \(\varrho _k\) is known, one can determine the excited-state energy \(E_k\) from Eq. (12). We can then define

$$ F^\mathrm{{Coul}}[\varrho ] = E_k[\varrho ] - \int \varrho (\mathbf{r}) v^\mathrm{{Coul}}[\varrho ;\mathbf{r}] \mathrm{d}{} \mathbf{r} . $$
(13)

This equation holds for any bound subspace density of a Coulomb external potential, provided that Eq. (10) is valid. For further details, see Ref. [1].

The theory proposed is valid for Coulomb systems. However, there is no easy way to decide whether a given subspace density is Coulombic. This Coulombic v-representability problem can be avoided by defining the functional for all subspace densities [1]. Therefore, in the next step we extend the analysis to non-Coulombic subspace densities. We propose an ensemble constrained-search approach on an individual excited state. Let \(\varrho (\mathbf{r})\) be any subspace density and let \(\varrho ^\mathrm{{Coul}}(\mathbf{r})\) be a Coulombic subspace density. Then we define the functional

$$ F[\varrho ,\varrho ^\mathrm{{Coul}}]= \mathop {\mathop {\mathrm{min}}_{S \rightarrow \varrho }}_{\{ S \perp S_j^\mathrm{{Coul}}[\varrho ^\mathrm{{Coul}}] \}_{j=1}^{k-1} } \sum ^{g}_{\gamma =1} \eta ^{\gamma } \langle \Psi ^{\gamma } | {{{\hat{T}}}} +{{{\hat{V}}}}_{ee} | \Psi ^{\gamma } \rangle . $$
(14)

The minimization is done with the constraints that each subspace S yields \(\varrho (\mathbf{r})\) and is simultaneously orthogonal to the subspaces corresponding to the first \(k-1\) subspaces of the Coulomb system specified by \(\varrho ^\mathrm{{Coul}}(\mathbf{r})\). Then, a universal functional \(F[\varrho ]\) is constructed as follows. Assume that there exists a unique Coulomb subspace density that is closest to the (non-Coulomb) subspace density \(\varrho \). (The best measure for “closest” is not detailed here, see [1, 2, 20, 43].) If there are several Coulomb subspace densities from the same “distance” from \(\varrho \), the one yielding to the smallest F (Eq. 14) is selected:

$$ F_{\epsilon }^\mathrm{{Coul}}[\varrho ]= \mathop {\mathrm{min}}_{\varrho ^\mathrm{{Coul}}} F[\varrho ,\varrho ^\mathrm{{Coul}}] \text{; } \quad ||\varrho ^\mathrm{{Coul}}-\varrho || \le \epsilon . $$
(15)

\(\epsilon \) is supposed to be large enough to ensure the existence of at least one subspace Coulomb density in the distance smaller than \(\epsilon \). With \(\epsilon _\mathrm{{min}}\) denoting the smallest possible value of \(\epsilon \),

$$ F^\mathrm{{Coul}}[\varrho ]= F_{\epsilon _\mathrm{{min}}}^\mathrm{{Coul}}[\varrho ] . $$
(16)

This procedure should be performed in the “vicinity” of all Coulomb subspace densities \(\varrho _k(\mathbf{r})\). In this way, the functional \(F^\mathrm{{Coul}}\) is defined for any subspace density.

We can also define a functional \(F^\mathrm{{Coul}}_k[\varrho ]\). Consider first the functional

$$ F_{\epsilon ,k}^\mathrm{{Coul}}[\varrho ]= \mathop {\mathrm{min}}_{\varrho ^\mathrm{{Coul}}_k} F[\varrho ,\varrho ^\mathrm{{Coul}}_k] \text{; } \quad ||\varrho ^\mathrm{{Coul}}_k-\varrho || \le \epsilon , $$
(17)

where \(\epsilon \) should be large enough to ensure the existence of at least one Coulomb subspace density \(\varrho ^\mathrm{{Coul}}_k\) closer than \(\epsilon \) from \(\varrho \). Then \(F^\mathrm{{Coul}}_k[\varrho ]\) is defined as

$$ F^\mathrm{{Coul}}_k[\varrho ]= F_{\epsilon _\mathrm{{min}},k}^\mathrm{{Coul}}[\varrho ] . $$
(18)

We do not know whether the functionals \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) are continuous or functionally differentiable. We expect that \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) have more favorable properties than our original functionals in Ref. [1], because \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) are functionals of the subspace density.

Supposing that functional (16) is functionally differentiable, we are led to the Euler equation

$$ v^\mathrm{{Coul}}([\varrho ], \mathbf{r}) = - \frac{\delta F^\mathrm{{Coul}}[\varrho ]}{\delta \varrho } $$
(19)

up to a constant. In case \(F^\mathrm{{Coul}}_k[\varrho ]\) is not functionally differentiable, but \(F^\mathrm{{Coul}}_k[\varrho ]\) is functionally differentiable, the Euler equation takes the form

$$ v^\mathrm{{Coul}}([\varrho ], \mathbf{r}) = - \frac{\delta F^\mathrm{{Coul}}_k[\varrho ]}{\delta \varrho } $$
(20)

up to a constant. \(\square \)

3 Generalized Kohn–Sham equations for excited levels

Our aim is to develop a theory that is convenient for calculation of excitation energies. Hence, it is essential to introduce a Kohn–Sham scheme. Therefore, consider the non-interacting Hamiltonian

$$ {{{\hat{H}}}}^{0} = {{{\hat{T}}}} + \sum _{i=1}^N w(\mathbf{r}_i) $$
(21)

and the corresponding equations

$$ {{\hat{H}}}^{0} \Phi ^{\gamma }_{l} = E_{j}^0 \Phi ^{\gamma }_{l} \quad \quad (\gamma =1,2,\ldots ,g_l^0) \; . $$
(22)

The lth degenerate state with non-interacting wave functions \(\Phi ^{\gamma }_{l}, \quad \quad (\gamma =1,2,\ldots ,g_l^0)\) spans the subspace \(S_l^0\). Note that l can be different from k. Moreover, \(g_l^0\) can be different from \(g_k\), too, that is, the degree of the degeneracy of the non-interacting and the true energy levels can be unequal. The non-interacting Hamiltonian \({{{\hat{H}}}}^{0}\) is defined so that the subspace density constructed from the lth degenerate state

$$ \varrho _l = N \sum ^{g_l^0}_{\gamma =1} \eta ^{\gamma }_{l} \int |\Phi ^{\gamma }_{l}|^2 \mathrm{d}s_1 \mathrm{d}{} \mathbf{x_2}\ldots \mathrm{d}\mathbf{x_N} = \varrho _k^\mathrm{{Coul}} $$
(23)

is the same as the given Coulomb subspace density \(\varrho _k^\mathrm{{Coul}}\) of the true interacting system and the subspace \(S_l^0\) is orthogonal to all subspaces \(S_j^0\), \(1\le j < l\). However strong these requirements look, it still might happen that it is not enough to obtain a unique \({{{\hat{H}}}}^{0}\), that is several non-interacting Hamiltonians satisfy these conditions.

To define a unique non-interacting system, we also require that the ground-state subspace density \(\varrho _1^0\) of the non-interacting system be as close as possible to the ground-state subspace density \(\varrho _1^\mathrm{{Coul}}\) of the interacting Coulomb system. That is, \(||\varrho _1^\mathrm{{Coul}}-\varrho _1^0|| \le \delta _\mathrm{{min}}\). Then, the non-interacting kinetic energy for Coulomb subspace densities can be defined as

$$ T_s^\mathrm{{Coul}}[\varrho ^\mathrm{{Coul}}_k]= \mathop {\mathop {\mathop {\mathrm{min}}_{S_l^0 \rightarrow \varrho ^\mathrm{{Coul}}_k}}_{\{S_l^0 \perp S_j^0[\varrho ^\mathrm{{Coul}}_k] \}_{j=1}^{l-1} }}_{||\varrho _1^\mathrm{{Coul}}-\varrho _1^0|| \le \delta _\mathrm{{min}}} \sum ^{g_l^0}_{\gamma =1} \eta ^{\gamma }_l \langle \Phi ^{\gamma }_{l} | {{{\hat{T}}}} | \Phi ^{\gamma }_{l} \rangle . $$
(24)

Define now the non-interacting kinetic energy for any (not necessarily Coulombic) subspace density. Inspect first \(T_s\) as a functional of any trial subspace density \(\varrho \) and a Coulomb subspace density \(\varrho ^\mathrm{{Coul}}\) corresponding to the kth state of some Coulomb Hamiltonian:

$$ T_s^\mathrm{{Coul}}[\varrho ,\varrho ^\mathrm{{Coul}}_k]= \mathop {\mathop {\mathop {\mathrm{min}}_{S_l^0 \rightarrow \varrho }}_{\{S_l^0 \perp |S_j^0[\varrho ^\mathrm{{Coul}}_k]\}_{j=1}^{l-1} }}_{||\varrho _1^\mathrm{{Coul}}-\varrho _1^0|| \le \delta _\mathrm{{min}}}\sum ^{g_l^0}_{\gamma =1} \eta ^{\gamma }_l \langle \Phi ^{\gamma }_{l} | {{{\hat{T}}}} | \Phi ^{\gamma }_{l} \rangle . $$
(25)

The minimization is performed with the constraints that the subspace density of the lth state of the non-interacting system is the given \(\varrho \), the subspace \(S_l^0\) is orthogonal to all subspaces \(S_j^0\), \(1\le j < l\) and the ground-state subspace density of the non-interacting system \(\varrho _1^0\) is as close as possible to the ground-state subspace density of the original Coulomb system \(\varrho _1^\mathrm{{Coul}}\).

We proceed by defining the functional

$$ \begin{aligned} & T_{s,\epsilon }^\mathrm{{Coul}}[\varrho ]= \mathop {\mathrm{min}}_{\varrho ^\mathrm{{Coul}}} T_s^\mathrm{{Coul}}[\varrho ,\varrho ^\mathrm{{Coul}}] \nonumber \\ &\quad \text{ where } \quad ||\varrho ^\mathrm{{Coul}}-\varrho || \le \epsilon,\end{aligned} $$
(26)

where \(\epsilon \) is supposed to be large enough to ensure the existence of at least one Coulomb subspace density in the distance smaller than \(\epsilon \). Then the non-interacting kinetic energy functional is defined as

$$ T_s^\mathrm{{Coul}}[\varrho ]= T_{s,\epsilon _\mathrm{{min}}}^\mathrm{{Coul}}[\varrho ] , $$
(27)

where \(\epsilon _\mathrm{{min}}\) stands for the smallest possible value of \(\epsilon \). In case there are more than one Coulomb subspace densities with the same distance from \(\varrho \), then the subspace density with the smallest \(T_s\) is selected.

The minimum principle for the non-interacting total energy

$$ \mathop {\mathrm{Min}}_{\varrho } \left\{ T_s^\mathrm{{Coul}}[\varrho ] + \int \varrho (\mathbf{r}) w([\varrho ];\mathbf{r})\mathrm{d}{} \mathbf{r} \right\} $$
(28)

leads to the Euler equation

$$ w([\varrho ];\mathbf{r}) = - \left. \frac{\delta T_s^\mathrm{{Coul}}[\varrho ]}{\delta \varrho } \right| _{\varrho =\varrho _k} $$
(29)

up to a constant. In the non-interacting total energy expression (28), Hamiltonian (21) was used. Partitioning the functional \(F^\mathrm{{Coul}}[\varrho ]\) (16) as

$$ F^\mathrm{{Coul}}[\varrho ] = T_s^\mathrm{{Coul}}[\varrho ] + J^\mathrm{{Coul}}[\varrho ] + E_{xc}^\mathrm{{Coul}}[\varrho ] $$
(30)

and taking the functional derivatives, we are led to

$$ v^\mathrm{{Coul}}[\varrho _k] = - \left( \frac{\delta F^\mathrm{{Coul}}[\varrho ]}{\delta \varrho }\right) _{\varrho = \varrho _k} =\left( - \frac{\delta T_{s}^\mathrm{{Coul}}[\varrho ]}{\delta \varrho } -\frac{\delta J^\mathrm{{Coul}}[\varrho ]}{\delta \varrho } -\frac{\delta E_{xc}^\mathrm{{Coul}}[\varrho ]}{\delta \varrho }\right) _{\varrho = \varrho _k}, $$
(31)

where Eq. (19) is utilized. Therefore, the local potential of the non-interacting system in Eq. (21), that is the Kohn–Sham potential, can be written as

$$ w[\varrho _k] = v^\mathrm{{Coul}}[\varrho _k] + v_J^\mathrm{{Coul}}[\varrho _k] + v_{xc}^\mathrm{{Coul}}[\varrho _k] . $$
(32)

\(J^\mathrm{{Coul}}\), \(v_J^\mathrm{{Coul}}\) and \(E_{xc}^\mathrm{{Coul}}\), \(v_{xc}^\mathrm{{Coul}}\) are the classical Coulomb and the exchange-correlation energies and potentials. The total energy takes the form

$$\begin{aligned} E^\mathrm{{Coul}}[\varrho _k]= & {} T_{s}^\mathrm{{Coul}}[\varrho _k] + J^\mathrm{{Coul}}[\varrho _k] +E_{xc}^\mathrm{{Coul}}[\varrho _k] \nonumber \\&+ \int \varrho _k(\mathbf{r}) v^{Cou l}([\varrho _k];\mathbf{r}) \mathrm{d}{} \mathbf{r} \end{aligned}$$
(33)

and the exchange-correlation energy \(E_{xc}^\mathrm{{Coul}}[\varrho _k]\) is defined by this equation. The exchange-correlation potential is given by

$$ v_{xc}^\mathrm{{Coul}}[\varrho ;\mathbf{r}] = \frac{\delta E_{xc}^\mathrm{{Coul}}[\varrho ] }{\delta \varrho } . $$
(34)

The Kohn–Sham equations have the form

$$ \left[ -\frac{1}{2} \nabla ^2 + w([\varrho _k], \mathbf{r})\right] \phi _i = \varepsilon _i \phi _i , $$
(35)

where the excited-level density \(\varrho _k\) is given by

$$ \varrho _k = \sum _{i=1}^m \lambda _i |\phi _i|^2 . $$
(36)

\(\phi _i\) and \(\varepsilon _i\) are the orbitals and the orbital energies, respectively. The occupation numbers \(\lambda _i\) are fractional and the sum goes for all orbitals with nonzero occupation number.

4 Discussion

We extended our theory [1, 2] using subspace densities, that is, we have functionals of the subspace density. It has turned out that the Coulomb subspace density determines not only the Hamiltonian of the Coulomb system but also the degree of excitation. We have defined two functionals \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) for the kinetic plus electron–electron repulsion part of the total energy. \(F^\mathrm{{Coul}}\) is general in the sense that it is appropriate for all bound excited states. (It is a great advantage of the theory compared to the previous theories.) We have also introduced the functional \(F^\mathrm{{Coul}}_k[\varrho ]\) that explicitly incorporates k, the excitation label of the state of interest. Both \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) have been defined for any well-behaved density not only for Coulomb densities. In spite of it, we do not know whether the functionals are well-behaved. In particular, we do not know whether \(F^\mathrm{{Coul}}[\varrho ]\) and \(F^\mathrm{{Coul}}_k[\varrho ]\) are functionally differentiable or even whether they are continuous. Using ensemble densities instead of pure-state densities can result in functionals with more favorable properties, such as continuity and differentiability and perhaps be more easily approximated. It will be the subject of further research to rigorously characterize the properties of these functionals.

One is free to select the values of the weighting factors \(\eta _l^{\gamma }\): they only need to satisfy conditions (6) and (7). If the weighting factors \(\eta _l^{\gamma }\) are all equal, the density has the property of transforming according to the totally symmetric irreducible representation [44, 45]. (It is, of course, true in case of degeneracy caused by symmetry, not for accidental degeneracy.) So, for instance, for atoms the subspace density will be spherically symmetric. But, it is possible to select other values for the weighting factors \(\eta _l^{\gamma }\). The advantage of using equal weighting factors is that the subspace density will show the symmetry of the external potential.

We would like to emphasize that the non-interacting ensemble, for a given excited level, can be constructed as a convex sum of Slater determinants. The Kohn–Sham equations are derived by minimizing the corresponding non-interacting energy.

In summary, we have shown that functionals of the kinetic plus electron–electron repulsion part of the total energy can be defined as functionals of subspace densities for degenerate excited levels of Coulomb systems. We have proven that the subspace Coulomb densities determine not only the Hamiltonian but also the degree of excitation. We have derived Euler equations that depend on only the subspace of the given degenerate excited state. Finally, we have proven the existence of the non-interacting system and the Kohn–Sham equations.