I need to prove:
$X$ open $\implies A = \{x\in X; f(x)\neq g(x)\}$ is open, and $X$ closed $\implies F = \{x\in X; f(x)= g(x)\}$ is open
I've found this question that basically proves it for the open case, but there's no assumption on $X$ being open... Also, I do know the property that $f$ continuous then $f^{-1}$ takes open sets to open sets.
I need, somehow, to use the definition of continuity that says $\lim_{x\to a} f(x) = f(a)$. For an open set, I think I need to use the definition of open set that talks about open balls. Is there an elementar way to do it?