(self, other)
return _af_commutes_with(a, b)
Checks if the elements are commuting.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> a = Permutation([1,4,3,0,2,5])
        >>> b = Permutation([0,1,2,3,4,5])
        >>> a.commutes_with(b)
        True
        >>> b = Permutation([2,3,5,4,1,0])
        >>> a.commutes_with(b)
        False
Checks if the elements are commuting.
Checks if the elements are commuting .
def commutes_with(self, other):
        """
        Checks if the elements are commuting.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> a = Permutation([1,4,3,0,2,5])
        >>> b = Permutation([0,1,2,3,4,5])
        >>> a.commutes_with(b)
        True
        >>> b = Permutation([2,3,5,4,1,0])
        >>> a.commutes_with(b)
        False
        """
        a = self.array_form
        b = other.array_form
        return _af_commutes_with(a, b)
def commutes_with ( self , other ) : a = self . array_form b = other . array_form return _af_commutes_with ( a , b )