0

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?

Curulian
  • 337
  • 1
  • 6
  • 2
    Your translation of the sentence is correct. As for the "at most 2 are angry", here's a hint: for any 3 you pick, they will not all be angry. – Snaw Feb 02 '22 at 17:12
  • @Snaw so could is write (given angry(x): x is angry), $\neg (angry(s_1) \land angry(s_2) \land angry(s_3)) \equiv \neg angry(s_1) \lor \neg angry(s_2) \lor \neg angry(s_3)$ ? – Curulian Feb 02 '22 at 17:21
  • That would be part of it, yes. You'd need to write a full sentence, similarly to the one you wrote above – Snaw Feb 02 '22 at 17:31
  • @Snaw so would: $\exists s_1, s_2, s_3 \in S, s_1 \neq s_2 \neq s_3 \land \neg angry(s_1) \lor \neg angry(s_2) \lor \neg angry(s_3)$ be correct in full for the statement "for all smurfs, at most 2 of them are angry"? or would there need to be a for all because the statement has a for all? – Curulian Feb 02 '22 at 18:38
  • 1
    You should translate the sentence you wrote in your last comment back into English to see if it says what you want it to say. Currently it says: there exist 3 different people such that at least one of them is not angry. This is not what you wanted to write. – Snaw Feb 02 '22 at 19:47
  • @Snaw Ok, so then could I write "for all p in S, there exists p1, p2 in S such that if angry(p) then p is either p1 or p2"? Formally: $\forall p \in S, \exists p_1, p_2 \in S, angry(p) \Rightarrow p = p_1 \lor p = p_2$. In terms of what I had before, other than changing ∃s1,s2,s3∈S to $\forall$s1,s2,s3∈S, i have no clue how to make it work... – Curulian Feb 02 '22 at 20:51
  • 1
    That last expression you wrote is going to be satisfied by any set of people, because for every $p\in S$ you can pick $p_1=p_2=p$ and then the result is going to be true regardless of how many angry people there are. You want something simpler: you want to say that for every 3 (different) people, at least one of them is not angry. So you'd start with $\forall p_1,p_2,p_3$, and the remainder is as you have written it in one of the comments above, but you need to condition it on it being $3$ different people or else it won't work. – Snaw Feb 03 '22 at 00:08
  • 1
    So you can write this as $$\forall p_1.\forall p_2.(p_1\ne p_2\Rightarrow (\forall p_3.(p_3\ne p_2 \land p_3 \ne p_1 \Rightarrow (\lnot angry(p_1) \lor \lnot angry(p_2) \lor \lnot angry(p_3)))))$$ and you can write this in a shoter way like this: $$\forall p_1,p_2,p_3.(p_1=p_2\lor p_1=p_3\lor p_2=p_3\lor \lnot angry(p_1) \lor \lnot angry(p_2) \lor \lnot angry(p_3)$$ – Snaw Feb 03 '22 at 00:13
  • @Snaw Ahhh, I see now! That makes a lot more sense, thank you so much! – Curulian Feb 03 '22 at 06:00

1 Answers1

0

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)$$

  • I believe this is essentially quantification over sets which requires second order logic and cannot be done in predicate logic. – Snaw Feb 02 '22 at 17:31
  • @Snaw Please have a look at what i just edited. – hamam_Abdallah Feb 02 '22 at 20:03
  • I'm not sure I understand the negation. If at least two are not angry, could you not have the case where only one is angry (since at least two would not be angry), but that also means the originally statement is true (at most one would be angry). How can that be the negation if there is a case where the negation is the same as the original statement? – Curulian Feb 02 '22 at 21:16