I'm having a hard time to understand predicate Calculus, Statement and Prolog programming.
Let $male$ be a unary predicate symbol with the indicated meaning. Let $parent$, $son$, $sibling$, and $ancestor$ be binary predicate symbols, interpreted so that the first argument bears the indicated relation to the second (e.g., $parent(X, Y)$ expresses that $X$ is a parent of $Y$ ). Let $john$ and $Jill$ be constants representing some individuals having these names.
Problem a: Write a statement that says that John is male.
My answer:
$$male(John)$$
b. Write a statement that says that Jill is a parent of John.
My answer:
$$parent(Jill, John)$$
c. Write a statement that says that $X$ is a son of $Y$ if $Y$ is a parent of $X$ and $X$ is male.
My answer:
$$∀x∀y(parent(y,x) ∧ male(x) → son(x,y))$$
d. Write a statement that says that $X$ and $Y$ are siblings if they have a common parent.
My answer:
$$∀x∀y∃z((parent(z,x) ∧ parent(z,y) → sibling(x,y))$$
e. Write a pair of statements that dene the ancestor relation in terms of the parent relation. (requires a recursive definition)
My answer:
$$∀x∀y(parent(x,y))$$ $$∀y∀z(parent(y,z))$$
f. Write a statement that says that everyone has an ancestor.
My answer:
$$∀x∃y(ancestor(y,x))$$
g. Write a statement that says that no one can be his or her own ancestor.
My answer:
$$¬∃x(ancestor(x,x))$$
Desperately need some advice whether my answer is write or wrong.
And another questions would be: For the above interpretation, the domain could be any kind of objects, e.g., numbers.
So what is the size of the domain of the smallest possible model for the above statement?
I have no idea what does it mean by the size of domain? How could I calculate the size of domain? and what is meant by smallest possible model?
d) is not right: the $z$ should be universally quantified. So:
$$\forall x \forall y \forall z(parent(z,x) \land parent(z,y) \rightarrow sibling(x,y))$$
(p.s. I really prefer to use parentheses, rather than to rely on operator preference, so I would use:
$$\forall x \forall y \forall z(\color{red}(parent(z,x) \land parent(z,y)\color{red}) \rightarrow sibling(x,y))$$
Also, as suggested by @BrianO, this statement could equivalenty be written as:
$$\forall x \forall y (\exists z (parent(z,x) \land parent(z,y)) \rightarrow sibling(x,y))$$
This might actually be a little easier to read. In fact, I am wondering if you weren't thinking along these lines anyway, since you ended up with an existential as well. However, as an existential it should be on the inside, not the outside. If you want the quantifier on the outside, you'll have to use a universal.
For e), you need to use the ancestor predicate somewhere of course, given that you are trying to define it.
So:
$$\forall x \forall y (parent(x,y) \rightarrow ancestor(x,y))$$
$$\forall x \forall y \forall z ((parent(x,z) \land ancestor(z, y)) \rightarrow ancestor(x,y))$$
Finally, there is a model of size $3$: make Jack, Jill, and John the only objects in the domain. Make Jack the only ancestor of Jill, and Jill the only ancestor of Jack, but do not make them parents of each other.
So, what you get is:
3 objects: John, Jill, and Jack
males: John (the other two don't matter, so let's say John is only male)
parents: Jill is parent of John .. that's all
sons: John is son of Jill ... that's all
ancestor: Jill is ancestor of John, Jack is ancestor of Jill, Jill is ancestor of Jack
This clearly satisfies a) and b)
c) is satisfied too: the only male is John, and the only parent relationship is that Jill is a parent of John, so that's the only one that applies, and indeed john is a son of Jill
to satisfy d) you need to make sure that John is a sibling of himself
e) is ok: the only parent relationship is also an ancestor relationship. And since John is the only one with a parent, but is not the ancestor of anyone, the antecedent never applies, meaning that the whole statement is true.
Finally, f) and g) are true: everyone has an ancestor, but not themselves.