[Math] Prove that the set of irrational number is neither closed or open subset on Set of real number

general-topologyproof-verification

Please check my proof

note:A is set of irrational number

Suppose $x\in A$,It must exist inteval that contain $y\in R$ to make it is open set

But A does not contain all $y$ that y is rational number.

therefore it is not open set

Supposed A is closed,the complement that is rational number must be open.

If it rational number is open for inteval in $R$ the inteval in rational number set must contain
any number y from real number set ,but irrational number does not exist in the set of rational number therefore it is not open an A is not closed

therefore the set of irrational number is not open or closed

Best Answer

Definition. Let $A\subset \Bbb R$. We say that $A$ is not open if there exists $x\in A$ such that for every open interval $I$ that contains $x$, we have $I\not\subset A$.

Let $\Bbb Q^c$ denotes the set of irrational numbers. Choose $p\in\Bbb Q^c$. Then any open interval $I$ that contains $p$, we have $I\not\subset \Bbb Q^c$ (this is because there are infinitely many rational numbers in $I$). Thus, $\Bbb Q^c$ is not open. In the same manner, the set $\Bbb Q$, which is the set of rationals, is not open, which means that the complement of $\Bbb Q^c$ is not open. This proves that $\Bbb Q^c$ is not closed.