Vector space dimension after nonlinearly mapping spanning vectors

Let $\mathbb{R}^d \supset V$ be a vector space spanned by elements $v_1, v_2, \dots, v_n$, not necessarily linearly independent. Let $v_i = \sum_{j=1}^dv_{ij}\mathbf{e}_j$ be the representations of $v_i$ in the canonical basis.

Let $f$ be a surjective linear map $\mathbb{R}^d \rightarrow \mathbb{R}^{\bar{d}}$, $\bar{d} < d$. Consider the following two vector spaces, $$X = span(f(v_1),\dots,f(v_n)), \quad Y = span(f\circ g(v_1),\dots,f\circ g(v_n)),$$ where $g$ is the map $v_i \mapsto v_{ij}\mathbf{e}_j$, with $j$ the maximum index such that $v_{ij} \neq 0$. Clearly, $g$ is not a linear map. Eg., let $v_1 = (1, 1), v_2 = (1, 0)$, $$g(v_1 - v_2) = (0, 1) \neq (0, 0) = g(v_1) - g(v_2).$$

To prove: $$\forall i\quad f(v_i) \neq 0 \Rightarrow \dim X > \dim Y.$$

I am completely lost on how to proceed with the problem. Clealy $X$ may not contain $Y$ in general. Moreover, $g$ is not a linear map. Intuitively it seems like the claim is true, but how to show?

Furthermore, if the above conditions are not sufficient for the implication to be true, what would be the sufficient conditions?

Any help would be much appreciated. Thanks very much!