1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
#############################################################################
##
#W Normal.gi FGA package Christian Sievers
##
## Method installations for normalizers in free groups
##
#Y 2003 - 2012
##
#############################################################################
##
#M NormalizerInWholeGroup( <group> )
##
## returns the normalizer of <group> in the group of the whole family
##
InstallMethod( NormalizerInWholeGroup,
[ CanComputeWithInverseAutomaton ],
function(G)
local found, A, reducedPos, states, s, u, ur, i, gens, redgenwords, fam,
interesting, conjinvLetterRep, N;
if IsTrivial( G ) then
N := Group( FreeGeneratorsOfWholeGroup( G ) );
SetIsWholeFamily( N, true );
return N;
fi;
found := false;
A := FreeGroupAutomaton(G);
fam := ElementsFamily(FamilyObj(G));
gens := ShallowCopy(FreeGeneratorsOfGroup(G));
redgenwords := List(gens, LetterRepAssocWord);
reducedPos := FGA_reducedPos(A);
conjinvLetterRep := redgenwords[1]{[1..reducedPos-1]};
redgenwords := List(redgenwords,
w -> w{[reducedPos .. Length(w)-reducedPos+1]});
states := FGA_States(FreeGroupAutomaton(G));
interesting := ReturnTrue;
for i in [reducedPos+1 .. Length(states)] do
s := states[i];
u := FGA_repr(s);
ur := u{[reducedPos..Length(u)]};
if interesting(ur) and
ForAll(redgenwords,w->FGA_Check(s,w)) then
# generator found
if found then # this was not the first extra generator
# Print("inserting\n");
else
# Print("inserting first\n");
A := FGA_FromGeneratorsLetterRep(redgenwords, G);
interesting := w -> not FGA_Check(A!.initial,w);
found := true;
fi;
FGA_AutomInsertGeneratorLetterRep(A, ur);
# Add(gens, AssocWordByLetterRep(fam, u));
fi;
od;
if found then
s := FGA_newstate();
FGA_coincidence(Iterated(conjinvLetterRep,
FGA_define,
s ),
A!.initial );
A!.initial := FGA_find(s);
A!.terminal := A!.initial;
MakeImmutable(A);
N := AsGroup(A);
else
N := G;
fi;
return N;
end );
#############################################################################
##
#M NormalizerOp( <group>, <subgroup> )
##
InstallMethod( NormalizerOp,
"for a subgroup of a free group",
IsIdenticalObj,
[ CanComputeWithInverseAutomaton, CanComputeWithInverseAutomaton ],
function(F,G)
return Intersection( F, NormalizerInWholeGroup( G ) );
end );
#############################################################################
##
#M NormalizerOp( <group>, <elm> )
##
InstallMethod( NormalizerOp,
"for an element in a free group",
IsCollsElms,
[ IsFreeGroup, IsElementOfFreeGroup ],
CentralizerOp );
#############################################################################
##
#E
|