==/2
, \==/2
+Term1 ==
+Term2
Succeeds if the terms currently instantiating Term1 and Term2 are literally identical (in particular, variables in equivalent positions in the two terms must be identical).
+Term1 \==
+Term2
Succeeds if the terms currently instantiating Term1 and Term2 are not literally identical.
Query (A) fails because Term1 and Term2 are distinct uninstantiated variables. However, query (B) succeeds because the first goal unifies the two variables:
| ?- Term1 == Term2. (A) no
| ?- Term1 = Term2, Term1 == Term2. (B) yes
Query (C) succeeds because Term1 and Term2 are distinct uninstantiated variables. However, query (D) fails because the first goal unifies the two variables.
| ?- Term1 \== Term2. (C) yes
| ?- Term1 = Term2, Term1 \== Term2. (D) no
compare/3
, @</2
, @=</2
, @>/2
, @>=/2
ref-lte