# Rule of inference and truth table issue

Let

P – Light is on

Q – The switch is down

R – The door is open

If the switch is down then the light is on.
If the switch is not down then the door is open.
If the door is open then the light is on.


Therefore the light is on;

Prove or disprove the argument using, i. Rule of inference ii. Truth table

\ Rule of inference

A. Q⇒P
B. ~Q⇒R
C. R⇒P

D. ~Q⇒P [By {B} and {C}]
E. P [By {A} and {D}]


Which is different from the answer I get from the rule of inference. Can anyone tell me where did I go wrong? Thanks!!

• Sorry about the truth table image. I can't upload images till I reach 5 rep points. :( May 29, 2015 at 3:37

No, your table is correct.   You may be interpreting the result wrong.   You wish to have $P$ true whenever the statements $Q\to P, \neg Q\to R,$ and $R\to P$ are all true at the same time.   That happens on the last three rows, and $P$ is true for each one. $$Q\to P, \neg Q\to R, R\to P \;\vdash\; P$$

PS: Your application of rules of inference is okay too.   You used hyperthetical syllogism and disjunctive elimination.

• Thanks for the reply. Do you mean that the whole "P" row doesn't need to be identical to the row we get after Q→P (and) ¬Q→R (and) R→P ?? Because in the truth table there is a 0 in the 5th line where it is 1 in the "P" row :( May 29, 2015 at 4:35
• @Blogger That's it. The last column does not have to be exactly the same as $P$, you only need $1$ in the first column whenever there is a $1$ in the last column. You only wish to prove a claim about the state of $P$ whenever the three premises all hold; you don't care at all what its state is otherwise. May 29, 2015 at 4:43

Your truth table supports the result of the proof: indeed, in all rows where all the premises are true, the conclusion is also true.

Perhaps you're mixing the situation up with one where you try to prove that $P$ is a tautology?

• So the answer is "P is the correct conclution" right? :) Even in the truth table, if I get the product of 1 and 4 other than getting the product of 1, 2 and 3; Result is the same as the "P" colomn. So can we conclude that "P" is a valid conclusion from the premises given? May 29, 2015 at 4:30
• @Blogger The last column does not have to be exactly the same as $P$, you only need $1$ in the first column whenever there is a $1$ in the last column. You are only proving a claim about the state of $P$ whenever the three premises all hold; you don't care at all what its state is otherwise. May 29, 2015 at 4:40
• So it is like; IF " Q→P (and) ¬Q→R (and) R→P = 1" THEN "P = 1"? May 29, 2015 at 4:43
• @Blogger It's exactly like that. May 29, 2015 at 4:46
• Hey thanks alot @GrahamKemp Now I get it. I thought both the rows should be always identical. Thanks again you saved my day! :D May 29, 2015 at 4:48