Let $X\subseteq\Bbb C^n$ be a closed analytic subset, meaning that for every $x\in X$ there is an open subset $U_x\subseteq\Bbb C^n$ and a finite family of holomorphic functions $f_1,\ldots,f_k\colon U_x\to\Bbb C$ such that $X\cap U_x=V(f_1,\ldots,f_k)$. Assume moreover that $X$ is definable is some $o$-minimal structure over $\Bbb R$ (identifying $\Bbb C^n$ with $\Bbb R^{2n}$).
A point $x\in X$ is called regular of codimension $d$ if there is $0\leq d\leq n$, $U_x\subseteq\Bbb C^n$ and $f_1,\ldots,f_d\colon U_x\to\Bbb C$ holomorphic functions such that $X\cap U_x=V(f_1,\ldots,f_d)$ and the Jacobian matrix $(\partial f_i/\partial z_j(x))_{ij}$ has maximal rank.
A point $x\in X$ is called singular if it is not regular.
I want to show that the singular locus (equivalently the set of regular points) of $X$ is itself definable. This would be clear if the $f_1,\ldots,f_d$ where themselves definable, since (partial) derivatives of definable functions are definable and the determinant of the Jacobian is a polynomial in the partial derivatives of the $f_i$'s, but I only know that they are holomorphic so it's not clear to me how to proceed.
Also note that this is a step in the proof that closed analytic definable sets are in fact algebraic, so I cannot use this fact yet.