[Math] Proof that when $x + y$ are irrational then $x$ and $y$ are irrational

proof-verificationproof-writingself-learning

I want to prove by contrapositive that:

Proof that if $x + y$ are irrational then $x$ and $y$ are irrational. $x,y \in \mathbb{R}$

I did the following:


Negation of the statement: $x + y$ are rational then $x$ and $y$ are also rational

$\exists m,n,i,j \in \mathbb{Z} $ $gcd(m,n)=1 $ $gcd(i,j)=1 $

Then $x = m/n$ and $y = i/j$

So when, $x + y = \frac{m}{n} + \frac{i}{j} = \frac{m*j + i*n}{n*j}$

Therefore if the gcd of $gcd(m,n,i,j)=1$ then we can conclude that the number is rational.

q.e.d


Is this proof formally correct?

I appreciate your answer!

Best Answer

The negation would not be the statement that if $x+y$ are rational, then $x$ and $y$ are also rational. $A$ implies $B$ is equivalent to "not $B$" implies "not $A$": This would be: if either $x$ or $y$ is rational then $x+y$ is rational. Unfortunately this is wrong. Take $x=1$ and $y=\sqrt{2}$.

Edit: The second claim that $x+y\in \mathbb{Q}$ implies $x,y\in \mathbb{Q}$ is not true either. For $x=\sqrt{2}$ and $y=1-\sqrt{2}$ we have $x+y=1\in \mathbb{Q}$, but not $x$ and $y$ rational.