How to express "at most 2" or "more than 1" in predicate logic?

895 Views Asked by At

There is another question about expressing "at most one", but it extremely specific and doesn't seem applicable to other cases. For example, "for all smurfs, at most 2 of them are angry." How would you express such a statement in predicate logic? And also, how would you express "There is a day where more than one smurf is happy." Would it be something like:

Given $S$ is the set of all smurfs, and $D$ is the set of all days and Happy is the following predicate, $Happy(x):$ "$x$ is happy"

$\exists d \in D, \exists s_1, s_2 \in S, s_1 \neq s_2 \land Happy(s_1) \land Happy(s_2)$

Is the reason why this works because even if more than 2 smurfs were happy, the statement would still be true since there does indeed exist two that are happy?

1

There are 1 best solutions below

3
On

expression of

"for all smurfs, at most one is angry"

Let us express its negation

" in the set of smurfs, at least two are not angry"

$$(\exists s_1,s_2\in S) \;:\; s_1\ne s_2\wedge \lnot angry(s_1)\wedge \lnot angry(s_2)$$

So, the initial proposition can be exptessed as $$(\forall s_1,s_2\in S)\;\;s_1=s_2\vee angry(s_1)\vee angry(s_2)$$