(a) Put Ω(δ):=sup{∣f(y)−f(z)∣:y,z∈(x−δ,x+δ)}, so ωf(x)=infδ>0Ω(δ). (⇒) Suppose f is continuous at x. For every ε>0 there is δ>0 with ∣y−x∣<δ⇒∣f(y)−f(x)∣<ε/2.
Then for y,z∈(x−δ,x+δ), ∣f(y)−f(z)∣≤∣f(y)−f(x)∣+∣f(x)−f(z)∣<ε, so Ω(δ)≤ε and ωf(x)≤ε. Since ε was arbitrary, ωf(x)=0.
(⇐) Suppose ωf(x)=0. For every ε>0, infδ>0Ω(δ)=0<ε, so some δ>0 has Ω(δ)<ε. Then ∣y−x∣<δ⇒∣f(y)−f(x)∣≤Ω(δ)<ε (the case z=x) — f is continuous at x.
Hence x∈C(f)⟺ωf(x)=0⟺ωf(x)<1/k (∀k)⟺x∈⋂k{ωf<1/k}; that is, C(f)=⋂k{ωf<1/k}.
Each {ωf<1/k} is open. Let ωf(x0)<1/k. By definition of the infimum, some δ>0 gives M:=sup{∣f(y)−f(z)∣:y,z∈(x0−δ,x0+δ)}<1/k.
If x1∈(x0−δ/2,x0+δ/2) then (x1−δ/2,x1+δ/2)⊂(x0−δ,x0+δ), so ωf(x1)≤M<1/k. Thus {ωf<1/k} contains a neighborhood of x0: it is open.
(b) Suppose Q=⋂nGn with Gn open. Each Gn⊃Q is dense, hence open dense. Enumerate Q={q1,q2,…} and put Hj=Gj∩(R∖{qj}). Each Hj is open dense (removing one point preserves density).
By Baire, ⋂jHj is dense in R, but ⋂jHj⊂Q∖Q=∅ — a contradiction. So Q is not Gδ.
(c) If some f had C(f)=Q, then (a) would make Q a Gδ, contradicting (b). Hence no function is continuous exactly on the rationals.
(For contrast, Thomae's function realizes the reverse — continuous exactly at the irrationals — and the irrationals are Gδ.)