Basic question about S-polynomial example

consider $f = xy + z^3$ and $z^2 -3z$ with Lex ordering (x>y>z). Then the S-polynomial of $f$ and $g$ is:

$S(f,g) = xyz^2 + z^5 -xyz^2 - 3xyz = z^5 - 3xyz$.

An S-polynomial is supposed to cancel leading terms. Can someone please clarify what this means?

The leading terms of $f$ and $g$ are: $LT(f) = xy$ and $LT(g) = z^2$. Do the mean neither leading term is the leading term of the S-polynomial or do they mean neither leading term is expressed in the S-polynomial explicitly?

If its the latter, then is this modified expression of the definition also an S-polynomial?

$S'(f,g) = xyz^2 + z^5 -xyz^2 - 3xyz = xyz^2 + z^5 + xyz^2 + 3xyz $ ?


Assume any monomial order $<$. By definition we have $\newcommand{\lcm}{\text{lcm}}\newcommand{\lm}{\text{lm}}\newcommand{\lt}{\text{lt}}$ $$ S(f,g)=\frac{\lcm(\lm(f),\lm(g))}{\lt(f)}f-\frac{\lcm(\lm(f),\lm(g))}{\lt(g)}g $$ where by $\lm(f)$ we mean the leading monomial of $f$ (with respect to $<$). Cancellation of leading terms happens as follows: note that $$ \lt\left(\frac{\lcm(\lm(f),\lm(g))}{\lt(f)}f\right)=\frac{\lcm(\lm(f),\lm(g))}{\lt(f)}\lt(f)=\lcm(\lm(f),\lm(g)) $$ and similarly $$ \lt\left(\frac{\lcm(\lm(f),\lm(g))}{\lt(g)}g\right)=\lcm(\lm(f),\lm(g)) $$ so that in the S-polynomial $S(f,g)$, lead terms cancel and we obtain $\lm(S(f,g))<\lcm(\lm(f),\lm(g))$ regardless of the monomial order $<$.

This corresponds to what you wrote, because in your example you have $\lcm(\lm(f),\lm(g))=xyz^2$ and in your S-polynomial the $xyz^2$ cancels with $-xyz^2$.