I writed prolog like that
add(). mult(). subs(). div(). %rules add(X,Y,Z):- Z is X+Y. mult(X,Y,Z):- Z is