I'm trying to define a prolog predicate numeral(X,Y) which is true if X is the roman numeral for the decimal number Y.
numerals(X,Y) :- X is ('M'), Y>=1000.
numerals(X,Y) :- X is ('CM'), Y>=900.
numerals(X,Y) :- X is ('D'), Y>=500.
numerals(X,Y) :- X is ('CD'), Y>=400.
numerals(X,Y) :- X is ('C'), Y>=100.
.
.
.
.
When I run my code, I get an error:
?-numerals(M,1001).
ERROR: toplevel: Undefined procedure: numerals/2 (DWIM could not correct goal)