I'm trying to make predicates such that for lists X and Y, rmlast is true if X and Y are the same list except for the fact that Y has 1 element more. So [1] [1,2] or [3,2] [3,2,5].
rmlast([], [_]). :- true.
rmlast([X|xtail], [Y|ytail]) :- rmlast(xtail,ytail), X is Y.
This however, produces a false result for anything other than the base case.