I have the following fact in my knowledge base: distance(c2, c5, 20, 1).
But when I try to query distance(c2, c5, X-0, 1), (or any other number instead of 0), this returns false. Why is that? Shouldn't X just bind to 20 since 20-0=20?
I have the following fact in my knowledge base: distance(c2, c5, 20, 1).
But when I try to query distance(c2, c5, X-0, 1), (or any other number instead of 0), this returns false. Why is that? Shouldn't X just bind to 20 since 20-0=20?
Prolog interprets that as a term with functor name
dashand arity2- evidence:Use e.g. is for arithmetic: