[Math] First Order Logic: sentence into symbols

first-order-logiclogicpredicate-logicproof-verificationpropositional-calculus

Are these translations correct?

Translate the following sentences into wfs.

  • a) Nobody loves a loser.

Let $H(x,y):= x$ loves $y$.

Then $\lnot(\exists x\exists p (H(x,p)))$

  • b) Nobody in the statistics class is smarter than everyone in the logic
    class.

(which is the same (I think) as 'All in the logic class are smarter than all in the statistic class.')

Let H(x,y):=x is smarter than y, p(x)=x is in the logic class and q(x)=x is in the statistic class.

Then $\forall x\forall y[(q(y)\land p(x))\to H(x,y)]$

  • c)Anyone who knows Julia loves her.

(This is the same as 'If x knows Julia, then x loves Julia.')

Let $p(x)=x $ knows Julia, H(x,J)=x loves Julia.

Then $\forall x(p(x)\to H(x,J))$

  • d) There is no set belonging to precisely those sets that do not belong
    to themselves.

Let $H(x,y)=$The set x belongs to the set y.

Then $\forall\forall[\lnot H(x,y)\land \lnot H(y,y)]$

  • e) There is no barber who shaves precisely those men who do not
    shave themselves.

Let H(x,y)=x shaves y.

Then $\forall x\forall y[\lnot H(x,y)\land \lnot H(y,y)]$

Best Answer

a) You need a predicate for "loser".

b) Your two statements are not the same. What the original question says is that the smartest kid is in the logic class. Hint: Another equivalent would be: "For every kid from the statistics class, there is someone in the logic class who is smarter than that kid."

edit: as pointed out in the comments, my statement is actually not equivalent, as there could be students in both classes who are equally smart (or as Fabio pointed out even just one student in both classes). Another approach would just be to translate the given sentence 1:1. Again, similar to e) "nobody" (="There is nobody...") should tell you to use $\neg \exists$.

c) correct, although you could drop the $J$ and make $H$ unary, as $J$ is the second argument of $H$ in any case here.

edit: As Bram28 said, you can keep $H$ unary and even make $p$ binary. I think both should have the same number of arguments, but that's up to debate. Also I always use descriptive predicate names, which could resolve this, too. Either $knowsJulia(x)$ or $knows(x, J)$. That's how I learned it, I don't know exactly how common this is in literature.

d) As you probably recognized, this is the same as e) but I find e) better to explain.

e) Your formula says: "Everyone does not shave anyone, including himself" or in other words "No one shaves anyone". The key words "There is" should tell you to use $\exists$ somehow. Or specifically for this case, "There is no..." should tell you to use $\neg \exists$. Then think about how to model "the barber who shaves precisely those men who do not shave themselves". Hint: For each man either the barber shaves that man and the man does not shave himself OR the barber does not shave the man but the man shaves himself. Or even shorter: Every man shaves himself if and only if the barber does not shave that man.

Related Question