Let $\pi \colon M\to N$ be a smooth map between real smooth manifolds. Then $C^\infty(M)$ forms a module over $C^\infty(N)$ (via pullback). Is this module flat when $\pi$ is a submersion?
Recall that the usual definition of flatness is equivalent to the following equational condition: whenever $ h_1 \ldots h_k\in C^\infty(N) $ and $g_1 \ldots g_k\in C^\infty(M)$ are such that: $$h_1 g_1 + \ldots + h_k g_k = 0$$ (as functions on $M$) then there are functions $G_1 \ldots G_r\in C^\infty(M)$ and $a_{i,j}\in C^\infty(N)$ such that: $$g_i= \sum_j a_{i,j}G_j \; \forall i $$ and $$\sum_i h_i a_{i,j}= 0 \; \forall j$$
Some remarks:
It's known that the inclusion of an open subset $U\subset N$ is a flat morphism since smooth functions on $U$ are obtained from smooth functions on $N$ by localizing w.r.t. functions vanishing nowhere on $U$.
It's also known that smooth flat maps have to be open. Proofs of both of these facts can be found for example in the book: Gonzales, Salas, $C^\infty$-differentiable spaces, Lecture notes in Mathematics, Springer 2000.
I've asked some of the experts including Malgrange and the above authors and it seems that the answer is not known.
I gave the equational condition of flatness since it seems like the most reasonable thing to use here. But considering already the simplest situation here's what gets me stuck: suppose you want to check flatness of the standard projection $\mathbb{R}^2 \to \mathbb{R}, (x,y)\mapsto x$, and take the case of just one $h\in C^\infty(\mathbb{R})$ and one $g\in C^\infty(\mathbb{R}^2)$ with $hg=0$. If you pick $h(x)$ to be strictly positive for $x<0$ and $0$ for $x\geq 0$, then the flatness condition translates into:
Any smooth function $g(x,y) \in C^\infty (\mathbb{R}^2)$ that vanishes on the half plane $x\leq 0 $ admits a "factorization": $$g(x,y)= \sum_j a_j (x)G_j (x,y)$$ where the $a_j\in C^\infty(\mathbb{R})$ all vanish on $x\leq 0$ and the $G_j\in C^\infty(\mathbb{R}^2)$ are arbitrary.
Anyone has an idea how to prove this "simple" case, or sees a counter example?
(Edit: George Lowther beautifully proves this "simple" case, and also comes closer to the full result in his second answer. If you also think he deserves some credit consider up-voting his second answer since the first one turned community wiki.)
Motivation
My personal interest is that a positive answer would allow me to finish a certain proof, which trying to explain here would take this too far afield. But I may try to put the question into context as follows: the notion of flat morphism plays an important role in algebraic geometry where it is basically the right way to formalize the notion of parametrized families of varieties (fibers of such a morphism being these families). One may also say that it is the right "technical" notion allowing one to do all the things one expects to do with such parametrized families (correct me if I'm wrong).
Now I've been taught that differential topology may also be seen as a part of commutative algebra (and that taking such a point of view might even be useful at times). For example: a manifold itself may be recovered completely from the algebra of smooth functions on it, and any smooth map between manifolds is completely encoded by the corresponding algebra morphism. Other examples: vector fields are just derivations of the algebra, vector bundles are just finitely generated projective modules over the algebra etc. Good places to learn this point of view are: Jet Nestruev, Smooth manifolds and observables, as well as the above mentioned book.
Now in differential topology there is a well know notion of smooth parametrized families of manifolds, namely smooth fiber bundles. Hence from this algebraic point of view it would be natural to expect that fiber bundles are flat morphisms.