Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Infinite simple continued fractions parametrise the irrational real numbers

Statement

The continued-fraction coding determined by Simple continued fractions, convergents, and the integer-coordinate coding of NN gives a bijection from the sequences (a0,a1,…) with a0∈Z and an≥1 for n≥1 onto R∖Q. Both the coding map and its inverse are continuous for the cylinder and subspace topologies.

Facts & Assumptions

Given: The objects, hypotheses, and choice principles stated above.

[F1]

Define a bijection z:N→Z by z(2k)=k and z(2k+1)=−(k+1); the division algorithm makes these two cases exhaustive (thm-division-algorithm-in-z). For x∈NN put a0=z(x0) and an=xn+1 for n≥1. Its finite simple continued fractions [a0;…,an] are defined by recursion on the length, evaluated in Q (def-rationals, def-rat-operations): [an]:=an and [ak;ak+1,…,an]:=ak+1/[ak+1;…,an] for k<n. The recursion never divides by zero, because aj≥1 for j≥1 makes every tail value [ak+1;…,an] at least 1. A finite prefix determines the cylinder of all codes extending it. Infinite continued-fraction values are established, rather than assumed, in this item. (Simple continued fractions, convergents, and the integer-coordinate coding of NN).

[F2]

Let a0∈Z and an∈Z with an≥1 for n≥1. With the initial values p−2=0, p−1=1, q−2=1, q−1=0 and the recurrences pn=anpn−1+pn−2, qn=anqn−1+qn−2 for n≥0: p0=a0 and q0=1; the qn are positive for n≥0 and strictly increasing for n≥1; and pnqn−1−pn−1qn=(−1)n−1 for n≥0. For a finite prefix (a0,…,an), C(a0,…,an)⊆NN is the code cylinder of all codes extending that prefix, and J(a0,…,an) is the closed real interval with endpoints pn/qn and (pn+pn−1)/(qn+qn−1). The intervals J are nested as the prefix is extended, and diam⁡J(a0,…,an)=1/(qn(qn+qn−1)), which tends to 0. A code cylinder and a real interval are different objects and the two are not identified. Both endpoints of J(a0,…,an) are rational, being ratios of integers; whether an infinite code's value can equal such an endpoint is not settled there. (Continued-fraction convergents, determinant identities, and nested irrational cylinders).

[F3]

Identify Z with its canonical copy inside R. Then for every real x there is exactly one integer m with m≤x<m+1, written ⌊x⌋ and called the integer part, or floor, of x. Existence is the Archimedean property (thm-of-archimedean) together with the well-ordering of N (thm-well-ordering-principle); uniqueness is the discreteness of Z, no integer lying strictly between m and m+1. (Integer part: for every real x there is exactly one integer m with m≤x<m+1).

[F4]

The map q↦q^ (def-real-numbers) is an embedding of ordered fields. Every real is approximated by rationals: for x∈R and rational ε>0 there is q∈Q with ∣x−q^∣<ε^. Consequently, strictly between any two reals lies a rational. (The rationals embed densely in the reals).

[F5]

For each k∈N let Ik=[ck,dk] be a closed bounded interval with ck≤dk (def-interval), and suppose the family is nested: Ik+1⊆Ik for every k∈N. Write ℓk=dk−ck≥0 for the length of Ik. Then: 1. ⋂k∈NIk is nonempty; more precisely, with c=sup⁡{ck:k∈N} and d=inf⁡{dk:k∈N}, both of which exist, one has c≤d and ⋂k∈NIk=[c,d]. 2. ⋂k∈NIk is a single point if and only if ℓk→0. (A nested sequence of nonempty closed bounded intervals has nonempty intersection, and the intersection is a single point exactly when the lengths tend to 0).

[F6]

The Baire sequence space is N:=NN, the set of functions from N to itself, with the product topology obtained by giving each copy of N the discrete topology (def-product-topology, def-standard-topologies). For a finite sequence s=(s0,…,sk−1), its cylinder is Ns:={x∈N:xi=si for i<k}. The empty sequence has cylinder N, and these cylinders form a basis. (Baire sequence space NN and its cylinder topology).

[F7]

For S⊆X the subspace topology on S is TS:={ U∩S:U∈T }, the family of traces on S of the open sets of X; a subset of S lying in TS is said to be open in S. (Subspace topology: the traces of the open sets, its closed sets and its bases, the continuity of the inclusion, and the characteristic property of a map into a subspace).

[F8]

For dR(x,y):=∣x−y∣: dR is a metric on R, the open ball is the bounded open interval B(x,r)=(x−r,x+r), and consequently U⊆R is open in the metric topology of dR exactly when for every x∈U there is r>0 with (x−r,x+r)⊆U; this topology is called the usual topology of R. (The absolute value makes R a metric space: d(x,y)=∣x−y∣ is a metric, its open balls are the intervals (x−r,x+r), and it is unbounded, claims 1 to 3).

Proof

technique · direct
1.1givenF1F6F7

Write A for the set of sequences a=(a0,a1,…) with a0∈Z and an≥1 for n≥1, and for a finite prefix put C(a0,…,an):={ b∈A:bk=ak for k≤n }; by [F1] the assignment x↦a with a0=z(x0) and an=xn+1 for n≥1 is a bijection of N=NN onto A, since z is a bijection of N onto Z and m↦m+1 is a bijection of N onto the integers that are at least 1, and it acts coordinatewise, so it carries the cylinder Ns of [F6] onto the cylinder C(t0,…,tk−1) of the decoded prefix t0=z(s0) and ti=si+1 for 1≤i<k, and every C(a0,…,an) arises from exactly one Ns in this way; give A the topology transported along the bijection, so that the bijection is a homeomorphism and, the Ns being a basis of N by [F6] and their images being exactly the sets C(a0,…,an), those sets are a basis of A, which is the cylinder topology of the Statement, while R∖Q carries the subspace topology of [F7] inherited from R.

1.2givenF2algebra

For a∈A let pn and qn be as in [F2] and, for n≥−1, put Mn(t):=(pnt+pn−1)/(qnt+qn−1); the initial values of [F2] give M−1(t)=(1⋅t+0)/(0⋅t+1)=t for every real t, and for n≥0 and every real t≥1 the denominator satisfies qnt+qn−1>0, since q0t+q−1=t>0 and, for n≥1, qn>0 and qn−1>0 by [F2], so Mn is defined at every real t≥1 when n≥0 and at every real t when n=−1.

1.3givenF2F5

For a∈A the intervals J(a0,…,an) are closed and bounded, are nested as n increases, and satisfy diam⁡J(a0,…,an)=1/(qn(qn+qn−1))→0, all by [F2], so by claims 1 and 2 of [F5] their intersection is a single real, written V(a), and V(a)∈J(a0,…,an) for every n∈N; moreover V(a) is irrational, for suppose V(a)=u/v with u,v integers and v≥1, and note first that the qn are positive for n≥0 and strictly increasing for n≥1 by [F2] and are integers, so q1≥1 and qn+1≥qn+1 give qn≥n for n≥1; for n≥1 both V(a) and the endpoint pn/qn lie in J(a0,…,an), so ∣V(a)−pn/qn∣≤1/(qn(qn+qn−1))<1/qn2 because qn−1>0, and hence ∣uqn−vpn∣=vqn ∣V(a)−pn/qn∣<v/qn; taking n>v makes ∣uqn−vpn∣<1, and it is a nonnegative integer, hence 0, so V(a)=pn/qn for every n>v, which is impossible because the determinant identity of [F2] gives pn+1/qn+1−pn/qn=(pn+1qn−pnqn+1)/(qnqn+1)=(−1)n/(qnqn+1)≠0.

2.1step 1.2F2algebra

For n≥−1 and reals s,t at which Mn is defined, clearing denominators gives Mn(s)−Mn(t)=(s−t)(pnqn−1−pn−1qn)/((qns+qn−1)(qnt+qn−1)), and by [F2] the determinant pnqn−1−pn−1qn equals (−1)n−1 for n≥0 while for n=−1 the initial values give p−1q−2−p−2q−1=1⋅1−0⋅0=1; in every case it is 1 or −1, and the denominators are positive by step 1.2, so Mn is strictly monotone on its domain, strictly increasing when that determinant is 1 and strictly decreasing when it is −1.

2.2step 1.2F2algebra

Fix a∈A and n≥0; the recurrences of [F2] give Mn−1(an)=(pn−1an+pn−2)/(qn−1an+qn−2)=pn/qn and Mn−1(an+1)=(pn−1(an+1)+pn−2)/(qn−1(an+1)+qn−2)=(pn+pn−1)/(qn+qn−1), both arguments lying in the domain found in step 1.2 because an≥1 when n≥1 while M−1 is defined on all of R, so by [F2] the interval J(a0,…,an) is the closed interval with endpoints Mn−1(an) and Mn−1(an+1), both of which are rational by [F2]; the interval is nondegenerate because diam⁡J(a0,…,an)=1/(qn(qn+qn−1))>0, and Mn−1 depends only on a0,…,an−1, since pn−1,pn−2,qn−1,qn−2 do.

2.3step 1.1F3algebra

Let x∈R∖Q and define x0:=x, an:=⌊xn⌋ and xn+1:=1/(xn−an); by induction on n every xn is irrational and xn>1 for n≥1, since given xn irrational [F3] supplies the unique integer an with an≤xn<an+1, so that 0≤xn−an<1 with xn−an≠0 because xn is irrational while an is an integer, whence 0<xn−an<1 and xn+1=1/(xn−an)>1, and xn+1 is irrational because a rational nonzero xn+1 would make xn=an+1/xn+1 rational; consequently an=⌊xn⌋≥1 for n≥1, the recursion never divides by zero, and Φ(x):=(a0,a1,…) is a member of the set A of step 1.1.

2.4step 1.1step 1.3F2F7F8

Let S be open in R∖Q, so S=T∩(R∖Q) for some T open in R by [F7], and let a∈A satisfy V(a)∈S; claim 3 of [F8] gives a real r>0 with (V(a)−r,V(a)+r)⊆T, and the diameters diam⁡J(a0,…,an) tend to 0 by [F2], so some n has diam⁡J(a0,…,an)<r; for every b∈C(a0,…,an) the interval J(b0,…,bn) equals J(a0,…,an), because [F2] computes it from the prefix alone, and both V(b) and V(a) lie in it by step 1.3, so ∣V(b)−V(a)∣<r and V(b)∈T∩(R∖Q)=S; hence every point of the preimage lies in a cylinder contained in it, so that preimage is the union of the cylinders it contains and is open by step 1.1, and the coding map is continuous.

3.1step 1.2step 2.2F2algebra

Fix a∈A and n≥0; subtracting and using the determinant identity of [F2] gives Mn(t)−pn/qn=(qn(pnt+pn−1)−pn(qnt+qn−1))/(qn(qnt+qn−1))=−(pnqn−1−pn−1qn)/(qn(qnt+qn−1))=(−1)n/(qn(qnt+qn−1)) for every real t≥1, and at t=1 the value Mn(1)=(pn+pn−1)/(qn+qn−1) is the endpoint of J(a0,…,an) other than pn/qn identified in step 2.2; for t>1 the two differences Mn(t)−pn/qn and Mn(1)−pn/qn therefore have the same sign (−1)n and satisfy ∣Mn(t)−pn/qn∣<∣Mn(1)−pn/qn∣, because qnt+qn−1>qn+qn−1>0, so Mn(t) lies strictly between the two endpoints of J(a0,…,an) and is neither of them.

3.2step 1.2step 2.3F2algebra

Let x∈R∖Q, let (an) and (xn) be as in step 2.3, and let pn and qn be the convergent numerators and denominators of the code Φ(x); then x=Mn(xn+1) for every n∈N, by induction on n: at n=0 the values p0=a0, q0=1, p−1=1 and q−1=0 of [F2] give M0(x1)=(a0x1+1)/x1=a0+1/x1=a0+(x0−a0)=x because x1=1/(x0−a0), and for the inductive step xn+1=an+1+1/xn+2 with xn+2>1, so multiplying numerator and denominator by xn+2 gives Mn(xn+1)=((an+1pn+pn−1)xn+2+pn)/((an+1qn+qn−1)xn+2+qn)=(pn+1xn+2+pn)/(qn+1xn+2+qn)=Mn+1(xn+2) by the recurrences of [F2]; every denominator here is nonzero, since xn+1>1 and xn+2>1 lie in the domains found in step 1.2.

3.3step 2.1step 2.2

Let a,b∈A with a≠b and let m be the least index with am≠bm; the quantities pm−1,pm−2,qm−1,qm−2 are computed from the common initial segment a0,…,am−1 alone, which is empty when m=0, the four quantities then being the initial values of [F2], so by step 2.2 the codes a and b determine the same function M:=Mm−1, and J(a0,…,am) is the closed interval with endpoints M(am) and M(am+1) while J(b0,…,bm) is the closed interval with endpoints M(bm) and M(bm+1); assume am<bm, which costs nothing by symmetry, so that am+1≤bm as these are integers, and all four arguments lie in the domain of M; if M is strictly increasing there, which is one of the two cases of step 2.1, then J(a0,…,am)=[M(am),M(am+1)] and J(b0,…,bm)=[M(bm),M(bm+1)] with M(am+1)≤M(bm), so the two meet in ∅ when M(am+1)<M(bm) and in {M(bm)} when M(am+1)=M(bm), while if M is strictly decreasing the same computation with the endpoints exchanged gives J(a0,…,am)=[M(am+1),M(am)] and J(b0,…,bm)=[M(bm+1),M(bm)] with M(bm)≤M(am+1), so the two meet in at most the single point M(am+1); in both cases J(a0,…,am)∩J(b0,…,bm) has at most one point, and any such point is an endpoint of both intervals and so is rational by step 2.2.

4.1step 1.3step 2.3step 3.1step 3.2

Let x∈R∖Q and let a:=Φ(x) be the code produced in step 2.3; for every n∈N the tail identity of step 3.2 gives x=Mn(xn+1) with xn+1>1, so step 3.1 places x strictly between the two endpoints of J(a0,…,an) and in particular inside it, whence x∈⋂n∈NJ(a0,…,an), which by step 1.3 is the single point V(a); therefore V(Φ(x))=x, and V maps A onto R∖Q.

4.2step 1.3step 3.3

Let a,b∈A with a≠b and let m be least with am≠bm; by step 1.3 the values V(a) and V(b) are irrational with V(a)∈J(a0,…,am) and V(b)∈J(b0,…,bm), so if V(a)=V(b) then that common value would lie in J(a0,…,am)∩J(b0,…,bm) and hence be rational by step 3.3, a contradiction; therefore V(a)≠V(b) and V is injective.

5.1step 1.1step 1.3step 4.1step 4.2

By step 1.3 the map V sends every member of A to an irrational real, it is surjective onto R∖Q by step 4.1 and injective by step 4.2, so V:A→R∖Q is a bijection, its inverse sends an irrational x to the code Φ(x) of step 2.3, and composing with the coordinatewise bijection of step 1.1 presents it as a bijection defined on NN.

6.1step 1.1step 1.3step 2.2step 3.3step 5.1F2F4F7F8

Let C(a0,…,an) be a cylinder and let x∈V[C(a0,…,an)], say x=V(c) with c∈C(a0,…,an), so that J(c0,…,cn)=J(a0,…,an) is a closed interval [α,β] with α<β rational by step 2.2 and x∈[α,β] irrational by step 1.3, giving α<x<β, and by [F4] there are rationals u,v with α<u<x<v<β; if x′ is irrational with u<x′<v then x′=V(b) for exactly one b∈A by step 5.1 and x′∈J(a0,…,an), and were bk≠ak for some k≤n then, taking m to be the least such index, so that m≤n, the nesting of [F2] would put x′ in J(a0,…,am)∩J(b0,…,bm), which by step 3.3 has at most one point and that point is rational, contradicting irrationality of x′, so b∈C(a0,…,an) and x′∈V[C(a0,…,an)]; consequently the set T:=⋃{ (s,t):s<t rational and (s,t)∩(R∖Q)⊆V[C(a0,…,an)] } is a union of open intervals and so is open in R by [F8], and T∩(R∖Q)=V[C(a0,…,an)], the inclusion from left to right being the defining condition of the union and the reverse holding because the interval (u,v) just produced for the arbitrary point x of the image is one of the united intervals; hence that image is open in R∖Q by [F7], and since every open subset of A is a union of cylinders by step 1.1 and the image of a union is the union of the images, V maps open sets to open sets, which for the bijection of step 5.1 says exactly that its inverse is continuous.

7.1step 2.4step 5.1step 6.1∎

The coding map is a bijection onto R∖Q by step 5.1, it is continuous by step 2.4, and its inverse is continuous by step 6.1, which is the assertion.

Remarks

  • The tail identity is what makes the algorithm invert the coding. Running floors and reciprocals on an irrational x produces a code, but nothing in that recipe by itself says the code's value is x again. The identity x=Mn(xn+1) of step 3.2 says it: the whole of x, not merely an approximation to it, is recovered from the first n+1 partial quotients together with the exact remainder xn+1, and since xn+1>1 the value sits strictly inside the n-th prefix interval. The intersection of those intervals is a single point, so it is x.

  • Irrationality is used twice, and for different purposes. It is what makes the algorithm run forever, since a remainder equal to its own integer part would stop it; and it is what makes prefixes separate, since two prefix intervals of the same length belonging to different codes can share only a rational endpoint. The second use is what gives injectivity and the continuity of the inverse at once.

  • Where the parametrisation fails for rationals. Nothing above extends to a rational target: the algorithm terminates, and the coding map is onto the irrationals only. That is the reason the companion identification is with R∖Q and not with R, and the reason Q cannot be homeomorphic to NN by this route.

Depends on

Used by

Dependency tree · two levels

59 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources