# Prove that for all x,y in RR, if x is rational and y is irrational, then x+y is irrational?

## I know I need to use contradiction to prove this, but I'm not sure how to go about it. I know that for either to be rational, then $\exists a , b \in \mathbb{Z}$ such that $x = \frac{a}{b}$ (for example) and $\gcd \left(a , b\right) = 1$. How can I go about proving this?

Feb 17, 2017

Hint: Consider $\left(x + y\right) - x$

#### Explanation:

As is very often the case, we do not need to write this as a proof by contradiction. We can prove the contrapositive directly.

We can prove directly:

$x$ is rational $\Rightarrow$ ($x + y$ is rational $\Rightarrow$ $y$ is rational)

(using $a , b \in \mathbb{Q} \Rightarrow a - b \in \mathbb{Q}$ -- that is, $\mathbb{Q}$ is closed under subtraction)

Therefore (by contraposition of the imbedded conditional)

$x$ is rational $\Rightarrow$ ($y$ is not rational $\Rightarrow$ $x + y$ is not rational)

This is logically equivalent to

($x$ is rational $\text{&}$ $y$ is not rational) $\Rightarrow$ $x + y$ is not rational)

Suppose $p$ and $\neg q$ and $r$ .

Prove a contradiction and conclude that if $p$ and $\neg q$, then $\neg r$.

By contrapositive

Suppose $p$ and $\neg r$. Prove that $q$.

Conclude that If $p$ and $\neg q$, then $r$.

The two methods are very closely related and I don't know of anyone who accepts one and not the other. (Although many/most/all intuitionists refuse to accept either contradiction or contrapositive.)

Proof by contrapositive

Suppose that $x$ is rational and $x + y$ is rational.

Then the difference $\left(x + y\right) - x = y$ is rational.

Hence is we know that $y$ is irrational, then $x + y$ must have been irrational. (Otherwise, $y$ would have been rational after all.)

Feb 17, 2017

Proof by contradiction follows:

We have:

$x , y \in \mathbb{R} \text{ st } x \in \mathbb{Q}$ (the set of rational numbers), and
 " "y in {RR"\"QQ}  (the set of irrational numbers).

Let us assume that $x + y \in \mathbb{Q}$, ie $x + y$ is rational, then:

$\exists m , n , p , q \in \mathbb{Z}$ st $x = \frac{m}{n}$ (since $x$ is rational), and $x + y = \frac{p}{q}$ (since the sum is rational).

Therefore, we can write;

$x + y = \frac{p}{q}$
$\therefore \frac{m}{n} + y = \frac{p}{q}$
$\therefore y = \frac{p}{q} - \frac{m}{n}$
$\therefore y = \frac{n p - m q}{n q}$

And so $y$ can be written as a fraction $\implies y$ is rational

But we initially asserted that $y$ was irrational and hence we have a contradiction, and so the sum $x + y$ cannot be rational and hence it must be irrational, QED.