> with(group);

[DerivedS, LCS, NormalClosure, RandElement, SnConjugates, Sylow, areconjugate, center, centralizer, core, cosets, cosrep, derived, elements, groupmember, grouporder, inter, invperm, isabelian, isnorma...[DerivedS, LCS, NormalClosure, RandElement, SnConjugates, Sylow, areconjugate, center, centralizer, core, cosets, cosrep, derived, elements, groupmember, grouporder, inter, invperm, isabelian, isnorma...[DerivedS, LCS, NormalClosure, RandElement, SnConjugates, Sylow, areconjugate, center, centralizer, core, cosets, cosrep, derived, elements, groupmember, grouporder, inter, invperm, isabelian, isnorma...

> f:=x->1-x; g:=x->1/x; e:=x->x;

f := proc (x) options operator, arrow; 1-x end proc

g := proc (x) options operator, arrow; 1/x end proc

e := proc (x) options operator, arrow; x end proc

> f(g(x));

1-1/x

> h:=x->f(g(x));h(x);

h := proc (x) options operator, arrow; f(g(x)) end proc

1-1/x

> k:=x->g(f(x));k(x);

k := proc (x) options operator, arrow; g(f(x)) end proc

1/(1-x)

> l:=x->f(k(x));normal(l(x));

l := proc (x) options operator, arrow; f(k(x)) end proc

x/(-1+x)

> G:=[e,f,g,h,k,l];G[2](x);

G := [e, f, g, h, k, l]

1-x

> Table:=A->Matrix(nops(A),(i,j)->simplify(A[i](A[j](x))));Table(G);

Table := proc (A) options operator, arrow; Matrix(nops(A), proc (i, j) options operator, arrow; simplify(A[i](A[j](x))) end proc) end proc

Matrix([[x, 1-x, 1/x, (-1+x)/x, -1/(-1+x), x/(-1+x)], [1-x, x, (-1+x)/x, 1/x, x/(-1+x), -1/(-1+x)], [1/x, -1/(-1+x), x, x/(-1+x), 1-x, (-1+x)/x], [(-1+x)/x, x/(-1+x), 1-x, -1/(-1+x), x, 1/x], [-1/(-1+...

Table := array(1 .. 6, 1 .. 6, [])

> map(G,x);

[x, 1-x, 1/x, 1-1/x, 1/(1-x), 1-1/(1-x)]

> TableCloture:=A->Matrix(nops(A),(i,j)->evalb(normal(A[i](A[j](x))) in normal(map(A,x))));TableCloture(G);

TableCloture := proc (A) options operator, arrow; Matrix(nops(A), proc (i, j) options operator, arrow; evalb(`in`(normal(A[i](A[j](x))), normal(map(A, x)))) end proc) end proc

Matrix([[true, true, true, true, true, true], [true, true, true, true, true, true], [true, true, true, true, true, true], [true, true, true, true, true, true], [true, true, true, true, true, true], [t...

>

Groupe de Permutations

> S:=permgroup(4,{[[1,2]],[[3,4]]});

S := permgroup(4, {[[1, 2]], [[3, 4]]})

> grouporder(S);

4

> U:= permgroup(4, {[ ]});

U := permgroup(4, {[]})

> cosets(S,U);elements(S);

{[], [[1, 2]], [[3, 4]], [[1, 2], [3, 4]]}

{[], [[1, 2]], [[3, 4]], [[1, 2], [3, 4]]}

>

> S2:= permgroup(4, {[[3,4]]});cosets(S2,U);cosets(S,S2);

S2 := permgroup(4, {[[3, 4]]})

{[], [[3, 4]]}

{[], [[1, 2]]}

Multiplier des permutations

> mulperms([[1,2]],[[3,4]]);

[[1, 2], [3, 4]]

> mulperms([[1,2]],[[1,2]]);mulperms([[1,2]],[]);

[]

[[1, 2]]

> mulperms([[1,2]],[[2,3]]);

[[1, 3, 2]]

Orbites d'un élément et d'un ensemble

> orbit({[[1,2]]},1);orbit({[[1,2]]},3);op(op([[1,2]]));

{1, 2}

{3}

1, 2

> S:=permgroup(4,{[[1,2]],[[3,4]]});orbit(S,1);orbit(S,3);

S := permgroup(4, {[[1, 2]], [[3, 4]]})

{1, 2}

{3, 4}

> Orbitg:=proc(g,S,k)
local s,Or,l;

l:=convert(g,'permlist',k);

Or:={};

for s in S do Or:=Or union {op(s,l)} od;

end;

Orbitg := proc (g, S, k) local s, Or, l; l := convert(g, 'permlist', k); Or := {}; for s in S do Or := `union`(Or, {op(s, l)}) end do end proc

> Orbitg([[1,2]],{1,2},4);Orbitg([[1,2]],{1},4);orbit({[[1,2]]},1);orbit({[[1,2]]},3);

{1, 2}

{2}

{1, 2}

{3}

> OrbitG:=proc(G,S,k)
local g,Or;

Or:={};

for g in elements(G) do Or:={op(Or),Orbitg(g,S,k)} ;od;

end;

OrbitG := proc (G, S, k) local g, Or; Or := {}; for g in group:-elements(G) do Or := {op(Or), Orbitg(g, S, k)} end do end proc

> OrbitG(S,{1,2},4);OrbitG({[[1,2]],[[3,4]]},{1,3},4);

{{1, 2}}

{{1, 3}, {2, 3}, {1, 4}, {2, 4}}

>

Stabilisateur d'un élément

> stabg:=proc(G,x,k)
local S,l,g;

S:={[]};

for g in elements(G) do

 if g<>[] then

 l:=convert(g,'permlist',k);

 if op(x,l)=x  then S:=S union {g}; end if;

fi;

od;

return S;

end;

>

stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...stabg := proc (G, x, k) local S, l, g; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); if op(x, l) = x then S := `union`(S, {g}) end if end if end do; return ...

Stabilisateur d'un sous-ensemble

> stabg2:=proc(G,Set,k)
local S,l,g,flag;

S:={[]};

for g in elements(G) do

 if g<>[] then

 l:=convert(g,'permlist',k);

flag:=true;

for s in Set do

 if not (op(s,l) in Set)  then flag:=false; fi;

od;

if flag=true then S:=S union {g}; end if;

fi;

od;

return S;

end;

>

Warning, `s` is implicitly declared local to procedure `stabg2`

stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...stabg2 := proc (G, Set, k) local S, l, g, flag, s; S := {[]}; for g in group:-elements(G) do if g <> [] then l := convert(g, 'permlist', k); flag := true; for s in Set do if not `in`(op(s, l), Set) th...

> undebug(stabg);S:=permgroup(5,{[[1,2]],[[3,4]],[[1,3,5]]});grouporder(S);

S := permgroup(5, {[[1, 2]], [[3, 4]], [[1, 3, 5]]})

120

>

> stabg(S,4,5);nops(stabg(S,4,5)); OrbitG(S,{4},5);

{[], [[1, 2]], [[2, 3]], [[1, 3, 2]], [[1, 3, 5]], [[1, 3], [2, 5]], [[2, 3, 5]], [[1, 3]], [[2, 5]], [[1, 5, 3, 2]], [[1, 5], [2, 3]], [[1, 2, 5, 3]], [[1, 2, 3]], [[1, 2], [3, 5]], [[1, 5, 2]], [[1,...{[], [[1, 2]], [[2, 3]], [[1, 3, 2]], [[1, 3, 5]], [[1, 3], [2, 5]], [[2, 3, 5]], [[1, 3]], [[2, 5]], [[1, 5, 3, 2]], [[1, 5], [2, 3]], [[1, 2, 5, 3]], [[1, 2, 3]], [[1, 2], [3, 5]], [[1, 5, 2]], [[1,...{[], [[1, 2]], [[2, 3]], [[1, 3, 2]], [[1, 3, 5]], [[1, 3], [2, 5]], [[2, 3, 5]], [[1, 3]], [[2, 5]], [[1, 5, 3, 2]], [[1, 5], [2, 3]], [[1, 2, 5, 3]], [[1, 2, 3]], [[1, 2], [3, 5]], [[1, 5, 2]], [[1,...

24

{{1}, {2}, {3}, {4}, {5}}

> undebug(stabg2);stabg2(S,{3,4},5);nops(stabg2(S,{3,4},5)); undebug(OrbitG);OrbitG(S,{3,4},5);

{[], [[1, 2]], [[3, 4]], [[1, 2], [3, 4]], [[2, 5]], [[1, 5, 2], [3, 4]], [[1, 2, 5], [3, 4]], [[1, 5, 2]], [[1, 5], [3, 4]], [[1, 2, 5]], [[2, 5], [3, 4]], [[1, 5]]}

12

{{1, 2}, {3, 4}, {1, 3}, {2, 3}, {1, 4}, {2, 4}, {2, 5}, {3, 5}, {4, 5}, {1, 5}}

> Sn:=permgroup(5,{seq([[i,i+1]], i=1..4)});Sstab:=stabg(Sn,1,5);nops(Sstab);nops(elements(permgroup(5,Sstab)));

Sn := permgroup(5, {[[1, 2]], [[3, 4]], [[2, 3]], [[4, 5]]})

Sstab := {[], [[3, 4]], [[2, 3]], [[2, 3, 5]], [[2, 4], [3, 5]], [[2, 5]], [[2, 5, 3, 4]], [[2, 3, 5, 4]], [[4, 5]], [[2, 3, 4, 5]], [[2, 4, 5, 3]], [[2, 3, 4]], [[2, 3], [4, 5]], [[3, 5]], [[2, 4]], ...Sstab := {[], [[3, 4]], [[2, 3]], [[2, 3, 5]], [[2, 4], [3, 5]], [[2, 5]], [[2, 5, 3, 4]], [[2, 3, 5, 4]], [[4, 5]], [[2, 3, 4, 5]], [[2, 4, 5, 3]], [[2, 3, 4]], [[2, 3], [4, 5]], [[3, 5]], [[2, 4]], ...Sstab := {[], [[3, 4]], [[2, 3]], [[2, 3, 5]], [[2, 4], [3, 5]], [[2, 5]], [[2, 5, 3, 4]], [[2, 3, 5, 4]], [[4, 5]], [[2, 3, 4, 5]], [[2, 4, 5, 3]], [[2, 3, 4]], [[2, 3], [4, 5]], [[3, 5]], [[2, 4]], ...

24

24

Générer le groupe Sn pour différents n

> Sn:=permgroup(5,{seq([[i,i+1]], i=1..4)});

Sn := permgroup(5, {[[1, 2]], [[3, 4]], [[2, 3]], [[4, 5]]})

> U:= permgroup(5, {[ ]});grouporder(Sn);cosets(Sn,U):elements(Sn):

U := permgroup(5, {[]})

120

> OrbitG(Sn,{1},5);

{{4}, {5}, {3}, {1}, {2}}

> SnPrime:=permgroup(5,{seq([[i,i+1]], i=1..3)});

SnPrime := permgroup(5, {[[1, 2]], [[3, 4]], [[2, 3]]})

> cosets(Sn,SnPrime);

{[], [[1, 3, 2, 4, 5]], [[4, 5]], [[2, 4, 5, 3]], [[2, 4, 5]]}

> orbit(Sn,5);

{1, 2, 3, 4, 5}

> orbit(SnPrime,5);

{5}

> map([[1,2]],{3});

{[[1, 2]]}

>

Définir un groupe par générateurs et relations

>

Le groupe cyclique d'ordre 4

> C4:=grelgroup({a},{[a,a,a,a]}); grouporder(C4);

C4 := grelgroup({a}, {[a, a, a, a]})

4

> U:=subgrel({e=[]},C4);

U := subgrel({e = []}, grelgroup({a}, {[a, a, a, a]}))

> CC4:=cosets(U);

CC4 := {[], [a, a, a], [a], [a, a], [b], [b, a], [b, a, a], [b, a, a, a]}

>

>

Le groupe dihedral Dn, groupe de symétries d'un régulier polygone à n cotés noté 1,...,n. Généré par la rotation d'angle 2*pi/n et la symétrie axiale d'axe passant par le sommet 1 et le centre du polygone (associe chaque i à n +2 - i mod n). Pour D4, on a :

> D4:=grelgroup({a,b,1/a,1/b},{[a,1/a],[b,1/b],[a,a,a,a],[b,b],[b,a,1/b,1/a]});

D4 := grelgroup({a, b, 1/b, 1/a}, {[a, a, a, a], [a, 1/a], [b, 1/b], [b, b], [b, a, 1/b, 1/a]})

> U:=subgrel({e=[]},D4); cosets(U);

U := subgrel({e = []}, grelgroup({a, b, 1/b, 1/a}, {[a, a, a, a], [a, 1/a], [b, 1/b], [b, b], [b, a, 1/b, 1/a]}))

{[], [a, a, a], [a], [a, a], [b], [b, a], [b, a, a], [b, a, a, a]}

>

On obtient une liste des éléments du groupe mais peu de chose sont prévues pour, par exemple, faire des manipulations simples sur ces groupes comme : multiplier deux éléments ou déterminer si deux produits sont égaux. On va procéder autrement et définir ces groupes comme sous-groupes d'un groupe de permutation Sn, ce qui est toujours possible pour un groupe d'ordre n (on peut même faire mieux parfois).

Dans le cas des groupes cycliques et dihédraux cela peut être fait facilement.

Remarquer que le générateur a de C4 correspond à une rotation de pi/2 des sommets d'un carré et donc à la permutation : [1,2,3,4] (pour une bonne numérotation des sommets!).

De même la symétrie axiale b de D4, correspond à la permutation de S4 : [2,4] (et laisse invariante les sommets 1 et 3).

Re-définir les groupes C4 et D4 puis donner leur table de multiplications.

> C4:=permgroup(4,{[[1,2,3,4]]}); elements(C4);

C4 := permgroup(4, {[[1, 2, 3, 4]]})

{[], [[1, 2, 3, 4]], [[1, 4, 3, 2]], [[1, 3], [2, 4]]}

> D4:=permgroup(4,{[[1,2,3,4]],[[2,4]]}); elements(D4);

D4 := permgroup(4, {[[1, 2, 3, 4]], [[2, 4]]})

{[], [[1, 2], [3, 4]], [[1, 2, 3, 4]], [[1, 3]], [[1, 4], [2, 3]], [[1, 4, 3, 2]], [[1, 3], [2, 4]], [[2, 4]]}

> Cayley:=A->Matrix(nops(A),(i,j)->mulperms(A[i],A[j]));Cayley(elements(C4));

Cayley := proc (A) options operator, arrow; Matrix(nops(A), proc (i, j) options operator, arrow; group:-mulperms(A[i], A[j]) end proc) end proc

Matrix([[[], [[1, 2, 3, 4]], [[1, 4, 3, 2]], [[1, 3], [2, 4]]], [[[1, 2, 3, 4]], [[1, 3], [2, 4]], [], [[1, 4, 3, 2]]], [[[1, 4, 3, 2]], [], [[1, 3], [2, 4]], [[1, 2, 3, 4]]], [[[1, 3], [2, 4]], [[1, ...

> Cayley(elements(D4));

Matrix([[[], [[1, 2], [3, 4]], [[1, 2, 3, 4]], [[1, 3]], [[1, 4], [2, 3]], [[1, 4, 3, 2]], [[1, 3], [2, 4]], [[2, 4]]], [[[1, 2], [3, 4]], [], [[1, 3]], [[1, 2, 3, 4]], [[1, 3], [2, 4]], [[2, 4]], [[1...

>