Translating sentence into symbolic logic containing 'only'

147 Views Asked by At

I am very new to formal logic and have not encountered 'only' in a statement yet. How can we translate this into formal logic:

"Only yellow bananas are in the purple basket. Domain is set of all bananas."

I need to use symbols Y and P for this translation. Thanks for any help to write this in formal logic.

1

There are 1 best solutions below

0
On BEST ANSWER

Saying that only yellow bananas are in the basket is equivalent to saying that anything that is not a yellow banana is not in the basket. Hence:

$\forall x (\neg Y(x) \to \neg P(x))$

By contraposition, this is equivalent to:

$\forall x (P(x) \to Y(x))$