Derivation of the laws of motion and equilibrium from a metaphysical principle