Write
with each open. The closed sets and are disjoint. By the Urysohn lemma, choose a continuous with
The uniformly convergent series
defines a continuous map to . It vanishes on . If , then for some , so and . Thus
which is the closed G-delta set as a zero set construction.