Making first order logic statements

422 Views Asked by At

I'm working on an assignment that deals with predicate calculus, and I'm trying to put sentences into first order logic statements. I've got the hang of most of them, but I'm not quite sure how to do a couple of them:

  • Every X except Y likes Z, $$\forall m: \neg Y(m) \rightarrow \mathit{likes}(X(m), Z)$$
  • X likes all Y who are not Z, $$\mathit{likes}(X, Y(\neg Z))$$
1

There are 1 best solutions below

2
On BEST ANSWER

In the first sentence $Y$ and $Z$ must be understood as referring to specific individuals, while $X$ is a dummy name that does not refer to any specific individual. In more technical terms, $Y$ and $Z$ are constants, and $X$ is a variable. If $\mbox{Likes}(x,y)$ is a two-place predicate meaning ‘$x$ likes $y$’, then you want

$$\forall X\Big(X\ne Y\to\mbox{Likes}(X,Z)\Big)\;.\tag{1}$$

Read fairly literally, that’s for all X, if X is not Y, then X likes Z, which is pretty clearly equivalent to the desired statement.

There is another possible interpretation of the original sentence. it certainly says that everyone who is not $Y$ likes $Z$. In everyday usage everyone except A does X generally also implies that $X$ does not do $X$, though it doesn’t explicitly say so. If you want to include that implication, then add $$\neg\mbox{Likes}(Y,Z)\land$$ at the front of $(1)$.

In the second sentence $X$ is a constant: it apparently refers to a particular individual, as does $Z$; this time it’s $Y$ that’s the variable ranging over all possible people. This statement doesn’t say anything one way or the other about whether $X$ likes $Z$, so we have

$$\forall Y\Big(Y\ne Z\to\mbox{Likes}(X,Y)\Big)\;:$$

for every Y, if Y is not Z, then X likes Y.