Proving $n^2=n$, $n$ is even and $n$ is greater than $0$ is false

You did (implicitly) make use of the assumption that $n > 0$. Since $n >0$, your $k$ cannot be $0$. Thus it is okay to divide by $k$, which you did in your proof when you moved from $4k^2=2k$ down to $2k=1$.

Good for you for thinking about this!


We have $n^2=n$ implies $n^2-n=0$, i.e., $$n(n-1)=0.$$ Thus either $n=0$ or $n=1$, but, by hypothesis, both these options are impossible. (They are the only possible solutions by inspection and the fundamental theorem of algebra; moreover, by the quadratic formula,

$$\begin{align} n&=\frac{-(-1)\pm\sqrt{(-1)^2-4(1)(0)}}{2(1)}\\ &=\frac{1\pm 1}{2}\\ &=0\text{ or }1.) \end{align}$$


The flaw lies in the implication

$$(2k)^2=2k\implies 2k=1.$$

This claim is indeed false when $k=0$.

$$0=0\not\Longrightarrow 0=1.$$