The liquid–solid transition of the hard sphere system from uniformity of the chemical potential