ag.algebraic geometry – Definition of smooth morphism of schemes

In Wedhorn’s and Görtz’s book, a morphism $f: X to Y$ is said to be smooth of relative dimension $d$ when for every $x in X$, there exists affine open neighborhoods $U$ of $x$ and $V = operatorname{Spec} R$ of $y=f(x)$ such that $f(U) subseteq V$, and an open immersion of $R$-schemes $j: U hookrightarrow operatorname{Spec} R(T_1, dots, T_n)/(g_1, dots, g_{n-d})$ such that the matrix $left (frac{partial g_i}{partial T_j}(x)right )$ has rank $n-d$.

In Bosch’s book, $f$ is smooth of relative dimension $d$ if for every $x in X$, there exists an open neighborhood $U$ of $x$ and an $Y$-morphism $j:U to W subseteq mathbb{A}_Y^n$ (here, $mathbb{A}^n_Y = underline{operatorname{Spec}}_Y mathscr{O}_Y(T_1, dots, T_n)$) giving rise to a closed immersion from $U$ over an open subscheme $W subseteq mathbb{A}^n_Y$ satisfying:

If $mathcal{I} subseteq mathscr{O}_W$ is the ideal correspondent to $j$, then there are $n-d$ sections $g_1, dots g_{n-d}$ generating $mathcal{I}$ in a neighborhood of $z = j(x)$ and such that the matrix $left(frac{partial g_i}{partial t_j}(z)right)$ has rank $n-d$, where $t_i$ are the coordinate functions of $mathbb{A}^n_Y$.

To be honest, I can’t quite make sense of Bosch’s definition: what does $frac{partial g_i}{partial t_j}$ even mean, given that the $t_j$ are global sections and the $g_i$ are sections on a neighborhood of $z$, and, thus, not necessarily polynomials. Am I missing something? How can I prove that these two definitions are equivalent? I can sort of see how Bosch’s definition imply Wedhorn’s and Görtz’s, if I squint. Can someone help me?