Even in your example (which is obviously not correct representation of prolog), that code will work X orders magnitude faster and with 100% reliability compared to much more inferior LLM reasoning capabilities.
could you expand what is the point? That authors opinion without much justification is that this is not reasoning?