Case one:
Let $(R,m)$ be a Noetherian local ring of Krull dimension $d$, $\dim(R)=d$.
Let $I$ be an ideal of $R$.
Assume that $\operatorname{depth}(I,R)=d$, namely, the maximal length of a regular sequence in $I$ is $d$.
Claim: $R$ is Cohen-Macaulay.
Proof of claim: We need to show that $\operatorname{depth}(m,R)=\dim(R)$.
Let $\{x_1,\ldots,x_d\} \subset I \subseteq m$, where $\{x_1,\ldots,x_d\}$ is a regular sequence (in $I$); then it is also a regular sequence in $m$. Therefore, $m$ contains a regular sequence of length $d$, so by definition, $\operatorname{depth}(m,R) \geq d$.
It is known that $\operatorname{depth}(m,R) \leq \dim(R)=d$, so we have $d \leq \operatorname{depth}(m,R) \leq \dim(R)=d$, which shows that $\operatorname{depth}(m,R) = \dim(R)$.
Question 1: Are my above claim and proof correct?
It seems to me a very easy result; my reason for asking it is to validate that I have not missed something, especially if I applied the definitions correctly.
Edit:
Case 2:
Let $(R,m)$ be a Noetherian local ring of finite Krull dimension $d$, $\dim(R)=d$.
Let $I$ be an ideal of $R$.
Claim: $\operatorname{depth}(I,R) \leq d$.
Proof of claim: It is easy to see directly from the definition of depth and the fact that $I \subseteq m$ that $\operatorname{depth}(I,R) \leq \operatorname{depth}(m,R)$.
It is known that $\operatorname{depth}(m,R) \leq \dim(R)=d$, so we have $\operatorname{depth}(I,R) \leq \operatorname{depth}(m,R) \leq \dim(R)=d$.
Question 2: Are my above claim and proof correct?
Thank you very much!