(self, strict=True)
return got_orb
Test if the group is transitive.

        A group is transitive if it has a single orbit.

        If ``strict`` is False the group is transitive if it has
        a single orbit of length different from 1.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1, 3])
        >>> b = Permutation([2, 0, 1, 3])
        >>> G1 = PermutationGroup([a, b])
        >>> G1.is_transitive()
        False
        >>> G1.is_transitive(strict=False)
        True
        >>> c = Permutation([2, 3, 0, 1])
        >>> G2 = PermutationGroup([a, c])
        >>> G2.is_transitive()
        True
        >>> d = Permutation([1,0,2,3])
        >>> e = Permutation([0,1,3,2])
        >>> G3 = PermutationGroup([d, e])
        >>> G3.is_transitive() or G3.is_transitive(strict=False)
        False
Test if the group is transitive.
Test if the group is transitive .
def is_transitive(self, strict=True):
        """Test if the group is transitive.

        A group is transitive if it has a single orbit.

        If ``strict`` is False the group is transitive if it has
        a single orbit of length different from 1.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1, 3])
        >>> b = Permutation([2, 0, 1, 3])
        >>> G1 = PermutationGroup([a, b])
        >>> G1.is_transitive()
        False
        >>> G1.is_transitive(strict=False)
        True
        >>> c = Permutation([2, 3, 0, 1])
        >>> G2 = PermutationGroup([a, c])
        >>> G2.is_transitive()
        True
        >>> d = Permutation([1,0,2,3])
        >>> e = Permutation([0,1,3,2])
        >>> G3 = PermutationGroup([d, e])
        >>> G3.is_transitive() or G3.is_transitive(strict=False)
        False
        """
        if self._is_transitive:  # strict or not, if True then True
            return self._is_transitive
        if strict:
            if self._is_transitive is not None:  # we only store strict=True
                return self._is_transitive

            ans = len(self.orbit(0)) == self.degree
            self._is_transitive = ans
            return ans

        got_orb = False
        for x in self.orbits():
            if len(x) > 1:
                if got_orb:
                    return False
                got_orb = True
        return got_orb
def is_transitive ( self , strict = True ) : if self . _is_transitive : # strict or not, if True then True return self . _is_transitive if strict : if self . _is_transitive is not None : # we only store strict=True return self . _is_transitive ans = len ( self . orbit ( 0 ) ) == self . degree self . _is_transitive = ans return ans got_orb = False for x in self . orbits ( ) : if len ( x ) > 1 : if got_orb : return False got_orb = True return got_orb