Dear GAP-Forum,
Laurent Bartholdi asked:
hi,
does gap have a command determining whether h < g is characteristic (i.e.
not just normal, but preserved by all automorphisms of g)? a search
through the help didn't reveal anything.
There is yet no specific function for testing. However in GAP4 you
could use the appended function. (Unfortunately, if the automorphism group
gets bigger, it might be rather expensive -- alas I don't know any better
solution.)
I hope this helps,
Alexander
IsCharacteristic:=function(G,H)
local n,a;
  if not IsNormal(G,H) then
     return false;
  fi;
  # computing the automorphism group is quite expensive. We therefore test
  # first whether there are image candidates
  if not IsAbelian(G) then #(otherwise there might be too many normal sgrps)
    n:=NormalSubgroups(G);
    n:=Filtered(n,i->Size(i)=Size(H)); # probably do further tests here
    if Length(n)=1 then
      return true; # there is no potential image - we are characteristic
    fi;
  fi;
  a:=AutomorphismGroup(G);
  if ForAny(GeneratorsOfGroup(a),i->Image(i,H)<>H) then
    return false;
  else
    return true;
  fi;
end;