Q1) These three options are represented in Prolog by three clauses (rules or facts) of the predicate fun. Prolog will start from the first clause of fun and try that. If that does not succeed, it will try the next clause. It only fail when it runs out of rules or facts to try. Given is an example of the first rule.
fun(x) :- /* an item is fun if */
red(X), /* the item is red */
car(X). /* and it is a car */
Here are other additional fun facts. VW_Beatle is a red car , Ford Escort is a blue car. Harley_Davidson is a blue bike. Yamaha is a red bike.
Construct the rest of the necessary clauses and commands to see if: - i) Harley_Davidson is fun and ii) Identify items which are fun.
Describe how Prolog executes command (query) and goal matching process.