Alphabeta Math
DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (z-ai/glm-5.2)audited 2026-07-28
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.

The Dirichlet function 1Q, and Thomae's function t with t(x)=1/q at a rational x=p/q in lowest terms with q≥1 and t(x)=0 at every irrational x

Definition

Throughout, N⊆Z⊆Q⊆R denotes the chain of canonical embeddings (The naturals embed in the integers, The integers embed in the rationals, The rationals embed densely in the reals), and each set is identified with its image in R, as elsewhere in this library; for a natural q the real ι(q)=q⋅1R is the canonical natural (The canonical natural ι(n)=n⋅1F of a field), and ι(q)>0 for q≥1 (Canonical naturals are positive and strictly increasing). A real is rational when it lies in Q and irrational otherwise; both sets are dense in R (Both Q and R∖Q are dense in R, and every nonempty open subset of R is uncountable).

The Dirichlet function

1Q:R→R,1Q(x):={1if x∈Q,0if x∉Q.

This is the indicator of the rationals. It is a function because every real either lies in Q or does not, and the two clauses are exclusive.

The least denominator of a rational

Let x∈Q and put

Q(x)  :=  { q∈N  :  q≥1  and  ι(q) x∈Z }.

Q(x) is nonempty. Every rational is a/b with a∈Z and b a positive integer (The integers embed in the rationals), and a positive integer is ι(q) for a unique natural q≥1 (The naturals embed in the integers); then ι(q) x=a∈Z, so q∈Q(x).

By the well-ordering principle (The well-ordering principle) the nonempty subset Q(x)⊆N has a least element. Write

q(x)  :=  min⁡Q(x)  ≥  1,

the least denominator of x, and p(x):=ι(q(x)) x∈Z, so that

x  =  p(x)ι(q(x)).

Nothing is selected here: q(x) is the least element of a set determined by x, so it is a function of x alone.

The least denominator is the denominator in lowest terms. The integers p(x) and q(x) are coprime (Coprime integers: gcd⁡(a,b)=1). Indeed put d:=gcd⁡(p(x),q(x)), which satisfies d≥1 because q(x)≥1 makes the pair different from (0,0) (gcd⁡ is symmetric and unchanged by signs: gcd⁡(a,b)=gcd⁡(b,a)=gcd⁡(∣a∣,∣b∣); moreover gcd⁡(a,0)=∣a∣, gcd⁡(a,1)=1, gcd⁡(a,a)=∣a∣, and gcd⁡(a,b)≥1 unless a=b=0, Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0). Then d divides q(x), so q(x)/d is a natural number ≥1, and ι(q(x)/d)=ι(q(x))/d because ι carries products of naturals to products (Canonical naturals are positive and strictly increasing); hence

ι(q(x)/d) x  =  ι(q(x)) xd  =  p(x)d  ∈  Z,

so q(x)/d∈Q(x) and therefore q(x)/d≥q(x), which forces d=1. Conversely, a lowest-terms denominator is the least one, so the description is unambiguous. Suppose x=p/ι(q) with q≥1 a natural, p∈Z and gcd⁡(p,q)=1. Then q∈Q(x), so q0:=q(x)≤q; and from p/ι(q)=p(x)/ι(q0) we get q0p=q p(x) in Z, so q∣q0p, and gcd⁡(p,q)=1 gives q∣q0 (If gcd⁡(a,b)=1 and a∣bc then a∣c; and if a∣c, b∣c and gcd⁡(a,b)=1 then ab∣c, claim 1), hence q≤q0. So q=q(x): writing x=p/q "in lowest terms with q≥1" and taking q=q(x) describe the same integer, and If d=gcd⁡(a,b) is nonzero then a/d and b/d are coprime is what produces such a representation from an arbitrary one.

Thomae's function

t:R→R,t(x):={1/ι(q(x))if x∈Q,0if x∉Q.

It is also called the popcorn function or the ruler function. The value is well defined because q(x) is, and ι(q(x))≥1>0 is invertible.

Boundary values, stated rather than left to the reader.

  • t(0)=1. Indeed ι(1)⋅0=0∈Z, so 1∈Q(0) and q(0)=1; the representation is 0=0/1.
  • t(m)=1 for every integer m, by the same computation with 1∈Q(m).
  • 0<t(x)≤1 for every rational x, since ι(q(x))≥1; and t(x)=0 exactly at the irrationals.

On the range. The values of t are 0 and the reciprocals 1/ι(q) of the canonical naturals q≥1; every such value is attained, 1/ι(q) being the value at the rational 1/ι(q) itself, whose least denominator is q because ι(k)/ι(q)∈Z with 1≤k<q would give a positive integer smaller than 1.

Depends on

Used by

Dependency tree · two levels

64 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