A book-length thought experiment uses math to investigate some of life’s big questions.