1) Use the constant z for the number zero and the unary functor s for the successor function to denote the non-negative integers(e.g. S(s(z)) denotes 2), and define in PROLOG the predicate numeral (X,N), which is true iff X is the term corresponding to the number N, and also the predicates representing the unary function predessor, the binary functions addition, subtraction, multiplication and factorial, and the finary relations equal, less than, and greater than. Hint: Assuming that the predicate add(X,Y,Z) is true iff X+Y=Z, where X, Y, and Z are the decimals, addition could be defined in PROLOG as follows: addition(0,X,X). addition(Y,X,Z) :- V is Y-1, addition(V,X,W), Z is w+1.
https://graduatepapertutors.com/wp-content/uploads/2019/10/logo-300x60.png 0 0 Joseph https://graduatepapertutors.com/wp-content/uploads/2019/10/logo-300x60.png Joseph2020-12-01 09:23:542020-12-01 09:23:541 use the constant z for the number zero and the unary functor s for the successor f 5346894