hcju/stacksqa huggingface dataset:
Since the completion of $A$ and $A^h$ are the same, we may assume that $A$ is henselian (Lemma \ref{lemma-henselization-noetherian}). We will apply Lemma \ref{lemma-quotient-by-idempotent} to $A^\wedge \to A^\wedge/J$ where $J = \Ker(A^\wedge \to (A^\wedge)_{\mathfrak q})$. Since $\dim((A^\wedge)_\mathfrak q) = 0$ we see that $\mathfrak q^n \subset J$ for some $n$. Hence $J/J^2$ is annihilated by $\mathfrak q^n$. On the other hand $(J/J^2)_\mathfrak q = 0$ because $J_\mathfrak q = 0$. Hence $\mathfrak m$ is the only associated prime of $J/J^2$ and we find that a power of $\mathfrak m$ annihilates $J/J^2$. Thus the lemma applies and we find that $A^\wedge/J = C^\wedge$ for some finite type $A$-algebra $C$. \medskip\noindent Then $C/\mathfrak m C = A/\mathfrak m$ because $A^\wedge/J$ has the same property. Hence $\mathfrak m_C = \mathfrak m C$ is a maximal ideal and $A \to C$ is unramified at $\mathfrak m_C$ (Algebra, Lemma \ref{algebra-lemma-characterize-unramified}). After replacing $C$ by a principal localization we may assume that $C$ is a quotient of an \'etale $A$-algebra $B$, see Algebra, Proposition \ref{algebra-proposition-unramified-locally-standard}. However, since the residue field extension of $A \to C_{\mathfrak m_C}$ is trivial and $A$ is henselian, we conclude that $B = A$ again after a localization. Thus $C = A/I$ for some ideal $I \subset A$ and it follows that $J = IA^\wedge$ (because completion is exact in our situation by Algebra, Lemma \ref{algebra-lemma-completion-flat}) and $I = J \cap A$ (by flatness of $A \to A^\wedge$). Since $\mathfrak q^n \subset J \subset \mathfrak q$ we see that $\mathfrak p = \mathfrak q \cap A$ satisfies $\mathfrak p^n \subset I \subset \mathfrak p$. Then $\sqrt{\mathfrak p A^\wedge} = \mathfrak q$ and the proof is complete.
Since the completion of $A$ and $A^h$ are the same, we may assume that $A$ is henselian (Lemma \ref{lemma-henselization-noetherian}). \medskip\noindent Since $A \to A^\wedge$ is faithfully flat (see reference just given) the map from the punctured spectrum of $A^\wedge$ to the punctured spectrum of $A$ is surjective (see Algebra, Lemma \ref{algebra-lemma-ff-rings}). Hence if the punctured spectrum of $A$ is disconnected, then the same is true for $A^\wedge$. \medskip\noindent Assume the punctured spectrum of $A^\wedge$ is disconnected. This means that $$ \Spec(A^\wedge) \setminus \{\mathfrak m^\wedge\} = Z \amalg Z' $$ with $Z$ and $Z'$ closed. Let $\overline{Z}, \overline{Z}' \subset \Spec(A^\wedge)$ be the closures. Say $\overline{Z} = V(J)$, $\overline{Z}' = V(J')$ for some ideals $J, J' \subset A^\wedge$. Then $V(J + J') = \{\mathfrak m^\wedge\}$ and $V(JJ') = \Spec(A^\wedge)$. The first equality means that $\mathfrak m^\wedge = \sqrt{J + J'}$ which implies $(\mathfrak m^\wedge)^e \subset J + J'$ for some $e \geq 1$. The second equality implies every element of $JJ'$ is nilpotent hence $(JJ')^n = 0$ for some $n \geq 1$. Combined this means that $J^n/J^{2n}$ is annihilated by $J^n$ and $(J')^n$ and hence by $(\mathfrak m^\wedge)^{2en}$. Thus we may apply Lemma \ref{lemma-quotient-by-idempotent} to see that there is a finite type $A$-algebra $C$ and an isomorphism $A^\wedge/J^n = C^\wedge$. \medskip\noindent The rest of the proof is exactly the same as the second part of the proof of Lemma \ref{lemma-one-dimensional-formal-branch}; of course that lemma is a special case of this one! We have $C/\mathfrak m C = A/\mathfrak m$ because $A^\wedge/J^n$ has the same property. Hence $\mathfrak m_C = \mathfrak m C$ is a maximal ideal and $A \to C$ is unramified at $\mathfrak m_C$ (Algebra, Lemma \ref{algebra-lemma-characterize-unramified}). After replacing $C$ by a principal localization we may assume that $C$ is a quotient of an \'etale $A$-algebra $B$, see Algebra, Proposition \ref{algebra-proposition-unramified-locally-standard}. However, since the residue field extension of $A \to C_{\mathfrak m_C}$ is trivial and $A$ is henselian, we conclude that $B = A$ again after a localization. Thus $C = A/I$ for some ideal $I \subset A$ and it follows that $J^n = IA^\wedge$ (because completion is exact in our situation by Algebra, Lemma \ref{algebra-lemma-completion-flat}) and $I = J^n \cap A$ (by flatness of $A \to A^\wedge$). By symmetry $I' = (J')^n \cap A$ satisfies $(J')^n = I'A^\wedge$. Then $\mathfrak m^e \subset I + I'$ and $II' = 0$ and we conclude that $V(I)$ and $V(I')$ are closed subschemes which give the desired disjoint union decomposition of the punctured spectrum of $A$.
To see this for the number of branches, combine Lemmas \ref{lemma-nr-branches-completion}, \ref{lemma-equal-nr-branches-completion}, and \ref{lemma-one-dimensional-formal-branch} and use that the dimension of $A^\wedge$ is one, see Lemma \ref{lemma-completion-dimension}. To see this is true for the number of geometric branches we use the result for branches, the fact that the dimension does not change under strict henselization (Lemma \ref{lemma-henselization-dimension}), and the fact that $(A^{sh})^\wedge = ((A^\wedge)^{sh})^\wedge$ by Lemma \ref{lemma-henselization-noetherian}.
Since a normal ring is reduced, we see that $A$ is Nagata by Lemma \ref{lemma-Nagata-local-ring}. In the rest of the proof we will use Lemma \ref{lemma-formal-fibres-normal}, Proposition \ref{proposition-finite-type-over-P-ring}, and Lemma \ref{lemma-check-P-ring-maximal-ideals}. This tells us that $A$ is a P-ring where $P(k \to R) = $``$R$ is geometrically normal over $k$'' and the same is true for any (essentially of) finite type $A$-algebra. \medskip\noindent Let $\mathfrak q \subset A$ be a minimal prime. Then $A^\wedge/\mathfrak q A^\wedge = (A/\mathfrak q)^\wedge$ and $A^h/\mathfrak qA^h = (A/\mathfrak q)^h$ (Algebra, Lemma \ref{algebra-lemma-quotient-henselization}). Hence the number of branches of $A$ is the sum of the number of branches of the rings $A/\mathfrak q$ and similarly for $A^\wedge$. In this way we reduce to the case that $A$ is a domain. \medskip\noindent Assume $A$ is a domain. Let $A'$ be the integral closure of $A$ in the fraction field $K$ of $A$. Since $A$ is Nagata, we see that $A \to A'$ is finite. Recall that the number of branches of $A$ is the number of maximal ideals $\mathfrak m'$ of $A'$ (Lemma \ref{lemma-branches}). Also, recall that $$ (A')^\wedge = A' \otimes_A A^\wedge = \prod\nolimits_{\mathfrak m' \subset A'} (A'_{\mathfrak m'})^\wedge $$ by Algebra, Lemma \ref{algebra-lemma-completion-finite-extension}. Because $A'_{\mathfrak m'}$ is a local ring whose formal fibres are geometrically normal, we see that $(A'_{\mathfrak m'})^\wedge$ is normal (Lemma \ref{lemma-completion-normal-local-ring}). Hence the minimal primes of $A' \otimes_A A^\wedge$ are in $1$-to-$1$ correspondence with the factors in the decomposition above. By flatness of $A \to A^\wedge$ we have $$ A^\wedge \subset A' \otimes_A A^\wedge \subset K \otimes_A A^\wedge $$ Since the left and the right ring have the same set of minimal primes, the same is true for the ring in the middle (small detail omitted) and this finishes the proof. \medskip\noindent To see this is true for the number of geometric branches we use the result for branches, the fact that the formal fibres of $A^{sh}$ are geometrically normal (Lemmas \ref{lemma-formal-fibres-normal} and \ref{lemma-henselization-P-ring}) and the fact that $(A^{sh})^\wedge = ((A^\wedge)^{sh})^\wedge$ by Lemma \ref{lemma-henselization-noetherian}.
By assumption there exists a minimal prime $\mathfrak p \subset A$ such that the spectrum of $A^\wedge /\mathfrak p A^\wedge$ is not equidimensional. After replacing $A$ by $A/\mathfrak p$ we may assume that $A$ is a domain and that the spectrum of $A^\wedge$ is not equidimensional. Let $\mathfrak q$ be a minimal prime of $A^\wedge$ such that $d = \dim(A^\wedge/\mathfrak q)$ is minimal and hence $0 < d < \dim(A)$. We prove the lemma by induction on $d$. \medskip\noindent The case $d = 1$. In this case $\dim(A^\wedge_\mathfrak q) = 0$. Hence $A^\wedge_\mathfrak q$ is Artinian local and we see that for some $n > 0$ the ideal $J = \mathfrak q^n$ maps to zero in $A^\wedge_\mathfrak q$. It follows that $\mathfrak m$ is the only associated prime of $J/J^2$, whence $\mathfrak m^m$ annihilates $J/J^2$ for some $m > 0$. Thus we can use Lemma \ref{lemma-quotient-by-idempotent} to find $A \to B$ of finite type such that $B^\wedge \cong A^\wedge/J$. It follows that $\mathfrak m_B = \sqrt{\mathfrak mB}$ is a maximal ideal with the same residue field as $\mathfrak m$ and $B^\wedge$ is the $\mathfrak m_B$-adic completion (Algebra, Lemma \ref{algebra-lemma-finite-after-completion}). Then $$ \dim(B_{\mathfrak m_B}) = \dim(B^\wedge) = 1 = d. $$ Since we have the factorization $A \to B \to A^\wedge/J$ the inverse image of $\mathfrak q/J$ is a prime $\mathfrak q' \subset \mathfrak m_B$ lying over $(0)$ in $A$. Thus, if $A$ were universally catenary, the dimension formula (Algebra, Lemma \ref{algebra-lemma-dimension-formula}) would give \begin{align*} \dim(B_{\mathfrak m_B}) & \geq \dim((B/\mathfrak q')_{\mathfrak m_B}) \\ & = \dim(A) + \text{trdeg}_A(B/\mathfrak q') - \text{trdeg}_{\kappa(\mathfrak m)}(\kappa(\mathfrak m_B)) \\ & = \dim(A) + \text{trdeg}_A(B/\mathfrak q') \end{align*} This contradiction finishes the argument in case $d = 1$. \medskip\noindent Assume $d > 1$. Let $Z \subset \Spec(A^\wedge)$ be the union of the irreducible components distinct from $V(\mathfrak q)$. Let $\mathfrak r_1, \ldots, \mathfrak r_m \subset A^\wedge$ be the prime ideals corresponding to irreducible components of $V(\mathfrak q) \cap Z$ of dimension $> 0$. Choose $f \in \mathfrak m$, $f \not \in A \cap \mathfrak r_j$ using prime avoidance (Algebra, Lemma \ref{algebra-lemma-silly}). Then $\dim(A/fA) = \dim(A) - 1$ and there is some irreducible component of $V(\mathfrak q, f)$ of dimension $d - 1$. Thus $A/fA$ is not formally catenary and the invariant $d$ has decreased. By induction $A/fA$ is not universally catenary, hence $A$ is not universally catenary.
Let $\mathfrak p \subset A$ be a prime ideal. Let $\mathfrak q \subset B$ be a prime minimal over $\mathfrak pB$. Then $\mathfrak q \cap A = \mathfrak p$ by going down for $A \to B$ (Algebra, Lemma \ref{algebra-lemma-flat-going-down}). Hence $A_\mathfrak p \to B_\mathfrak q$ is a flat local ring map with special fibre of dimension $0$ and hence $$ \dim(A_\mathfrak p) = \dim(B_\mathfrak q) = \dim(B) - \dim(B/\mathfrak q) $$ (Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total}). The second equality because $\Spec(B)$ is equidimensional and $B$ is catenary. Thus $\dim(B/\mathfrak q)$ is independent of the choice of $\mathfrak q$ and we conclude that $\Spec(B/\mathfrak p B)$ is equidimensional of dimension $\dim(B) - \dim(A_\mathfrak p)$. On the other hand, we have $\dim(B/\mathfrak p B) = \dim(A/\mathfrak p) + \dim(B/\mathfrak m_A B)$ and $\dim(B) = \dim(A) + \dim(B/\mathfrak m_A B)$ by flatness (see lemma cited above) and we get $$ \dim(A_\mathfrak p) = \dim(A) - \dim(A/\mathfrak p) $$ for all $\mathfrak p$ in $A$. Applying this to all minimal primes in $A$ we see that $A$ is equidimensional. If $\mathfrak p \subset \mathfrak p'$ is a strict inclusion with no primes in between, then we may apply the above to the prime $\mathfrak p'/\mathfrak p$ in $A/\mathfrak p$ because $A/\mathfrak p \to B/\mathfrak p B$ is flat and $\Spec(B/\mathfrak p B)$ is equidimensional, to get $$ 1 = \dim((A/\mathfrak p)_{\mathfrak p'}) = \dim(A/\mathfrak p) - \dim(A/\mathfrak p') $$ Thus $\mathfrak p \mapsto \dim(A/\mathfrak p)$ is a dimension function and we conclude that $A$ is catenary.
We may replace $A$ by $A/\mathfrak p$ where $\mathfrak p$ is a minimal prime of $A$, see Algebra, Lemma \ref{algebra-lemma-catenary-check-irreducible}. Thus we may assume that the spectrum of $A^\wedge$ is equidimensional. It suffices to show that every local ring essentially of finite type over $A$ is catenary (see for example Algebra, Lemma \ref{algebra-lemma-catenary-check-local}). Hence it suffices to show that $A[x_1, \ldots, x_n]_\mathfrak m$ is catenary where $\mathfrak m \subset A[x_1, \ldots, x_n]$ is a maximal ideal lying over $\mathfrak m_A$, see Algebra, Lemma \ref{algebra-lemma-localization-at-closed-point-special-fibre} (and Algebra, Lemmas \ref{algebra-lemma-quotient-catenary} and \ref{algebra-lemma-localization-catenary}). Let $\mathfrak m' \subset A^\wedge[x_1, \ldots, x_n]$ be the unique maximal ideal lying over $\mathfrak m$. Then $$ A[x_1, \ldots, x_n]_\mathfrak m \to A^\wedge[x_1, \ldots, x_n]_{\mathfrak m'} $$ is local and flat (Algebra, Lemma \ref{algebra-lemma-completion-flat}). Hence it suffices to show that the ring on the right hand side catenary with equidimensional spectrum, see Lemma \ref{lemma-flat-under-catenary-equidimensional}. It is catenary because complete local rings are universally catenary (Algebra, Remark \ref{algebra-remark-Noetherian-complete-local-ring-universally-catenary}). Pick any minimal prime $\mathfrak q$ of $A^\wedge[x_1, \ldots, x_n]_{\mathfrak m'}$. Then $\mathfrak q = \mathfrak p A^\wedge[x_1, \ldots, x_n]_{\mathfrak m'}$ for some minimal prime $\mathfrak p$ of $A^\wedge$ (small detail omitted). Hence $$ \dim(A^\wedge[x_1, \ldots, x_n]_{\mathfrak m'}/\mathfrak q) = \dim(A^\wedge/\mathfrak p) + n = \dim(A^\wedge) + n $$ the first equality by Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total} and the second because the spectrum of $A^\wedge$ is equidimensional. This finishes the proof.
By Lemma \ref{lemma-geometrically-normal-formal-fibres-number-of-branches} the number of branches of $A$ and $A^\wedge$ are the same, hence Lemma \ref{lemma-equal-nr-branches-completion} applies. Then for any minimal prime $\mathfrak q \subset A^h$ we see that $A^\wedge/\mathfrak q A^\wedge$ has a unique minimal prime. Thus $A^h$ is formally catenary (by definition) and hence universally catenary by Proposition \ref{proposition-ratliff}. If $A$ is unibranch, then $A^h$ has a unique minimal prime, hence $A^\wedge$ has a unique minimal prime, hence $A$ is formally catenary and we conclude in the same way.
Write $A$ as the quotient of a polynomial algebra $P$ over $R^G$. Then $(P \otimes_{R^G} R)^G = P$ because $P$ is free as an $R^G$-module. Hence part (1) follows from Lemma \ref{lemma-pol-lifting}. \medskip\noindent Let $J = \Ker(P \to A)$. Lift $a$ as in (2) to an element $f \in P$. Then $f \otimes 1$ maps to zero in $A \otimes_{R^G} R$. Hence $f \otimes 1$ is in $(J')^G$ where $J' \subset P \otimes_{R^G} R$ is the image of the map $J \otimes_{R^G} R \to P \otimes_{R^G} R$. Apply Lemma \ref{lemma-pol-lifting} to $f \otimes 1$ and the surjective ring map $$ \text{Sym}^*_{R^G}(J) \otimes_{R^G} R \longrightarrow A' \subset \text{Sym}^*_{R^G}(P) \otimes_{R^G} R $$ which defines $A'$. We obtain $P \in (\text{Sym}^*_{R^G}(J) \otimes_{R^G} R)^G[T]$ mapping to $(T - f \otimes 1)^n$ in $A'[T]$. Apply part (1) to see that there exists a $P' \in \text{Sym}^*_{R^G}(J)[T, T']$ whose image is $(T' - P)^n$. Since $\text{Sym}_{R^G}^*(P)$ is still free over $R^G$ we conclude that $P'$ maps to $(T' - (T - f)^n)^n$ in $\text{Sym}_{R^G}^*(P)$. On the other hand, tracing through the construction of the polynomials $P$ and $P'$ in Lemma \ref{lemma-pol-lifting} we see that $P'$ is congruent to $(T' - T^n)^n$ modulo the irrelevant ideal of the graded ring $\text{Sym}^*_{R^G}(J)$. It follows that $$ (T' - (T - a)^n)^n = (T' - T^n)^n $$ in $A[T', T]$. Setting $T' = 0$ for example we obtain the statement of the lemma.
The first statement follows from Lemma \ref{lemma-functor-invariants-tensor} and Algebra, Lemma \ref{algebra-lemma-universally-bijective}. To see the second consider the exact sequence $0 \to R^G \to R \to \bigoplus_{\sigma \in G} R$ where the second map sends $x$ to $(\sigma(x) - x)$. Tensoring with $A$ the sequence remains exact if $R^G \to A$ is flat.
The extension $R^G \subset R$ is integral because every $x \in R$ is a root of the monic polynomial $\prod_{\sigma \in G}(T - \sigma(x))$ in $R^G[T]$. Thus there are no inclusion relations among the primes lying over a given prime $\mathfrak p$ (Algebra, Lemma \ref{algebra-lemma-integral-no-inclusion}). If the lemma is wrong, then we can choose $x \in \mathfrak q'$, $x \not \in \sigma(\mathfrak q)$ for all $\sigma \in G$. See Algebra, Lemma \ref{algebra-lemma-silly}. Then $y = \prod_{\sigma \in G} \sigma(x)$ is in $R^G$ and in $\mathfrak p = R^G \cap \mathfrak q'$. On the other hand, $x \not \in \sigma(\mathfrak q)$ for all $\sigma$ means $\sigma(x) \not \in \mathfrak q$ for all $\sigma$. Hence $y \not \in \mathfrak q$ as $\mathfrak q$ is a prime ideal. This is impossible as $y \in \mathfrak p \subset \mathfrak q$.
With $A = (R^G)_\mathfrak p$ and $B = A \otimes_{R^G} R$ we see that $A = B^G$ as localization is flat, see Lemma \ref{lemma-base-change-invariants}. Observe that $\mathfrak pA$ and $\mathfrak qB$ are prime ideals, $D$ is the stabilizer of $\mathfrak qB$, and $\kappa(\mathfrak p) = \kappa(\mathfrak pA)$ and $\kappa(\mathfrak q) = \kappa(\mathfrak qB)$. Thus we may replace $R$ by $B$ and assume that $\mathfrak p$ is a maximal ideal. Since $R \subset R^G$ is an integral ring extension, we find that the maximal ideals of $R$ are exactly the primes lying over $\mathfrak p$ (follows from Algebra, Lemmas \ref{algebra-lemma-integral-no-inclusion} and \ref{algebra-lemma-integral-going-up}). By Lemma \ref{lemma-one-orbit} there are finitely many of them $\mathfrak q = \mathfrak q_1, \mathfrak q_2, \ldots, \mathfrak q_m$ and they form a single orbit for $G$. By the Chinese remainder theorem (Algebra, Lemma \ref{algebra-lemma-chinese-remainder}) the map $R \to \prod_{j = 1, \ldots, m} R/\sigma(\mathfrak q_j)$ is surjective. \medskip\noindent First we prove that the extension is normal. Pick an element $\alpha \in \kappa(\mathfrak q)$. We have to show that the minimal polynomial $P$ of $\alpha$ over $\kappa(\mathfrak p)$ splits completely. By the above we can choose $a \in \mathfrak q_2 \cap \ldots \cap \mathfrak q_m$ mapping to $\alpha$ in $\kappa(\mathfrak q)$. Consider the polynomial $Q = \prod_{\sigma \in G} (T - \sigma(a))$ in $R^G[T]$. The image of $Q$ in $R[T]$ splits completely into linear factors, hence the same is true for its image in $\kappa(\mathfrak q)[T]$. Since $P$ divides the image of $Q$ in $\kappa(\mathfrak p)[T]$ we conclude that $P$ splits completely into linear factors over $\kappa(\mathfrak q)$ as desired. \medskip\noindent Since $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is normal we may assume $\kappa(\mathfrak q) = \kappa_1 \otimes_{\kappa(\mathfrak p)} \kappa_2$ with $\kappa_1/\kappa(\mathfrak p)$ purely inseparable and $\kappa_2/\kappa(\mathfrak p)$ Galois, see Fields, Lemma \ref{fields-lemma-normal-case}. $\alpha \in \kappa_2$ which generates $\kappa_2$ over $\kappa(\mathfrak p)$ if it is finite and a subfield of degree $> |G|$ if it is infinite (to get a contradiction). This is possible by Fields, Lemma \ref{fields-lemma-primitive-element}. Pick $a$, $P$, and $Q$ as in the previous paragraph. If $\alpha' \in \kappa_2$ is a Galois conjugate of $\alpha$, then the above shows there exists a $\sigma \in G$ such that $\sigma(a)$ maps to $\alpha'$. By our choice of $a$ (vanishing at other maximal ideals) this implies $\sigma \in D$ and that the image of $\sigma$ in $\text{Aut}(\kappa(\mathfrak q)/\kappa(\mathfrak p))$ maps $\alpha$ to $\alpha'$. Hence the surjectivity or the desired absurdity in case $\alpha$ has degree $> |G|$ over $\kappa(\mathfrak p)$.
Let $\sigma \in D_\mathfrak q$. Pick $\tau \in H$ mapping to $\sigma$. This is possible by Fields, Lemma \ref{fields-lemma-galois-infinite}. Then $\tau(\mathfrak r)$ and $\mathfrak r$ both lie over $\mathfrak q$. Hence by Lemma \ref{lemma-one-orbit-geometric-galois} there exists a $\sigma' \in \text{Gal}(M/L)$ with $\sigma'(\tau(\mathfrak r)) = \mathfrak r$. Hence $\sigma'\tau \in D_\mathfrak r$ maps to $\sigma$. The case of inertia groups is proved in exactly the same way using surjectivity onto automorphism groups.
We will use the results of the discussion in Remark \ref{remark-finite-separable-extension} without further mention. \medskip\noindent Proof of (1). Let $C/B/A$ be the integral closures of $A$ in $M/L/K$. Since $C$ is a finite ring extension of $B$, we see that $\Spec(C) \to \Spec(B)$ is surjective. Hence for ever maximal ideal $\mathfrak m \subset B$ there is a maximal ideal $\mathfrak m' \subset C$ lying over $\mathfrak m$. By the multiplicativity of ramification indices (Lemma \ref{lemma-multiplicative-e-f}) and the assumption, we conclude that the ramification index of $B_\mathfrak m$ over $A$ is $1$. Since $\kappa(\mathfrak m')/\kappa_A$ is finite separable, the same is true for $\kappa(\mathfrak m)/\kappa_A$. \medskip\noindent Proof of (2). Let $M$ be the normal closure of $L$ over $K$, see Fields, Definition \ref{fields-definition-normal-closure}. Then $M/K$ is Galois by Fields, Lemma \ref{fields-lemma-normal-closure-galois}. On the other hand, there is a surjection $$ L \otimes_K \ldots \otimes_K L \longrightarrow M $$ of $K$-algebras, see Fields, Lemma \ref{fields-lemma-normal-closure-tensor-product}. Let $B$ be the integral closure of $A$ in $L$ as in Remark \ref{remark-finite-separable-extension}. The condition that $L$ is unramified with respect to $A$ exactly means that $A \to B$ is an \'etale ring map, see Algebra, Lemma \ref{algebra-lemma-characterize-etale}. By permanence properties of \'etale ring maps we see that $$ B \otimes_A \ldots \otimes_A B $$ is \'etale over $A$, see Algebra, Lemma \ref{algebra-lemma-etale}. Hence the displayed ring is a product of Dedekind domains, see Lemma \ref{lemma-Dedekind-etale-extension}. We conclude that $M$ is the fraction field of a Dedekind domain finite \'etale over $A$. This means that $M$ is unramified with respect to $A$ as desired. \medskip\noindent Proof of (3). Let $B_i \subset L_i$ be the integral closure of $A$. Argue in the same manner as above to show that $B_1 \otimes_A B_2$ is finite \'etale over $A$. Details omitted.
Let $C$ be the integral closure of $A$ in $M$. Every maximal ideal $\mathfrak m'$ of $C$ lies over a maximal ideal $\mathfrak m$ of $B$. Then the lemma follows from the multiplicativity of ramification indices (Lemma \ref{lemma-multiplicative-e-f}) and the fact that we have the tower $\kappa(\mathfrak m')/\kappa(\mathfrak m)/\kappa_A$ of finite extensions of fields.
Observe that $A = B^G$ as $A$ is integrally closed in $K$ and $K = L^G$. Thus parts (1) and (2) follow from Lemma \ref{lemma-one-orbit-geometric}. The ``equivalently all'' part of the lemma follows from Lemma \ref{lemma-galois}. Assume $\kappa(\mathfrak m)/\kappa$ is separable. Then parts (3) and (4) follow immediately from (1) and (2).
The formula makes sense as $I$ is a normal subgroup of $D$ and as $\tau$ acts on $\kappa(\mathfrak m)$ via the map $D \to \text{Aut}(\kappa(\mathfrak m))$ discussed in Lemma \ref{lemma-galois-galois} for example. Recall the construction of $\theta$. Choose a uniformizer $\pi$ of $B_\mathfrak m$ and for $\sigma \in I$ write $\sigma(\pi) = \theta_\sigma \pi$. Then $\theta(\sigma)$ is the image $\overline{\theta}_\sigma$ of $\theta_\sigma$ in the residue field. For any $\tau \in D$ we can write $\tau(\pi) = \theta_\tau \pi$ for some unit $\theta_\tau$. Then $\theta_{\tau^{-1}} = \tau^{-1}(\theta_\tau^{-1})$. We compute \begin{align*} \theta_{\tau \sigma \tau^{-1}} & = \tau(\sigma(\tau^{-1}(\pi)))/\pi \\ & = \tau(\sigma(\tau^{-1}(\theta_\tau^{-1}) \pi))/\pi \\ & = \tau(\sigma(\tau^{-1}(\theta_\tau^{-1})) \theta_\sigma \pi)/\pi \\ & = \tau(\sigma(\tau^{-1}(\theta_\tau^{-1}))) \tau(\theta_\sigma) \theta_\tau \end{align*} However, since $\sigma$ acts trivially modulo $\pi$ we see that the product $\tau(\sigma(\tau^{-1}(\theta_\tau^{-1}))) \theta_\tau$ maps to $1$ in the residue field. This proves the lemma.