  In [Phys. Rev. Lett. 127, 023001 (2021)] a reduced density matrix functional
theory (RDMFT) has been proposed for calculating energies of selected
eigenstates of interacting many-fermion systems. Here, we develop a solid
foundation for this so-called $\boldsymbol{w}$-RDMFT and present the details of
various derivations. First, we explain how a generalization of the Ritz
variational principle to ensemble states with fixed weights $\boldsymbol{w}$ in
combination with the constrained search would lead to a universal functional of
the one-particle reduced density matrix. To turn this into a viable functional
theory, however, we also need to implement an exact convex relaxation. This
general procedure includes Valone's pioneering work on ground state RDMFT as
the special case $\boldsymbol{w}=(1,0,\ldots)$. Then, we work out in a
comprehensive manner a methodology for deriving a compact description of the
functional's domain. This leads to a hierarchy of generalized exclusion
principle constraints which we illustrate in great detail. By anticipating
their future pivotal role in functional theories and to keep our work
self-contained, several required concepts from convex analysis are introduced
and discussed.
