Metaphysics and logic