Computational problem - definition
But the thing is - these sentences are not mathematical objects.

Yes, they are. A set of sentences can be a mathematical object. Just about anything can be a mathematical object.


A computational problem can be viewed as an infinite collection of instances together with a solution for every instance.

[...] but I don't quite see the relationship with the first definition

Well, &quot;an infinite collection of instances together with a solution for every instance&quot; is a mathematical object (representing a collection of questions that computers might be able to solve).