(self)
return self._is_trivial
Test if the group is the trivial group.

        This is true if the group contains only the identity permutation.

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> G = PermutationGroup([Permutation([0, 1, 2])])
        >>> G.is_trivial
        True
Test if the group is the trivial group.
Test if the group is the trivial group .
def is_trivial(self):
        """Test if the group is the trivial group.

        This is true if the group contains only the identity permutation.

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> G = PermutationGroup([Permutation([0, 1, 2])])
        >>> G.is_trivial
        True

        """
        if self._is_trivial is None:
            self._is_trivial = len(self) == 1 and self[0].is_Identity
        return self._is_trivial
def is_trivial ( self ) : if self . _is_trivial is None : self . _is_trivial = len ( self ) == 1 and self [ 0 ] . is_Identity return self . _is_trivial