Homework 5 (this is easier than extending homework 4, but both are small)

This homework is on basics of Prolog.

Problem 1. (First order logic)

Let's say we have the following predicates:

Using only these predicates, translate each of the English statements below into first-order logic. Do not use any function symbols, constrant symbols, or arithmetic symbols. You may use the equality predicate if necessary.

Problem 2. Unification

For each of the following pairs, state whether or not the atomic formulas unify. In each case, state what the most general unifier is, or show that unification is impossible. In this problem, U, V, X, Y, Z are variables, and a, b, c, d are constant symbols.

Problem 3. (Freelance)

You need to learn how to use Prolog to give simple facts and pose simple queries. Make a file with a set of facts about mothers, fathers, parents, siblings, etc. E.g.,

father(John, Fred)

sibling(Mary,John)

mother(Mary,Jennifer)

and a set of rules relating family members. This should be something like

'Sibling of my sibling is my sibling'

'Father is a parent'

'Mother is a parent'

'My sibling and I have the same parents'

Translate these rules in Prolog and add them to your file. Load the file into Prolog session and ask it simple queries, like

'Who is Mary's mother?' - mother(Mary, X)

'Who is Mary's sibling?'

'Who is John's wife?'

etc.