First Order Logic XOR

3k Views Asked by At

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?

2

There are 2 best solutions below

0
On

"$\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.

0
On

If you are allowed to use biconditionals, you can do:

$$\forall x (Person(x) \rightarrow (LikesPizza(x) \leftrightarrow \neg Irrational(x)))$$