Theorem 26.10 (the Cartier Equality) in Matsumura's Commutative Ring Theory I am trying to understand the proof of Theorem 26.10 in Matsumura's Commutative Ring Theory, and I cannot understand the last step.
To expand a bit, let $k\to A\to B$ be ring homomorphisms, then we have a natural map $\Omega_{A/k}\otimes_A B\to \Omega_{B/k}$ where $\Omega$ is the module of relative differentials. Let $\Gamma_{B/A/k}$ be the kernel of this map, the so-called imperfection module. The theorem then states:
Let $k$ be a perfect field, $K$ an extension of $k$, and $L$ a finitely generated extension field of $K$. Then
$$\mathrm{rk}_L\Omega_{L/K} = \mathrm{tr.deg}_KL + \mathrm{rk}_L\Gamma_{L/K/k}$$
where $\mathrm{rk}_L$ is the dimension of a vector space over $L$ and $\mathrm{tr.deg}_K$ is the transcendence degree of a field extension.
Following the proof we can reduce to the case where $L = K(\alpha)$ where char $K = p$, and $\alpha^p = a\in K$, but $\alpha\notin K$. He then says that writing $L = K[X]/(X^p-a)$ that we can see
\begin{align*}
\Omega_{L/k} & = (\Omega_{K[X]/k}\otimes L)/Lda\\\\
 & = (\Omega_{K/k}/Kda)\otimes L \oplus Ld\alpha
\end{align*}
and $d\alpha\neq 0$. Furthermore, since $k$ is a perfect field, we have $a\notin K^p = kK^p$, so that in $\Omega_{K/k}(= \Omega_{K/\Pi}$ where $\Pi$ is the prime subfield) we have $da\neq 0,\mathrm{rk}\Omega_{L/K} = 1$ and $\mathrm{rk}\Gamma_{L/K/k} = 1$, so that the equality holds.
I fail to follow anything starting from the calculation of $\Omega_{L/k}$, and have exhausted all of my ideas which did not lead to anything useful.
Edit: I think I have managed to prove the equalities stated involving the various $\Omega$ and shown that $\mathrm{rk}\Gamma_{L/K/k} = 1$. I thought I had managed to show that $\mathrm{rk}\Omega_{L/K} = 1$ but then realized my solution was incoherent. I believe that you would have to show that $(\Omega_{K/k}/Kda)\otimes L = 0$ as $Ld\alpha$ already contributes 1 to the rank, but I am unable to show this.
 A: It's been a while so I'm not sure if you've already figured it out, but it may nonetheless help someone else out in that case.
We want to show that $$
\operatorname{rk}_L \Omega_{L/K} = \operatorname{tr.deg}_K L + \operatorname{rk}_L \Gamma_{L/K/k},
$$
where $k$ is perfect, $K$ is an extension of $k$ with $\operatorname{char}(K) = p$ and $L = K(\alpha)$ with $\alpha^p = a \in K$ but $\alpha \notin K$.
It is clear that $\operatorname{tr. deg}_K L = 0$, so we have to show that $$
\operatorname{rk}_L \Omega_{L/K} = \operatorname{rk}_L \Gamma_{L/K/k}.
$$
Note that $L = K(\alpha)$, so $\Omega_{L/K} = L d\alpha$ hence has rank one. Thus we have to show $\operatorname{rk}_L \Gamma_{L/K/k} = 1$.
Writing $L = K[X]/(X^p -a)$, we consider the second fundamental exact sequence (*)
$$
\mathfrak m/\mathfrak m^2 \xrightarrow{\delta} \Omega_{K[X]/k} \otimes_{K[X]} L \xrightarrow{\gamma} \Omega_{L/k} \to 0,
$$
where $\mathfrak m = (X^p - a)$. Here, $\delta$ sends an element $f \bmod \mathfrak m^2$ to $d_{K[X]/k}(f) \otimes 1$ and $\gamma$ sends $d_{K[X]/k}(a) \otimes b$ to $bd_{L/k}(q(a))$, with $q : K[X] \to L$ the standard quotient map.
For the middle term, we have that any derivation of $D \in \operatorname{Der}_k(K, T)$ extends to a derivation in $\operatorname{Der}_k(K[X], T)$ (simply apply the derivation $D$ to the coefficients), so the exact sequence $$
0 \to \Omega_{K/k} \otimes_K K[X] \xrightarrow{p} \Omega_{K[X]/k} \to \Omega_{K[X]/K} \to 0$$ is split (note the map $p$, we need it later). This is theorem 25.1.2) in Matsumura, however he requires $K[X]$ to be $0$-smooth instead. I don't know if this is equivalent to being able to extend every derivation, however $0$-smooth implies the former and is the only thing needed for the proof to work.
As a consequence, we have that $$
\Omega_{K[X]/k} = (\Omega_{K/k} \otimes_K K[X]) \oplus \Omega_{K[X]/K} = (\Omega_{K/k} \otimes_K K[X]) \oplus K[X] dX.
$$
Thus, the middle term $\Omega_{K[X]/k} \otimes_{K[X]} L$ is equal to (**) $$
  \Omega_{K[X]/k} \otimes_{K[X]} L = (\Omega_{K/k} \otimes_K L) \oplus L d\alpha.
$$
We are now almost done. As stated in your post, we have $d_{K/k}(a) \neq 0$. So $d_{K[X]/k}(a) = p(d_{K/k} a \otimes 1)$ is nonzero.  Letting $f = X^p - a$, we have that $\delta(f) = d_{K[x]/k}(f) \otimes 1 = -(d_{K[X]/k}(a) \otimes 1)$ since $df = pX^{p-1}dX - da$ and $\operatorname{char} K = p$. In particular, this is nonzero.
So, since $\delta(f)$ is nonzero and lands in the first summand of $$\Omega_{K[X]/k} \otimes_{K[X]} L = (\Omega_{K/k} \otimes_K L) \oplus L d\alpha,$$ the kernel of $\Omega_{K/k} \otimes_K L \to \Omega_{L/k}$ is of rank one, i.e. $\operatorname{rk}_L \Gamma_{L/K/k} = 1$. This is what we wanted to show.
