Hamiltonian of the phase separation border and phase transitions of the first kind. I