The following Prolog code defines a predicate P. (Remember
that uppercase terms are variables, not constants, in Prolog.)
P(X,[X|Y]).<br>
P(X,[Y|Z]) :- P(X,Z).<br>
-
Show proof trees and solutions for the queries P(A,[1,2,3]) and P(2,[1,A,3]).
-
What standard list operation does P represent?