% if X >= Y, then X is the max max(X, Y, X) :- X >= Y. % if X is less, than Y is the max max(X, Y, Y) :- X < Y.