$\def\CC{\mathbb{C}}\def\cO{\mathcal{O}}$

Here is a candidate counterexample for $M= \CC$: Is $e^{-z}$ in the closure of the algebra generated by $e^z$ and $e^{\sqrt{2}z}$? My current guess is "no", but I need to move on to actual work.

<hr>

I will show that separating points and separating tangents is not enough for $M = \CC^2$. 

Let $A \subset \cO(\CC^2)$ be those holomorphic functions $f$ such that $f(z,z^{-1})$ extends holomorphically to $z=0$. We observe:

<b>$A$ is a subalgebra:</b> This is obvious.

<b>$A$ is closed:</b> Proof We have $f \in A$ if and only if $\oint f(z,z^{-1}) z^n dz=0$ for all $n \geq 0$, where the integral is on a circle around $0$. This fact is preserved by uniform limits on compact sets. (Specifically, by uniform limits on that circle.)

<b>$A$ separates points:</b> Note that the functions $f(x,y) = x$, $g(x,y) = xy$ and $h(x,y) = y (xy-1)$ are all in $A$. The functions $f$ and $g$ alone separate $(x_1, y_1)$ and $(x_2, y_2)$ unless $x_1=x_2=0$. In that case, $h$ separates them.

<b>$A$ separates tangent vectors:</b> Again, $df$ and $dg$ are linearly independent at all points where $x \neq 0$, and $df$ and $dh$ are linearly independent at $x=0$.

<b>$A \neq \cO(\CC^2)$</b> Clearly, $y \not \in A$.

I remembered this counterexample from [an old blog post of mine][1].

Note that we could replace $z \mapsto (z, z^{-1})$ with any map $\phi$ from the punctured disc $D^{\ast}$ to $\CC^2$. There are many such $\phi$'s, and they all appear to impose independent conditions. This makes me pessimistic about any simple criterion for equality when $M = \CC^2$.


  [1]: https://sbseminar.wordpress.com/2008/12/05/the-plane-is-not-maximally-affine/