I have a question from computing mathematics which I am not really able to prove.
Given that $p \rightarrow q$ and $p$ are true, show that $q \lor r$ is true using rules of inference.
Any suggestion would be greatly appreciated.
I have a question from computing mathematics which I am not really able to prove.
Given that $p \rightarrow q$ and $p$ are true, show that $q \lor r$ is true using rules of inference.
Any suggestion would be greatly appreciated.
On
I'll answer this in an expanded way to benefit anyone reading this, seeing that the person who asked the question is no longer registered on MSE.
There are multiple ways to formally prove something, and they are what govern the principalities of logic itself. Rules of inference. In this case, the one in question is Modus Ponens or (translated) Mode of Affirmation. It is stated as follows
$${\phi \vdash (p \to q); \phi \vdash p} \over {\phi \vdash q} \tag{MP}$$
If it is proven that $p$ implies $q$, then it is proven that $p$, we can infer $q$. There is also another rule of inference which can be called into question
$${\phi \vdash p} \over {\phi \vdash p \lor q} \tag{I $\lor$}$$
It says that if $p$ is proven, then it can be inferred that $p$ or $q$ is true. Knowing this, we can construct a formal proof.
Proof of... $\phi \vdash q \lor r$:
\begin{gather}
p \to q \\
\\
p \\
\\
q \tag{By MP} \\
\\
q \lor \lambda
\end{gather}
$$\tag*{$\blacksquare$}$$
Lets break down the proof... since we're already given through the question that $p \to q$ is true, and that $p$ is also true, then these are free points. We apply the (MP) rule that we just learned, and then push for the (I$\lor$) rule that we also just happened to know to arrive at $q \lor \lambda$ with $\phi + \{\lambda\}$ being the same as $\phi$.
Hope this helped someone. :)
Use $p \rightarrow q$, with $p$, to get $q$ by modus ponens (sometimes called $\rightarrow$-elimination.)
Then, from $q$, infer $q \lor r$, by the rule of inference known as $\lor$-introduction.
So you should have four lines in your proof: the first two being premises, the third should state $q$ for the reason given above, and the fourth "therefore $q\lor r$," for the reason given above.