Let $R<S$ be an extension of commutative rings with identities (i.e. $R$ is a subring of $S$). We say $s_1,s_2,...,s_k$ are algebraically independent over $R$ iff there is no polynomial $f\in R[x_1,...,x_k]$ such that $f(s_1,...,s_k)=0$
let $n,M$ be positive integers (where $n>1$), and set $R=\mathbb{Z}_n$ and $S=\mathbb{Z}_n[x_1,x_2,...,x_M]$ (So $R$ is viewed as the ring of constant polynomials in $S$). Let $s_1,...,s_k\in S$ be algebraically independent over $R$.
Question 1: If $n$ is prime (so $R$ is a field now), must we have $k\leq M$ ? I think the answer is yes and it follows from steinitz theory of dependence relations. I can not trust myself though, because I read about this long time ago and I forgot the exact statements of the theorems of steinitz theory.
Now here is the question that I am more interested about
Question 2: If $n>1$ is just a positive integer (not necessarily prime), must we have $k\leq M$ ?
Thank you a lot.
Edit: $\mathbb{Z}_n$ means $\{0,1,...,n-1\}$ under addition and multiplication modulo $n$