Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
375 views
unlisted
ubuntu2204
1
# h: an endomorphism of a group G.
2
# f: the embedding of G into the the group algebra kG.
3
# x: an element of kG
4
#
5
# Returns h'(x), where h' is the natural extension
6
# of h to an endomorphism of kG.
7
8
def mapkGElt(h, f, x):
9
# L is the result of converting x into a list [L[1], L[2], ...]
10
# where, for i odd, L[i+1] is the coefficient of the group element
11
# L[i] such that the sum of L[i+1]*L[i] is equal to x.
12
if x == x - x:
13
# x is zero
14
return x
15
else:
16
L = x.CoefficientsAndMagmaElements()
17
result = L[2]*gap.Image(f, gap.Image(h, L[1]))
18
i = 3
19
while i+1 <= len(L):
20
result = result + L[i+1]*gap.Image(f, gap.Image(h, L[i]))
21
i +=2
22
return result
23
24
# G: a group.
25
# f: embedding of G into kG.
26
# I: an ideal in the group algebra kG.
27
# L: a list of elements in I, usually a set of generators.
28
# type: 'end' for endomorphisms, 'aut' for automorphisms
29
# verbose: True for verbose output
30
#
31
# Return True if every endomorphism (or, automorphism if type == 'aut')
32
# maps every element of L into I. Return False otherwise.
33
34
def preservesList(f, G, I, L, type='end',verbose=False):
35
E = []
36
type_str = ""
37
38
if type == 'end':
39
E = G.Endomorphisms()
40
type_str = "endomorphism"
41
elif type == 'aut':
42
E = G.Automorphisms()
43
type_str = "automorphism"
44
else:
45
print("Invalid type")
46
return
47
48
i = 1
49
for t in L:
50
for h in E:
51
image = mapkGElt(h, f, t)
52
if not image in I:
53
if verbose:
54
print("The ", type_str)
55
print(h)
56
print("sends element " + str(i) + ":")
57
print(t)
58
print("to the element:")
59
print(image)
60
print("which is outside the ideal.")
61
return False
62
if verbose:
63
print("Every", type_str, "takes element " + str(i) + ":")
64
print(t),
65
print("into the ideal.")
66
i += 1
67
return True
68
69
# G: a group.
70
# f: embedding of G into kG.
71
# id: the multiplicative identity element of kG.
72
# I: an ideal in kG.
73
#
74
# Returns True if f embeds G into kG/I and False
75
# otherwise.
76
77
def GEmbeds(G, f, id, I):
78
embeds = True
79
for g in G.Elements():
80
x = gap.Image(f, g)
81
if x != id and x - id in I:
82
embeds = False
83
break
84
return embeds
85
86
# G: a group.
87
# f: embedding of G into kG.
88
# id: the multiplicative identity of kG.
89
# I: an ideal in kG.
90
# kGmodI: kG/I.
91
# Igens: list of generators for I.
92
# skipFRCheck: if True, skip checking full realizability.
93
#
94
# Check if G embeds in kG/I. If it does, find the number of units in kG/I.
95
# If G = (kG/I)*, then kG/I realizes G. In this case, check whether
96
# kG/I fully realizes G.
97
98
def analyzekGmodI(G, f, id, I, kGmodI, Igens, skipFRCheck=False):
99
print("G = " + str(gap.StructureDescription(G)) + " of order " + str(G.Order()) + '.')
100
embeds = GEmbeds(G, f, id, I)
101
if embeds:
102
print("G embeds in kG/I.")
103
numUnits = kGmodI.Units().Order()
104
print("kG/I has", kGmodI.Size(), "elements and", numUnits, "units.")
105
if numUnits == G.Order():
106
if not skipFRCheck:
107
preserves = preservesList(f, G, I, Igens)
108
if preserves:
109
print("G is fully realizable.")
110
else:
111
print("kG/I realizes but does not fully realize G.")
112
else:
113
print("kG/I realizes G. I didn't check whether it fully realizes G.")
114
else:
115
print("kG/I does not realize G.")
116
else:
117
print("G does not embed in kG/I.")
118