How is floor(x) + j/A between x and y, and how the proof is related to the well-ordering property?

I am having trouble with a proof by well-ordering property exercise.

Use the well-ordering principle to show that if x and y are real numbers with $x \lt y$, then there is a rational number r with $x \lt r \lt y$.

The exercise gives you a hint. Use the Archimedean property, given in Appendix 1, to ﬁnd a positive integer A with $A \gt \frac{1}{y−x}$. Then show that there is a rational number r with denominator A between x and y by looking at the numbers $floor(x) +\frac{j}{A}$, where j is a positive integer.

This is what I have so far.

Let P(n) denote that if x, y are real numbers with $x \lt y$ then there is a rational number r such that $x \lt r \lt y$.

Assume P(n) is false, then there is no rational number r such that $x \lt r \lt y$.

(I am hoping I can arrive at a contradiction)

By the Archimedean property there is a positive integer A such that $A \gt \frac{1}{y-x}$

where $y - x \gt 0$, obtained by solving $x \lt y$.

Now i have to look at the numbers $floor(x) + \frac{j}{A} = \frac{A\cdot floor(x) + j}{A}$.

All of this have denominator A and are rational because floor(x), j and A are integers but how do I show they are between x and y?

Also, how is this proof related to the well-ordering property? From my understanding this is a proof by contradiction.

Edit: I came to this though I am not sure if it is correct.

By the well-ordering principle, there is a least positive integer j such that x < floor(x) + j/A < y but since floor(x) + j/A is rational we arrive at a contradiction to our initial assumption that there is no rational number r such that x < r < y.

• Please quote the exercise you are given. It is hard to guess – Ross Millikan Jun 25 '15 at 3:04
• The exercise is to prove P(n). I'll quote it now. – CBeginner Jun 25 '15 at 3:07
• Your $P(n)$ as you have it now does not contain any reference to $n.$ – coffeemath Jun 25 '15 at 4:34
• @Coffeemath Should I change it to something like P(x,y)? – CBeginner Jun 25 '15 at 4:46
• Actually it would be easier not to use induction but just the well ordering principle as you have in your last paragraph. It would be better to just define $j$ to be the least $j$ for which $x < floor(x)+j/A.$ You then have to show the set of these $j$ is a nonempty set of naturals [this justifies defining $j$ as just done], and then show both parts of the inequality $x < floor(x)+j/A < y$ using what you have already set up. – coffeemath Jun 25 '15 at 5:29