If X
can be NOT unified with Y
the goal succeeds else the goal fails.
Examples
?- abc \= def.
yes
?- X \= Y.
no
?- p(X,b) \= p(a,Y).
no
?- p(X,b,c) \= p(a,Y,z).
X = UNINSTANTIATED VARIABLE
Y = UNINSTANTIATED VARIABLE
yes
X \= Y
- checks whether two terms cannot be unified.If X
can be NOT unified with Y
the goal succeeds else the goal fails.
?- abc \= def.
yes
?- X \= Y.
no
?- p(X,b) \= p(a,Y).
no
?- p(X,b,c) \= p(a,Y,z).
X = UNINSTANTIATED VARIABLE
Y = UNINSTANTIATED VARIABLE
yes