How Societies Develop Mathematical Expertise