How Humans Learn to Think Mathematically