# Using Krull Dimension, show that the transcendence degree of an affine $K$-domain is the size of a maximal algebraically independent subset

This is an Exercise on Kemper, A Course in Commutative Algebra:

Exercise 5.6 (G. Kemper) If $$A$$ is an affine $$K$$-domain, then the transcendence degree of $$A$$ is the size of a maximal algebraically independent subset of $$A$$.

The transcendence degree of an algebra $$A$$ over a field $$K$$ is defined by: $$trdeg(A):=\sup \{|T|\ \mid T\subset A \text{ is finite and algebraically independent} \}$$

The solution Kemper wrote used Noether Normalization (in particular the transcendence basis), which is far after Chapter 5 in his book. I wonder if this question can be solved without using any of that since this is an exercise of Chapter 5. I tried using Krull Dimension, which was just introduced by Chapter 5, but got stuck by a gap:

Let $$a_1,\cdots,a_n$$ be a maximal algebraically independent subset of $$A$$, consider $$R=K[a_1,\cdots,a_n]$$. Clearly $$\dim A=trdeg(A)\geq trdeg(R)=n$$, so it remains only to show that $$n=\dim R\geq \dim A$$. It suffices to show that for any chain of prime ideals $$P_0\subsetneq P_1\subsetneq\cdots\subsetneq P_m$$ in $$A$$, $$R\cap P_i\in Spec(R)$$ form a chain $$R\cap P_0\subset\cdots \subset R\cap P_m$$ of length $$m$$. The only thing needs to prove is that $$R\cap P_i\neq R\cap P_{i+1}$$ for each $$i$$.

It seems that this is not impossible to be fulfilled if one uses the properties of $$A$$ and $$R$$ smartly. My attempt is as below:

Assume not, so $$R\cap P_i=R\cap P_{i+1}$$, then for any $$p\in P_{i+1}\setminus P_i$$ we have $$p\not\in R$$. Since $$R$$ is generated by a maximal algebraically independent subset of $$A$$, this means that there exists $$r_k\in R$$ such that $$\sum_{k=0}^N r_kp^k=0$$. Thus $$-r_0=p\left(\sum_{k=1}^N r_kp^{k-1}\right)\in R\cap P_{i+1}=R\cap P_i,$$ which implies that $$r_0\in P_i$$ and $$r_1+\sum_{k=2}^N r_k > p^{k-1}\in P_i\subset P_{i+1}$$. Since $$\sum_{k=2}^N r_k p^{k-1}\in P_{i+1}$$, we have $$r_1\in R\cap P_{i+1}=R\cap P_i$$, so $$r_1\in P_i$$, which implies that $$p\left(\sum_{k=2}^N r_kp^{k-2}\right)\in P_i$$, so $$r_2+\sum_{k=3}^N r_kp^{k-2}\in P_i\subset P_{i+1}$$. Repeat this argument and we see that $$r_0,\cdots,r_N\in P_i$$.

So we conclude that for any $$p\in P_{i+1}$$ there exists $$r_k\in R\cap P_i$$ such that $$\sum_{k=0}^N r_kp^k=0$$ (For $$p\in P_i\setminus R$$ a similar argument applies).

Notice that since at least one of the $$r_k$$'s must be non-zero, we know that if $$R\cap P_i=\{0\}$$ then there must be $$R\cap P_i\neq R\cap P_{i+1}$$. So far I haven't used the property that $$A$$ is an integral domain, and I cannot see a clue how to use it. If this property can be used to restrict the choice of the $$r_k$$'s, for example if one of the $$r_k$$'s is $$1$$, then a contradiction can be drawn. Or if this property can be used to draw a contradiction directly from the conclusion below? I'd be grateful if anyone could tell me the solution or give me some hints that would work.

Let $$R=\mathbb Z[X]$$ and $$A=\mathbb Z[X,Y]/(XY-2)$$. The ring extension $$R\subset A$$ is algebraic, but does not have the incomparable (INC) property. Let $$P=(2,X)/(XY-2)$$ and $$P'=(2,X,Y)/(XY-2)$$. We have $$P\cap R=P'\cap R=(2,X)R$$.
If one wants $$R$$ and $$A$$ to be finitely generated algebras over a field I suggest to consider $$R=K[X,Y]$$ and $$A=K[X,Y][\frac{X}{Y}]$$. (In fact, $$A\simeq K[X,Y,Z]/(YZ-X)$$.) The ring extension $$R\subset A$$ is algebraic, and does not have the incomparable property since $$P=(X,Y)A$$ and $$P'=(X,Y,X/Y)A$$ lie over the same prime ideal, that is, $$(X,Y)R$$.