  Electronic mechanism in the interplay between ferromagnetism and structure
stability of $4f$-$3d$ intermetallics in the main phase of rare-earth permanent
magnets is investigated from first principles. We present a case study with an
archetypical materials family RCo$_5$ (R=Ce, La, Y), which was a part of the
earliest rare-earth permanent magnets and from which other representative
main-phase compounds can be regarded as a derived type. Comparison with the
champion magnet materials family R$_2$T$_{14}$B and recently revisited
materials family RT$_{12}$ (T=Co and Fe) points to a direction leading to a
mid-class magnet for the possible next generation materials.
