Question: I am trying to write comparison operations for peano's number in prolog language then find GCD and LCM peano's number Important Remark:
I am trying to write comparison operations " for peano's number " in prolog language then find GCD and LCM peano's number "
Important Remark: Work directly on the peanos numbers. Dont convert them into
usual integers.
comparison operations
- greater , greater than
- less , less than
- equal and not equal
Examples:
?- equal(s(0), s(p(s(0)))).
yes.
I don't know how I run it this code {comparison operations , GCD and LCM }?
The code probably won't be longer than a few lines of code. I've been trying to achieve this for days now and it's starting to make me mad.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
