gpx_buttom_on_course_in(X,C) :- gpx(C,L), last_member(X,L). last_member(X,[X]). last_member(X,[_|L]) :- last_member(X,L).