Let $f: \mathbb{C}^n \rightarrow \mathbb{C}^r$ be an algebraic map (i.e., rational functions that contain radicals). We assume that $r>n$ and that the Jacobian of $f$ has rank $n$ on a dense subset of $\mathbb{C}^n$. Let $X\subset \mathbb{C}^n$ of dimension $n-c$ be an irreducible affine variety that contains a dense subset where $f$ is well-defined and the Jacobian of $f$ has rank $n$.
I want to show that $\dim \overline{f(X)}=n-c$.
All of the relevant theoretical results seem to be stated for manifolds. Since a priori $X$ can contain singular points, do I need to take a desingularisation $X'$ of $X$ and then somehow show that it is true for $X$ as well or can they be somehow directly applied because $f$ is "nice" on a dense subset of $X$?
In the former case, what is the correct formal way to extend the result from $X'$ to $X$?
Now to the proof itself, I've been thinking about two approaches but cannot quite make either of them precise.
Using the Inverse Function Theorem for Manifolds (as stated in Lee Theorem 5.11). If I read it correctly, then at every point $p$ in a dense subset of $X$, there exist connected neighbourhoods $U_0$ of $p$ and $V_0$ of $f(p)$ such that $U_0$ and $V_0$ are diffeomorphic, so $X$ is diffeomorphic to $\overline{f(X)}$ and hence $\dim \overline{f(X)}=n-c$. –Is this true?
Using Sard's theorem. By construction, the differential of $f$ has rank less than $r$ for every points of $X$, so $X$ equals its critical set. Hence, $f(X)$ has measure $0$ in \mathbb{C}^r. My problem is that it just says that $\dim \overline{f(X)} < r$. I was hoping to say something along the lines that this claim about the measure would be true for any algebraic map $g: \mathbb{C}^n \rightarrow \mathbb{C}^m$ with the properties stated above and if $m>n-c+1$, but now the condition on the rank of Jacobian does not hold any more.
Question: "All of the relevant theoretical results seem to be stated for manifolds. Since a priori X can contain singular points, do I need to take a desingularisation X′ of X and then somehow show that it is true for X as well or can they be somehow directly applied because f is "nice" on a dense subset of X?"
Answer: This seems to follow from a classical result on smoothness. For simplicity if $f:X:=Spec(B)\rightarrow S:=Spec(A)$ where $k \rightarrow A \rightarrow B$ are maps of $k$-algebras where $A,B$ are finitely generated and regular integral domains, there is an induced cotangent sequence
$$ B\otimes \Omega^1_{A/k} \rightarrow \Omega^1_{B/k} \rightarrow \Omega^1_{B/A} \rightarrow 0$$
There is the following result: The map $f$ is smooth of relative dimension $n:=dim(X)-dim(S)$ iff $\Omega^1_{B/A}$ is a finite rank projective $B$-module of rank $n$.
The map $f$ is generically smooth, hence there is an open subset $V \subseteq S$ with induced map $f_V: f^{-1}(V) \rightarrow V$ smooth. These results are proved in Hartshorne, Chapter III.10.4 and 7. For a definition of "smooth" see HH. Def.10.0. This seems to imply your result since the cotangent module is related to the jacobian criterion.
Hence you must calculate the generic rank $n$ of $\Omega^1_{B/A}$ and from this it follows that
$$dim(\overline{f(X)})=dim(X)-n.$$