Is the Archimedean principle necessary to prove the density of $\mathbb Q$ in $\mathbb R$? I've noticed that most proofs of the density of $\mathbb Q$ in $\mathbb R$ use the Archimedean principle. For example see @Arturo Magidin's checked answer here. Density of irrationals
I'm puzzled by the fact that in the hyperreals, the standard rationals must be dense in the standard reals; yet the hyperreals are not Archimedean. This would seem to imply that the Archimedean principle is not a necessary assumption.
I can see that in the hyperreals, if $\epsilon$ is infinitesimal then there is no standard rational between $\epsilon$ and $2 \epsilon$; so that the standard rationals are not dense in the hyperreals.
But now I'm confused. Wouldn't the hyper-rationals be dense in the hyperreals? And wouldn't it still be a theorem that the standard rationals are dense in the standard reals?
Clearly the answer must be in some subtlety involving standard/nonstandard reals and the transfer principle. Can anyone shed any light? Is the Archimedean principle necessary to prove that the rationals are dense in the reals? Why aren't the hyperreals a counterexample? 
 A: I am not completely sure about the question, but I think this may be the answer.
When we construct the reals directly from the rationals, for example using Dedekind cuts or Cauchy sequences, we can directly prove the rationals are dense in the reals using the construction.  Thus we can prove that the reals have the Archimedean property, we don't just assume they have the property.
However, sometimes authors want to avoid the details of this construction. They want to talk about the rationals and the reals, and the relationship between them, without having to talk about Dedekind cuts or anything like that.  This way, they can move on to other topics more quickly - the constructions can be difficult for less experienced students.  So, rather than constructing the reals from first principles, an author may present a list of axioms for the reals, so that those axioms are enough to obtain the results the author is interested in. 
In these cases, it is common to use the Archimedean property itself as an axiom. This allows us to prove that the sequence $(1/n)$ converges to $0$, and other key facts about the topology of the reals, without referring to any specific construction of the reals. 
Not every field is Archimedean, though.  For example, the hyperreals are not Archimedean, as the question points out.  There is no contradiction to this - when we actually construct the hyperreals we can't prove they are Archimedean (because they aren't), unlike when we construct the ordinary reals.   
The same idea about replacing constructions with axioms applies to the hyperreals - some authors in nonstandard analysis give direct constructions of the hyperreals, while others only give a list of axioms for the hyperreals, which are enough to prove the results the authors are interested in obtaining. 
A: Completeness has many faces
For an ordered field $F$, the following are equivalent:


*

*$F$ has the Archimedean property and Cauchy sequences converge

*$F$ is Dedekind complete

*$F$ is connected

*$F$ has the LUB property

*$F$ has the monotone sequence property

*$F$ has the nested interval property  

*In $F$, the Bolzano-Weierstrass theorem holds

*In $F$, the Heine-Borel theorem holds


There are probably other good examples too; this is the list appearing in Buck's Advanced Calculus.
Taking any one of these as an axiom suffices to be able to prove the rationals are dense in the reals.
The Archimedean property is a necessary one
While we may have a proof that the rationals are dense in some field $F$ that doesn't use it, it must still be true that $F$ satisfies the Archimedean property; we can't get away from the fact it holds, even if we don't actually use it directly. Explicitly
Theorem: If $F$ is an ordered field in which the rationals are dense, then $F$ is Archimedean.
Proof: For any $x \in F$, there is a rational number $q$ with $|x| < q < |x| + 1$. $\lceil q \rceil$ is a natural number larger than $x$. $\square$
The hyperreals are Archimedean too
Internally, the hyperreals are Archimedean. More precisely, if you take the Archimedean property

For every $r \in \mathbb{R}$ there is an $n \in \mathbb{N}$ such that $n > r$

and apply the transfer principle, you get a theorem about the hyperreals

For every $r \in {}^\star\mathbb{R}$ there is an $n \in {}^\star\mathbb{N}$ such that $n > r$

A: As far as I can tell, your actual question is:

Proofs that the rationals are dense in the reals rely on the fact that the reals are Archimedean.  But the hyperrationals are dense in the hyperreals, and the hyperreals are not Archimedean.  How is this possible?

The obvious answer is that the hyperrationals are not the same as the rationals!  If you wanted to prove the rationals were dense in the hyperreals, you would need the hyperreals to be Archimedean.  But the hyperrationals are different from the rationals, so this is not relevant to proving that the hyperrationals are dense in the hyperreals.
A: The truncation $10^{-n}\lfloor10^n x\rfloor$ of a real $x$ at rank $n$ of its decimal expansion is rational and implies that the rationals are dense in the reals.  This argument works also in the hyperreals and does not use the Archimedean property.
