type $1$, that is, $S$ is Gorenstein. Moreover, the colength $\ell_S(R/S)$ is equal to $\ell_R(\m/I)=1$.

Assume There is a canonical ideal $I$ such that $\ell_R(R/I)\le 2$. If $\ell_R(R/I)\le 1$, then $I=R$ or $\m$. In both of these cases, $R$ should be Gorenstein.

Thus we only need to consider the case $\ell_R(R/I)=2$. By previous lemma, the ring $S\coloneqq k+I$ is Gorenstein and the colength $\ell_S(R/S)$ is $1$. This shows $bg(R)le 1$. 0 Taking a $\m$-adic completion $\widehat{(-)}$, we still have an isomorphism $\widehat{\m}\cong \widehat{\m}^\dag$. In particular, $\widehat{\m}^\dag$ has a constant rank as an $\widehat{R}$-module. Since the isomorphisms $$(\widehat{\m}^\dag)_\mathfrak{p}\cong\Hom_{R_\mathfrak{p}}(\m_\mathfrak{p},\widehat{\omega}_\mathfrak{p})\cong \Hom_{R_\mathfrak{p}}(\widehat{R}_\mathfrak{p},\widehat{\omega}_\mathfrak{p})\cong \widehat{\omega}_\mathfrak{p}$$ holds for any non-maximal prime ideal $\mathfrak{p}$ of $\widehat{R}$, one can see that $\widehat{\omega}$ also has a constant rank. In other words, $\widehat{R}$ is generically Gorenstein. Then we can take a fractional ideal $R\subseteq K_R \subseteq \widetilde R$ such that $K_R$ is isomorphic to $\omega$ (see [@GMP Corollary 2.9]).

Now we identify the $R$-module $\m^\dag$ with the fractional ideal $K_R:\m$. Fix an isomorphism $\phi\colon K_R:\m\to \m$, which is a multiplication by an element $\phi=t/s\in \m:(K_R:\m)$, where $s\in R$ is an element and $t\in R$ is a non-zero divisor. We see that $$t/s\in\m:(K_R:\m)\subseteq \m:R=\m.$$ So we may assume $s=1$. It follows that 