I am currently taking a course in "Introduction to Mathematical Logic" and I have been trying to do this proof, but everything I did just lead me to nowhere... Could anyone give me a general idea of how to start these kinds of proofs in the right way? And is there a specific mindset I need to have when approaching these kinds of problems?
$ \vdash((p\lor(p\rightarrow q))\rightarrow((p\rightarrow r)\land(q\rightarrow r)))\rightarrow((p\lor q)\rightarrow r) $
Natural deduction is just formally writing out how we reason in a normal proof. First, let me write out how I would reason about the proof in words.
This proof is then formalised using the natural deduction rules. If you read the following proof line by line and compared it with the informal word-y proof above, you will see parallels in the line-of-thinking.
$\quad$ 2. p ∨ q $\quad$ Assumption
$\quad$ $\quad$ 3. p $\quad$ Assumption
$\quad$ $\quad$ $\quad$ 4. p ∨ (p → q) $\quad$ ∨ Intro (3)
$\quad$ $\quad$ $\quad$ 5. (p → r) ∧ (q → r) $\quad$ → Elim (1, 4)
$\quad$ $\quad$ $\quad$ 6. p → r $\quad$ ∧ Elim (5)
$\quad$ $\quad$ $\quad$ 7. r $\quad$ → Elim (3, 6)
$\quad$ $\quad$ 8. q $\quad$ Assumption
$\quad$ $\quad$ $\quad$ 9. p $\quad$ Assumption
$\quad$ $\quad$ $\quad$ $\quad$ 10. p → q $\quad$ → Intro (8, 9)
$\quad$ $\quad$ $\quad$ $\quad$ 11. q $\quad$ → Elim (9, 10)
$\quad$ $\quad$ $\quad$ 12. p → q $\quad$ → Intro (9, 10, 11)
$\quad$ $\quad$ $\quad$ 13. p ∨ (p → q) $\quad$ ∨ Intro (12)
$\quad$ $\quad$ $\quad$ 14. (p → r) ∧ (q → r) $\quad$ → Elim (1, 13)
$\quad$ $\quad$ $\quad$ 15. q → r $\quad$ ∧ Elim (14)
$\quad$ $\quad$ $\quad$ 16. r $\quad$ → Elim (8, 15)
$\quad$ $\quad$ 17. r $\quad$ ∨ Elim (2, 3–7, 8–16)
$\quad$ 18. (p ∨ q) → r $\quad$ → Intro (2–17)
It is worth noting that some people suggest using a bottom-up approach when writing out these natural deduction proofs, because you can always see what you should be aiming for. For example, if you're trying to prove A → B, then you know that your very last step must be an → Intro.