Non-Gorenstein loci of Ehrhart rings of chain and order polytopes
Let $P$ be a finite poset, $K$ a field, and $O(P)$ (resp. $C(P)$) the order (resp. chain) polytope of $P$. We study the non-Gorenstein locus of $E_K[O(P)]$ (resp. $E_K[C(P)]$), the Ehrhart ring of $O(P)$ (resp. $C(P)$) over $K$, which are each normal toric rings associated $P$. In particular, we show that the dimension of non-Gorenstein loci of $E_K[O(P)]$ and $E_K[C(P)]$ are the same. Further, we show that $E_K[C(P)]$ is nearly Gorenstein if and only if $P$ is the disjoint union of pure posets $P_1, \ldots, P_s$ with $|\mathrm{rank} P_i-\mathrm{rank} P_j|\leq 1$ for any $i$ and $j$.