>I think the following is true ...>>Proposition:>>For any closed subset A of R there exists an infinitely>differentiable function f:R -> R such that A = f^(1)(0).

Modulo the obvous typo, this is certainly true.Here's the proof that springs to my mind:

Lemma. If I is an open interval there exists an infinitelydifferentiable f such that f > 0 on I, f = 0 on R\I,and every derivative of f is bounded.

Proof. This follows from whatever your favoriteoroof of the existence of infinitely differentiablefunctions with compact support it. QED.

If you're wondering why the last bit about everyderivative being bounded is not automatic fromthe rest of the conclusion, the point is I couldbe unbounded. If, say, I = (0, infinity) thentake an f so that f(x) = 0 for x <= 0,f(x) > 0 for x > 0, and f(x) = 1 for x > 1.

Now to prove your theorem. The complementof A is the union of countably many openintervals I_n. Choose f_n correspondingto I_n as in the lemma.

Now choose a_n > 0 with the followingproperty:

(*) If g_n = a_n f_n and k <= n then

|D_k g_n(x)| < 1/2_n everywhere.

Here D_k is a convenient notation for the k-thderivative. You can find a_n making (*) truebecause each D_k f_n is bounded andfor a given n, (*) refers to only finitely manyvalues of k.

Note: Of course it's natural to take the I_nto be disjoint here. But disjointness is notneeded in the proof. Hence the same proofworks in R^d: The complement of any closedset A is the union of countable many balls...

>>Proof:>>If A = the empty set, let f(x) = 1 for all x, and we're done.>>Thus, assume A is nonempty.>>Let B = R\A. Then B is open so can be expressed as a countable>union of pairwise disjoint nonempty open intervals, say>> B = B_1 U B_2 U ...>>where the number of intervals in the union is either finite>or countably infinite.>>Let B_n = (s_n,t_n) where s_n is either real or -oo, t_n is>either real or +oo, and s_n < t_n.>>Let g_n: R -> R be an infinitely differentiable function such>that g_n = 0 on R\B_n (via a bump function construction).>>Let d be the usual distance function on R.>>For x in B_n, let d_n(x) = min(d(s_n,x),d(x,t_n)).>>Define f:R -> R by>> f(x) = 0 if x in A>> f(x) = (d_n(x))*(g_n(x)) if x in B_n>>Then f is infinitely differentiable and A = f^(-1)(0),>as required.>>Is my proof correct?>>If not, is the claim of the proposition true?>>If so, here's a followup question ...>>For an infinitely differentiable function f:R -> R, let f^(n)>denote the n'th derivative of f if n > 0 and f if n = 0.>>Let A_0, A_1, A_2, ... be closed subsets of R such that for all>s,t in A_n with s < t, the set A_(n+1) has nonempty intersection>with the open interval (s,t). >>Question:>>Must there exist an infinitely differentiable function f:R -> R>such that, for all n, A_n = (f^(n))^(-1)(0)?>>quasi