############################################################################### ## ## AG_CreatedTreeHomomorphismFamilies ## ## Contains all created TreeHomomorphismFamily objects; for each spherical ## index there exists one family, to which all objects created with TreeHomomorphism ## belong. ##
BindGlobal("AG_CreatedTreeHomomorphismFamilies", rec(ind := [], fam := []));
sph_ind := AG_ReducedSphericalIndex(sph_ind); if sph_ind in AG_CreatedTreeHomomorphismFamilies.ind then for fam in AG_CreatedTreeHomomorphismFamilies.fam do if fam!.spher_index = sph_ind then
return fam; fi;
od; fi;
############################################################################### ## #M TreeHomomorphism (<states>, <tr>) ##
InstallMethod(TreeHomomorphism,
[IsList and IsTreeHomomorphismCollection, IsObject], function(states, perm)
local top_deg, bot_deg, ind, fam, a;
if not IsPerm(perm) and not IsTransformation(perm) then
Error("The second argument ",perm, "must be a permutation or transformation"); fi;
if perm^-1<>fail and
ForAll(states, IsTreeAutomorphism) then
return TreeAutomorphism(states, AG_PermFromTransformation(perm)); fi;
top_deg := Length(states);
if IsPerm(perm) then if not IsOne(perm) and top_deg < Maximum(MovedPoints(perm)) then
Error("The root permutation ", perm, " must move only points from 1 to the degree ", top_deg, " of the tree"); fi; else if not IsOne(perm) and top_deg < DegreeOfTransformation(perm) then
Error("The root transformation ", perm, " must move only points from 1 to the degree ", top_deg, " of the tree"); fi; fi;
bot_deg := DegreeOfTree(states[1]);
ind := rec(start := [top_deg], period := [bot_deg]);
fam := TreeHomomorphismFamily(ind);
############################################################################### ## #M ViewObj(<a>) ##
InstallMethod(ViewObj, [IsTreeHomomorphism], function (a)
local deg, printword, i, perm, states;
states := Sections(a);
deg := Length(states);
perm := TransformationOnLevel(a, 1);
Print("("); for i in [1..deg] do
View(states[i]); if i <> deg then Print(", "); fi;
od;
Print(")"); if not IsOne(perm) then
AG_PrintTransformation(perm); fi; end);
############################################################################### ## #M PrintObj(<a>) ##
InstallMethod(PrintObj, "for [IsTreeHomomorphism and IsTreeHomomorphismRep]",
[IsTreeHomomorphism and IsTreeHomomorphismRep], function (a)
local deg, i, states, perm;
states := Sections(a);
deg := Length(states);
perm := TransformationOnLevel(a, 1);
Print("("); for i in [1..deg] do if IsAutom(a!.states[i]) then
View(a!.states[i]); else
Print(a!.states[i]); fi; if i <> deg then Print(", "); fi;
od;
Print(")"); if not IsOne(perm) then
AG_PrintTransformation(perm); fi; end);
############################################################################### ## #M String(<a>) ##
InstallMethod(String, "for [IsTreeHomomorphism]", [IsTreeHomomorphism], function (a)
local deg, printword, i, perm, states, str;
for i in [1..deg] do
Append(str, String(states[i])); if i <> deg then Append(str, ", "); fi;
od;
Append(str, ")"); if not IsOne(perm) then
Append(str, AG_TransformationString(perm)); fi;
return str; end);
if k = 1then
return TransformationOnFirstLevel(a); fi;
# TODO: it is unnesessarily greedy, it could check whether there # are trivial permutations below
d1 := DegreeOfTree(a);
d2 := 1; for i in [2 .. k] do
d2 := d2 * DegreeOfLevel(a, i);
od;
states := Sections(a);
top := TransformationOnFirstLevel(a);
first_level := List(states, s -> TransformationOnLevel(s, k-1));
permuted := []; for i in [1..d1] do for j in [1..d2] do
permuted[d2*(i-1) + j] := d2*(i^top - 1) + j^first_level[i];
od;
od;
# p := PermList(permuted); # if p = fail then # p := Transformation(permuted); # fi; # return p;
return Transformation(permuted); end);
InstallMethod(TransformationOnFirstLevel, [IsTreeHomomorphism and IsTreeHomomorphismRep], function(a)
return AsTransformation(a!.perm); end);
############################################################################### ## #M k ^ a ##
InstallMethod(\^, "for [IsPosInt, IsTreeHomomorphism]", [IsPosInt, IsTreeHomomorphism], function(k, a)
return k ^ TransformationOnLevel(a, 1); end);
############################################################################### ## ## AG_TreeHomomorphismCmp(a1, a2) ## ## Global function to be used from IsTreeAutomomorphism too ##
InstallGlobalFunction(AG_TreeHomomorphismCmp, function(a1, a2)
local i, cmp;
############################################################################### ## #M Representative( <word>, <fam> ) ##
InstallMethod(Representative, "for [IsAssocWord, IsTreeHomomorphismFamily]",
[IsAssocWord, IsTreeHomomorphismFamily], function( word, fam ) if IsAutomFamily( fam ) then return Autom( word, fam ); elif IsSelfSimFamily( fam ) then return SelfSim( word, fam ); else Error("the family <fam> must be either IsAutomFamily or IsSelfSimFamily"); fi; end);
############################################################################### ## #M Representative( <word>, <a> ) ##
InstallMethod(Representative, "for [IsAssocWord, IsTreeHomomorphism]",
[IsAssocWord, IsTreeHomomorphism], function( word, a )
local fam;
fam := FamilyObj(a); if IsAutomFamily( fam ) then return Autom( word, fam ); elif IsSelfSimFamily( fam ) then return SelfSim( word, fam ); else Error("the homomorphism <a> must be either from IsAutomFamily or from IsSelfSimFamily"); fi; end);
¤ 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.16Bemerkung:
(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.