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.
Files changed (36) hide show
  1. passagemath_groups/__init__.py +3 -0
  2. passagemath_groups-10.6.41.dist-info/METADATA +113 -0
  3. passagemath_groups-10.6.41.dist-info/RECORD +36 -0
  4. passagemath_groups-10.6.41.dist-info/WHEEL +5 -0
  5. passagemath_groups-10.6.41.dist-info/top_level.txt +3 -0
  6. sage/all__sagemath_groups.py +21 -0
  7. sage/geometry/all__sagemath_groups.py +1 -0
  8. sage/geometry/palp_normal_form.cpython-314t-x86_64-linux-musl.so +0 -0
  9. sage/geometry/palp_normal_form.pyx +401 -0
  10. sage/groups/abelian_gps/all.py +25 -0
  11. sage/groups/all.py +5 -0
  12. sage/groups/all__sagemath_groups.py +32 -0
  13. sage/groups/artin.py +1074 -0
  14. sage/groups/braid.py +3806 -0
  15. sage/groups/cactus_group.py +1001 -0
  16. sage/groups/cubic_braid.py +2052 -0
  17. sage/groups/finitely_presented.py +1896 -0
  18. sage/groups/finitely_presented_catalog.py +27 -0
  19. sage/groups/finitely_presented_named.py +592 -0
  20. sage/groups/fqf_orthogonal.py +579 -0
  21. sage/groups/free_group.py +944 -0
  22. sage/groups/group_exp.py +360 -0
  23. sage/groups/group_semidirect_product.py +504 -0
  24. sage/groups/kernel_subgroup.py +231 -0
  25. sage/groups/lie_gps/all.py +1 -0
  26. sage/groups/lie_gps/catalog.py +8 -0
  27. sage/groups/lie_gps/nilpotent_lie_group.py +945 -0
  28. sage/groups/misc_gps/all.py +1 -0
  29. sage/groups/misc_gps/misc_groups.py +11 -0
  30. sage/groups/misc_gps/misc_groups_catalog.py +33 -0
  31. sage/groups/raag.py +866 -0
  32. sage/groups/semimonomial_transformations/all.py +1 -0
  33. sage/groups/semimonomial_transformations/semimonomial_transformation.cpython-314t-x86_64-linux-musl.so +0 -0
  34. sage/groups/semimonomial_transformations/semimonomial_transformation.pxd +9 -0
  35. sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +346 -0
  36. sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +512 -0
@@ -0,0 +1,360 @@
1
+ # sage_setup: distribution = sagemath-groups
2
+ r"""
3
+ Functor that converts a commutative additive group into a multiplicative group.
4
+
5
+ AUTHORS:
6
+
7
+ - Mark Shimozono (2013): initial version
8
+ """
9
+ # ***************************************************************************
10
+ # Copyright (C) 2013 <mshimo at math.vt.edu>
11
+ #
12
+ # This program is free software: you can redistribute it and/or modify
13
+ # it under the terms of the GNU General Public License as published by
14
+ # the Free Software Foundation, either version 2 of the License, or
15
+ # (at your option) any later version.
16
+ # https://www.gnu.org/licenses/
17
+ # ***************************************************************************
18
+
19
+ from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups
20
+ from sage.categories.functor import Functor
21
+ from sage.categories.groups import Groups
22
+ from sage.categories.homset import Hom
23
+ from sage.categories.morphism import SetMorphism
24
+ from sage.structure.element import MultiplicativeGroupElement
25
+ from sage.structure.element_wrapper import ElementWrapper
26
+ from sage.structure.parent import Parent
27
+ from sage.structure.unique_representation import UniqueRepresentation
28
+
29
+
30
+ class GroupExp(Functor):
31
+ r"""
32
+ A functor that converts a commutative additive group into an isomorphic
33
+ multiplicative group.
34
+
35
+ More precisely, given a commutative additive group `G`, define the exponential
36
+ of `G` to be the isomorphic group with elements denoted
37
+ `e^g` for every `g \in G` and but with product in multiplicative notation
38
+
39
+ .. MATH::
40
+
41
+ e^g e^h = e^{g+h} \qquad\text{for all $g,h \in G$.}
42
+
43
+ The class :class:`GroupExp` implements the sage functor which sends a commutative
44
+ additive group `G` to its exponential.
45
+
46
+ The creation of an instance of the functor :class:`GroupExp` requires no input::
47
+
48
+ sage: E = GroupExp(); E
49
+ Functor from Category of commutative additive groups to Category of groups
50
+
51
+ The :class:`GroupExp` functor (denoted `E` in the examples) can be applied to two kinds of input.
52
+ The first is a commutative additive group. The output is its exponential.
53
+ This is accomplished by :meth:`_apply_functor`::
54
+
55
+ sage: EZ = E(ZZ); EZ
56
+ Multiplicative form of Integer Ring
57
+
58
+ Elements of the exponentiated group can be created and manipulated as follows::
59
+
60
+ sage: x = EZ(-3); x
61
+ -3
62
+ sage: x.parent()
63
+ Multiplicative form of Integer Ring
64
+ sage: EZ(-1) * EZ(6) == EZ(5)
65
+ True
66
+ sage: EZ(3)^(-1)
67
+ -3
68
+ sage: EZ.one()
69
+ 0
70
+
71
+ The second kind of input the :class:`GroupExp` functor accepts, is a homomorphism of commutative additive groups.
72
+ The output is the multiplicative form of the homomorphism. This is achieved by :meth:`_apply_functor_to_morphism`::
73
+
74
+ sage: L = RootSystem(['A',2]).ambient_space()
75
+ sage: EL = E(L)
76
+ sage: W = L.weyl_group(prefix='s')
77
+ sage: s2 = W.simple_reflection(2)
78
+ sage: def my_action(mu):
79
+ ....: return s2.action(mu)
80
+ sage: from sage.categories.morphism import SetMorphism
81
+ sage: from sage.categories.homset import Hom
82
+ sage: f = SetMorphism(Hom(L, L, CommutativeAdditiveGroups()), my_action)
83
+ sage: F = E(f); F
84
+ Generic endomorphism of
85
+ Multiplicative form of Ambient space of the Root system of type ['A', 2]
86
+ sage: v = L.an_element(); v
87
+ (2, 2, 3)
88
+ sage: y = F(EL(v)); y
89
+ (2, 3, 2)
90
+ sage: y.parent()
91
+ Multiplicative form of Ambient space of the Root system of type ['A', 2]
92
+ """
93
+ def __init__(self):
94
+ r"""
95
+ Initialize the :class:`GroupExp` functor.
96
+
97
+ EXAMPLES::
98
+
99
+ sage: F = GroupExp()
100
+ sage: F.domain()
101
+ Category of commutative additive groups
102
+ sage: F.codomain()
103
+ Category of groups
104
+ """
105
+ Functor.__init__(self, CommutativeAdditiveGroups(), Groups())
106
+
107
+ def _apply_functor(self, x):
108
+ r"""
109
+ Given a commutative additive group, return the isomorphic
110
+ multiplicative group.
111
+
112
+ INPUT:
113
+
114
+ - A commutative additive group `x`
115
+
116
+ OUTPUT: an isomorphic group whose operation is multiplication rather
117
+ than addition
118
+
119
+ In the following example, ``self`` is the functor ``GroupExp()``,
120
+ ``x`` is the additive group ``QQ^2``, and the output group is stored as ``EQ2``.
121
+
122
+ EXAMPLES::
123
+
124
+ sage: EQ2 = GroupExp()(QQ^2)
125
+ sage: x = EQ2(vector(QQ,(-2,1))); x
126
+ (-2, 1)
127
+ sage: x^(-1)
128
+ (2, -1)
129
+ sage: x*x
130
+ (-4, 2)
131
+ sage: EQ2(vector(QQ,(-1,1)))*EQ2(vector(QQ,(3,4))) == EQ2(vector(QQ,(2,5)))
132
+ True
133
+ sage: EQ2.one()
134
+ (0, 0)
135
+ """
136
+ return GroupExp_Class(x)
137
+
138
+ def _apply_functor_to_morphism(self, f):
139
+ r"""
140
+ Given a morphism of commutative additive groups, return the corresponding morphism
141
+ of multiplicative groups.
142
+
143
+ INPUT:
144
+
145
+ - A homomorphism `f` of commutative additive groups
146
+
147
+ OUTPUT: the above homomorphism, but between the corresponding
148
+ multiplicative groups
149
+
150
+ In the following example, ``self`` is the functor :class:`GroupExp` and `f`
151
+ is an endomorphism of the additive group of integers.
152
+
153
+ EXAMPLES::
154
+
155
+ sage: def double(x):
156
+ ....: return x + x
157
+ sage: from sage.categories.morphism import SetMorphism
158
+ sage: from sage.categories.homset import Hom
159
+ sage: f = SetMorphism(Hom(ZZ, ZZ, CommutativeAdditiveGroups()), double)
160
+ sage: E = GroupExp()
161
+ sage: EZ = E._apply_functor(ZZ)
162
+ sage: F = E._apply_functor_to_morphism(f)
163
+ sage: F.domain() == EZ
164
+ True
165
+ sage: F.codomain() == EZ
166
+ True
167
+ sage: F(EZ(3)) == EZ(3) * EZ(3)
168
+ True
169
+ """
170
+ new_domain = self._apply_functor(f.domain())
171
+ new_codomain = self._apply_functor(f.codomain())
172
+
173
+ def new_f(a):
174
+ return new_codomain(f(a.value))
175
+
176
+ return SetMorphism(Hom(new_domain, new_codomain, Groups()), new_f)
177
+
178
+
179
+ class GroupExpElement(ElementWrapper, MultiplicativeGroupElement):
180
+ r"""
181
+ An element in the exponential of a commutative additive group.
182
+
183
+ INPUT:
184
+
185
+ - ``self`` -- the exponentiated group element being created
186
+ - ``parent`` -- the exponential group (parent of ``self``)
187
+ - ``x`` -- the commutative additive group element being wrapped to form ``self``
188
+
189
+ EXAMPLES::
190
+
191
+ sage: from sage.groups.group_exp import GroupExpElement
192
+ sage: G = QQ^2
193
+ sage: EG = GroupExp()(G)
194
+ sage: z = GroupExpElement(EG, vector(QQ, (1, -3))); z
195
+ (1, -3)
196
+ sage: z.parent()
197
+ Multiplicative form of Vector space of dimension 2 over Rational Field
198
+ sage: EG(vector(QQ, (1, -3))) == z
199
+ True
200
+ """
201
+ def __init__(self, parent, x):
202
+ r"""
203
+ EXAMPLES::
204
+
205
+ sage: G = QQ^2
206
+ sage: EG = GroupExp()(G)
207
+ sage: x = EG.an_element(); x
208
+ (1, 0)
209
+ sage: TestSuite(x).run(skip="_test_category")
210
+
211
+ See the documentation of :meth:`sage.structure.element_wrapper.ElementWrapper.__init__`
212
+ for the reason behind skipping the category test.
213
+ """
214
+ if x not in parent._G:
215
+ raise ValueError("%s is not an element of %s" % (x, parent._G))
216
+ ElementWrapper.__init__(self, parent, x)
217
+
218
+ def __invert__(self):
219
+ r"""
220
+ Invert the element ``self``.
221
+
222
+ EXAMPLES::
223
+
224
+ sage: EZ = GroupExp()(ZZ)
225
+ sage: EZ(-3).inverse() # indirect doctest
226
+ 3
227
+ """
228
+ return GroupExpElement(self.parent(), -self.value)
229
+
230
+ def __mul__(self, x):
231
+ r"""
232
+ Multiply ``self`` by `x`.
233
+
234
+ EXAMPLES::
235
+
236
+ sage: G = GroupExp()(ZZ)
237
+ sage: x = G(2)
238
+ sage: x.__mul__(G(3))
239
+ 5
240
+ sage: G.product(G(2), G(3))
241
+ 5
242
+ """
243
+ return GroupExpElement(self.parent(), self.value + x.value)
244
+
245
+
246
+ class GroupExp_Class(UniqueRepresentation, Parent):
247
+ r"""
248
+ The multiplicative form of a commutative additive group.
249
+
250
+ INPUT:
251
+
252
+ - ``G`` -- a commutative additive group
253
+
254
+ OUTPUT: the multiplicative form of `G`
255
+
256
+ EXAMPLES::
257
+
258
+ sage: GroupExp()(QQ)
259
+ Multiplicative form of Rational Field
260
+ """
261
+ def __init__(self, G) -> None:
262
+ r"""
263
+
264
+ EXAMPLES::
265
+
266
+ sage: EG = GroupExp()(QQ^2)
267
+ sage: TestSuite(EG).run(skip="_test_elements")
268
+ """
269
+ if G not in CommutativeAdditiveGroups():
270
+ raise TypeError("%s must be a commutative additive group" % G)
271
+ self._G = G
272
+ Parent.__init__(self, category=Groups())
273
+
274
+ def _repr_(self) -> str:
275
+ r"""
276
+ Return a string describing the multiplicative form of a commutative additive group.
277
+
278
+ EXAMPLES::
279
+
280
+ sage: GroupExp()(ZZ) # indirect doctest
281
+ Multiplicative form of Integer Ring
282
+ """
283
+ return "Multiplicative form of %s" % self._G
284
+
285
+ def _element_constructor_(self, x):
286
+ r"""
287
+ Construct the multiplicative group element, which wraps the additive
288
+ group element `x`.
289
+
290
+ EXAMPLES::
291
+
292
+ sage: G = GroupExp()(ZZ)
293
+ sage: G(4) # indirect doctest
294
+ 4
295
+ """
296
+ return GroupExpElement(self, x)
297
+
298
+ def one(self):
299
+ r"""
300
+ Return the identity element of the multiplicative group.
301
+
302
+ EXAMPLES::
303
+
304
+ sage: G = GroupExp()(ZZ^2)
305
+ sage: G.one()
306
+ (0, 0)
307
+ sage: x = G.an_element(); x
308
+ (1, 0)
309
+ sage: x == x * G.one()
310
+ True
311
+ """
312
+ return GroupExpElement(self, self._G.zero())
313
+
314
+ def _an_element_(self):
315
+ r"""
316
+ Return an element of the multiplicative group.
317
+
318
+ EXAMPLES::
319
+
320
+ sage: L = RootSystem(['A',2]).weight_lattice()
321
+ sage: EL = GroupExp()(L)
322
+ sage: x = EL.an_element(); x
323
+ 2*Lambda[1] + 2*Lambda[2]
324
+ sage: x.parent()
325
+ Multiplicative form of Weight lattice of the Root system of type ['A', 2]
326
+ """
327
+ return GroupExpElement(self, self._G.an_element())
328
+
329
+ def product(self, x, y):
330
+ r"""
331
+ Return the product of `x` and `y` in the multiplicative group.
332
+
333
+ EXAMPLES::
334
+
335
+ sage: G = GroupExp()(ZZ)
336
+ sage: G.product(G(2),G(7))
337
+ 9
338
+ sage: x = G(2)
339
+ sage: x.__mul__(G(7))
340
+ 9
341
+ """
342
+ return GroupExpElement(self, x.value + y.value)
343
+
344
+ def group_generators(self):
345
+ r"""
346
+ Return generators of ``self``.
347
+
348
+ EXAMPLES::
349
+
350
+ sage: GroupExp()(ZZ).group_generators()
351
+ (1,)
352
+ """
353
+ if hasattr(self._G, 'gens'):
354
+ additive_generators = self._G.gens()
355
+ else:
356
+ raise AttributeError("Additive group has no method 'gens'")
357
+ return tuple([self(x) for x in additive_generators])
358
+
359
+
360
+ GroupExp_Class.Element = GroupExpElement