In predicate calculus
green(fonzie) green(puff) green(martian) dragon(godzilla) dragon(puff)
The corresponding translation in Prolog will be :
fly(X) :- green(X), dragon(X).
body antecedents that must be true.
A Logical Deduction is called a Query
Find a fact to match the goal : Binding
Some Prolog Facts :
Find a fact to match the goal : Binding
So in the previous example, for instance, puff
was found to be a valid answer. If more than one possible
answers existed to the problem, then the first goal
variable is unbound (i.e. its value discarded) and the
next matching value bound to it.
Fundamental processes in the understanding of how Prolog
works.