How do you write "for every three integers $a,b,c$, exactly two of the integers $ab$, $ac$, and $bc$ cannot be odd" in predicate logic?

80 Views Asked by At

I've been thinking about it for a pretty long time but I can't really figure it out.

I'm used to writing sentences of the form "there are exactly $n$ $\alpha$" where $\alpha$ is a noun, but this sentence is different, and it confuses me a lot.
I would be tempted to write something like $\forall a,b,c((¬Oab \wedge ¬Oac)\vee(¬Oab \wedge ¬Obc)\vee(¬Oac\wedge ¬Obc)$ where $O$ means "is odd" but i know its completely wrong since it doesn't have the "at most two cannot be odd" part. I don't really know how to do it. You guys have any idea?

1

There are 1 best solutions below

0
On

I interpret "exactly two cannot be odd" as "it cannot be the case that exactly two are odd". In that case, we can just start with "exactly two are odd" and negate that.

We can write "exactly two are odd" as the $\lor$ of three cases, depending on which of the two products are odd. For example, $O(ab) \land O(ac) \land \neg O(bc)$ would be one of the cases.