I'm trying to prove the equivalence of the following statements:
Suppose $M^m$ and $N^n$ are smooth manifolds, $S\subseteq M\times N$ immersed, and $\pi_M$ and $\pi_N$ the projection maps. TFAE:
1) $S$ is the graph of a smooth function $f\colon M\to N$
2) $\pi_M|_S$ is a diffeomorphism from $S$ onto $M$,
3) For each $p\in M$, the submanifolds $S$ and $\{p\}\times N$ intersect transversely in exactly one point.
I've shown $(1)\iff (2)$, and $(2)\implies (3)$. I can include that work if needed. Right now I'm just trying to show $(3)$ implies either of the other two.
If $S$ and $\{p\}\times N$ intersect transversely in one point, then the inclusion $\iota\colon S\to M\times N$ is transverse to $\{p\}\times N$, and $\iota^{-1}(p\times N)$ is a singleton. Then this means there exists some $(p,q)\in S$ such that $(p,q)\in p\times N$, thus $\pi_M|_S$ is surjective, and it must be injective since $\iota^{-1}(p\times N)$ is a singleton.
The transversality condition implies $$ T_{(p,q)}(p\times N)+d\iota_{(p,q)}(T_{(p,q)}S)\simeq T_{(p,q)}N+T_{(p,q)}(S)=T_{(p,q)}(M\times N) $$
so necessarily $\dim(T_{(p,q)}(S))\geq m$, by dimension considerations.
As a bijection, it's enough to show $\pi_M|_S$ is either of constant rank, or a local diffeomorphism to prove it's a diffeomorphism. As a projection map, I feel like it should be a submersion onto $M$, and that would do the trick.
Note: This is Theorem 6.32 in John Lee's Intro to Smooth Manifolds.
You've got 99% of the proof already. Hint: Suppose $d\pi_M|_S$ is not surjective and think about the isomorphisms $T_{(p,q)} S+ T_{(p,q)}(\{p\} \times N) \cong T_{(p,q)}(M \times N) \cong T_p M \times T_q N$.
Click/rollover for full answer below: