A drawback of arithmetic using is/2 is that the right hand side must be fully instantiated at evaluation time. Often it is desirable to have predicates that define true logic relationships between their arguments like “Z is the sum of X and Y”. For integer addition and multiplication this is provided as:
They work only with integer arguments but any single argument can be a variable which is then instantiated so that the relation holds. If more than one argument is uninstantiated, an instantiation fault is produced.
Note that if one of the first two arguments is a variable, a solution doesn’t necessarily exist. For example, the following goal has no integer solution :
[eclipse 1]: times(2, X, 3). no (more) solution.
Since any one of the arguments of these two predicates can be a variable, it does not make much sense to use them in arithmetic expressions where always the first arguments are taken as input and the last one as output.