Where's the problem with a false "proof": $\;1^0 = 1^2 \overset{?}\implies 0 = 2$

What's wrong with this:

$$\large 1^0=1^2$$

Since bases are same, therefore

$$\large 0=2$$

My thinking:

Since the function $\,f(x)=1^x\,$ is not one to one, therefore whenever $\,f(x)=f(y),\,$ $x\,$ need not be equal to $\,y$.

Question:

Is my reasoning sound?


Yes. That's fine reasoning.

Indeed $f(x) = 1^x = 1 \;\forall x \in \mathbb R$.

Certainly, as you note, $f$ fails to be injective, so it is NOT the case that $\forall x, y \in \mathbb R, \; f(x) = f(y) \implies x = y$.


I like to think of these things in terms of divide-by-zero errors. In that sense, if you take the $\log$ of both sides you get $0\log 1=2\log 1$, and the argument that the bases are the same implying equality is essentially cancelling out the $\log 1$ from each side. This would be valid for $\log b$ for any $b\neq 1$, but $\log 1=0$.


Your reasoning is fine. Your reasoning also explains why $\log_b$ is not defined for $b=1$.