次のように、(swi-prolog で) 既に組み込まれている述語を取得することは可能ですか?
Wanted_Pred(X, a) %false
Wanted_Pred(b, a) %false
Wanted_Pred(X, Y) %true
Wanted_Pred(X, X) %true
Wanted_Pred(X, [Y|Z]) %false
Wanted_Pred([A|B], [X,Y|Z]) %false
Wanted_Pred([A,C|B], [X,Y|Z]) %true
たとえば、両方の引数が互いの自由な変数の名前変更を表している場合は成功します。
copy_term(X, a) %true
copy_term(X, [Y|Z]) %true
copy_term([A|B], [X,Y|Z]) %true