For example if there are facts of who likes which color and everyone likes green, but not everyone likes pink: likes(X, green) is true for all X, can Prolog somehow give a result that likes(X, green) is true for all X-es?
Lets say that there's also information about the gender of people within the rules in the form female(deby). male(robert). If according to the data set all females but not all males like pink, can Prolog return something like this: likes(X, pink) :-female(X)
Edit: When I say "I want to ask" in the last paragraph, I mean my query to Prolog should have this meaning.
To be clear I don't want to specify what Prolog should check. In English I don't want to ask, whether everyone likes green, but I want to ask: Can you make new rules based on the facts available?
facts:
male(albert).
male(brett).
female(chloe).
female(deby).
likes(albert, green).
likes(brett, green).
likes(chloe, green).
likes(deby, green).
likes(albert, pink).
likes(chloe, pink).
likes(deby, pink).
likes(X, green)is true for all X-es?, but then you later say, I don't want to ask, whether everyone likes green, which seems to contradict the first question. The answer to the question, Can you make new rules based on the facts available? is "yes" if you make those rules yourself. That's what Prolog is about. But are you looking for some kind of automatic rule generation? If that were the case, then you'd need meta-rules to describe what a valid rule looks like. - lurkerassert/1, etc, to manage dynamic rules. - lurkerlikes(X, green), which only asks if anybody likes green I need, a different query which asks if everyone likes green. Is that possible? - user3546630