Success: 3 ~= 4. 3 ~= X, (delays ... X = 4. ... then succeeds and gives X = 4) Note the nonlogical behaviour of negation as failure: 3 \= X, (fails ... X = 4. ... and this is not recognized) Fail: 3 ~= 3. s(X,Y) ~= s(X,Y). s(X,Y) ~= s(X,Z), (delays ... Z = Y. ... then fails)