passagemath-groups 10.6.41__cp314-cp314t-musllinux_1_2_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- passagemath_groups/__init__.py +3 -0
- passagemath_groups-10.6.41.dist-info/METADATA +113 -0
- passagemath_groups-10.6.41.dist-info/RECORD +36 -0
- passagemath_groups-10.6.41.dist-info/WHEEL +5 -0
- passagemath_groups-10.6.41.dist-info/top_level.txt +3 -0
- sage/all__sagemath_groups.py +21 -0
- sage/geometry/all__sagemath_groups.py +1 -0
- sage/geometry/palp_normal_form.cpython-314t-x86_64-linux-musl.so +0 -0
- sage/geometry/palp_normal_form.pyx +401 -0
- sage/groups/abelian_gps/all.py +25 -0
- sage/groups/all.py +5 -0
- sage/groups/all__sagemath_groups.py +32 -0
- sage/groups/artin.py +1074 -0
- sage/groups/braid.py +3806 -0
- sage/groups/cactus_group.py +1001 -0
- sage/groups/cubic_braid.py +2052 -0
- sage/groups/finitely_presented.py +1896 -0
- sage/groups/finitely_presented_catalog.py +27 -0
- sage/groups/finitely_presented_named.py +592 -0
- sage/groups/fqf_orthogonal.py +579 -0
- sage/groups/free_group.py +944 -0
- sage/groups/group_exp.py +360 -0
- sage/groups/group_semidirect_product.py +504 -0
- sage/groups/kernel_subgroup.py +231 -0
- sage/groups/lie_gps/all.py +1 -0
- sage/groups/lie_gps/catalog.py +8 -0
- sage/groups/lie_gps/nilpotent_lie_group.py +945 -0
- sage/groups/misc_gps/all.py +1 -0
- sage/groups/misc_gps/misc_groups.py +11 -0
- sage/groups/misc_gps/misc_groups_catalog.py +33 -0
- sage/groups/raag.py +866 -0
- sage/groups/semimonomial_transformations/all.py +1 -0
- sage/groups/semimonomial_transformations/semimonomial_transformation.cpython-314t-x86_64-linux-musl.so +0 -0
- sage/groups/semimonomial_transformations/semimonomial_transformation.pxd +9 -0
- sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +346 -0
- sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +512 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-groups
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-groups
|
|
2
|
+
from sage.structure.element cimport Element, MonoidElement, MultiplicativeGroupElement
|
|
3
|
+
|
|
4
|
+
cdef class SemimonomialTransformation(MultiplicativeGroupElement):
|
|
5
|
+
cdef tuple v
|
|
6
|
+
cdef object perm, alpha
|
|
7
|
+
|
|
8
|
+
cdef _new_c(self)
|
|
9
|
+
cpdef _mul_(self, other)
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-groups
|
|
2
|
+
# sage.doctest: needs sage.rings.finite_rings
|
|
3
|
+
r"""
|
|
4
|
+
Elements of a semimonomial transformation group
|
|
5
|
+
|
|
6
|
+
The semimonomial transformation group of degree `n` over a ring `R` is
|
|
7
|
+
the semidirect product of the monomial transformation group of degree `n`
|
|
8
|
+
(also known as the complete monomial group over the group of units
|
|
9
|
+
`R^{\times}` of `R`) and the group of ring automorphisms.
|
|
10
|
+
|
|
11
|
+
The multiplication of two elements `(\phi, \pi, \alpha)(\psi, \sigma, \beta)`
|
|
12
|
+
with
|
|
13
|
+
|
|
14
|
+
- `\phi, \psi \in {R^{\times}}^n`
|
|
15
|
+
|
|
16
|
+
- `\pi, \sigma \in S_n` (with the multiplication `\pi\sigma`
|
|
17
|
+
done from left to right (like in GAP) --
|
|
18
|
+
that is, `(\pi\sigma)(i) = \sigma(\pi(i))` for all `i`.)
|
|
19
|
+
|
|
20
|
+
- `\alpha, \beta \in Aut(R)`
|
|
21
|
+
|
|
22
|
+
is defined by
|
|
23
|
+
|
|
24
|
+
.. MATH::
|
|
25
|
+
|
|
26
|
+
(\phi, \pi, \alpha)(\psi, \sigma, \beta) =
|
|
27
|
+
(\phi \cdot \psi^{\pi, \alpha}, \pi\sigma, \alpha \circ \beta)
|
|
28
|
+
|
|
29
|
+
with
|
|
30
|
+
`\psi^{\pi, \alpha} = (\alpha(\psi_{\pi(1)-1}), \ldots, \alpha(\psi_{\pi(n)-1}))`
|
|
31
|
+
and an elementwisely defined multiplication of vectors. (The indexing
|
|
32
|
+
of vectors is `0`-based here, so `\psi = (\psi_0, \psi_1, \ldots, \psi_{n-1})`.)
|
|
33
|
+
|
|
34
|
+
The parent is
|
|
35
|
+
:class:`~sage.groups.semimonomial_transformations.semimonomial_transformation_group.SemimonomialTransformationGroup`.
|
|
36
|
+
|
|
37
|
+
AUTHORS:
|
|
38
|
+
|
|
39
|
+
- Thomas Feulner (2012-11-15): initial version
|
|
40
|
+
- Thomas Feulner (2013-12-27): :issue:`15576` dissolve dependency on
|
|
41
|
+
Permutations.options.mul
|
|
42
|
+
|
|
43
|
+
EXAMPLES::
|
|
44
|
+
|
|
45
|
+
sage: S = SemimonomialTransformationGroup(GF(4, 'a'), 4)
|
|
46
|
+
sage: G = S.gens()
|
|
47
|
+
sage: G[0]*G[1]
|
|
48
|
+
((a, 1, 1, 1); (1,2,3,4), Ring endomorphism of Finite Field in a of size 2^2
|
|
49
|
+
Defn: a |--> a)
|
|
50
|
+
|
|
51
|
+
TESTS::
|
|
52
|
+
|
|
53
|
+
sage: TestSuite(G[0]).run()
|
|
54
|
+
"""
|
|
55
|
+
from cpython.object cimport PyObject_RichCompare
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _is_id(f, R):
|
|
59
|
+
"""
|
|
60
|
+
Test some automorphism `f` of a ring `R` if it is the identity
|
|
61
|
+
automorphism.
|
|
62
|
+
|
|
63
|
+
EXAMPLES::
|
|
64
|
+
|
|
65
|
+
sage: from sage.groups.semimonomial_transformations.semimonomial_transformation import _is_id
|
|
66
|
+
sage: F.<a> = GF(8)
|
|
67
|
+
sage: f = F.hom([a**2])
|
|
68
|
+
sage: _is_id(f, F)
|
|
69
|
+
False
|
|
70
|
+
"""
|
|
71
|
+
for r in R.gens():
|
|
72
|
+
if r != f(r):
|
|
73
|
+
return False
|
|
74
|
+
return True
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _inverse(f, R):
|
|
78
|
+
"""
|
|
79
|
+
Return the inverse to the automorphism `f` of a ring `R`.
|
|
80
|
+
|
|
81
|
+
EXAMPLES::
|
|
82
|
+
|
|
83
|
+
sage: from sage.groups.semimonomial_transformations.semimonomial_transformation import _inverse
|
|
84
|
+
sage: F.<a> = GF(8)
|
|
85
|
+
sage: f = F.hom([a**2])
|
|
86
|
+
sage: _inverse(f, F)*f == F.hom([a])
|
|
87
|
+
True
|
|
88
|
+
"""
|
|
89
|
+
g = f
|
|
90
|
+
while not _is_id(g*f, R):
|
|
91
|
+
g *= f
|
|
92
|
+
return g
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
cdef class SemimonomialTransformation(MultiplicativeGroupElement):
|
|
96
|
+
r"""
|
|
97
|
+
An element in the semimonomial group over a ring `R`. See
|
|
98
|
+
:class:`~sage.groups.semimonomial_transformations.semimonomial_transformation_group.SemimonomialTransformationGroup`
|
|
99
|
+
for the details on the multiplication of two elements.
|
|
100
|
+
|
|
101
|
+
The init method should never be called directly. Use the call via the
|
|
102
|
+
parent
|
|
103
|
+
:class:`~sage.groups.semimonomial_transformations.semimonomial_transformation_group.SemimonomialTransformationGroup`.
|
|
104
|
+
instead.
|
|
105
|
+
|
|
106
|
+
EXAMPLES::
|
|
107
|
+
|
|
108
|
+
sage: F.<a> = GF(9)
|
|
109
|
+
sage: S = SemimonomialTransformationGroup(F, 4)
|
|
110
|
+
sage: g = S(v = [2, a, 1, 2])
|
|
111
|
+
sage: h = S(perm = Permutation('(1,2,3,4)'), autom=F.hom([a**3]))
|
|
112
|
+
sage: g*h
|
|
113
|
+
((2, a, 1, 2); (1,2,3,4), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> 2*a + 1)
|
|
114
|
+
sage: h*g
|
|
115
|
+
((2*a + 1, 1, 2, 2); (1,2,3,4), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> 2*a + 1)
|
|
116
|
+
sage: S(g)
|
|
117
|
+
((2, a, 1, 2); (), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> a)
|
|
118
|
+
sage: S(1) # the one element in the group
|
|
119
|
+
((1, 1, 1, 1); (), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> a)
|
|
120
|
+
"""
|
|
121
|
+
def __init__(self, parent, v, perm, alpha):
|
|
122
|
+
r"""
|
|
123
|
+
The init method should never be called directly. Use the call via the
|
|
124
|
+
parent instead. See
|
|
125
|
+
:meth:`sage.groups.semimonomial_transformations.semimonomial_transformation.SemimonomialTransformation.__call__`.
|
|
126
|
+
|
|
127
|
+
EXAMPLES::
|
|
128
|
+
|
|
129
|
+
sage: F.<a> = GF(9)
|
|
130
|
+
sage: S = SemimonomialTransformationGroup(F, 4)
|
|
131
|
+
sage: g = S(v = [2, a, 1, 2]) #indirect doctest
|
|
132
|
+
"""
|
|
133
|
+
MultiplicativeGroupElement.__init__(self, parent)
|
|
134
|
+
self.v = tuple(v)
|
|
135
|
+
self.perm = perm
|
|
136
|
+
self.alpha = alpha
|
|
137
|
+
|
|
138
|
+
cdef _new_c(self):
|
|
139
|
+
# Create a copy of self.
|
|
140
|
+
cdef SemimonomialTransformation x
|
|
141
|
+
x = SemimonomialTransformation.__new__(SemimonomialTransformation)
|
|
142
|
+
x._parent = self._parent
|
|
143
|
+
x.v = self.v
|
|
144
|
+
x.perm = self.perm
|
|
145
|
+
x.alpha = self.alpha
|
|
146
|
+
return x
|
|
147
|
+
|
|
148
|
+
def __copy__(self):
|
|
149
|
+
"""
|
|
150
|
+
Return a copy of ``self``.
|
|
151
|
+
|
|
152
|
+
EXAMPLES::
|
|
153
|
+
|
|
154
|
+
sage: F.<a> = GF(9)
|
|
155
|
+
sage: s = SemimonomialTransformationGroup(F, 4).an_element()
|
|
156
|
+
sage: t = copy(s) # indirect doctest
|
|
157
|
+
sage: t is s
|
|
158
|
+
False
|
|
159
|
+
sage: t == s
|
|
160
|
+
True
|
|
161
|
+
"""
|
|
162
|
+
return self._new_c()
|
|
163
|
+
|
|
164
|
+
def __hash__(self):
|
|
165
|
+
"""
|
|
166
|
+
Return hash of this element.
|
|
167
|
+
|
|
168
|
+
EXAMPLES::
|
|
169
|
+
|
|
170
|
+
sage: F.<a> = GF(9)
|
|
171
|
+
sage: hash( SemimonomialTransformationGroup(F, 4).an_element() ) #random #indirect doctest
|
|
172
|
+
6279637968393375107
|
|
173
|
+
"""
|
|
174
|
+
return hash(self.v) + hash(self.perm) + hash(self.get_autom())
|
|
175
|
+
|
|
176
|
+
cpdef _mul_(left, _right):
|
|
177
|
+
r"""
|
|
178
|
+
Multiplication of elements.
|
|
179
|
+
|
|
180
|
+
The multiplication of two elements `(\phi, \pi, \alpha)` and
|
|
181
|
+
`(\psi, \sigma, \beta)` with
|
|
182
|
+
|
|
183
|
+
- `\phi, \psi \in {R^{\times}}^n`
|
|
184
|
+
|
|
185
|
+
- `\pi, \sigma \in S_n`
|
|
186
|
+
|
|
187
|
+
- `\alpha, \beta \in Aut(R)`
|
|
188
|
+
|
|
189
|
+
is defined by:
|
|
190
|
+
|
|
191
|
+
.. MATH::
|
|
192
|
+
|
|
193
|
+
(\phi, \pi, \alpha)(\psi, \sigma, \beta) =
|
|
194
|
+
(\phi \cdot \psi^{\pi, \alpha}, \pi\sigma, \alpha \circ \beta)
|
|
195
|
+
|
|
196
|
+
with
|
|
197
|
+
`\psi^{\pi, \alpha} = (\alpha(\psi_{\pi(1)-1}), \ldots, \alpha(\psi_{\pi(n)-1}))`
|
|
198
|
+
and an elementwisely defined multiplication of vectors. (The indexing
|
|
199
|
+
of vectors is `0`-based here, so `\psi = (\psi_0, \psi_1, \ldots, \psi_{n-1})`.)
|
|
200
|
+
Furthermore, the multiplication `\pi\sigma` is done from left to right
|
|
201
|
+
(like in GAP) -- that is, `(\pi\sigma)(i) = \sigma(\pi(i))` for all `i`.
|
|
202
|
+
|
|
203
|
+
EXAMPLES::
|
|
204
|
+
|
|
205
|
+
sage: F.<a> = GF(9)
|
|
206
|
+
sage: s = SemimonomialTransformationGroup(F, 4).an_element()
|
|
207
|
+
sage: s*s # indirect doctest
|
|
208
|
+
((a, 2*a + 1, 1, 1); (1,3)(2,4), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> a)
|
|
209
|
+
"""
|
|
210
|
+
cdef SemimonomialTransformation right = <SemimonomialTransformation> _right
|
|
211
|
+
cdef i
|
|
212
|
+
v = left.perm.action(right.v)
|
|
213
|
+
alpha = left.get_autom()
|
|
214
|
+
v = [left.v[i]*alpha(v[i]) for i in range(left.parent().degree())]
|
|
215
|
+
return left.parent()(v=v, perm=left.perm.right_action_product(right.perm),
|
|
216
|
+
autom=alpha*right.get_autom(), check=False)
|
|
217
|
+
|
|
218
|
+
def __invert__(self):
|
|
219
|
+
"""
|
|
220
|
+
Return the inverse of ``self``.
|
|
221
|
+
|
|
222
|
+
EXAMPLES::
|
|
223
|
+
|
|
224
|
+
sage: F.<a> = GF(9)
|
|
225
|
+
sage: S = SemimonomialTransformationGroup(F, 4)
|
|
226
|
+
sage: s = S.an_element()
|
|
227
|
+
sage: s*s**(-1) == S(1) # indirect doctest
|
|
228
|
+
True
|
|
229
|
+
"""
|
|
230
|
+
cdef i
|
|
231
|
+
alpha = _inverse(self.get_autom(), self.get_autom().domain())
|
|
232
|
+
inv_perm = self.perm.inverse()
|
|
233
|
+
v = [alpha(self.v[i]**(-1)) for i in range(len(self.v))]
|
|
234
|
+
return self.parent()(v=inv_perm.action(v), perm=inv_perm, autom=alpha,
|
|
235
|
+
check=False)
|
|
236
|
+
|
|
237
|
+
def __repr__(self):
|
|
238
|
+
"""
|
|
239
|
+
String representation of ``self``.
|
|
240
|
+
|
|
241
|
+
EXAMPLES::
|
|
242
|
+
|
|
243
|
+
sage: F.<a> = GF(9)
|
|
244
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element() # indirect doctest
|
|
245
|
+
((a, 1, 1, 1); (1,4,3,2), Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> 2*a + 1)
|
|
246
|
+
"""
|
|
247
|
+
return "(%s; %s, %s)" % (self.v, self.perm.cycle_string(),
|
|
248
|
+
self.get_autom())
|
|
249
|
+
|
|
250
|
+
cpdef _richcmp_(left, _right, int op):
|
|
251
|
+
"""
|
|
252
|
+
Compare group elements ``self`` and ``right``.
|
|
253
|
+
|
|
254
|
+
EXAMPLES::
|
|
255
|
+
|
|
256
|
+
sage: F.<a> = GF(9)
|
|
257
|
+
sage: g = SemimonomialTransformationGroup(F, 4).gens()
|
|
258
|
+
sage: g[0] > g[1] # indirect doctest
|
|
259
|
+
True
|
|
260
|
+
sage: g[1] != g[2] # indirect doctest
|
|
261
|
+
True
|
|
262
|
+
"""
|
|
263
|
+
cdef SemimonomialTransformation right = <SemimonomialTransformation> _right
|
|
264
|
+
return PyObject_RichCompare([left.v, left.perm, left.get_autom()],
|
|
265
|
+
[right.v, right.perm, right.get_autom()],
|
|
266
|
+
op)
|
|
267
|
+
|
|
268
|
+
def __reduce__(self):
|
|
269
|
+
"""
|
|
270
|
+
Return a function and its arguments needed to create this
|
|
271
|
+
semimonomial group element. This is used in pickling.
|
|
272
|
+
|
|
273
|
+
EXAMPLES::
|
|
274
|
+
|
|
275
|
+
sage: F.<a> = GF(9)
|
|
276
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element().__reduce__()
|
|
277
|
+
(Semimonomial transformation group over Finite Field in a of size 3^2 of degree 4, (0, (a, 1, 1, 1), [4, 1, 2, 3], Ring endomorphism of Finite Field in a of size 3^2
|
|
278
|
+
Defn: a |--> 2*a + 1))
|
|
279
|
+
"""
|
|
280
|
+
return (self.parent(), (0, self.v, self.perm, self.get_autom()))
|
|
281
|
+
|
|
282
|
+
def get_v(self):
|
|
283
|
+
"""
|
|
284
|
+
Return the component corresponding to `{R^{\times}}^n` of ``self``.
|
|
285
|
+
|
|
286
|
+
EXAMPLES::
|
|
287
|
+
|
|
288
|
+
sage: F.<a> = GF(9)
|
|
289
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element().get_v()
|
|
290
|
+
(a, 1, 1, 1)
|
|
291
|
+
"""
|
|
292
|
+
return self.v
|
|
293
|
+
|
|
294
|
+
def get_v_inverse(self):
|
|
295
|
+
"""
|
|
296
|
+
Return the (elementwise) inverse of the component corresponding to
|
|
297
|
+
`{R^{\times}}^n` of ``self``.
|
|
298
|
+
|
|
299
|
+
EXAMPLES::
|
|
300
|
+
|
|
301
|
+
sage: F.<a> = GF(9)
|
|
302
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element().get_v_inverse()
|
|
303
|
+
(a + 2, 1, 1, 1)
|
|
304
|
+
"""
|
|
305
|
+
return tuple(x**(-1) for x in self.v)
|
|
306
|
+
|
|
307
|
+
def get_perm(self):
|
|
308
|
+
"""
|
|
309
|
+
Return the component corresponding to `S_n` of ``self``.
|
|
310
|
+
|
|
311
|
+
EXAMPLES::
|
|
312
|
+
|
|
313
|
+
sage: F.<a> = GF(9)
|
|
314
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element().get_perm()
|
|
315
|
+
[4, 1, 2, 3]
|
|
316
|
+
"""
|
|
317
|
+
return self.perm
|
|
318
|
+
|
|
319
|
+
def get_autom(self):
|
|
320
|
+
"""
|
|
321
|
+
Return the component corresponding to `Aut(R)` of ``self``.
|
|
322
|
+
|
|
323
|
+
EXAMPLES::
|
|
324
|
+
|
|
325
|
+
sage: F.<a> = GF(9)
|
|
326
|
+
sage: SemimonomialTransformationGroup(F, 4).an_element().get_autom()
|
|
327
|
+
Ring endomorphism of Finite Field in a of size 3^2 Defn: a |--> 2*a + 1
|
|
328
|
+
"""
|
|
329
|
+
return self.alpha
|
|
330
|
+
|
|
331
|
+
def invert_v(self):
|
|
332
|
+
"""
|
|
333
|
+
Elementwisely invert all entries of ``self`` which
|
|
334
|
+
correspond to the component `{R^{\times}}^n`.
|
|
335
|
+
|
|
336
|
+
The other components of ``self`` keep unchanged.
|
|
337
|
+
|
|
338
|
+
EXAMPLES::
|
|
339
|
+
|
|
340
|
+
sage: F.<a> = GF(9)
|
|
341
|
+
sage: x = copy(SemimonomialTransformationGroup(F, 4).an_element())
|
|
342
|
+
sage: x.invert_v()
|
|
343
|
+
sage: x.get_v() == SemimonomialTransformationGroup(F, 4).an_element().get_v_inverse()
|
|
344
|
+
True
|
|
345
|
+
"""
|
|
346
|
+
self.v = tuple([x**(-1) for x in self.v])
|