Skip to content

Commit e5e7293

Browse files
authored
Merge pull request #6942 from rvisser7/abstract_groups
Various improvements to code snippets for groups
2 parents c0f5a0f + 9492e88 commit e5e7293

29 files changed

Lines changed: 2849 additions & 234 deletions

lmfdb/galois_groups/code.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ prompt:
22
magma: 'magma'
33
sage: 'sage'
44
oscar: 'oscar'
5+
gap: 'gap'
56

67
logo:
78
magma: <img src = "https://i.stack.imgur.com/0468s.png" width="50px">
89
sage: <img src ="https://www.sagemath.org/pix/sage_logo_new.png" width = "50px">
910
oscar: <img src = "https://oscar-system.github.io/Oscar.jl/stable/assets/logo.png" width="50px">
11+
gap: <img src = "https://gap.math.u-bordeaux.fr/logo/Logo%20Couleurs/Logo_GAP-GP_Couleurs_L150px.png" width="50px">
1012

1113
comment:
1214
sage: |
@@ -15,6 +17,8 @@ comment:
1517
//
1618
oscar: |
1719
#
20+
gap: |
21+
#
1822
1923
not-implemented:
2024
sage: |
@@ -23,6 +27,9 @@ not-implemented:
2327
// (not yet implemented)
2428
oscar: |
2529
# (not yet implemented)
30+
gap: |
31+
# (not yet implemented)
32+
2633
2734
frontmatter:
2835
all: |
@@ -33,89 +40,105 @@ gg:
3340
magma: G := TransitiveGroup({n}, {t});
3441
sage: G = TransitiveGroup({n}, {t})
3542
oscar: G = transitive_group({n}, {t})
43+
gap: G := TransitiveGroup({n}, {t});
3644

3745
n:
3846
comment: Degree
3947
magma: t, n := TransitiveGroupIdentification(G); n;
4048
sage: G.degree()
4149
oscar: degree(G)
50+
gap: NrMovedPoints(G);
4251

4352
t:
4453
comment: Transitive number
4554
magma: t, n := TransitiveGroupIdentification(G); t;
4655
sage: G.transitive_number()
4756
oscar: transitive_group_identification(G)[2]
57+
gap: TransitiveIdentification(G);
4858

4959
primitive:
5060
comment: Determine if group is primitive
5161
magma: IsPrimitive(G);
5262
sage: G.is_primitive()
5363
oscar: is_primitive(G)
64+
gap: IsPrimitive(G);
5465

5566
even:
5667
comment: Parity
5768
magma: IsEven(G);
5869
sage: all(g.SignPerm() == 1 for g in libgap(G).GeneratorsOfGroup())
5970
oscar: is_even(G)
71+
gap: ForAll(GeneratorsOfGroup(G), g -> SignPerm(g) = 1);
6072

6173
nilpotent:
6274
comment: Nilpotency class
6375
magma: NilpotencyClass(G);
6476
sage: libgap(G).NilpotencyClassOfGroup() if G.is_nilpotent() else -1
6577
oscar: if is_nilpotent(G) nilpotency_class(G) end
78+
gap: if IsNilpotentGroup(G) then NilpotencyClassOfGroup(G); fi;
6679

6780
auts:
6881
comment: Order of the centralizer of G in S_n
6982
magma: Order(Centralizer(SymmetricGroup(n), G));
7083
sage: SymmetricGroup({n}).centralizer(G).order()
7184
oscar: order(centralizer(symmetric_group({n}), G)[1])
85+
gap: Order(Centralizer(SymmetricGroup({n}), G));
7286

7387
gens:
7488
comment: Generators
7589
magma: Generators(G);
7690
sage: G.gens()
7791
oscar: gens(G)
92+
gap: GeneratorsOfGroup(G);
7893

7994
ccs:
8095
comment: Conjugacy classes
8196
magma: ConjugacyClasses(G);
8297
sage: G.conjugacy_classes()
8398
oscar: conjugacy_classes(G)
99+
gap: ConjugacyClasses(G);
84100

85101
order:
86102
comment: Order
87103
magma: Order(G);
88104
sage: G.order()
89105
oscar: order(G)
106+
gap: Order(G);
90107

91108
cyclic:
92109
comment: Determine if group is cyclic
93110
magma: IsCyclic(G);
94111
sage: G.is_cyclic()
95112
oscar: is_cyclic(G)
113+
gap: IsCyclic(G);
96114

97115
abelian:
98116
comment: Determine if group is abelian
99117
magma: IsAbelian(G);
100118
sage: G.is_abelian()
101119
oscar: is_abelian(G)
120+
gap: IsAbelian(G);
102121

103122
solvable:
104123
comment: Determine if group is solvable
105124
magma: IsSolvable(G);
106125
sage: G.is_solvable()
107126
oscar: is_solvable(G)
127+
gap: IsSolvable(G);
108128

109129
id:
110130
comment: Abstract group ID
111131
magma: IdentifyGroup(G);
112132
sage: G.id()
133+
oscar: small_group_identification(G)
134+
gap: IdGroup(G);
113135

114136
char_table:
115137
comment: Character table
116138
magma: CharacterTable(G);
117139
sage: G.character_table()
118140
oscar: character_table(G)
141+
gap: CharacterTable(G);
119142

120143

121144
# specify which code snippets to test

lmfdb/galois_groups/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def render_group_webpage(args):
356356
data['dispv'] = sparse_cyclotomic_to_mathml
357357
data['malle_a'] = wgg.malle_a
358358
downloads = []
359-
for lang in [("Magma", "magma"), ("Oscar", "oscar"), ("SageMath", "sage")]:
359+
for lang in [("Gap", "gap"), ("Magma", "magma"), ("Oscar", "oscar"), ("SageMath", "sage")]:
360360
downloads.append(('{} commands'.format(lang[0]), url_for(".gg_code_download", label=label, download_type=lang[1])))
361361
downloads.append(('Underlying data', url_for(".gg_data", label=label)))
362362
# split the label so that breadcrumbs point to a search for this object's degree

0 commit comments

Comments
 (0)