What’s nonsensical about this definition of the order of a meromorphic function

complex-geometryseveral-complex-variables

According to this math.stackexchange.com answer, the following definition of Huybrechts in his book Complex Geometry is nonsensical:

Let $X$ be a complex manifold. Let $Y \subset X$ be a hypersurface and let $x \in Y$. Suppose that $Y$ defines an irreducible germ in $x$. Hence, this germ is the zero set of an irreducible $g \in \mathcal{O}_{X,x}$.

Definition. (D. Huybrechts, Complex Geometry, Definition 2.3.5, page 78) Let $f$ be a meromorphic function in a neighbourhood of $x \in Y$. Then, the order $\mathrm{ord}_{Y,x}(f)$ of $f$ in $x$ with respect to $Y$ is given by the equality $f = g^{\mathrm{ord}(f)}\cdot h$ with $h \in \mathcal{O}^*_{X,x}$.

The definition seems reasonable to me. What's wrong with it?

For example, suppose $X = \mathbb{C}^2$, $Y = \{0\}\times\mathbb{C}$, and $f(x, y) = \frac{1}{x} + y$. Then, $g(x,y) = x$, and we have $f = g^{-1}h$ where $h(x,y)=1+xy \in \mathcal{O}_{X,(0,0)}^*$. So, according to Huybrechts' definition, we have $\mathrm{ord}_{Y,(0,0)}(f)=-1$, which seems correct to me.

Best Answer

Yes, so Georges is correct. The definition is flawed. The correct definition is that that the order of $f$ is the largest integer $k$ so that you can express $f = g^k h$ in the local ring. There is no reason to expect $h$ to be a unit. (Great question, by the way. I'm embarrassed it took me so long.) See the various examples that @JulianRosen and I offered in the comments.