Why do magnetic field lines describe a force? My professor stated the four Maxwell equations, as well as the "Lorentz force" equation
$$
\mathbf{F} = q\left(\mathbf{E}+\frac{1}{c}\mathbf{v} \wedge\mathbf{B}\right)
\tag{1}
$$
He said that this equation together with the Maxwell equations describe all classical phenomena of electrodynamics.
As far as I can see, the Maxwell equations describe how $\mathbf{E}$ and $\mathbf{B}$ behave, and the equation above describes how they affect electric charges. But two permancent magnets at rest are not electrically charged, and their magnetic fields do not change in time, so $\mathbf{E}=0$ and $\mathbf{v}=0$, therefore also $\mathbf{F}=0$.
Why do they attract or repel? From which equation can the force between magnetic moments at rest be deduced?
EDIT: Wikipedia has an explanation using the Ampère model which treats all magnetic dipoles as the result of an electric current. The formula is
$$
\mathbf{F}=-\nabla(\mathbf{B}\cdot\mathbf{v})
\tag{2}
$$
But the Ampère model is not something that can be derived from the Maxwell equations.
Another frequent explanation is that the magnet "tries to get into a position with the lowest magnetic energy density". But this is an additional postulate, it does not follow from Maxwell's equations.
So, I'm still looking for a derivation of this formula from the Maxwell equations.
 A: Feel free to skip all text and to read only the equations.  =). (I dislike wordy books). Texts are explanations to the equations. Also, I've used SI instead of CGS (I also dislike CGS).
You want a proof that two magnets executes force upon each other. A magnet can be interpreted by a magnetic dipole, which has its own magnetic dipole moment vector. A dipole generates a magnetic field. Thus, two dipoles, will interact with each other by means of the field. Thus, suffices to prove that a magnetic dipole will experience a force by an external magnetic field. And this is exactly what we are going to prove, using only Maxwell equations and Lorentz force.
Assume a closed circuit $\gamma$, with stationary current $I$. On this region, there is a external magnetic field $\mathbf B(\mathbf r)$. The force on each charge $dq$ in the circuit is by Lorentz force:
$$
d\mathbf F = dq\mathbf v\times\mathbf B
$$
Assuming $n$ charge carriers per unit volume of the conductor, where $A$ is the sectional area of the circuit, we can compute the force over an element of circuit $d\mathbf l$:
$$
d\mathbf F = NAq|d\mathbf l|\mathbf v\times\mathbf B = 
NAq|\mathbf v| d\mathbf l\times\mathbf B = 
A|\mathbf J| d\mathbf l\times\mathbf B = 
I d\mathbf l\times\mathbf B
$$
Now we can have the torque:
$$
d\tau = \mathbf r\times d\mathbf F = 
\mathbf r\times (I d\mathbf l\times\mathbf B) = 
I\mathbf r\times (d\mathbf l\times\mathbf B)
$$
About the torque, notice that if we integrate component by component, we will arrive in: $\tau = I\mathbf A\times\mathbf B$, where $\mathbf A$ is the vector where $A_i$ is the area over of the projections of the curve $\gamma$ over plane xy, yz, zx. At this point, we can find its magnetic moment:
$$
\mathbf A = \frac{1}{2}\oint_\gamma \mathbf r\times d\mathbf l
\quad\Longrightarrow\quad
\mathbf m = I\mathbf A = \frac{I}{2}\oint_\gamma \mathbf r\times d\mathbf l
$$
Its possible to prove that such integral also gives vector $\mathbf A$. Therefore, the torque can be calculated using magnetic moment:
$$
\tau = 
\mathbf m\times\mathbf B = 
\oint_\gamma I\mathbf r\times (d\mathbf l\times\mathbf B)
$$
Thus we are proving (not defining) that, this quantity indeed is equal to the magnetic vector moment $\mathbf m$. Means, this circuit has an associated magnetic moment, and because of this there is a torque. It coincides with the actual defined value of the magnetic moment vector from the multipole expansion of the magnetic vector potential from localized current distributions. Furthermore, it indicates systems with magnetic moment (such as, magnets) are equivalent to circuit current loops (notice how the magnetic moment encodes the geometry of the circuit). A similar treatment of all of this is possible using a general localized current distribution $\mathbf J(\mathbf r)$ instead of a closed current circuit $\gamma$ with statioanry current $I$.
Taylor expansion of the magnetic field gives: $\mathbf B(\mathbf r) = \mathbf B_0 + \mathbf r\cdot\nabla\mathbf B$, until second order. You can consider $\nabla\mathbf B$ as the Jacobian matrix of the magnetic field. Notice that, we can use such approximation to compute the force over the circuit:
$$
\mathbf F = 
\oint_\gamma Id\mathbf l\times\mathbf B = 
\oint_\gamma Id\mathbf l\times\mathbf B_0 +  \oint_\gamma Id\mathbf l\times\mathbf r\cdot\nabla\mathbf B
$$
The first integral, $\mathbf B_0$ is constant, and will get out the integral. If $I$ is constant, it will also get out, and we will be left with a closed integral over $d\mathbf l$ which is zero. So, the force contribution comes from the non-uniformity of the magnetic field, ie, its second order term expansion:
$$
\mathbf F = 
I\oint_\gamma d\mathbf l\times(\mathbf r\cdot\nabla\mathbf B) = 
(\mathbf m\times\nabla)\times\mathbf B
$$
Done. Here we made use of the magnetic moment. This means, anything with an associated magnetic moment (our circuit, a magnet, a dipole, a planet, etc) can be equivalent modeled by our circuit, and will experience a force and torque from an external non-uniform magnetic field (such as, the magnetic field generated by other magnetic dipole, or equivalently, the magnetic field generated by another something with associated magnetic moment vector). We can simplify:
$$
\mathbf F = (\mathbf m\times\nabla)\times\mathbf B = 
\nabla(\mathbf m\cdot\mathbf B) - \mathbf m(\nabla\cdot\mathbf B)
$$
Where here we used a vector identity. Now, using Maxwell equation: $\nabla\cdot\mathbf B = 0$, we have the force and torque experienced by the dipole immersed in external non-uniform magnetic field:
$$
\mathbf F = \nabla(\mathbf m\cdot\mathbf B), \quad\quad
\tau = \mathbf m\times\mathbf B
$$
