After applying Bayes' theorem, I end up with a contradiction. Why is this happening?
$P(x|y) = \frac{P(y|x)P(x)}{P(y)} \times \frac{P(x)}{P(x)} = \frac{P(x,y)P(x)}{P(x)P(y)} = \frac{P(x,y)P(x)}{P(x,y)} = P(x)$
Does this happen when I use $P(x,y) = P(x)P(y)$. Is $P(x|y) = P(x)$ ever true?
What about $P(x|y)P(y)$, is always equal to $P(x,y)$, or does that assume independence too?
In the denominator, you used $P(x) P(y) = P(x,y)$ which is only true when $x$ and $y$ are independent. Indeed, the final conclusion $p(x \mid y) =p(x)$ is another equivalent way to express independence of $x$ and $y$: in English, "knowing $y$ (conditioning on $y$) does not affect the distribution of $x$."
However, $p(x \mid y) p(y)=p(y \mid x) p(x) = p(x,y)$ is always true, even without independence.
Bayes's Theorem does not assume independence.