Discrete maths Prove the argument is Valid or Invalid by inference

discrete mathematicslogic

If my plumbing plans do not meet the construction code, then I cannot build my house.

If I hire a licensed contractor, then my plumbing plans will not meet the construction code.

I hire a licensed contractor.
Therefore I can build my house.

Prove by rule of inference is the argument valid or invalid :

below is my attempt

Premise 1: $\neg P \rightarrow \neg Q$
Premise 2: $R \rightarrow \neg P$
Premise 3: $R$
Conclusion: $Q$

and to further prove the validity i used this method :

Premise 4 : $P \rightarrow Q$ (Inverse of premise 1)
Premise 5 : $\neg P$ (Modus ponens of premise 2 + 3)
Premise 6 : $\ P$ (negation of premise 5)
$\ Q$ (Modus ponens of premise 4 and premise 6)

Best Answer

Welcome! it's a good attempt, you almost have it.

Consider,

Premise 1: $\neg P \rightarrow \neg Q$
Premise 2: $R \rightarrow \neg P$
Premise 3: $R$

By premise (2) and (3) + Modus Ponens we have: $ \neg P$

So,

premise 4: $ \neg P$

by premise (1) and (4) + Modus Ponens

Conclusion: $\neg Q$

What can you say, about the truth of Q, given the above argument?