You guess incorrectly. Look up Gödel's incompleteness theorems. In particular they imply that there is no decision procedure for mathematical truth. This applies to LLMs as much as anything.
... work in various industrial fields, such as computer vision or IT security, because they are trained to find shared patters for a given set of tasks and to express assumptions about them.