Every open interval (x,y) contains a rational: with n=⌊1/(y−x)⌋+1 and m=⌊nx⌋+1, x<m/n<y. Watch the rational ticks inside the interval multiply as the denominator cap grows.
n=⌊y−x1⌋+1,m=⌊nx⌋+1
x<nm<y
z=r+(s−r)22is irrational
Examples & Exercises
Prove completely, from the Archimedean property, that for every real x there is an integer n with n≤x<n+1 (Tao, Proposition 4.4.1).
∀x∈R∃n∈Z:n≤x<n+1
Interval (1,2): n=⌊1/(2−1)⌋+1=2, m=⌊2⋅1⌋+1=3, so q=3/2=1.5 lands inside. The proof below shows this recipe always works.Show proof
Let S={k∈Z:k≤x}. By the Archimedean property there is a natural number K>−x; then −K<x, so −K∈S — S is nonempty and bounded above by x.
A nonempty set of integers bounded above has a maximum: pick an integer M>x (Archimedean); then S′′={M−s:s∈S} is a nonempty set of nonnegative integers, so by well-ordering it has a least element M−n with n∈S. Every s∈S satisfies M−s≥M−n, i.e. s≤n, so n=maxS.
Since n∈S, n≤x. Also n+1>x: otherwise n+1≤x would put n+1∈S, contradicting the maximality of n. Hence n≤x<n+1 — every real sits exactly between two consecutive integer marks.
Prove completely that for reals x<y there is a rational q with x<q<y — the rationals are dense in the reals (Tao, Proposition 4.4.3).
x<y⇒∃q∈Q:x<q<y
n=⌊y−x1⌋+1,m=⌊nx⌋+1,q=nm
Interval (1,2): taking n=2 with 1/n<y−x, one of the 1/2-spaced marks …,1,3/2,2,… — namely 3/2 — falls inside the interval: the proof's recipe executed live.Show proof
Since y−x>0, the Archimedean property gives a natural number n larger than y−x1 — i.e. n1<y−x. The model computes such an n directly as n=⌊y−x1⌋+1.
Applying problem 1 to nx gives an integer m with m−1≤nx<m (the model computes m=⌊nx⌋+1). Put q=m/n; from m>nx we get nm>nnx=x.
Also m<nx+1, and n1<y−x is equivalent to 1<n(y−x), so nx+1<nx+n(y−x)=ny. Hence m<ny, i.e. nm<y. Together: x<nm<y — the desired rational q=m/n is found.
The key idea: once the marks are spaced finer than the interval (n1<y−x), no mark can jump clean over it. However narrow the interval (try the (0,0.1) and (−3.5,−3.4) presets), finer marks always work — there are no exceptions.
Prove the irrationals are dense too: if x<y there is an irrational z with x<z<y (hint: pick rationals r<s inside (x,y) and use z=r+(s−r)22).
z=r+(s−r)22∈(x,y),z∈/Q
Interval (1,2): with rationals r=3/2, s=7/4, z=23+41⋅22≈1.677 is an irrational inside (1,2) — an irrational always squeezes between rational marks.Show proof
By problem 2 there are rationals r<s inside (x,y). Put z=r+(s−r)22. Since 1<2<4 and squaring is strictly increasing on [0,∞) (problem 1 of the sqrt2-irrational scene, plus the n-th root scene), 1<2<2 — hence 0<22<1.
Since s−r>0, 0<(s−r)22<s−r; adding r gives r<z<s. With x<r and s<y, x<z<y — z lies in the interval.
Now z is irrational: if it were rational, 2=s−r2(z−r) would be rational too (the right side is arithmetic on rationals with nonzero denominator) — contradicting Proposition 4.4.4 that 2 is irrational (problem 1 of the sqrt2-irrational scene). Hence z is irrational with x<z<y.
Corollary: every open interval of the real line contains both rationals and irrationals. Density of the rationals does not mean "almost all" reals are rational — quite the opposite is true (the countability scene).