  We present the first non-mean-field calculation of the magnetization $M(T)$
of YBa$_2$Cu$_3$O$_{7-\delta}$ both above and below the flux-lattice melting
temperature $T_m(H)$. The results are in good agreement with experiment as a
function of transverse applied field $H$. The effects of fluctuations in both
order parameter $\psi({\bf r})$ and magnetic induction $B$ are included in the
Ginzburg-Landau free energy functional: $\psi({\bf r})$ fluctuates within the
lowest Landau level in each layer, while $B$ fluctuates uniformly according to
the appropriate Boltzmann factor. The second derivative $(\partial^2 M/\partial
T^2)_H$ is predicted to be negative throughout the vortex liquid state and
positive in the solid state. The discontinuities in entropy and magnetization
at melting are calculated to be $\sim 0.034\, k_B$ per flux line per layer and
$\sim 0.0014$~emu~cm$^{-3}$ at a field of 50 kOe.
