Rational density theorem in topology I'm working through Bert Mendelson's Introduction to Topology, and want to check my logic for exercises 8 - 10, chapter 3, section 5 (p. 87 of the Dover edition).
Exercise 8: A subset A of a topological space (X, $\mathfrak I$) is said to be dense in X if $\bar A$ = X. Prove that if for each open set O we have A $\cap$ O $\neq \emptyset$, then A is dense in X.
Answer: If A $\cap$ O$_\alpha$ $\neq \emptyset$ for all $\alpha \in$ I, then A = $\bigcup$$_{\alpha \in I}$ O$_\alpha$. If $\bigcup$$_{\alpha \in I}$ O$_\alpha$ = Int(X), then A = Int(X). If A = Int(X), then $\bar A$ = X.
Exercise 9: The "rational density theorem" for the real line states that between any two real numbers there lies a rational number. Use the rational density theorem to prove that the rational numbers are dense in the real line.
Answer: (this seems to be an application of exercise 8) Let (X, $\mathfrak I$) be a topological space corresponding to the real line. Let Q be the set of rational numbers on the real line, a subset of X. By the rational density theorem, for any a, b in X, (a, b) $\cap$ Q $\neq \emptyset$. The union of all sets (a, b) in X = Int(X). Also the union of all sets (a, b) = Q. Q = Int(X), therefore $\bar Q$ = X, and Q is dense in X.
Exercise 10: The "Archimedian principle" for the real line states that if c, d > 0 then there is a positive integer N such that Nc > d. Prove the Archimedian principle for the real line and use this principle to prove the rational density theorem for the real line.
Answer: Given that there is no upper bound in $\Bbb N$. If Nc > d for all N $\in$ $\Bbb N$, then N < $\frac dc$ for all N $\in$ $\Bbb N$, therefore $\frac dc$ would be an upper bound for $\Bbb N$, which has no upper bound.
The rational density theorem follows:
Let c $\in \Bbb R$, N $\in \Bbb N$, d $\in \Bbb Q$, c $\neq$ d.
There is an N such that Nc > d and such that (N-1)c < d. Nc $\in \Bbb R$ and (N-1)c $\in \Bbb R$, d $\in \Bbb Q$, (N-1)c < d < Nc.
Apologies for not following the forms and conventions perfectly, I'm still learning.
 A: Your answer to 8 does not make a lot of sense: what are the $O_\alpha, \alpha \in I$ that suddenly appear out of thin air? And if $A$ would intersect all of them, why would $A$ be exactly equal to their union? Why talk about $\operatorname{int}(X)=X$ at all? It's baffling.
You just have to show two implications between these statements:


*

*$\overline{A} =X$.

*For all $O \subseteq X$ non-empty (!) and open: $O \cap A \neq \emptyset$.


This is rather easy, depending on your definition of closure.
Suppose $1$ holds, and let $O$ be non-empty and open, say $x \in O$ for some $x$. Then by $1$, $x \in \overline{A}$ so (using the adherent points definition of closure) every open neighbourhood of $x$ must intersect $A$, and $O$ is such an open neighbourhood, so $O$ intersects $A$ and $2$ thus holds. OTOH, if $2$ holds and $\overline{A}\neq X$, then $O= X\setminus \overline{A}$ is open, non-empty and is disjoint from $A$. This contradicts $2$, and so $\overline{A}=X$ and $1$ holds.
One can generalise a bit and show that both facts are equivalent to a third one: suppose that $O_\alpha, \alpha \in I$ is a base for the topology, consisting of non-empty sets. Then $A$ is dense in $X$ iff $\forall \alpha \in I: O_\alpha \cap A\neq \emptyset$. Necessity is clear by 2. and if $A$intersects all basic open sets, any other non-empty open set it will also intersect as these are just unions of basic open sets, so sufficiency is likewise obvious.
We can apply the previous remark to the base of open intervals $(a,b)$ of $\Bbb R$, so if we know that between any reals $a < b$ there lies some rational $q$, then $A=\Bbb Q$ intersects all non-empty basic open sets and so is topologically dense.
Your proof of the Archimedean principle using the unboundedness of $\Bbb N$ is fine, provided you already have shown at that point in the text that the reals form an ordered field.
The proof of order-density of the rationals is missing some details: Given $a < b$ find $n \in \Bbb Z$ such that $n \le a$ and $n+1 > a$, by defining $n = \max(\Bbb Z \cap (-\infty, a])$ e.g.
and then find $N \in \Bbb N$ by the A.P. such that $N(b-a) > 1$ or $\frac{1}{N} < b-a$. Then one of the rationals $\{n + \frac{k}{N}: k =0,\ldots,N-1\}$ lies in $(a,b)$.
A: Ex. 8.  Assume x in X.
For all open U nhood x, U $\cap$ A is not empty.
Thus x in $\bar A.$
Consequently, X = $\bar A.$ 
Your proof is a disaster.
Q is a dense subset of R.
By your thinking Q would be a union of open sets.
That would make Q open which it is not.
That index I thing is symbol juggling sans sense.
