> no one will pay them when a machine can do it.
Let's start with the fact that mathematicians aren't paid for results. Institution which gives them salary fundamentally doesn't give a fuck about theorems. They might care about having top-grade mathematicians for prestige, or because they believe that countries which are "good at math" also do better in science, engineering, etc.
> somehow the skill of building new theories in math is directly tied to slaving hard over a problem
We don't know if that's the only way. Perhaps collaboration with AI is just as good. Why reject it before it has been tried?
> what about junior ones
Junior guy with brilliant new ideas might benefit the most from AI as it can compensate for lacking technical chops and breadth of knowledge.