Created
December 22, 2018 05:42
-
-
Save DonaldKellett/71e574370abeb9f5dac89a894240516a to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 3 - Exercise 3.4 - X > Y?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% greater_than/2 - Given 2 natural numbers X, Y (as defined by Peano's axioms), is X > Y. | |
% Basis: The successor of any natural number must be greater than 0 | |
greater_than(succ(_), 0). | |
% Inductive step: if X > Y, then succ(X) > succ(Y) | |
greater_than(succ(X), succ(Y)) :- greater_than(X, Y). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment