AI is cracking math problems that baffled generations of researchers, but its success is raising uncomfortable questions.