Several approaches generalizing the concept of symmetry Let S be a numerical semigroup and let R be its semigroup ring K[\![S]\!]. We say that S has the generalized Gorenstein property if its semigroup ring has this property. For the definition and characterization of generalized Gorenstein rings please see .

A numerical semigroup is said to be nearly Gorenstein if its maximal ideal is contained in its trace ideal . Every almost symmetric numerical semigroup is nearly Gorenstein.

A numerical semigroup S with canonical ideal K is a generalized almost symmetric numerical semigroup if either 2K=K (symmetric) or 2K\setminus K=\{\textrm{F}(S)-x_1,\dots, \textrm{F}(S)-x_r,\textrm{F}(S)\} for some x_1,\dots,x_r \in M\setminus 2M (minimal generators) and x_i-x_j\not\in (S-M)\setminus S (not pseudo-Frobenius numbers), see . As expected, every almost symmetric numerical semigroup is a generalized almost symmetric numerical semigroup. s is a numerical semigroup. The output is true if the semigroup ring K[\![S]\!] is generalized Gorenstein using the characterization by Goto-Kumashiro .
gap> s:=NumericalSemigroup(3,7,8);; gap> IsAlmostSymmetric(s); false gap> IsGeneralizedGorenstein(s); true
s is a numerical semigroup. The output is true if the semigroup is nearly Gorenstein, and false otherwise.
gap> s:=NumericalSemigroup(10,11,12,25);; gap> IsAlmostSymmetric(s); false gap> IsNearlyGorenstein(s); true gap> s:=NumericalSemigroup(3,7,8);; gap> IsNearlyGorenstein(s); false
s is a numerical semigroup. The output is a lists of lists (making the cartesian product of them yields all possible NG-vectors). If n_i is the ith generator of s, in the ith position of the list it returns all pseudo-Frobenius numbers f of s such that n_i+f-f' is in s for all f a pseudo-Frobenius number of s, .
gap> s:=NumericalSemigroup(10,11,12,25);; gap> IsAlmostSymmetric(s); false gap> IsNearlyGorenstein(s); true gap> s:=NumericalSemigroup(3,7,8);; gap> IsNearlyGorenstein(s); false
s is a numerical semigroup. Determines whether or not s is a generalized almost symmetric numerical semigroup.
gap> s:=NumericalSemigroup(9, 24, 39, 43, 77);; gap> IsGeneralizedAlmostSymmetric(s); true gap> IsAlmostSymmetric(s); false