The theory of dark matter