Talk:Prolog/Rules

"if" or "only if"
Do we mean "if" or "only if" when we describe the relationship of a predicate to its associated predicates? a :- b, c, d.

This says that a is true, if b, c and d are true. Does this mean "if (b and c and d) then a"? Would that be logically the same as "a only if (b and c and d)".
 * The first option. If (b and c and d) is true, then a is true. If (b and c and d) is not true, we don't know if a is true or not. In this case prolog will discard the rule. If it finds another rule a :- e, where e is true, a will still be true. If :- meant 'only if', and thus a would be false because (b, c, d) was untrue, the fact that a was made true by a :- e would cause a conflict (a would be both true and false). risk (talk) 12:14, 28 May 2008 (UTC)