Symmetry and phase transitions