Consider:
bar([], Ws, Ws).
bar([X|Xs], Ys, [X|Zs]) :- bar(Xs, Ys, Zs).
1) How does this have no Solutions
bar([1,2], [], [X,X]).
2) How does this have only One Solution when Z=5?
bar([5,Y], [Y,5], [Z,Z|_]).
3)How does this have only One Solution when Z=5 and Y = 5?
bar([_,Y], [5,5], [Z,Z,Z|_]).