'Test if ``G=self`` is a normal subgroup of ``gr``.
G is normal in gr if
for each g2 in G, g1 in gr, ``g = g1*g2*g1**-1`` belongs to G
It is sufficient to check this for each g1 in gr.generators and
g2 in G.generators.
Examples
>>> from sympy.combinatorics import Permutation
>>> Permutation.print_cyclic = True
>>> from sympy.combinatorics.perm_groups import PermutationGroup
>>> a = Permutation([1, 2, 0])
>>> b = Permutation([1, 0, 2])
>>> G = PermutationGroup([a, b])
>>> G1 = PermutationGroup([a, Permutation([2, 0, 1])])
>>> G1.is_normal(G)
True'

def is_normal(self, gr, strict=True):

    d_self = self.degree
    d_gr = gr.degree
    new_self = self.copy()
    if ((not strict) and (d_self != d_gr)):
        if (d_self < d_gr):
            new_self = PermGroup((new_self.generators + [Permutation((d_gr - 1))]))
        else:
            gr = PermGroup((gr.generators + [Permutation((d_self - 1))]))
    gens2 = [p._array_form for p in new_self.generators]
    gens1 = [p._array_form for p in gr.generators]
    for g1 in gens1:
        for g2 in gens2:
            p = _af_rmuln(g1, g2, _af_invert(g1))
            if (not new_self.coset_factor(p, True)):
                return False
    return True
