I wanted to make comparisons of two predicates, example: A=s(s(s(0))) and B=s(s(s(s(s(0))) where the correct condition is A <= B, I don't know How do I have to do this, but I do have a clear mind that it is a unify but I don't know how to represent it in codes.
my codes:
comparar_dimensiones(A,E):-
A=X,
E=Y,
X=Y.
I know this is wrong.
In Prolog, the predicates
(=)/2
and(\=)/2
represent respectively the unification and the negation of it.The standard defines an order between terms, which you can check using the following built-in predicates:
Where in your case, you could compare the two terms like
A @=< B
.