Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedSession-authored (Fable 5 assisted)precheck 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 a0Z and an1 for n1 onto RQ. 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:NZ by z(2k)=k and z(2k+1)=(k+1); the division algorithm makes these two cases exhaustive (thm-division-algorithm-in-z). For xNN put a0=z(x0) and an=xn+1 for n1. 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 aj1 for j1 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 a0Z and anZ with an1 for n1. With the initial values p2=0, p1=1, q2=1, q1=0 and the recurrences pn=anpn1+pn2, qn=anqn1+qn2 for n0: p0=a0 and q0=1; the qn are positive for n0 and strictly increasing for n1; and pnqn1pn1qn=(1)n1 for n0. 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+pn1)/(qn+qn1). The intervals J are nested as the prefix is extended, and diamJ(a0,,an)=1/(qn(qn+qn1)), 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 mx<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 mx<m+1).

[F4]

The map qq^ (def-real-numbers) is an embedding of ordered fields. Every real is approximated by rationals: for xR and rational ε>0 there is qQ with xq^<ε^. Consequently, strictly between any two reals lies a rational. (The rationals embed densely in the reals).

[F5]

For each kN let Ik=[ck,dk] be a closed bounded interval with ckdk (def-interval), and suppose the family is nested: Ik+1Ik for every kN. Write k=dkck0 for the length of Ik. Then: 1. kNIk is nonempty; more precisely, with c=sup{ck:kN} and d=inf{dk:kN}, both of which exist, one has cd and kNIk=[c,d]. 2. kNIk is a single point if and only if k0. (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,,sk1), its cylinder is Ns:={xN: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 SX the subspace topology on S is TS:={US:UT}, 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):=xy: dR is a metric on R, the open ball is the bounded open interval B(x,r)=(xr,x+r), and consequently UR is open in the metric topology of dR exactly when for every xU there is r>0 with (xr,x+r)U; this topology is called the usual topology of R. (The absolute value makes R a metric space: d(x,y)=xy is a metric, its open balls are the intervals (xr,x+r), and it is unbounded, claims 1 to 3).

Proof

technique · direct
1.1

Write A for the set of sequences a=(a0,a1,) with a0Z and an1 for n1, and for a finite prefix put C(a0,,an):={bA:bk=ak for kn}; by [F1] the assignment xa with a0=z(x0) and an=xn+1 for n1 is a bijection of N=NN onto A, since z is a bijection of N onto Z and mm+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,,tk1) of the decoded prefix t0=z(s0) and ti=si+1 for 1i<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 RQ carries the subspace topology of [F7] inherited from R.

givenF1F6F7
1.2

For aA let pn and qn be as in [F2] and, for n1, put Mn(t):=(pnt+pn1)/(qnt+qn1); the initial values of [F2] give M1(t)=(1t+0)/(0t+1)=t for every real t, and for n0 and every real t1 the denominator satisfies qnt+qn1>0, since q0t+q1=t>0 and, for n1, qn>0 and qn1>0 by [F2], so Mn is defined at every real t1 when n0 and at every real t when n=1.

givenF2algebra
1.3

For aA the intervals J(a0,,an) are closed and bounded, are nested as n increases, and satisfy diamJ(a0,,an)=1/(qn(qn+qn1))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 nN; moreover V(a) is irrational, for suppose V(a)=u/v with u,v integers and v1, and note first that the qn are positive for n0 and strictly increasing for n1 by [F2] and are integers, so q11 and qn+1qn+1 give qnn for n1; for n1 both V(a) and the endpoint pn/qn lie in J(a0,,an), so V(a)pn/qn1/(qn(qn+qn1))<1/qn2 because qn1>0, and hence uqnvpn=vqnV(a)pn/qn<v/qn; taking n>v makes uqnvpn<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+1pn/qn=(pn+1qnpnqn+1)/(qnqn+1)=(1)n/(qnqn+1)0.

givenF2F5
2.1

For n1 and reals s,t at which Mn is defined, clearing denominators gives Mn(s)Mn(t)=(st)(pnqn1pn1qn)/((qns+qn1)(qnt+qn1)), and by [F2] the determinant pnqn1pn1qn equals (1)n1 for n0 while for n=1 the initial values give p1q2p2q1=1100=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.

step 1.2F2algebra
2.2

Fix aA and n0; the recurrences of [F2] give Mn1(an)=(pn1an+pn2)/(qn1an+qn2)=pn/qn and Mn1(an+1)=(pn1(an+1)+pn2)/(qn1(an+1)+qn2)=(pn+pn1)/(qn+qn1), both arguments lying in the domain found in step 1.2 because an1 when n1 while M1 is defined on all of R, so by [F2] the interval J(a0,,an) is the closed interval with endpoints Mn1(an) and Mn1(an+1), both of which are rational by [F2]; the interval is nondegenerate because diamJ(a0,,an)=1/(qn(qn+qn1))>0, and Mn1 depends only on a0,,an1, since pn1,pn2,qn1,qn2 do.

step 1.2F2algebra
2.3

Let xRQ and define x0:=x, an:=xn and xn+1:=1/(xnan); by induction on n every xn is irrational and xn>1 for n1, since given xn irrational [F3] supplies the unique integer an with anxn<an+1, so that 0xnan<1 with xnan0 because xn is irrational while an is an integer, whence 0<xnan<1 and xn+1=1/(xnan)>1, and xn+1 is irrational because a rational nonzero xn+1 would make xn=an+1/xn+1 rational; consequently an=xn1 for n1, the recursion never divides by zero, and Φ(x):=(a0,a1,) is a member of the set A of step 1.1.

step 1.1F3algebra
2.4

Let S be open in RQ, so S=T(RQ) for some T open in R by [F7], and let aA satisfy V(a)S; claim 3 of [F8] gives a real r>0 with (V(a)r,V(a)+r)T, and the diameters diamJ(a0,,an) tend to 0 by [F2], so some n has diamJ(a0,,an)<r; for every bC(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(RQ)=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.

step 1.1step 1.3F2F7F8
3.1

Fix aA and n0; subtracting and using the determinant identity of [F2] gives Mn(t)pn/qn=(qn(pnt+pn1)pn(qnt+qn1))/(qn(qnt+qn1))=(pnqn1pn1qn)/(qn(qnt+qn1))=(1)n/(qn(qnt+qn1)) for every real t1, and at t=1 the value Mn(1)=(pn+pn1)/(qn+qn1) 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+qn1>qn+qn1>0, so Mn(t) lies strictly between the two endpoints of J(a0,,an) and is neither of them.

step 1.2step 2.2F2algebra
3.2

Let xRQ, 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 nN, by induction on n: at n=0 the values p0=a0, q0=1, p1=1 and q1=0 of [F2] give M0(x1)=(a0x1+1)/x1=a0+1/x1=a0+(x0a0)=x because x1=1/(x0a0), 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+pn1)xn+2+pn)/((an+1qn+qn1)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.

step 1.2step 2.3F2algebra
3.3

Let a,bA with ab and let m be the least index with ambm; the quantities pm1,pm2,qm1,qm2 are computed from the common initial segment a0,,am1 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:=Mm1, 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+1bm 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.

step 2.1step 2.2
4.1

Let xRQ and let a:=Φ(x) be the code produced in step 2.3; for every nN 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 xnNJ(a0,,an), which by step 1.3 is the single point V(a); therefore V(Φ(x))=x, and V maps A onto RQ.

step 1.3step 2.3step 3.1step 3.2
4.2

Let a,bA with ab and let m be least with ambm; 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.

step 1.3step 3.3
5.1

By step 1.3 the map V sends every member of A to an irrational real, it is surjective onto RQ by step 4.1 and injective by step 4.2, so V:ARQ 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.

step 1.1step 1.3step 4.1step 4.2
6.1

Let C(a0,,an) be a cylinder and let xV[C(a0,,an)], say x=V(c) with cC(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 bA by step 5.1 and xJ(a0,,an), and were bkak for some kn then, taking m to be the least such index, so that mn, 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 bC(a0,,an) and xV[C(a0,,an)]; consequently the set T:={(s,t):s<t rational and (s,t)(RQ)V[C(a0,,an)]} is a union of open intervals and so is open in R by [F8], and T(RQ)=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 RQ 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.

step 1.1step 1.3step 2.2step 3.3step 5.1F2F4F7F8
7.1

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

step 2.4step 5.1step 6.1

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 RQ and not with R, and the reason Q cannot be homeomorphic to NN by this route.

Depends on

Used by

Dependency tree · next 3 levels

Direct dependencies and their dependencies through the next three levels: 127 results over 31 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.

Sources