Okay guys, I've reached the next chapter of my book (I'm teaching myself prop logic), and there is a question which asks you to put a real life scenario sequence into prop logic form. I think I know the answer, but there are no answers to confirm my understanding.
So, this is the question:
P represents the proposition 'the toaster is switched on'
Q represents the proposition 'the toaster is plugged in to the mains'
R represents the proposition 'the toast (or bread for the picky ones of you!) is cooking'
In propositional logic, write this event:
'If the toaster is plugged in, when it is switched on, the toast is cooking'
I think it would be R ⇒ (P ∧ Q)
...but as I say, there are no answers in the book to check. So could someone tell me whether it is right or wrong and explain why it is right or wrong?
Keep in mind A implies B means the same thing as "B is true, or A is false" (or both). The only time A does not imply B is when A is true but B is false.
P Q R P^Q P->R (P^Q)->R Q->(P->R)
F F F F T T T
F F T F T T T
F T F F T T T
F T T F T T T
T F F F F T T
T F T F T T T
T T F T F F F
T T T T T T T
Yep, looks like they're logically equivalent! Both the statement you just made and the one Plato provided are only false when 1) the plug is in, and 2) the switch is on, but 3) the toast is not cooking.
Of course, this isn't really a complete statement from a common-sense point of view. It allows toast to be cooking at any time, even when the toaster is off and/or unplugged. We might want to specify that the toast is cooking if and only if the two other conditions are met. This would be true only when R = (P ^ Q).
And if we don't always keep bread in the toaster, I'd switch the direction of the if rather than make it bidirectional.
As has been said, Q ⇒ (P ⇒ R) is equivalent to Q ∧ P ⇒ R. Both statements, when they are given, allow deducing R. If we use Q ⇒ (P ⇒ R) to deduce R, we have to prove the assumptions Q and P separately; if we use Q ∧ P ⇒ R, then we have to prove just one assumption Q ∧ P.