How to write “There is at least 2 Cars are not the same Colour” in logic

186 Views Asked by At

I would like to know how to write “At least 2 Cars are not the same Colour” in logic.

I know that "at least two cars" can be defined as ∃x(C(x)∧∃y(C(x)∧y≠x)). is that right? What's next then

Also, how to write "himself/herself" in logic? For example "nobody is better than himself/herself".

Appreciate for any help.

1

There are 1 best solutions below

2
On

Suppose $C(x)$ denotes the colour $C$ of a car $x$. To translate "At least 2 cars are not the same colour" we could say "there are cars $x$ and $y$ that are not identical such that $C(x) \ne C(y)$". In formal logic notation this is:

$\exists \space x,y \space \left( (\space x \ne y) \land (\space C(x) \ne C(y)) \right)$

or, without using $\ne$, as follows:

$\exists \space x,y \space \left( \lnot (\space x = y) \land \lnot(\space C(x) = C(y)) \right)$

In fact, the qualification $x \ne y$ is redundant, since $C(x) \ne C(y) \Rightarrow x \ne y$. So we can simplify this to:

$\exists \space x,y \space \left(\lnot(C(x) = C(y)) \right)$

For the second part, if $B(x,y)$ denotes "$x$ is better than $y$" then "nobody is better than himself/herself" can be expressed as "there is no person $x$ such that $B(x,x)$". In formal logic notation this is:

$\nexists \space x \space B(x,x)$

or

$\forall \space x \space \lnot B(x,x)$