Mathematics of Continual Learning