Let $p,q\in\mathbb N$.
Prove with induction on $q$: $\forall p\in\mathbb N\hspace{1em}\left(\frac{p}{q}\right)^{2}\neq2$.
Things I already proved and might help:
- $p^2\neq2$
- if $(\frac{p}{q})^2=2$ then $q<p<2q$
- if $(\frac{p}{q})^2=2$ then $(\frac{2q-p}{p-q})^2=2$
I tried to solve it like that:
Basis step: for $q=1 \rightarrow(\frac{p}{1})^2=p^2\neq2$ as we already proved.
Inductive Step: Here I'm stuck.
After many thoughts that's the answer I have:
basis step: for $q=1 \rightarrow (\frac{p}{1})^2=p^2 \neq 2$ as we already proved.
inductive step: assume it's true for every $q \in [n]$ and prove for $q=n+1$.
Suppose by contradiction that $(\frac{p}{q})^2=2$. from (2) we know that $p<2q$. therefore:
$ \begin{array}{c} p<2q\\ \Downarrow\\ p<2\left(n+1\right)\\ \Downarrow\\ p<2n+2\\ \Downarrow\\ p-n-1<2n+2-n-1\\ \Downarrow\\ p-n-1<n+1\\ \Downarrow\\ p-n-1\leq n\\ \Downarrow\\ p-n-1\in[n] \end{array} $
from (3) we know that $\left(\frac{2q-p}{p-q}\right)^{2}=\left(\frac{p}{q}\right)^{2}=2.$ define: $q'=p-n-1\in[n]$.
therefore:
$\left(\frac{2q-p}{p-q}\right)^{2}=\left(\frac{2\left(n+1\right)-p}{p-\left(n+1\right)}\right)^{2}=\left(\frac{2n+2-p}{p-n-1}\right)^{2}=2$.
define: $p'=2n+2-p\in\mathbb N\hspace{1em},q'=p-n-1\in[n].$ We got: $\left(\frac{p'}{q'}\right)=2.$ contradiction! to our inductive assumption that for every $q\in [n]$ there's no p that $\left(\frac{p}{q}\right)=2$.
therefore we proved that $ ∀p\in \mathbb N\hspace{1em} (\frac{p}{q})^2\neq2$ $\hspace{6em}\blacksquare$