:- dynamic(math/4). math(A,B,C,D) :- D is A + B + C * A. true :- 1 = 1.