Theory of chemical bonding based on the atom–homogeneous electron gas system