############################################################################### ## #M SelfSimilarSemigroup(<list>, <bind_vars>) ##
InstallMethod(SelfSimilarSemigroup, "for [IsList, IsBool]", [IsList, IsBool], function (list, bind_vars) if not AG_IsCorrectRecurList(list, false) then
Error("in SelfSimilarSemigroup(IsList):\n", " given list is not a correct list representing automaton\n"); fi;
############################################################################### ## #M SelfSimilarSemigroup(<list>, <names>) ##
InstallMethod(SelfSimilarSemigroup, "for [IsList, IsList]", [IsList, IsList], function (list, names) if not AG_IsCorrectRecurList(list, false) then
Error("error in SelfSimilarSemigroup(IsList, IsList):\n", " given list is not a correct list representing automaton\n"); fi;
############################################################################### ## #M SelfSimilarSemigroup(<list>, <names>, <bind_vars>) ##
InstallMethod(SelfSimilarSemigroup, "for [IsList, IsList, IsBool]",
[IsList, IsList, IsBool], function (list, names, bind_vars) if not AG_IsCorrectRecurList(list, false) then
Error("error in SelfSimilarSemigroup(IsList):\n", " given list is not a correct list representing automaton\n"); fi;
############################################################################### ## #M IsSelfSimilar(<G>) ##
InstallMethod(IsSelfSimilar, "for [IsSelfSimSemigroup]",
[IsSelfSimSemigroup], function(G)
local g, i, res;
res := true; for g in GeneratorsOfSemigroup(G) do for i in [1..UnderlyingSelfSimFamily(G)!.deg] do
res := Section(g, i) in G; if res = fail then
TryNextMethod(); elif not res then
return false; fi;
od;
od;
return true; end);
gens := GeneratorsOfSemigroup(G); if gens = [] then Print("< >"); fi; if Length(gens) = 1then
Print("< "); printone(gens[1]); Print(" >"); else
Print("< "); printone(gens[1]); Print(", \n"); for i in [2..Length(gens)-1] do
Print(" "); printone(gens[i]); Print(", \n");
od;
Print(" "); printone(gens[Length(gens)]); Print(" >"); fi; end);
############################################################################### ## #M ViewObj(<G>) ##
InstallMethod(ViewObj, "for [IsSelfSimSemigroup]",
[IsSelfSimSemigroup], function(G)
local i, gens;
gens := List(GeneratorsOfSemigroup(G), g -> Word(g)); if gens = [] then Print("< >"); fi;
Print("< "); for i in [1..Length(gens)-1] do if IsOne(gens[i]) then
Print(AG_Globals.identity_symbol, ", "); else
Print(gens[i], ", "); fi;
od; if IsOne(gens[Length(gens)]) then
Print(AG_Globals.identity_symbol, " >"); else
Print(gens[Length(gens)], " >"); fi; end);
############################################################################# ## #M String(<G>) ##
InstallMethod(String, "for [IsSelfSimSemigroup]", [IsSelfSimSemigroup], function(G)
local i, gens, formatone, s;
############################################################################### ## #M IsTrivial(G) ##
InstallMethod(IsTrivial, "for [IsSelfSimSemigroup]", [IsSelfSimSemigroup], function (G)
local g; for g in GeneratorsOfSemigroup(G) do if not IsOne(g) then return false; fi;
od;
return true; end);
############################################################################### ## #M Size(G) ##
InstallMethod(Size, "for [IsSelfSimSemigroup]", [IsSelfSimSemigroup], function (G)
local g; if IsTrivial(G) then
Info(InfoAutomGrp, 3, "Size(G): 1, G is trivial");
return 1; fi;
TryNextMethod(); end);
############################################################################### ## #M <g> in <G> ##
InstallMethod(\in, "for [IsSelfSim, IsSelfSimSemigroup]",
[IsSelfSim, IsSelfSimSemigroup], function(g, G)
local fam, fgens, w;
if HasIsGroupOfSelfSimFamily(G) and IsGroupOfSelfSimFamily(G) then
return true; fi;
fgens := List(GeneratorsOfSemigroup(G), g -> Word(g));
w := Word(g);
fam := UnderlyingSelfSimFamily(G);
if fam!.rws <> fail then
fgens := AsSet(AG_ReducedForm(fam!.rws, fgens));
w := AG_ReducedForm(fam!.rws, w); fi;
if w in SemigroupByGenerators(fgens) then
Info(InfoAutomGrp, 3, "g in G: true");
Info(InfoAutomGrp, 3, " by elements of free group");
Info(InfoAutomGrp, 3, " g = ", g, "; G = ", G);
return true; fi;
TryNextMethod(); end);
############################################################################### ## #M Random(<G>) ##
InstallMethodWithRandomSource(Random, "for a random source and [IsSelfSimSemigroup]",
[IsRandomSource, IsSelfSimSemigroup], function(rs, G)
local w, monoid, F, gens, pi; if IsSelfSimilarSemigroup(G) then
monoid := UnderlyingFreeMonoid(G);
if IsTrivial(monoid) then
w := One(monoid); else while true do
w := Random(rs, monoid); if not IsOne(w) then
break; fi;
od; fi;
return SelfSim(w, UnderlyingSelfSimFamily(G)); else
gens := GeneratorsOfSemigroup(G);
F := FreeGroup(Length(gens));
pi := GroupHomomorphismByImagesNC(F, UnderlyingFreeGroup(G),
GeneratorsOfGroup(F), List(gens, Word) );
return SelfSim( Random( rs, SemigroupByGenerators( GeneratorsOfGroup(F)))^pi, UnderlyingSelfSimFamily(G)); fi; end);
############################################################################### ## #M IsSelfSimilarSemigroup(<G>) ## ## Returns `true' if generators of <G> coincide with generators of the family
InstallMethod(IsSelfSimilarSemigroup, [IsSelfSimSemigroup], function(G)
local fam;
fam := UnderlyingSelfSimFamily(G);
return fam!.numstates = 0 or
GeneratorsOfSemigroup(G) = fam!.recurgens{[1..fam!.numstates]}; end);
# preimages of generators of G in UnderlyingFreeGroup(G)
gens_in_freegrp := List(GeneratorsOfSemigroup(G), Word);
# preimages of generators of a subgroup of H isomorphic to G in UnderlyingFreeGroup(H)
images_in_freegrp := List(UnderlyingAutomFamily(H)!.automgens{images}, Word);
preimage_in_freegrp := function(x)
local w; if IsOne(x!.word) then
return states[ Position( UnderlyingAutomFamily(H)!.oldstates, UnderlyingAutomFamily(H)!.trivstate)]; fi;
w := LetterRepAssocWord(x!.word)[1]; if w>0then
return states[ Position( UnderlyingAutomFamily(H)!.oldstates, w)]; else
return states[ Position( UnderlyingAutomFamily(H)!.oldstates, -w+UnderlyingAutomFamily(H)!.numstates)]; fi; end;
# preimages of generators of H in UnderlyingFreeGroup(G)
preimages_in_freegrp := List(GeneratorsOfSemigroup(H), x -> preimage_in_freegrp(x));
if IsSelfSimilarSemigroup(G) then
free_groups_hom :=
GroupHomomorphismByImagesNC( Group(gens_in_freegrp), UnderlyingFreeGroup(H),
gens_in_freegrp, images_in_freegrp );
hom := MappingByFunction(G, SemigroupByGenerators(UnderlyingAutomFamily(H)!.automgens{images}), hom_function, inv_hom_function);
SetMonomorphismToAutomatonSemigroup(G, hom); fi;
return true; end);
############################################################################### ## #M IsomorphicAutomSemigroup(<G>) ##
InstallMethod(IsomorphicAutomSemigroup, "for [IsSelfSimSemigroup]",
[IsSelfSimSemigroup], function(G) if IsFiniteState(G) then return IsomorphicAutomSemigroup(G); fi; end);
############################################################################### ## #M UnderlyingAutomatonSemigroup(<G>) ##
InstallMethod(UnderlyingAutomatonSemigroup, "for [IsSelfSimSemigroup]",
[IsSelfSimSemigroup], function(G) if IsFiniteState(G) then return UnderlyingAutomatonSemigroup(G); fi; end);
############################################################################### ## #M MonomorphismToAutomatonSemigroup(<G>) ##
InstallMethod(MonomorphismToAutomatonSemigroup, "for [IsSelfSimSemigroup]",
[IsSelfSimSemigroup], function(G) if IsFiniteState(G) then return MonomorphismToAutomatonSemigroup(G); fi; end);
#E
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.25Bemerkung:
(vorverarbeitet am 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.