'Return ``True`` if PermutationGroup generated by elements in the
group are same i.e they represent the same PermutationGroup.
Examples
>>> from sympy.combinatorics import Permutation
>>> from sympy.combinatorics.perm_groups import PermutationGroup
>>> p = Permutation(0, 1, 2, 3, 4, 5)
>>> G = PermutationGroup([p, p**2])
>>> H = PermutationGroup([p**2, p])
>>> G.generators == H.generators
False
>>> G == H
True'

def __eq__(self, other):

    if (not isinstance(other, PermutationGroup)):
        return False
    set_self_gens = set(self.generators)
    set_other_gens = set(other.generators)
    if (set_self_gens == set_other_gens):
        return True
    for gen1 in set_self_gens:
        if (not other.contains(gen1)):
            return False
    for gen2 in set_other_gens:
        if (not self.contains(gen2)):
            return False
    return True
