A theorem on refractive index as a function of wavelength