13.5. Comparisons

A comparison compares the values of two terms, which can be variables, atoms, or arithmetic terms. The comparison operator is the functor of a comparison structure, and the comparison's terms are the terms of this structure. For example, a valid comparison can compare 9*11 to 100:

<(9*11, 100) 

You can issue a comparison as a query to the Logikus IDE. Regardless of the program that is present in the IDE, this comparison is true—99 is less than 100. If you enter this query and press Next, the results area displays yes. If you press Next again, the results area displays no. There is only one proof of the comparison, and thus there is no other way to prove its truth.

Logikus recognizes the following operators in comparisons:

Get Building Parsers with Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.