How to translate "The mayor has (exactly) two cats" into first-order logic?

70 Views Asked by At

This is what I have so far.

I'm not sure where 'the mayor' will fit into here.

1

There are 1 best solutions below

2
On BEST ANSWER

Answer: You should include possession of the cats, everywhere you specify what property is being counted.

\begin{equation}\exists x\exists y\big(\big(C(x)\land\color{red}{h(m,x)}\big)\land \big(C(y)\land\color{red}{h(m,y)}\big)\land x\neq y)\land\forall z(\big(C(z)\land \color{red}{h(m,z)}\big)\supset(z=x\lor z=y)\big) \end{equation}

In the above, $h(p,q)$ reads "p has q". I have used the word has instead of owns, in case the mayor is holding someone else's cats. $h(m,z)$ allows more cats to exist in the world, other than those the mayor has.

For your future reference, I have included the definitions of less than, greater than or equal to, and exactly 1 below this answer.

Less than n:

\begin{equation}\tag{2} \forall x_1\dots\forall x_{n-1}\forall x_n((x_1\neq x_2\land\dots\land x_{n-1}\neq x_n)\supset \lnot P(x_1)\lor\dots\lor\lnot P(x_{n-1})\lor\lnot P(x_n)) \end{equation}

Greater than or equal to n:

\begin{equation}\tag{3} \exists x_1\dots\exists x_{n-1}\exists x_n(x_1\neq x_2\land\dots\land x_{n-1}\neq x_n\land P(x_1)\land\dots\land P(x_{n-1})\land P(x_n)) \end{equation}

Exactly 1

\begin{equation}\tag{4} \exists x(P(x)\land\forall(P(y)\supset y=x)) \end{equation}