# The barbers paradox first order logic formalization

I tried to look on the site and while I found some similar questions, I did not find the first order logic formalization of the following sentence (the basic barber's paradox), so I wanted to ask if I got the right first order logic formalization of it, and I am sure others will benefit from this thread as well.

Sentence: there exists a barber who shaves all the people that don't shave themselves.

My attempt: this complicated sentence can be made simpler by inferring that "for all of those who does not shave themselves, are shaved by the barber"

And now it seems to be easier to substitute with variables so:

$$\exists x(\lnot S(x,x) \rightarrow S(b,x))$$

where $$S(x,x)$$ is shaving(verb), $$x$$ are the persons (who don't shave themselves), and $$b$$ is a shortcut for barber, so if a person does not shave himself, it can be inferred that he is shaved by the barber.

There are two issues about your formula:
First, you use an existential quantifier for the people where there should be a univeral one, since the statement is "all people". What your formula expresses is "There is an $$x$$ such that if $$x$$ does't shave themself, the barber does." Instead, what you want to say is that "For all $$x$$ it holds that if $$x$$ doesn't shave themself, the barber does." In general, an existentially quantified implicational formula is often a sign that something is wrong.
Second, instead of using a constant name $$b$$ for the barber, it would be better to directly translate the "There is" as an existential quantifier, and you could also specify that this someone is a barber.

Whith this, the sentence becomes

There is a thing $$y$$ which is a barber and such that for all people $$x$$ who don't shave themselves, $$y$$ shaves $$x$$.

which translates as

$$\exists y (B(y) \land \forall x (\neg S(x,x) \to S(y,x)))$$

• thank you for your answer @lemontree. before marking this answer, i am just wondering about the difference between both answers, could you please the difference between using the verb B(y) in comparison to saying exists b like in the other answer? thank you very much for your explaining Commented May 3, 2019 at 6:10
• $b$ is just a (more or less arbitrary) name for an object that the formula says nothing about other than that this object shaves everyone who doesn't shave themselves. But we additionally want to express that this object is a barber, which we do by $B(b)$. Commented May 3, 2019 at 10:28
• The other queston is whether to use a constant name $b$ (without a quantifier) or a vaiable with an existential introduction ($\exists y$/$\exists b$; the name of the variable does not matter in this case.) It is better to use $\exists$, because the English sentence says "There is a barber", while using a constant name $b$ just talks about "the barber", which excludes the possibility that there might be more than one such barber. Commented May 3, 2019 at 10:29

You're not being asked to do any inference; just to express something.

there exists a barber who shaves all the people that don't shave themselves

translates directly as

$$\exists b\, \forall x\,\big(\neg S(x,x) \rightarrow S(b,x)\big)\,.$$

(There exists a barber such that everyone who doesn't shave themself is shaved by the barber.)

Your version says that there exists a person who, if they don't shave themself, is shaved by the barber. That's not equivalent. For example, it's true in any world where at least one person does shave themself: just let $$x$$ be that person, so $$\neg S(x,x)$$ is false, so $$\neg S(x,x)\rightarrow\text{anything}$$ is true.

• thank you so much for your explanation! Commented May 3, 2019 at 6:09