Let $f\colon X\to Y$ be a morphism between irreducible $\mathbb{C}$-varieties, such that $f$ is 1-1 and surjective, but $df$ fails to be injective along a subvariety $Z$. (This forces $Y$ to be singular).
My question is, in this case, with the (possible non-reduced) scheme structure, What is the scheme structure of the fiber product $Y\times_{Y\times Y} X\times X=X\times_Y X$ ?
Thanks for the comment @abx. Probably I should be more precise, what I would like to ask is, what is the scheme structure of $X\times_Y X$? For example, the base set is just the diagonal $\Delta_X$ union with the double point set, but as a scheme there should be a non-reduced structure along the non-immersion locus, I suppose. My question was to ask this scheme structure. For example, consider $X,Y\subset \mathbb{C}^4$ parametrized by $X=(x, -6x^2, 8x^3, w)$, and $Y=(3x^4, -6x^2, 8x^3, w)$, with $f\colon (x,y,z,w)\mapsto (x^4+yx^2+zx, y,z,w)$. $X$ is a smooth surface, while $Y$ is not. $f$ is 1-1 and surjective, but not local immersion along $(0,0,0,w)$. In this case what is the scheme structure of $X\times_Y X$?