Prediction and mathematical reasoning