[Math] First Order Logic XOR

first-order-logic

I want to express this sentence in First Order Logic:

All people either like pizza or are irrational.

If I write:
$$\forall x \ \text{Person}(x) ⇒ \text{Likes}_{\text{Pizza}}(x) \lor \text{Irrational}(x)$$
Is the $\lor$ an exclusive or an inclusive or? How would I express inclusive or and exclusive or using this example?

Best Answer

"$\vee$" by itself is inclusive or. To express exclusive or, we need to write a more complicated expression.

Remember that "$A$ xor $B$" just means "$A$ or $B$, but not $A$ and $B$." With that in mind, "$A$ xor $B$" can be expressed as $$(A\vee B)\wedge\neg(A\wedge B).$$ Another useful way to express it is $$(\neg A\wedge B)\vee(A\wedge\neg B).$$ It's a good exercise to check that these two expressions are in fact equivalent.

Related Question