Question: In Prolog Defining Natural numbers and Common Numerical Operators For this part, you will be defining Natural numbers (including zero, 'Z') using Prolog using the
In Prolog
Defining Natural numbers and Common Numerical Operators For this part, you will be defining Natural numbers (including zero, 'Z') using Prolog using the numbering scheme discussed in class. You should also provide the prolog code for the following predicates/functors listed below. predecessor/2, the second parameter provides the predecessor to the first successor/2, the second parameter provides the successor to the first numeral/2, the second parameter gives the numerical value for the first addition/3, the third parameter gives the numbering scheme value of adding the first and second subtraction/3, the third parameter gives the numbering scheme value of subtracting the first and second multiplication/3, the third parameter gives the numbering scheme value of multiplying the first and second factorial/2, the second parameter gives the numbering scheme value of the factorial of the first equal/2, will answer true if the first and second parameter are equal and false otherwise greater/2, will answer true if the first parameter is greater than the second and false otherwise less/2, will answer true if the first parameter is less than the second and false otherwise Defining Natural numbers and Common Numerical Operators For this part, you will be defining Natural numbers (including zero, 'Z') using Prolog using the numbering scheme discussed in class. You should also provide the prolog code for the following predicates/functors listed below. predecessor/2, the second parameter provides the predecessor to the first successor/2, the second parameter provides the successor to the first numeral/2, the second parameter gives the numerical value for the first addition/3, the third parameter gives the numbering scheme value of adding the first and second subtraction/3, the third parameter gives the numbering scheme value of subtracting the first and second multiplication/3, the third parameter gives the numbering scheme value of multiplying the first and second factorial/2, the second parameter gives the numbering scheme value of the factorial of the first equal/2, will answer true if the first and second parameter are equal and false otherwise greater/2, will answer true if the first parameter is greater than the second and false otherwise less/2, will answer true if the first parameter is less than the second and false otherwise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
