Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/algs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ algorithms and methods can be found in&nbsp;<Cite Key="Kohl08b"/>.
Check whether <C>h</C> lies in <C>H</C>. If not, return <C>false</C>.
Compute an element <C>g1</C> of <A>G</A> which acts on&nbsp;<C>P</C>
like&nbsp;<A>g</A>. For this purpose, factor <A>h</A> into generators
of&nbsp;<C>H</C> using <C>PreImagesRepresentative</C>, and compute the
of&nbsp;<C>H</C> using <C>PreImagesRepresentativeNC§</C>, and compute the
Comment thread
fingolfin marked this conversation as resolved.
Outdated
corresponding product of generators of&nbsp;<A>G</A>.
Let <C>k := g/g1</C>. The mapping <C>k</C> is always integral.
Compute the kernel&nbsp;<C>K</C> of the action of <A>G</A>
Expand All @@ -407,7 +407,7 @@ algorithms and methods can be found in&nbsp;<Cite Key="Kohl08b"/>.
not leave a partition of&nbsp;&ZZ; into unions of residue
classes (mod&nbsp;<M>m</M>) invariant which is fixed by&nbsp;<A>G</A>.
If successful, return <C>false</C>. If not, try to factor <A>g</A> into
generators of&nbsp;<A>G</A> using <C>PreImagesRepresentative</C>.
generators of&nbsp;<A>G</A> using <C>PreImagesRepresentativeNC</C>.
Comment thread
fingolfin marked this conversation as resolved.
Outdated
If successful, return <C>true</C>. If <A>g</A> is in <A>G</A>, this
terminates after a finite number of steps. Both run time and memory
requirements are exponential in the word length. If <A>g</A> is not
Expand Down Expand Up @@ -1148,7 +1148,7 @@ algorithms and methods can be found in&nbsp;<Cite Key="Kohl08b"/>.
</Item>

<Mark>
<C>PreImagesRepresentative(<A>phi</A>,<A>g</A>)</C>, &nbsp;
<C>PreImagesRepresentativeNC(<A>phi</A>,<A>g</A>)</C>, &nbsp;
Comment thread
fingolfin marked this conversation as resolved.
Outdated
<C>PreImagesRepresentatives(<A>phi</A>,<A>g</A>)</C>
</Mark>
<Item>
Expand Down
2 changes: 1 addition & 1 deletion doc/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ gap> List(B,Length);
[ 1, 3, 6, 12, 24, 48, 96, 192 ]
gap> List(B[3],Order);
[ 12, infinity, infinity, infinity, infinity, 12 ]
gap> List(B[3],g->PreImagesRepresentative(phi,g));
gap> List(B[3],g->PreImagesRepresentativeNC(phi,g));
Comment thread
fingolfin marked this conversation as resolved.
Outdated
[ b*a, c*b, c*a, b*c, a*c, a*b ]
gap> g := a*b;; Order(g);;
gap> Display(g);
Expand Down
6 changes: 3 additions & 3 deletions doc/rcwagrp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ gap> RelatorsOfFpGroup(Source(phi));
A related very common task is to factor group elements into generators:

<ManSection>
<Meth Name ="PreImagesRepresentative" Arg="phi, g"
<Meth Name ="PreImagesRepresentativeNC" Arg="phi, g"
Label="for an epi. from a free group to an rcwa group"/>
<Returns>
a representative of the set of preimages of&nbsp;<A>g</A> under
Expand All @@ -859,7 +859,7 @@ A related very common task is to factor group elements into generators:
computing just one, i.e. often several preimages are found
simultaneously. The operation <C>PreImagesRepresentatives</C>
takes care of this. It takes the same arguments as
<C>PreImagesRepresentative</C> and returns a list of preimages.
<C>PreImagesRepresentativeNC</C> and returns a list of preimages.
If multiple preimages are found, their quotients give rise to nontrivial
relations among the generators of the image of&nbsp;<A>phi</A>.
<Example>
Expand All @@ -870,7 +870,7 @@ gap> G := Group(a,b);; # G = <<Collatz permutation>, n -> n + 1>
gap> phi := EpimorphismFromFreeGroup(G);;
gap> g := Comm(a^2*b^4,a*b^3); # a sample element to be factored
<rcwa permutation of Z with modulus 8>
gap> PreImagesRepresentative(phi,g); # -> a factorization of g
gap> PreImagesRepresentativeNC(phi,g); # -> a factorization of g
b^-3*(b^-1*a^-1)^2*b^3*a*b^-1*a*b^3
gap> g = b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3; # check
true
Expand Down
8 changes: 4 additions & 4 deletions doc/rcwamap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,8 @@ gap> List([[0,3],[1,3],[2,3]],ResidueClass)^a;
<Index Key="PreImageElm" Subkey="of a ring element under an rcwa mapping">
<C>PreImageElm</C>
</Index>
<Index Key="PreImagesElm" Subkey="of a ring element under an rcwa mapping">
<C>PreImagesElm</C>
<Index Key="PreImagesElmNC" Subkey="of a ring element under an rcwa mapping">
<C>PreImagesElmNC</C>
</Index>
<Index Key="PreImage"
Subkey="of a set of ring elements under an rcwa mapping">
Expand All @@ -781,14 +781,14 @@ gap> List([[0,3],[1,3],[2,3]],ResidueClass)^a;
</Index>

For computing preimages of elements under rcwa mappings,
there are methods for <C>PreImageElm</C> and <C>PreImagesElm</C>.
there are methods for <C>PreImageElm</C> and <C>PreImagesElmNC</C>.
Comment thread
fingolfin marked this conversation as resolved.
Outdated
The preimage of a finite set of ring elements or of a union of finitely
many residue classes under an rcwa mapping can be computed by
<C>PreImage</C>.

<Example>
<![CDATA[
gap> PreImagesElm(T,8);
gap> PreImagesElmNC(T,8);
[ 5, 16 ]
gap> PreImage(T,ResidueClass(Integers,3,2));
Z \ 0(6) U 2(6)
Expand Down
16 changes: 16 additions & 0 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
##
#############################################################################

#I introducing globally the NC versions of PreImages...
Comment thread
fingolfin marked this conversation as resolved.
Outdated
if not IsBound( PreImagesNC ) then
BindGlobal( "PreImagesNC", PreImages );
fi;
if not IsBound( PreImagesElmNC ) then
BindGlobal( "PreImagesElmNC", PreImagesElm );
fi;
if not IsBound( PreImagesSetNC ) then
BindGlobal( "PreImagesSetNC", PreImagesSet );
fi;
if not IsBound( PreImagesRepresentativeNC ) then
BindGlobal( "PreImagesRepresentativeNC", PreImagesRepresentative );
fi;

#############################################################################

ReadPackage( "rcwa", "lib/rcwamap.gd" );
ReadPackage( "rcwa", "lib/rcwamono.gd" );
ReadPackage( "rcwa", "lib/rcwagrp.gd" );
Expand Down
4 changes: 2 additions & 2 deletions lib/perlist.gi
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ InstallOtherMethod( Permuted,
* (Int((preperiod_bound-1)/period_bound)+1);
else preperiod_bound := 0; fi;
preperiod_img := List([0..preperiod_bound-1],
n->Sum(perlist{PreImagesElm(f,n)+1}));
n->Sum(perlist{PreImagesElmNC(f,n)+1}));
period_img := List([preperiod_bound..preperiod_bound+period_bound-1],
n->Sum(perlist{PreImagesElm(f,n)+1}));
n->Sum(perlist{PreImagesElmNC(f,n)+1}));

perlist_img := PeriodicList(preperiod_img,period_img);
CompressPeriodicList(perlist_img);
Expand Down
2 changes: 1 addition & 1 deletion lib/rcwagrp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ DeclareOperation( "EpimorphismFromFpGroup",
##
#O PreImagesRepresentatives( <map>, <elm> ) . . . . several representatives
##
## This is an analogon to `PreImagesRepresentative', which returns a list
## This is an analogue to `PreImagesRepresentativeNC', which returns a list
Comment thread
fingolfin marked this conversation as resolved.
Outdated
## of possibly several representatives if computing these is not harder than
## computing just one representative.
##
Expand Down
20 changes: 10 additions & 10 deletions lib/rcwagrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2456,8 +2456,8 @@ InstallMethod( IsomorphismRcwaGroup,
g->IsIdenticalObj(f,g))));
gens := List([1..Length(gensF)],
i->Image(embs[embnrs[i]],
PreImagesRepresentative(embsF[embnrs[i]],
gensF[i])));
PreImagesRepresentativeNC(embsF[embnrs[i]],
gensF[i])));
img := Group(gens);
SetSize(img,infinity); SetIsTame(img,false);
SetFreeProductInfo(img,info);
Expand Down Expand Up @@ -4166,7 +4166,7 @@ InstallMethod( \in,
then return true; fi;
Info(InfoRCWA,2,"\\in: trying to factor <g> into gen's ...");
phi := EpimorphismFromFreeGroup(G);
return PreImagesRepresentative(phi,g) <> fail;
return PreImagesRepresentativeNC(phi,g) <> fail;
end );

#############################################################################
Expand Down Expand Up @@ -4259,7 +4259,7 @@ InstallMethod( \in,
fi;
Info(InfoRCWA,2,"<G> is wild -- trying to factor <g> into gen's ...");
phi := EpimorphismFromFreeGroup(G);
return PreImagesRepresentative(phi,g) <> fail;
return PreImagesRepresentativeNC(phi,g) <> fail;
else
if Modulus(G) mod Modulus(g) <> 0 then
Info(InfoRCWA,2,"Mod(<g>) does not divide Mod(<G>).");
Expand Down Expand Up @@ -4296,7 +4296,7 @@ InstallMethod( \in,
Info(InfoRCWA,2,"on RespectedPartition(<G>).");

phi := EpimorphismFromFreeGroup(H);
h := PreImagesRepresentative(phi,h:NoStabChain);
h := PreImagesRepresentativeNC(phi,h:NoStabChain);
if h = fail then return false; fi;
h := Product(List(LetterRepAssocWord(h),
id->gens[AbsInt(id)]^SignInt(id)));
Expand Down Expand Up @@ -4392,7 +4392,7 @@ InstallMethod( \in,
fi;
Info(InfoRCWA,2,"<G> is wild -- trying to factor <g> into gen's ...");
phi := EpimorphismFromFreeGroup(G);
return PreImagesRepresentative(phi,g) <> fail;
return PreImagesRepresentativeNC(phi,g) <> fail;
else
if Modulus(G) mod Modulus(g) <> 0 then
Info(InfoRCWA,2,"Mod(<g>) does not divide Mod(<G>).");
Expand Down Expand Up @@ -4423,7 +4423,7 @@ InstallMethod( \in,
then return true; fi;
Info(InfoRCWA,2,"Trying to factor <g> into gen's ...");
phi := EpimorphismFromFreeGroup(G); # <G> is tame -> this
return PreImagesRepresentative(phi,g) <> fail; # could be improved.
return PreImagesRepresentativeNC(phi,g) <> fail; # could be improved.
fi;
end );

Expand Down Expand Up @@ -6802,9 +6802,9 @@ InstallMethod( PreImagesRepresentatives,

#############################################################################
##
#M PreImagesRepresentative( <phi>, <g> )
#M PreImagesRepresentativeNC( <phi>, <g> )
##
InstallMethod( PreImagesRepresentative,
InstallMethod( PreImagesRepresentativeNC,
"for hom's from free groups to rcwa- or perm.-groups (RCWA)",
ReturnTrue, [ IsGroupHomomorphism, IsObject ], SUM_FLAGS,

Expand All @@ -6831,7 +6831,7 @@ InstallMethod( Factorization,
[ IsRcwaGroup, IsRcwaMapping ], 0,

function ( G, g )
return PreImagesRepresentative(EpimorphismFromFreeGroup(G),g);
return PreImagesRepresentativeNC(EpimorphismFromFreeGroup(G),g);
end );

#############################################################################
Expand Down
Loading
Loading