[Math] How to prove $P\to (Q\to R)$ is equivalent to $(P\wedge Q) \to R$

discrete mathematicspropositional-calculus

I'm a freshman CS student at my university and I'm struggling with understanding my professor through his thick accent.

I've asked him to explain the proof for this multiple times and still have trouble comprehending what he's trying to tell me.

The question is:

Prove that: $P\to (Q\to R)$ is equivalent to $(P\wedge Q) \to R$

He wants us to prove it using math and goes on to tell me that $P \to(Q\to R)=\neg P \lor (\neg Q \lor R)$

From that point on, I was completely lost and unable to follow along.

Best Answer

Your professor is using a standard fact in logic that $P\to Q$ is equivalent to $\lnot P \vee Q$ (or $\lnot P + Q$ or $P'+Q$ or whatever notation you are using). Applying this to your question, you get that

$$\begin{align} P\to(Q\to R) &= \lnot P \vee (Q\to R) \\ &= \lnot P \vee (\lnot Q \vee R) \\ &= (\lnot P \vee \lnot Q) \vee R \\ &= \lnot (P \wedge Q) \vee R \\ &= (P \wedge Q) \to R \end{align}$$

Related Question