I can show that this is true for your "simple" case.
If g(x,y) ∈ C∞(ℝ2) vanishes on x ≤ 0 then it decomposes as g(x,y) = a(x)G(x,y) where a(x) ∈ C∞(ℝ) vanishes on x ≤ 0 and G(x,y) ∈ C∞(ℝ2).
This can be shown by proving the statements below. They could possibly be standard results, but I've never seen them before.
First, I'll refer to the following sets of functions.
- Let U be thet set of functions f(x) ∈ C∞(ℝ) which vanish on x ≤ 0 and are positive on x > 0.
- Let V be the set of functions f: ℝ+→ ℝ such that x-n f(x) → 0 as x → 0, for each positive integer n.
The statements I need to show the main result are as follows.
Lemma 1: For any f ∈ V, there is a g ∈ U such that f(x)/g(x) → 0 as x → 0.
Proof: Choose any smooth function r: ℝ+→ ℝ+ with r(0) = 1 and r(x) = 0 for x ≥ 1. For example, we can use r(x) = exp(1-1/(1-x)) for x < 1. Then, the idea is to choose a sequence of positive reals αk → 0 satisfying ∑k αk < ∞, and set
$$g(x) = x^{theta(x)}, theta(x)=sum_{k=1}^infty r(x/alpha_k)$$
for x > 0 and g(x) = 0 for x ≤ 0. Only finitely many terms in the summation will be nonzero outside any neighborhood of 0, so it is a well defined expression, and smooth on x > 0. Clearly, θ(x) → ∞ and, therefore, x-n g(x) → 0 as x → 0. It needs to be shown that all the derivatives of g vanish at 0 so that g ∈ U. As r and all its derivatives are bounded with compact support, r(n)(x) ≤ Knx-n-1 for some constants Kn. The nth derivative of θ is
$$theta^{(n)}(x)=sum_kalpha_k^{-n}r^{(n)}(x/alpha_k)le K_nx^{-n-1}sum_kalpha_k$$
which has polynomially bounded growth in 1/x. The derivatives of log(g) satisfy
$$frac{d^n}{dx^n}log(g(x))=frac{d^n}{dx^n}left(log(x)theta(x)right)$$
which also has polynomially bounded growth in 1/x. However, the derivative on the left hand side is g(n)(x)/g(x) plus a polynomial in g(i)(x)/g(x) for i < n. So, induction gives that g(n)(x)/g(x) has polynomially bounded growth in 1/x and, multiplying by g(x), g(n)(x) → 0 as x → 0.
By definition of f ∈ V, there is a decreasing sequence of positive reals εk such that f(x) ≤ xn for x ≤ εn. We just need to make sure that αk ≤ εn+1 for k ≥ n to ensure that g(x) ≥ xn-1 for εn+1 ≤ x ≤ min(εn,1). Then f(x)/g(x) goes to zero at rate x as x → 0.
█
Lemma 2: For any sequence f1,f2,... ∈ V there is a g ∈ U such that fk(x)/g(x) → 0 as x → 0 for all k.
Proof: The idea is to apply Lemma 1 to f(x) = Σk λk|fk(x)| for positive reals λk. This works as long as f ∈ V, which is the case if Σk λksupx≤kmin(x,1)-k|fk(x)| is finite, and this condition is easy to ensure.
█
Lemma 3: For any sequence f1,f2,... ∈ V there is a g ∈ U such that fk(x)/g(x)n → 0 as x → 0 for all positive integers k,n.
Proof: Apply Lemma 2 to the doubly indexed sequence fk,n = |fk|1/n.
The result follows from applying lemma 3 to the triply indexed sequence fi,j,k(x) = max{|(di+j/dxidyj)g(x,y)|: |y| ≤ k} ∈ V. Then, there is an a ∈ U such that fijk(x)/a(x)n → 0 as x → 0. Set G(x,y) = f(x,y)/a(x) for x > 0 and G(x,y) = 0 for x ≤ 0. On any bounded region for x > 0, the derivatives of G(x,y) to any order are bounded by a sum of terms, each of which is a product of fijk(x,y)/a(x)n with derivatives of a(x), so this vanishes as x → 0. Therefore, G ∈ C∞(ℝ2).
█
In fact, using a similar method, the simple case can be generalized to arbitrary submersions.
Let p: M →N be a submersion. If h ∈ C∞(N) and g ∈ C∞(M) satisfy hg = 0 then, g = aG for some G ∈ C∞(M) and a ∈ C∞(N) satisfying ha = 0.
Very Rough Sketch:
If S ⊂ N is the open set {h≠0} then g and all its derivatives vanish on p-1(S).
The idea is to choose a smooth parameter u:N-S →ℝ+ which vanishes linearly with the distance to S. This can be done locally and then extended to the whole of N (I'm assuming manifolds satisfy the second countability property). As all the derivatives of g vanish on p-1(S), u-ng tends to zero at the boundary of S. This uses the fact that p is a submersion, so that u also goes to zero linearly with the distance from p-1(S) in M.
Then, following a similar argument as above, a can be expressed a function of u so that g/a and all its derivatives tend to zero at the boundary of S. Finally, G=0 on the closure of p-1(S) and G=g/a elsewhere.
█
I suppose the next question is: does proving the special case above of a single g and h reduce the proof of flatness to algebraic manipulation?