Mathematics of the Cosmic Mind