passagemath-groups 10.6.33__cp314-cp314-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 (35) hide show
  1. passagemath_groups-10.6.33.dist-info/METADATA +113 -0
  2. passagemath_groups-10.6.33.dist-info/RECORD +35 -0
  3. passagemath_groups-10.6.33.dist-info/WHEEL +5 -0
  4. passagemath_groups-10.6.33.dist-info/top_level.txt +2 -0
  5. sage/all__sagemath_groups.py +21 -0
  6. sage/geometry/all__sagemath_groups.py +1 -0
  7. sage/geometry/palp_normal_form.cpython-314-x86_64-linux-musl.so +0 -0
  8. sage/geometry/palp_normal_form.pyx +401 -0
  9. sage/groups/abelian_gps/all.py +25 -0
  10. sage/groups/all.py +5 -0
  11. sage/groups/all__sagemath_groups.py +32 -0
  12. sage/groups/artin.py +1074 -0
  13. sage/groups/braid.py +3806 -0
  14. sage/groups/cactus_group.py +1001 -0
  15. sage/groups/cubic_braid.py +2052 -0
  16. sage/groups/finitely_presented.py +1896 -0
  17. sage/groups/finitely_presented_catalog.py +27 -0
  18. sage/groups/finitely_presented_named.py +592 -0
  19. sage/groups/fqf_orthogonal.py +579 -0
  20. sage/groups/free_group.py +944 -0
  21. sage/groups/group_exp.py +360 -0
  22. sage/groups/group_semidirect_product.py +504 -0
  23. sage/groups/kernel_subgroup.py +231 -0
  24. sage/groups/lie_gps/all.py +1 -0
  25. sage/groups/lie_gps/catalog.py +8 -0
  26. sage/groups/lie_gps/nilpotent_lie_group.py +945 -0
  27. sage/groups/misc_gps/all.py +1 -0
  28. sage/groups/misc_gps/misc_groups.py +11 -0
  29. sage/groups/misc_gps/misc_groups_catalog.py +33 -0
  30. sage/groups/raag.py +866 -0
  31. sage/groups/semimonomial_transformations/all.py +1 -0
  32. sage/groups/semimonomial_transformations/semimonomial_transformation.cpython-314-x86_64-linux-musl.so +0 -0
  33. sage/groups/semimonomial_transformations/semimonomial_transformation.pxd +9 -0
  34. sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +346 -0
  35. sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +512 -0
@@ -0,0 +1,231 @@
1
+ # sage_setup: distribution = sagemath-groups
2
+ r"""
3
+ Kernel Subgroups
4
+
5
+ The kernel of a homomorphism implemented as a subgroup.
6
+
7
+ AUTHORS:
8
+
9
+ - Travis Scrimshaw (1-2023): Initial version
10
+ """
11
+
12
+ # ****************************************************************************
13
+ # Copyright (C) 2023 Travis Scrimshaw <tcscrims at gmail.com>
14
+ #
15
+ # Distributed under the terms of the GNU General Public License (GPL)
16
+ # https://www.gnu.org/licenses/
17
+ # ****************************************************************************
18
+
19
+ from sage.misc.cachefunc import cached_method
20
+ from sage.categories.groups import Groups
21
+ from sage.structure.element_wrapper import ElementWrapper
22
+ from sage.structure.parent import Parent
23
+ from sage.structure.unique_representation import UniqueRepresentation
24
+
25
+
26
+ class KernelSubgroup(UniqueRepresentation, Parent):
27
+ r"""
28
+ The kernel (normal) subgroup.
29
+
30
+ Let `\phi : G \to H` be a group homomorphism. The kernel
31
+ `K = \{\phi(g) = 1 | g \in G\}` is a normal subgroup of `G`.
32
+ """
33
+ def __init__(self, morphism):
34
+ r"""
35
+ Initialize ``self``.
36
+
37
+ EXAMPLES::
38
+
39
+ sage: S2 = SymmetricGroup(2)
40
+ sage: S3 = SymmetricGroup(3)
41
+ sage: H = Hom(S3, S2)
42
+ sage: phi = H(S2.__call__)
43
+ sage: from sage.groups.kernel_subgroup import KernelSubgroup
44
+ sage: K = KernelSubgroup(phi)
45
+ sage: TestSuite(K).run()
46
+ """
47
+ self._morphism = morphism
48
+ cat = Groups().Subobjects()
49
+ base_cat = morphism.domain().category()
50
+ if base_cat in Groups().Finite():
51
+ cat = cat.Finite()
52
+ elif base_cat in Groups().Enumerated():
53
+ cat = cat.Enumerated()
54
+ Parent.__init__(self, category=cat)
55
+
56
+ def _repr_(self):
57
+ r"""
58
+ Return a string representation of ``self``.
59
+
60
+ EXAMPLES::
61
+
62
+ sage: S2 = SymmetricGroup(2)
63
+ sage: S3 = SymmetricGroup(3)
64
+ sage: H = Hom(S3, S2)
65
+ sage: phi = H(S2.__call__)
66
+ sage: from sage.groups.kernel_subgroup import KernelSubgroup
67
+ sage: KernelSubgroup(phi)
68
+ Kernel subgroup defined by Generic morphism:
69
+ From: Symmetric group of order 3! as a permutation group
70
+ To: Symmetric group of order 2! as a permutation group
71
+ """
72
+ return "Kernel subgroup defined by {}".format(self._morphism)
73
+
74
+ def gens(self) -> tuple:
75
+ r"""
76
+ Return the generators of ``self``.
77
+
78
+ EXAMPLES::
79
+
80
+ sage: S2 = SymmetricGroup(2)
81
+ sage: S3 = SymmetricGroup(3)
82
+ sage: H = Hom(S3, S2)
83
+ sage: phi = H(S2.__call__)
84
+ sage: from sage.groups.kernel_subgroup import KernelSubgroup
85
+ sage: K = KernelSubgroup(phi)
86
+ sage: K.gens()
87
+ ((),)
88
+ """
89
+ if self.ambient() in Groups().Finite():
90
+ return tuple(self)
91
+ raise NotImplementedError("only implemented for finite groups")
92
+
93
+ def defining_morphism(self):
94
+ r"""
95
+ Return the defining morphism of ``self``.
96
+
97
+ EXAMPLES::
98
+
99
+ sage: PJ3 = groups.misc.PureCactus(3) # needs sage.rings.number_field
100
+ sage: PJ3.defining_morphism() # needs sage.rings.number_field
101
+ Conversion via _from_cactus_group_element map:
102
+ From: Cactus Group with 3 fruit
103
+ To: Symmetric group of order 3! as a permutation group
104
+ """
105
+ return self._morphism
106
+
107
+ @cached_method
108
+ def ambient(self):
109
+ r"""
110
+ Return the ambient group of ``self``.
111
+
112
+ EXAMPLES::
113
+
114
+ sage: PJ3 = groups.misc.PureCactus(3) # needs sage.rings.number_field
115
+ sage: PJ3.ambient() # needs sage.rings.number_field
116
+ Cactus Group with 3 fruit
117
+ """
118
+ return self._morphism.domain()
119
+
120
+ def _an_element_(self):
121
+ r"""
122
+ Return an element of ``self``.
123
+
124
+ EXAMPLES::
125
+
126
+ sage: PJ3 = groups.misc.PureCactus(3) # needs sage.rings.number_field
127
+ sage: PJ3.an_element() # needs sage.rings.number_field
128
+ 1
129
+ """
130
+ return self.element_class(self, self.ambient().one())
131
+
132
+ def lift(self, x):
133
+ r"""
134
+ Lift ``x`` to the ambient group of ``self``.
135
+
136
+ EXAMPLES::
137
+
138
+ sage: PJ3 = groups.misc.PureCactus(3) # needs sage.rings.number_field
139
+ sage: PJ3.lift(PJ3.an_element()).parent() # needs sage.rings.number_field
140
+ Cactus Group with 3 fruit
141
+ """
142
+ return x.value
143
+
144
+ def retract(self, x):
145
+ r"""
146
+ Convert ``x`` to an element of ``self``.
147
+
148
+ EXAMPLES::
149
+
150
+ sage: # needs sage.rings.number_field
151
+ sage: J3 = groups.misc.Cactus(3)
152
+ sage: s12,s13,s23 = J3.group_generators()
153
+ sage: PJ3 = groups.misc.PureCactus(3)
154
+ sage: elt = PJ3.retract(s23*s12*s23*s13); elt
155
+ s[2,3]*s[1,2]*s[2,3]*s[1,3]
156
+ sage: elt.parent() is PJ3
157
+ True
158
+ """
159
+ return self._element_constructor_(x)
160
+
161
+ def _element_constructor_(self, x):
162
+ r"""
163
+ Construct an element of ``self`` from ``x``.
164
+
165
+ EXAMPLES::
166
+
167
+ sage: # needs sage.rings.number_field
168
+ sage: J3 = groups.misc.Cactus(3)
169
+ sage: s12,s13,s23 = J3.group_generators()
170
+ sage: PJ3 = groups.misc.PureCactus(3)
171
+ sage: elt = PJ3(s23*s12*s23*s13)
172
+ sage: elt.parent() is PJ3
173
+ True
174
+ """
175
+ if self._morphism(x) != self._morphism.codomain().one():
176
+ raise ValueError("{} is not in the kernel of {}".format(x, self._morphism))
177
+ return self.element_class(self, x)
178
+
179
+ def __iter__(self):
180
+ r"""
181
+ Iterate through ``self``.
182
+
183
+ EXAMPLES::
184
+
185
+ sage: S2 = SymmetricGroup(2)
186
+ sage: S3 = SymmetricGroup(3)
187
+ sage: H = Hom(S3, S2)
188
+ sage: phi = H(S2.__call__)
189
+ sage: from sage.groups.kernel_subgroup import KernelSubgroup
190
+ sage: K = KernelSubgroup(phi)
191
+ sage: list(K)
192
+ [()]
193
+ """
194
+ for g in self.ambient():
195
+ try:
196
+ yield self(g)
197
+ except ValueError:
198
+ pass
199
+
200
+ class Element(ElementWrapper):
201
+ def _mul_(self, other):
202
+ r"""
203
+ Multiply ``self`` and ``other``.
204
+
205
+ EXAMPLES::
206
+
207
+ sage: # needs sage.rings.number_field
208
+ sage: J3 = groups.misc.Cactus(3)
209
+ sage: s12,s13,s23 = J3.group_generators()
210
+ sage: PJ3 = groups.misc.PureCactus(3)
211
+ sage: elt = PJ3(s23*s12*s23*s13)
212
+ sage: elt * elt
213
+ s[2,3]*s[1,2]*s[2,3]*s[1,2]*s[2,3]*s[1,2]
214
+ """
215
+ return type(self)(self.parent(), self.value * other.value)
216
+
217
+ def __invert__(self):
218
+ r"""
219
+ Return the inverse of ``self``.
220
+
221
+ EXAMPLES::
222
+
223
+ sage: # needs sage.rings.number_field
224
+ sage: J3 = groups.misc.Cactus(3)
225
+ sage: s12,s13,s23 = J3.group_generators()
226
+ sage: PJ3 = groups.misc.PureCactus(3)
227
+ sage: elt = PJ3(s23*s12*s23*s13)
228
+ sage: ~elt
229
+ s[1,2]*s[2,3]*s[1,2]*s[1,3]
230
+ """
231
+ return type(self)(self.parent(), ~self.value)
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-groups
@@ -0,0 +1,8 @@
1
+ # sage_setup: distribution = sagemath-groups
2
+ r"""
3
+ Type ``groups.lie.<tab>`` to access examples of Lie groups.
4
+ """
5
+ from sage.misc.lazy_import import lazy_import as _lazy_import
6
+
7
+ # We use lazy import because the module depends on sage.manifolds and thus on sage.symbolic
8
+ _lazy_import('sage.groups.lie_gps.nilpotent_lie_group', 'NilpotentLieGroup', as_='Nilpotent')