  Molecules containing a lanthanide atom have sets of electronic states arising
from excitation of an inner-shell electron. These states have received little
attention, but are thought to play an important role in laser cooling of such
molecules and may be a useful resource for testing fundamental physics. We
study a series of inner-shell excited states in YbF using resonance-enhanced
multi-photon ionisation spectroscopy. We investigate the excited states of
lowest energy, 8474, 9013 and 9090 cm$^{-1}$ above the ground state, all
corresponding to the configuration 4f$^{13}$6s$^{2}$ ${}^{2}F_{7/2}$ of the
Yb$^+$ ion. They are metastable, since they have no electric dipole allowed
transitions to the ground state. We also characterize a state at 31050
cm$^{-1}$ that is easily excited from both the ground and metastable states,
which makes it especially useful for this spectroscopic study. Finally, we
study a state at 48729 cm$^{-1}$, which is above the ionization limit and
features strong auto-ionizing resonances that prove useful for efficient
detection of the molecules and for identifying the rotational quantum number of
each line in the spectrum. We resolve the rotational structures of all these
states and find that they can all be described by a very simple model based on
Hund's case (c). Our study provides information necessary for laser slowing and
magneto-optical trapping of YbF, which is an important species for testing
fundamental physics. We also consider whether the low-lying inner-shell states
may themselves be useful as probes of the electron's electric dipole moment or
of varying fundamental constants, since they are long-lived states in a
laser-coolable molecule featuring closely-spaced levels of opposite parity.
