[GAP Forum] Defining a set.
Maciej Niebrzydowski
mniebrz at gmail.com
Wed Nov 8 22:44:13 GMT 2006
If your set is just a list then
you could write a simple function:
f:=function(T,p)
local i,S,t;
S:=[];
t:=Size(T);
for i in [1..t]
do
Add(S, T[i]*p*(T[i]^-1));
od;
return(S);
end;
You can write this in some text file, e.g. prog.txt
and then you load it into Gap using Read("C:/prog.txt"), or whatever
path you have.
I hope it helps
Maciej Niebrzydowski
On 11/8/06, Fernando Fantino <fantino at gmail.com> wrote:
> One question:
>
> How do you define (in the GAP) a set by comprehension?
> i.e. given a set T and an element p I want to define a set S compose by
> element y of the form:
>
> y=x * p * Inverse(x), such that x "move" over all T.
>
> Thanks. Fernando.
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>
More information about the Forum
mailing list