  The surface freezing and surface melting transitions exhibited by a model
two-dimensional soft matter system is studied. The behaviour when confined
within a wedge is also considered. The system consists of particles interacting
via a soft purely repulsive pair potential. Density functional theory (DFT) is
used to calculate density profiles and thermodynamic quantities. The external
potential due to the confining walls is modelled via a hard-wall with an
additional repulsive Yukawa potential. The surface phase behaviour depends on
the range and strength of this repulsion: When the repulsion strength is weak,
the wall promotes freezing at the surface of the wall. The thickness of this
frozen layer grows logarithmically as the bulk liquid-solid phase coexistence
is approached. Our mean-field DFT predicts that this crystalline layer at the
wall must be nucleated (i.e. there is a free energy barrier) and its formation
is necessarily a first-order transition, referred to as `prefreezing', by
analogy with the prewetting transition. However, in contrast to the latter,
prefreezing cannot terminate in a critical point, since the phase transition
involves a change in symmetry. If the wall-fluid interaction is sufficiently
long ranged and the repulsion is strong enough, surface melting can instead
occur. Then the interface between the wall and the bulk crystalline solid
becomes wet by the liquid phase as the chemical potential is decreased towards
the value at liquid-solid coexistence. It is observed that the finite thickness
fluid film at the wall has a broken translational symmetry due to its proximity
to the bulk crystal and so the nucleation of the wetting film can be either
first-order or continuous. Our mean-field theory predicts that for certain wall
potentials there is a premelting critical point analogous to the surface
critical point for the prewetting transition. In a wedge...
