I have been reading baby Rudin and I am currently in the topology chapter. I came across the proof that a metric space is open iff its complement is closed and I liked his slick and direct style but I also wanted to prove it on my own. So this is my attempt
The definitions that I use here are:
$p$ is a limit point of a subset $E$ of a metric space iff every open neighborhood of $p$ contains a point in $E$ which is not equal to $p$
$E$ is closed iff it contains all its limit points.
A point $p$ is an interior point of $E$ if there exists an open neighborhood $N(p)$ of $p$ such that $N(p)$ is contained within $E$
$E$ is open iff all its points are interior points.
Proof: Suppose $E$ open and $E^c$ not closed. Then there is a limit point $x$ of $E^c$ which is not in $E^c$. Then $x \in E$. But $E$ is open so there is some open neighborhood of $x$ which is contained within $E$ and hence has no element in $E^c$. But this is impossible since $x$ is a limit point of $E^c$.
On the converse, suppose $E^c$ closed and $E$ not open. Then there is a point $p$ in $E$ which is not an interior point of $E$. Then every open neighborhood of $p$ contains a point in $E^c$. Then $p$ is clearly a limit point of $E^c$. But $E^c$ is closed so $p \in E^c$ which is impossible.
I'm making this post also for other people who are studying real analysis and to see different possibilities for the solutions as well as getting some feedback on my proof writing. Any comment is appreciated.