Closed UWN closed 1 year ago
Interesting. Possibly variable ordering plays a role (of course this should not be the case).
Maybe more helpful:
?- dif(A, B), A=[D|C], B=[E|D], A=[F|B],E=F, E = e.
A = [e, e|e],
B = C, C = [e|e],
D = E, E = F, F = e.
?- dif(A, B), _=C, A=[D|C], B=[E|D], A=[F|B],E=F, E = e.
false, unexpected.
?- dif(A, B), _=C, A=[D|C], B=[E|D], A=[F|B],E=F.
false, unexpected.
?- dif(A, B), _=C, A=[D|C], B=[E|D], A=[F|B].
A = [F, E|F],
B = C, C = [E|F],
D = F.
By adding an unrelated equation sharing a variable, success turns into failure.