% maxi(X,Y,Z) will be true when Z is the maximum of X and Y. maxi(X,Y,Z):-(X>=Y, Z is X,!); Z is Y.