  A theorem on the magnetic energy minimum in a perfect, or ideal, conductor is
proved. Contrary to conventional wisdom the theorem provides a classical
explanation of the expulsion of a magnetic field from the interior of a
conductor that loses its resistivity. It is analogous to Thomson's theorem
which states that static charge distributions in conductors are surface charge
densities at constant potential since these have minimum energy. This theorem
is proved here using a variational principle. Then an analogous result for the
magnetic energy of current distributions is proved: magnetic energy is
minimized when the current distribution is a surface current density with zero
interior magnetic field. The result agrees with currents in superconductors
being confined near the surface and indicates that the distinction between
superconductors and hypothetical perfect conductors is artificial.
