[Math] Proof by contrapositive: Prove for all $x,y\in\mathbb{R},$ if $x$ is rational and $y$ is irrational then $x+y$ is irrational.

discrete mathematicsproof-explanationproof-writingsolution-verification

I read some answers on here, but I wanted some input on what happens if I try a proof and get a weird outcome.

I tried proving this by taking the contrapositive which is: if x+y is rational then $x$ is irrational or $y$ is rational

Let $x+y=\frac{P}{Q}$ for some integers $P,Q$
$$x = \frac{P}{Q} – y$$
$$x = \frac{Py-PQ}{Q}$$
(this shows that $x$ is actually rational – which contradicts my contrapositive statement?)

What does it mean when I find a contradiction when trying to prove the contrapositive statement? How should I proceed from here? Any tips would be appreciated $-$ I'm pretty new to proofs.

Best Answer

You are trying to proof by contrapositive that for all $x,y\in\mathbb{R},$ if $x$ is rational and $y$ is irrational then $x+y$ is irrational.

The contrapositive of this statement is

For all $x, y \in \mathbb{R},$ if $x+y$ is rational, then $x$ irrational or $y$ is rational.

Using logic notation, let $P,Q,R$ be statements, note that

$$P \to (Q \vee R) \iff (P \wedge \neg Q) \to R.$$

Hence to prove this statement, you can suppose $P$ and $\neg Q$, and derive $R.$ And you can do it using the proof by contradiction, you assume that $P$ and $\neg Q$ are true and $R$ is false and then derive a contradiction. This proves that $(P \wedge \neg Q) \to R$ is true, which is equal to the contrapositive we were ask to prove. Then we are done.

Proof: Let $x, y \in \mathbb{R},$ such that $x+y$ and $x$ are rational. Suppose that $y$ is irrational. Let’s derive a contradiction. Since $x+y$ and $x$ are rational, then there are integers $a,b,c,d$ with $b \neq 0 \neq d$ such that $x+y=\frac{a}{b}$ and $x=\frac{c}{d}.$ Substituting $x$ in $x + y,$ we get $$\frac{c}{d}+y=\frac{a}{b}.$$ Simplifying this expression, we get that $y=\frac{ad-bc}{bd},$ where $ad-bc$ and $bd$ are integers, with $bd \neq 0.$ Therefore $y$ is rational, which is a contradiction. Hence we prove that, if $x+y$ is rational, then $x$ irrational or $y$ is rational. By contrapositive, we conclude that if $x$ is rational and $y$ is irrational then $x+y$ is irrational. $\square$