passagemath-groups 10.5.28__cp310-cp310-macosx_13_0_x86_64.whl → 10.6.34__cp310-cp310-macosx_13_0_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.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-groups
3
- Version: 10.5.28
3
+ Version: 10.6.34
4
4
  Summary: passagemath: Groups and Invariant Theory
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
7
- License: GNU General Public License (GPL) v2 or later
7
+ License-Expression: GPL-2.0-or-later
8
8
  Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
9
  Project-URL: repo (upstream), https://github.com/sagemath/sage
10
10
  Project-URL: repo, https://github.com/passagemath/passagemath
11
- Project-URL: documentation, https://doc.sagemath.org
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
12
  Project-URL: homepage (upstream), https://www.sagemath.org
13
13
  Project-URL: discourse, https://passagemath.discourse.group
14
14
  Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
@@ -16,22 +16,22 @@ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
16
  Classifier: Development Status :: 6 - Mature
17
17
  Classifier: Intended Audience :: Education
18
18
  Classifier: Intended Audience :: Science/Research
19
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
20
19
  Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
21
  Classifier: Operating System :: MacOS :: MacOS X
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
- Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
27
26
  Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
28
  Classifier: Programming Language :: Python :: Implementation :: CPython
29
29
  Classifier: Topic :: Scientific/Engineering :: Mathematics
30
- Requires-Python: <3.14,>=3.9
30
+ Requires-Python: <3.15,>=3.10
31
31
  Description-Content-Type: text/x-rst
32
- Requires-Dist: passagemath-categories~=10.5.28.0
33
- Requires-Dist: passagemath-gap~=10.5.28.0
34
- Requires-Dist: passagemath-modules~=10.5.28.0
32
+ Requires-Dist: passagemath-categories~=10.6.34.0
33
+ Requires-Dist: passagemath-gap~=10.6.34.0
34
+ Requires-Dist: passagemath-modules~=10.6.34.0
35
35
  Provides-Extra: test
36
36
  Requires-Dist: passagemath-repl; extra == "test"
37
37
  Provides-Extra: coxeter3
@@ -62,47 +62,52 @@ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
62
62
  developed 2005-2025 under the motto “Creating a Viable Open Source
63
63
  Alternative to Magma, Maple, Mathematica, and MATLAB”.
64
64
 
65
- The passagemath fork was created in October 2024 with the following
66
- goals:
65
+ The passagemath fork uses the motto "Creating a Free Passage Between the
66
+ Scientific Python Ecosystem and Mathematical Software Communities."
67
+ It was created in October 2024 with the following goals:
67
68
 
68
- - providing modularized installation with pip, thus completing a `major
69
- project started in 2020 in the Sage
70
- codebase <https://github.com/sagemath/sage/issues/29705>`__,
69
+ - providing modularized installation with pip,
71
70
  - establishing first-class membership in the scientific Python
72
71
  ecosystem,
73
72
  - giving `clear attribution of upstream
74
73
  projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
75
74
  - providing independently usable Python interfaces to upstream
76
75
  libraries,
77
- - providing `platform portability and integration testing
76
+ - offering `platform portability and integration testing
78
77
  services <https://github.com/passagemath/passagemath/issues/704>`__
79
78
  to upstream projects,
80
79
  - inviting collaborations with upstream projects,
81
80
  - `building a professional, respectful, inclusive
82
81
  community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
82
+ - `empowering Sage users to participate in the scientific Python ecosystem
83
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
83
84
  - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
84
85
  serverless deployment with Javascript,
85
86
  - developing a native Windows port.
86
87
 
87
- `Full documentation <https://doc.sagemath.org/html/en/index.html>`__ is
88
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
88
89
  available online.
89
90
 
90
- passagemath attempts to support all major Linux distributions and recent versions of
91
- macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
92
- virtualization.
91
+ passagemath attempts to support and provides binary wheels suitable for
92
+ all major Linux distributions and recent versions of macOS.
93
93
 
94
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
95
- Python 3.13.x is also supported, but some third-party packages are still missing wheels,
96
- so compilation from source is triggered for those.
94
+ Binary wheels for native Windows (x86_64) are are available for a subset of
95
+ the passagemath distributions. Use of the full functionality of passagemath
96
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
97
+ or virtualization.
98
+
99
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
97
100
 
98
101
 
99
102
  About this pip-installable distribution package
100
- -----------------------------------------------------------
103
+ -----------------------------------------------
101
104
 
102
- This pip-installable source distribution `sagemath-groups` is an experimental distribution of a part of the Sage Library. Use at your own risk. It provides a small subset of the modules of the Sage library ("sagelib", `sagemath-standard`).
105
+ This pip-installable package ``passagemath-groups`` a distribution of a part of the Sage Library. It provides a small subset of the modules of the Sage library ("sagelib", ``passagemath-standard``) for computations with groups.
103
106
 
104
107
 
105
108
  What is included
106
109
  ----------------
107
110
 
108
- * `Groups <https://doc.sagemath.org/html/en/reference/groups/index.html>`_
111
+ * `Groups <https://passagemath.org/docs/latest/html/en/reference/groups/index.html>`_
112
+
113
+ * see https://github.com/passagemath/passagemath/blob/main/pkgs/sagemath-groups/MANIFEST.in
@@ -1,25 +1,26 @@
1
- passagemath_groups.dylibs/libreadline.8.2.dylib,sha256=rdH5NCg7cX7h7bsLE20uL0NzRMpi2wnZIgSdOutEI0c,296192
2
- passagemath_groups.dylibs/libgap.9.dylib,sha256=u5HhUMRVrfDO7ft_MrUUNd7Pa5jQgmnPe18_Ieq_kys,2557568
3
- passagemath_groups.dylibs/libgmp.10.dylib,sha256=CHW4cQCJWByKPnXFo9gwyT8UTuUhJZPnF1bVpjPXPXk,580928
4
- passagemath_groups-10.5.28.dist-info/RECORD,,
5
- passagemath_groups-10.5.28.dist-info/WHEEL,sha256=uB-yY4rbOc2u-QEdNQG7BRIHb3UrAtTElvaI55WmLFs,110
6
- passagemath_groups-10.5.28.dist-info/top_level.txt,sha256=Kmzulf9WsphADFQuqgvdy5mvTLDj_V2zkFHU2s3UXos,6
7
- passagemath_groups-10.5.28.dist-info/METADATA,sha256=04uOHyEUm7bjHn60ibOD0ijdFplRcdvypapCEWqE39A,4924
8
- sage/all__sagemath_groups.py,sha256=r79v2kKSV7vqPKchrDfS9MOANmHgfIB1uvFiby6HVPk,505
1
+ passagemath_groups.dylibs/libreadline.8.2.dylib,sha256=pZEStgv58Eot18eL4BmJ95UnqZ05YgxIu0Xi-6UPKsc,279592
2
+ passagemath_groups.dylibs/libz.1.3.1.dylib,sha256=2Y5rHm5kG8v4bsjTKiQZVje3CKf15Zrx4c_kpJC3v30,109840
3
+ passagemath_groups.dylibs/libgap.10.dylib,sha256=AagBeoweWXkAQg3uwAEPqtfSkWonuiKaQVg0elIrfRY,2487296
4
+ passagemath_groups.dylibs/libgmp.10.dylib,sha256=bGuoBcs9fWXZtn1iHDmJbsXZfvu15JsUYmWi0BSAkLc,488712
5
+ passagemath_groups-10.6.34.dist-info/RECORD,,
6
+ passagemath_groups-10.6.34.dist-info/WHEEL,sha256=mC9XaLUIYd-A0klVSjTvb9Dm5RdzpW418xdGHHJcrOE,154
7
+ passagemath_groups-10.6.34.dist-info/top_level.txt,sha256=Kmzulf9WsphADFQuqgvdy5mvTLDj_V2zkFHU2s3UXos,6
8
+ passagemath_groups-10.6.34.dist-info/METADATA,sha256=Uw52sNSG5Ylgx1m7gTvWUpAyn0fZYQCwBt8QXr-Hd30,5177
9
+ sage/all__sagemath_groups.py,sha256=JOSY5oJmS67eaWpSs14SBcD7be6NMKH05esJQj8sNOI,525
9
10
  sage/groups/finitely_presented.py,sha256=hLccjNjrj880fFeiLu9W7Z7Xz1HewuyJTVKNWrUsVMI,70042
10
11
  sage/groups/fqf_orthogonal.py,sha256=8cx71JJorwsFoSPzVLBg1rI_dA9dfGeWDqA6GAuqRh8,20181
11
- sage/groups/free_group.py,sha256=Jp7zjjWcb4fwx5tXTW0km5C4MIA34IVptT4Q7Y153yM,29463
12
+ sage/groups/free_group.py,sha256=iMxfq5y8gA91i7XdpCmlL2N-5s2h_oYYohITmhMpVXo,29468
12
13
  sage/groups/all__sagemath_groups.py,sha256=g4HxEDA-YDJcTYHqA5pGLBIy7gpzg-BEVb2Jn7mTJD8,1147
13
- sage/groups/artin.py,sha256=lnpgpA6m7fuAvlcIEjIRlr7IXCrKq9aKLTlkfrV3vlw,41036
14
+ sage/groups/artin.py,sha256=CQHII1jKlBJZ_3GEyH-D22lS06prmIYcagTE7eg_RKc,41353
14
15
  sage/groups/finitely_presented_named.py,sha256=dKB2M78fw5W7RTHCGy-VB_X9co9UbFcQQYSdBr945Rc,20597
15
16
  sage/groups/all.py,sha256=ia6P1nJW_QxBEPMNKdT6ZE8v7J0z8qlMbX2uD3lBJU8,229
16
17
  sage/groups/raag.py,sha256=WbkPRhwCopLc2PtJ_Zcy_QASzsHcsp84_fM1x_dUcWw,28842
17
18
  sage/groups/cubic_braid.py,sha256=LEStrE9YiJAb5acsybhoQhth5fh-wbtn7uLjYyLoO1o,86974
18
19
  sage/groups/group_semidirect_product.py,sha256=7XqgwRR8i-KAWQdRXE8uoNbYDG-mDTqFw2uyqhDGCwY,17910
19
20
  sage/groups/cactus_group.py,sha256=O0FTBvGw8y3nRSR1aGPn5FdEv3jILG7QK_g_lZYdLPc,32895
20
- sage/groups/braid.py,sha256=8QUyWn3-gJyl_68F0w1NAJADjJSCVFq9MniA7ssRDXA,139338
21
+ sage/groups/braid.py,sha256=6LyEbj9KCOyR7v1HhHWYyd62XqGSHcIOQVQF_TuWCXk,140495
21
22
  sage/groups/finitely_presented_catalog.py,sha256=Ylc_cx0Sv6eKH9J-n4xotqWK0Hc4pNrwZ3iRPe-gh1s,1251
22
- sage/groups/group_exp.py,sha256=QYVMwfLD1WYTOBjLp0wvKvElyGStDlSagpToYX-Ot4s,11157
23
+ sage/groups/group_exp.py,sha256=KjhnaTnqnNKvBmYZJEbUge2-RydGSkued1JFXSLzeoo,11190
23
24
  sage/groups/kernel_subgroup.py,sha256=hZVsh5UYfq6MPxekXwlRuQyPuHq0Fk6SlNnN-5Yja6A,7706
24
25
  sage/groups/lie_gps/catalog.py,sha256=O5ub0bmV3z8tvJEFjxhgjIz4Zff8rJksOe5VQp0py0o,363
25
26
  sage/groups/lie_gps/all.py,sha256=-vXQHOTG46Zum7Q6k0kcJO43yJo09AIX-El8fzXA7eI,45
@@ -29,10 +30,10 @@ sage/groups/misc_gps/all.py,sha256=-vXQHOTG46Zum7Q6k0kcJO43yJo09AIX-El8fzXA7eI,4
29
30
  sage/groups/misc_gps/misc_groups_catalog.py,sha256=TbpMPXGhwFpeOMlXdwdIGItBLV0XSvfN4oQRbKbMK9o,1627
30
31
  sage/groups/abelian_gps/all.py,sha256=yQQEiBWy_vtucLyFb_q1OIqgiC_DIE9KUzNWpdGTa4A,906
31
32
  sage/groups/semimonomial_transformations/semimonomial_transformation.pyx,sha256=9j9eS_uZYdCUQrTJDs4VhpO_7SeSzXdnzh0cACFNtkk,11298
32
- sage/groups/semimonomial_transformations/semimonomial_transformation.cpython-310-darwin.so,sha256=nniuPJ-gv0kUg30hxckn3aTXfGa9hRCgX78GObqDRtY,160848
33
+ sage/groups/semimonomial_transformations/semimonomial_transformation.cpython-310-darwin.so,sha256=D_8xxXIzADY-UWcTIvSgM33aVmKYiYwbflAdNHa86Ys,131912
33
34
  sage/groups/semimonomial_transformations/all.py,sha256=-vXQHOTG46Zum7Q6k0kcJO43yJo09AIX-El8fzXA7eI,45
34
35
  sage/groups/semimonomial_transformations/semimonomial_transformation_group.py,sha256=QflEYRK_oDUf8axx4kwcUR4aMOQNmE_faY1lzOdrAvQ,18312
35
36
  sage/groups/semimonomial_transformations/semimonomial_transformation.pxd,sha256=wivg7LyXn_ZMrADRUmabPEYNitTRZCvs2htLN3E0v9g,297
36
37
  sage/geometry/all__sagemath_groups.py,sha256=-vXQHOTG46Zum7Q6k0kcJO43yJo09AIX-El8fzXA7eI,45
37
- sage/geometry/palp_normal_form.cpython-310-darwin.so,sha256=iOlddGTS4LM4NvD2gGFZKmOuzCBlKBwvIXIpGAEhxHY,255200
38
- sage/geometry/palp_normal_form.pyx,sha256=dElNMIah-kQ7xxwSh4ZW5_Fgo9685Md79dGbqcs8seQ,17502
38
+ sage/geometry/palp_normal_form.cpython-310-darwin.so,sha256=CgDPwBQMGC-N2dybU2gQR44en8dfkwwrog7gyHnyvAA,211560
39
+ sage/geometry/palp_normal_form.pyx,sha256=HfDpZHxffoxG2pxTrXO0ucRlEDZcrtzHBoZ0CoHm5lI,17498
@@ -1,5 +1,6 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-macosx_13_0_x86_64
5
+ Generator: delocate 0.13.1.dev42+ga0af70b54
5
6
 
Binary file
@@ -1,4 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-groups
2
+ # delvewheel: patch
2
3
  r"""
3
4
  Top level of the distribution package sagemath-groups
4
5
 
@@ -198,7 +198,7 @@ def _palp_PM_max(Matrix_integer_dense PM, check=False):
198
198
  else:
199
199
  S[i] = i + 1
200
200
 
201
- cdef int l, np, cf, ccf, n_s_bar, d1, v0, vc, vj
201
+ cdef int l, cf, ccf, n_s_bar, d1, v0, vc, vj
202
202
  cdef list l_r
203
203
 
204
204
  # We determine the other rows of PM_max in turn by use of perms and
sage/groups/artin.py CHANGED
@@ -171,7 +171,7 @@ class ArtinGroupElement(FinitelyPresentedGroupElement):
171
171
  W = self.parent().coxeter_group()
172
172
  s = W.simple_reflections()
173
173
  In = W.index_set()
174
- return W.prod(s[In[abs(i)-1]] for i in self.Tietze())
174
+ return W.prod(s[In[abs(i) - 1]] for i in self.Tietze())
175
175
 
176
176
  def burau_matrix(self, var='t'):
177
177
  r"""
@@ -272,6 +272,7 @@ class ArtinGroupElement(FinitelyPresentedGroupElement):
272
272
  Next, we show ``elm`` is not the identity by using the embedding of
273
273
  the affine braid group `\widetilde{B}_n \to B_{n+1}`::
274
274
 
275
+ sage: # needs sage.libs.braiding
275
276
  sage: B.<t1,t2,t3,t4> = BraidGroup(5)
276
277
  sage: D = t1 * t2 * t3 * t4^2
277
278
  sage: t0 = D * t3 * ~D
@@ -291,7 +292,7 @@ class ArtinGroupElement(FinitelyPresentedGroupElement):
291
292
  (Bigelow gave an example of the representation not being faithful for
292
293
  `B_5`, but it is still open for `B_4`)::
293
294
 
294
- sage: emb.burau_matrix() != 1
295
+ sage: emb.burau_matrix() != 1 # needs sage.libs.braiding
295
296
  True
296
297
 
297
298
  We also verify the result using the elements in [BQ2024]_ Remark 4.2::
@@ -300,8 +301,8 @@ class ArtinGroupElement(FinitelyPresentedGroupElement):
300
301
  sage: bp = s1 * ~s4 * s1^2 * s3^-2 * ~s2 * s4 * s1 * ~s3 * s2 * ~s4 * s3 * s1 * s4 * s1 * ~s2 * s4^-2 * s3
301
302
  sage: alpha = ap * s3 * ~ap
302
303
  sage: beta = bp * s2 * ~bp
303
- sage: elm = alpha * beta * ~alpha * ~beta
304
- sage: elm.burau_matrix()
304
+ sage: elm = alpha * beta * ~alpha * ~beta # needs sage.libs.braiding
305
+ sage: elm.burau_matrix() # needs sage.libs.braiding
305
306
  [1 0 0 0]
306
307
  [0 1 0 0]
307
308
  [0 0 1 0]
@@ -624,10 +625,10 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
624
625
  return super().__classcall__(cls, coxeter_data, names)
625
626
  if coxeter_data.coxeter_type().cartan_type().type() == 'A':
626
627
  from sage.groups.braid import BraidGroup
627
- return BraidGroup(coxeter_data.rank()+1, names)
628
+ return BraidGroup(coxeter_data.rank() + 1, names)
628
629
  return FiniteTypeArtinGroup(coxeter_data, names)
629
630
 
630
- def __init__(self, coxeter_matrix, names):
631
+ def __init__(self, coxeter_matrix, names) -> None:
631
632
  """
632
633
  Initialize ``self``.
633
634
 
@@ -646,7 +647,7 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
646
647
  I = coxeter_matrix.index_set()
647
648
  gens = free_group.gens()
648
649
  for ii, i in enumerate(I):
649
- for jj, j in enumerate(I[ii + 1:], start=ii+1):
650
+ for jj, j in enumerate(I[ii + 1:], start=ii + 1):
650
651
  m = coxeter_matrix[i, j]
651
652
  if m == Infinity: # no relation
652
653
  continue
@@ -657,7 +658,7 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
657
658
  rels.append(elt)
658
659
  FinitelyPresentedGroup.__init__(self, free_group, tuple(rels))
659
660
 
660
- def _repr_(self):
661
+ def _repr_(self) -> str:
661
662
  """
662
663
  Return a string representation of ``self``.
663
664
 
@@ -792,7 +793,7 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
792
793
  return self.element_class(self, x)
793
794
 
794
795
  @cached_method
795
- def an_element(self):
796
+ def _an_element_(self):
796
797
  """
797
798
  Return an element of ``self``.
798
799
 
@@ -804,7 +805,7 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
804
805
  """
805
806
  return self.gen(0)
806
807
 
807
- def some_elements(self):
808
+ def some_elements(self) -> list:
808
809
  """
809
810
  Return a list of some elements of ``self``.
810
811
 
@@ -972,7 +973,8 @@ class ArtinGroup(UniqueRepresentation, FinitelyPresentedGroup):
972
973
  elif x == 1:
973
974
  return 1 + q**2
974
975
  else:
975
- return q * (E(2*x) + ~E(2*x))
976
+ E2x = E(2 * x)
977
+ return q * (E2x + ~E2x)
976
978
  elif isinstance(base_ring, sage.rings.abc.NumberField_quadratic):
977
979
  from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField
978
980
  E = UniversalCyclotomicField().gen
sage/groups/braid.py CHANGED
@@ -5,7 +5,8 @@ Braid groups
5
5
  Braid groups are implemented as a particular case of finitely presented groups,
6
6
  but with a lot of specific methods for braids.
7
7
 
8
- A braid group can be created by giving the number of strands, and the name of the generators::
8
+ A braid group can be created by giving the number of strands, and the name
9
+ of the generators::
9
10
 
10
11
  sage: BraidGroup(3)
11
12
  Braid group on 3 strands
@@ -16,8 +17,8 @@ A braid group can be created by giving the number of strands, and the name of th
16
17
  sage: BraidGroup(3,'a,b').gens()
17
18
  (a, b)
18
19
 
19
- The elements can be created by operating with the generators, or by passing a list
20
- with the indices of the letters to the group::
20
+ The elements can be created by operating with the generators, or by passing
21
+ a list with the indices of the letters to the group::
21
22
 
22
23
  sage: B.<s0,s1,s2> = BraidGroup(4)
23
24
  sage: s0*s1*s0
@@ -69,7 +70,6 @@ AUTHORS:
69
70
 
70
71
  from itertools import combinations
71
72
 
72
- from sage.algebras.free_algebra import FreeAlgebra
73
73
  from sage.categories.action import Action
74
74
  from sage.categories.groups import Groups
75
75
  from sage.combinat.permutation import Permutation, Permutations
@@ -82,7 +82,8 @@ from sage.groups.finitely_presented import (
82
82
  GroupMorphismWithGensImages,
83
83
  )
84
84
  from sage.groups.free_group import FreeGroup, is_FreeGroup
85
- from sage.groups.perm_gps.permgroup_named import SymmetricGroup, SymmetricGroupElement
85
+ from sage.groups.perm_gps.permgroup_named import (SymmetricGroup,
86
+ SymmetricGroupElement)
86
87
  from sage.libs.gap.libgap import libgap
87
88
  from sage.matrix.constructor import identity_matrix, matrix
88
89
  from sage.misc.cachefunc import cached_method
@@ -97,10 +98,11 @@ from sage.structure.element import Expression
97
98
  from sage.structure.richcmp import rich_to_bool, richcmp
98
99
 
99
100
  lazy_import('sage.libs.braiding',
100
- ['leftnormalform', 'rightnormalform', 'centralizer', 'supersummitset', 'greatestcommondivisor',
101
+ ['leftnormalform', 'rightnormalform', 'centralizer',
102
+ 'supersummitset', 'greatestcommondivisor',
101
103
  'leastcommonmultiple', 'conjugatingbraid', 'ultrasummitset',
102
104
  'thurston_type', 'rigidity', 'sliding_circuits', 'send_to_sss',
103
- 'send_to_uss', 'send_to_sc', 'trajectory', 'cyclic_slidings' ],
105
+ 'send_to_uss', 'send_to_sc', 'trajectory', 'cyclic_slidings'],
104
106
  feature=sage__libs__braiding())
105
107
  lazy_import('sage.knots.knot', 'Knot')
106
108
 
@@ -503,7 +505,8 @@ class Braid(FiniteTypeArtinGroupElement):
503
505
  """
504
506
  return self.coxeter_group_element(W)
505
507
 
506
- def plot(self, color='rainbow', orientation='bottom-top', gap=0.05, aspect_ratio=1, axes=False, **kwds):
508
+ def plot(self, color='rainbow', orientation='bottom-top', gap=0.05,
509
+ aspect_ratio=1, axes=False, **kwds):
507
510
  """
508
511
  Plot the braid.
509
512
 
@@ -637,7 +640,7 @@ class Braid(FiniteTypeArtinGroupElement):
637
640
 
638
641
  def plot3d(self, color='rainbow'):
639
642
  """
640
- Plots the braid in 3d.
643
+ Plot the braid in 3d.
641
644
 
642
645
  The following option is available:
643
646
 
@@ -835,6 +838,7 @@ class Braid(FiniteTypeArtinGroupElement):
835
838
  r"""
836
839
  Return the representation matrix of ``self`` according to the R-matrix
837
840
  representation being attached to the quantum superalgebra `\mathfrak{sl}_q(2|1)`.
841
+
838
842
  See [MW2012]_, section 3 and references given there.
839
843
 
840
844
  INPUT:
@@ -867,15 +871,16 @@ class Braid(FiniteTypeArtinGroupElement):
867
871
  M = rep[0][0].parent().one()
868
872
  for i in self.Tietze():
869
873
  if i > 0:
870
- M = M*rep[i-1][0]
874
+ M = M * rep[i-1][0]
871
875
  if i < 0:
872
- M = M*rep[-i-1][1]
876
+ M = M * rep[-i-1][1]
873
877
  return M
874
878
 
875
879
  @cached_method
876
880
  def links_gould_polynomial(self, varnames=None, use_symbolics=False):
877
881
  r"""
878
882
  Return the Links-Gould polynomial of the closure of ``self``.
883
+
879
884
  See [MW2012]_, section 3 and references given there.
880
885
 
881
886
  INPUT:
@@ -913,12 +918,13 @@ class Braid(FiniteTypeArtinGroupElement):
913
918
  mu = rep[ln - 1] # quantum trace factor
914
919
  M = mu * self.links_gould_matrix(symbolics=use_symbolics)
915
920
  d1, d2 = M.dimensions()
916
- e = d1//4
921
+ e = d1 // 4
917
922
  B = M.base_ring()
918
923
  R = LaurentPolynomialRing(ZZ, varnames)
919
924
 
920
925
  # partial quantum trace according to I. Marin section 2.5
921
- part_trace = matrix(B, 4, 4, lambda i, j: sum(M[e * i + k, e * j + k] for k in range(e)))
926
+ part_trace = matrix(B, 4, 4, lambda i, j: sum(M[e * i + k, e * j + k]
927
+ for k in range(e)))
922
928
  ptemp = part_trace[0, 0] # part_trace == psymb*M.parent().one()
923
929
  if use_symbolics:
924
930
  v1, v2 = R.variable_names()
@@ -929,13 +935,13 @@ class Braid(FiniteTypeArtinGroupElement):
929
935
  else:
930
936
  ltemp = ptemp.lift().constant_coefficient()
931
937
  # Since the result of the calculation is known to be a Laurent polynomial
932
- # in t0 and t1 all exponents of ltemp must be divisable by 2
938
+ # in t0 and t1 all exponents of ltemp must be divisible by 2
933
939
  L = ltemp.parent()
934
940
  lred = L({(k[0]/2, k[1]/2): v for k, v in ltemp.monomial_coefficients().items()})
935
941
  t0, t1 = R.gens()
936
942
  return lred(t0, t1)
937
943
 
938
- def tropical_coordinates(self):
944
+ def tropical_coordinates(self) -> list:
939
945
  r"""
940
946
  Return the tropical coordinates of ``self`` in the braid group `B_n`.
941
947
 
@@ -979,7 +985,7 @@ class Braid(FiniteTypeArtinGroupElement):
979
985
 
980
986
  from sage.rings.semirings.tropical_semiring import TropicalSemiring
981
987
  T = TropicalSemiring(ZZ)
982
- return [T(_) for _ in coord]
988
+ return [T(c) for c in coord]
983
989
 
984
990
  def markov_trace(self, variab=None, normalized=True):
985
991
  r"""
@@ -1649,7 +1655,7 @@ class Braid(FiniteTypeArtinGroupElement):
1649
1655
  B = self.parent()
1650
1656
  return tuple([B(b) for b in rnf[:-1]] + [B.delta()**rnf[-1][0]])
1651
1657
 
1652
- def centralizer(self):
1658
+ def centralizer(self) -> list:
1653
1659
  """
1654
1660
  Return a list of generators of the centralizer of the braid.
1655
1661
 
@@ -1665,7 +1671,7 @@ class Braid(FiniteTypeArtinGroupElement):
1665
1671
  B = self.parent()
1666
1672
  return [B._element_from_libbraiding(b) for b in c]
1667
1673
 
1668
- def super_summit_set(self):
1674
+ def super_summit_set(self) -> list:
1669
1675
  """
1670
1676
  Return a list with the super summit set of the braid.
1671
1677
 
@@ -1787,10 +1793,9 @@ class Braid(FiniteTypeArtinGroupElement):
1787
1793
  cb = conjugatingbraid(self, other)
1788
1794
  if not cb:
1789
1795
  return None
1790
- else:
1791
- B = self.parent()
1792
- cb[0][0] %= 2
1793
- return B._element_from_libbraiding(cb)
1796
+ B = self.parent()
1797
+ cb[0][0] %= 2
1798
+ return B._element_from_libbraiding(cb)
1794
1799
 
1795
1800
  def is_conjugated(self, other) -> bool:
1796
1801
  """
@@ -1909,7 +1914,7 @@ class Braid(FiniteTypeArtinGroupElement):
1909
1914
  n2 = len(b2.Tietze())
1910
1915
  return b2 if n2 <= n0 else b0
1911
1916
 
1912
- def ultra_summit_set(self):
1917
+ def ultra_summit_set(self) -> list:
1913
1918
  """
1914
1919
  Return a list with the orbits of the ultra summit set of ``self``.
1915
1920
 
@@ -1939,7 +1944,7 @@ class Braid(FiniteTypeArtinGroupElement):
1939
1944
  B = self.parent()
1940
1945
  return [[B._element_from_libbraiding(i) for i in s] for s in uss]
1941
1946
 
1942
- def thurston_type(self):
1947
+ def thurston_type(self) -> str:
1943
1948
  """
1944
1949
  Return the thurston_type of ``self``.
1945
1950
 
@@ -2029,7 +2034,7 @@ class Braid(FiniteTypeArtinGroupElement):
2029
2034
  """
2030
2035
  return Integer(rigidity(self))
2031
2036
 
2032
- def sliding_circuits(self):
2037
+ def sliding_circuits(self) -> list:
2033
2038
  """
2034
2039
  Return the sliding circuits of the braid.
2035
2040
 
@@ -2153,6 +2158,8 @@ class Braid(FiniteTypeArtinGroupElement):
2153
2158
  sage: burau.subs({t:q}).change_ring(db_base) == db_simp
2154
2159
  True
2155
2160
  """
2161
+ from sage.algebras.free_algebra import FreeAlgebra
2162
+
2156
2163
  R = LaurentPolynomialRing(ZZ, variab)
2157
2164
 
2158
2165
  n = self.strands()
@@ -2309,7 +2316,7 @@ class Braid(FiniteTypeArtinGroupElement):
2309
2316
 
2310
2317
  sage: B = BraidGroup(4)
2311
2318
  sage: b = B([1, 2, 1, 2, 3, -1, 2, 1, 3])
2312
- sage: b.super_summit_set_element()
2319
+ sage: b.super_summit_set_element() # needs sage.libs.braiding
2313
2320
  (s0*s2*s0*s1*s2*s1*s0, s0^-1*s1^-1*s0^-1*s2^-1*s1^-1*s0^-1*s1*s0*s2*s1*s0)
2314
2321
  """
2315
2322
  to_sss = send_to_sss(self)
@@ -2325,14 +2332,14 @@ class Braid(FiniteTypeArtinGroupElement):
2325
2332
 
2326
2333
  sage: B = BraidGroup(4)
2327
2334
  sage: b = B([1, 2, 1, 2, 3, -1, 2, -1, 3])
2328
- sage: b.ultra_summit_set_element()
2335
+ sage: b.ultra_summit_set_element() # needs sage.libs.braiding
2329
2336
  (s0*s1*s0*s2*s1, s0^-1*s1^-1*s0^-1*s2^-1*s1^-1*s0^-1*s1*s2*s1^2*s0)
2330
2337
  """
2331
2338
  to_uss = send_to_uss(self)
2332
2339
  B = self.parent()
2333
2340
  return tuple([B._element_from_libbraiding(b) for b in to_uss])
2334
2341
 
2335
- def sliding_circuits_element(self):
2342
+ def sliding_circuits_element(self) -> tuple:
2336
2343
  r"""
2337
2344
  Return an element of the braid's sliding circuits, and the conjugating
2338
2345
  braid.
@@ -2341,14 +2348,14 @@ class Braid(FiniteTypeArtinGroupElement):
2341
2348
 
2342
2349
  sage: B = BraidGroup(4)
2343
2350
  sage: b = B([1, 2, 1, 2, 3, -1, 2, -1, 3])
2344
- sage: b.sliding_circuits_element()
2351
+ sage: b.sliding_circuits_element() # needs sage.libs.braiding
2345
2352
  (s0*s1*s0*s2*s1, s0^2*s1*s2)
2346
2353
  """
2347
2354
  to_sc = send_to_sc(self)
2348
2355
  B = self.parent()
2349
2356
  return tuple([B._element_from_libbraiding(b) for b in to_sc])
2350
2357
 
2351
- def trajectory(self):
2358
+ def trajectory(self) -> list:
2352
2359
  r"""
2353
2360
  Return the braid's trajectory.
2354
2361
 
@@ -2356,7 +2363,7 @@ class Braid(FiniteTypeArtinGroupElement):
2356
2363
 
2357
2364
  sage: B = BraidGroup(4)
2358
2365
  sage: b = B([1, 2, 1, 2, 3, -1, 2, -1, 3])
2359
- sage: b.trajectory()
2366
+ sage: b.trajectory() # needs sage.libs.braiding
2360
2367
  [s0^-1*s1^-1*s0^-1*s2^-1*s1^-1*s2*s0*s1*s2*s1*s0^2*s1*s2^2,
2361
2368
  s0*s1*s2^3,
2362
2369
  s0*s1*s2*s1^2,
@@ -2366,7 +2373,7 @@ class Braid(FiniteTypeArtinGroupElement):
2366
2373
  B = self.parent()
2367
2374
  return [B._element_from_libbraiding(b) for b in traj]
2368
2375
 
2369
- def cyclic_slidings(self):
2376
+ def cyclic_slidings(self) -> list:
2370
2377
  r"""
2371
2378
  Return the braid's cyclic slidings.
2372
2379
 
@@ -2376,7 +2383,7 @@ class Braid(FiniteTypeArtinGroupElement):
2376
2383
 
2377
2384
  sage: B = BraidGroup(4)
2378
2385
  sage: b = B([1, 2, 1, 2, 3, -1, 2, 1])
2379
- sage: b.cyclic_slidings()
2386
+ sage: b.cyclic_slidings() # needs sage.libs.braiding
2380
2387
  [[s0*s2*s1*s0*s1*s2, s0*s1*s2*s1*s0^2, s1*s0*s2^2*s1*s0],
2381
2388
  [s0*s1*s2*s1^2*s0, s0*s1*s2*s1*s0*s2, s1*s0*s2*s0*s1*s2]]
2382
2389
  """
@@ -2551,6 +2558,7 @@ class RightQuantumWord:
2551
2558
  def tuple_to_word(q_tuple):
2552
2559
  return M.prod(self._gens[i]**exp
2553
2560
  for i, exp in enumerate(q_tuple))
2561
+
2554
2562
  ret = {tuple_to_word(q_tuple): q_factor
2555
2563
  for q_tuple, q_factor in self.tuples.items() if q_factor}
2556
2564
  return self._algebra._from_dict(ret, remove_zeros=False)
@@ -2614,7 +2622,7 @@ class RightQuantumWord:
2614
2622
  return sum(q_factor * eps_monom(q_tuple)
2615
2623
  for q_tuple, q_factor in self.tuples.items())
2616
2624
 
2617
- def __repr__(self):
2625
+ def __repr__(self) -> str:
2618
2626
  r"""
2619
2627
  String representation of ``self``.
2620
2628
 
@@ -2644,14 +2652,14 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2644
2652
  sage: B1
2645
2653
  Braid group on 5 strands
2646
2654
  sage: B2 = BraidGroup(3)
2647
- sage: B1==B2
2655
+ sage: B1 == B2
2648
2656
  False
2649
2657
  sage: B2 is BraidGroup(3)
2650
2658
  True
2651
2659
  """
2652
2660
  Element = Braid
2653
2661
 
2654
- def __init__(self, names):
2662
+ def __init__(self, names) -> None:
2655
2663
  """
2656
2664
  Python constructor.
2657
2665
 
@@ -2664,7 +2672,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2664
2672
  sage: B1 = BraidGroup(5) # indirect doctest
2665
2673
  sage: B1
2666
2674
  Braid group on 5 strands
2667
- sage: TestSuite(B1).run()
2675
+ sage: TestSuite(B1).run() # needs sage.libs.braiding
2668
2676
  sage: B1.category()
2669
2677
  Category of infinite groups
2670
2678
 
@@ -2726,7 +2734,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2726
2734
  # For caching hermitian form of unitary Burau representation
2727
2735
  self._hermitian_form = None
2728
2736
 
2729
- def __reduce__(self):
2737
+ def __reduce__(self) -> tuple:
2730
2738
  """
2731
2739
  TESTS::
2732
2740
 
@@ -2739,7 +2747,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2739
2747
  """
2740
2748
  return (BraidGroup_class, (self.variable_names(), ))
2741
2749
 
2742
- def _repr_(self):
2750
+ def _repr_(self) -> str:
2743
2751
  """
2744
2752
  Return a string representation.
2745
2753
 
@@ -2816,7 +2824,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2816
2824
  x = self._standard_lift_Tietze(x)
2817
2825
  return self.element_class(self, x)
2818
2826
 
2819
- def an_element(self):
2827
+ def _an_element_(self):
2820
2828
  """
2821
2829
  Return an element of the braid group.
2822
2830
 
@@ -2830,7 +2838,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2830
2838
  """
2831
2839
  return self.gen(0)
2832
2840
 
2833
- def some_elements(self):
2841
+ def some_elements(self) -> list:
2834
2842
  """
2835
2843
  Return a list of some elements of the braid group.
2836
2844
 
@@ -2847,7 +2855,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2847
2855
  elements_list.append(elements_list[-1]**self.strands())
2848
2856
  return elements_list
2849
2857
 
2850
- def _standard_lift_Tietze(self, p):
2858
+ def _standard_lift_Tietze(self, p) -> tuple:
2851
2859
  """
2852
2860
  Helper for :meth:`_standard_lift_Tietze`.
2853
2861
 
@@ -2875,8 +2883,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2875
2883
  (1, 2, 3, 4, 1, 2)
2876
2884
  """
2877
2885
  G = SymmetricGroup(self.strands())
2878
- pl = G(p)
2879
- return tuple(pl.reduced_word())
2886
+ return tuple(G(p).reduced_word())
2880
2887
 
2881
2888
  @cached_method
2882
2889
  def _links_gould_representation(self, symbolics=False):
@@ -2900,6 +2907,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2900
2907
 
2901
2908
  TESTS::
2902
2909
 
2910
+ sage: # needs sage.libs.singular
2903
2911
  sage: B = BraidGroup(3)
2904
2912
  sage: g1, g2, mu3 = B._links_gould_representation()
2905
2913
  sage: R1, R1I = g1
@@ -2922,8 +2930,9 @@ class BraidGroup_class(FiniteTypeArtinGroup):
2922
2930
  else:
2923
2931
  from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
2924
2932
  LR = LaurentPolynomialRing(ZZ, 's0r, s1r')
2933
+ s0r, s1r = LR.gens()
2925
2934
  PR = PolynomialRing(LR, 'Yr')
2926
- s0r, s1r, Yr = PR.gens_dict_recursive().values()
2935
+ Yr = PR.gen()
2927
2936
  pqr = Yr**2 + (s0r**2 - 1) * (s1r**2 - 1)
2928
2937
  BR = PR.quotient_ring(pqr)
2929
2938
  s0 = BR(s0r)
@@ -3488,9 +3497,10 @@ class BraidGroup_class(FiniteTypeArtinGroup):
3488
3497
  r"""
3489
3498
  Return the mirror involution of ``self``.
3490
3499
 
3491
- This automorphism maps a braid to another one by replacing each generator
3492
- in its word by the inverse. In general this is different from the inverse
3493
- of the braid since the order of the generators in the word is not reversed.
3500
+ This automorphism maps a braid to another one by replacing
3501
+ each generator in its word by the inverse. In general this is
3502
+ different from the inverse of the braid since the order of the
3503
+ generators in the word is not reversed.
3494
3504
 
3495
3505
  EXAMPLES::
3496
3506
 
@@ -3499,11 +3509,11 @@ class BraidGroup_class(FiniteTypeArtinGroup):
3499
3509
  sage: b = B((1,-2,-1,3,2,1))
3500
3510
  sage: bm = mirr(b); bm
3501
3511
  s0^-1*s1*s0*s2^-1*s1^-1*s0^-1
3502
- sage: bm == ~b
3512
+ sage: bm == ~b # needs sage.libs.braiding
3503
3513
  False
3504
- sage: bm.is_conjugated(b)
3514
+ sage: bm.is_conjugated(b) # needs sage.libs.braiding
3505
3515
  False
3506
- sage: bm.is_conjugated(~b)
3516
+ sage: bm.is_conjugated(~b) # needs sage.libs.braiding
3507
3517
  True
3508
3518
  """
3509
3519
  gens_mirr = [~g for g in self.gens()]
@@ -3554,7 +3564,7 @@ class BraidGroup_class(FiniteTypeArtinGroup):
3554
3564
  h2 = G.hom(codomain=self, im_gens=[self(a) for a in L2], check=False)
3555
3565
  return (G, h1, h2)
3556
3566
 
3557
- def epimorphisms(self, H):
3567
+ def epimorphisms(self, H) -> list:
3558
3568
  r"""
3559
3569
  Return the epimorphisms from ``self`` to ``H``, up to automorphism of `H` passing
3560
3570
  through the :meth:`two generator presentation
@@ -3587,12 +3597,18 @@ class BraidGroup_class(FiniteTypeArtinGroup):
3587
3597
  Gg = libgap(G)
3588
3598
  Hg = libgap(H)
3589
3599
  gquotients = Gg.GQuotients(Hg)
3590
- hom1g = libgap.GroupHomomorphismByImagesNC(G0g, Gg, [libgap(hom1(u)) for u in self.gens()])
3600
+ hom1g = libgap.GroupHomomorphismByImagesNC(G0g, Gg,
3601
+ [libgap(hom1(u))
3602
+ for u in self.gens()])
3591
3603
  g0quotients = [hom1g * h for h in gquotients]
3592
3604
  res = []
3605
+
3593
3606
  # the following closure is needed to attach a specific value of quo to
3594
3607
  # each function in the different morphisms
3595
- fmap = lambda tup: (lambda a: H(prod(tup[abs(i)-1]**sign(i) for i in a.Tietze())))
3608
+ def fmap(tup):
3609
+ return (lambda a: H(prod(tup[abs(i) - 1]**sign(i)
3610
+ for i in a.Tietze())))
3611
+
3596
3612
  for quo in g0quotients:
3597
3613
  tup = tuple(H(quo.ImageElm(i.gap()).sage()) for i in self.gens())
3598
3614
  fhom = GroupMorphismWithGensImages(HomSpace, fmap(tup))
@@ -3720,7 +3736,8 @@ class MappingClassGroupAction(Action):
3720
3736
 
3721
3737
  sage: A = B.mapping_class_action(F)
3722
3738
  sage: A
3723
- Right action by Braid group on 4 strands on Free Group on generators {x0, x1, x2, x3}
3739
+ Right action by Braid group on 4 strands on Free Group
3740
+ on generators {x0, x1, x2, x3}
3724
3741
  sage: A(x0, s1)
3725
3742
  x0
3726
3743
  sage: A(x1, s1)
@@ -3728,14 +3745,15 @@ class MappingClassGroupAction(Action):
3728
3745
  sage: A(x1^-1, s1)
3729
3746
  x1*x2^-1*x1^-1
3730
3747
  """
3731
- def __init__(self, G, M):
3748
+ def __init__(self, G, M) -> None:
3732
3749
  """
3733
3750
  TESTS::
3734
3751
 
3735
3752
  sage: B = BraidGroup(3)
3736
3753
  sage: G = FreeGroup('a, b, c')
3737
3754
  sage: B.mapping_class_action(G) # indirect doctest
3738
- Right action by Braid group on 3 strands on Free Group on generators {a, b, c}
3755
+ Right action by Braid group on 3 strands on Free Group
3756
+ on generators {a, b, c}
3739
3757
  """
3740
3758
  import operator
3741
3759
  Action.__init__(self, G, M, False, operator.mul)
sage/groups/free_group.py CHANGED
@@ -458,8 +458,9 @@ class FreeGroupElement(ElementLibGAP):
458
458
  R = ring
459
459
  symb = list(im_gens)
460
460
  symb += reversed([a**(-1) for a in im_gens])
461
- i = gen.Tietze()[0] # So ``gen`` is the `i`-th
462
- # generator of the free group.
461
+ i = gen.Tietze()[0]
462
+ # so gen is the i-th generator of the free group
463
+
463
464
  a = R.zero()
464
465
  coef = R.one()
465
466
  while l:
@@ -507,7 +508,7 @@ class FreeGroupElement(ElementLibGAP):
507
508
  for i in range(k):
508
509
  exponent = exponent_syllable(g, i+1).sage()
509
510
  generator = gen(generator_syllable(g, i+1).sage() - 1)
510
- result.append( (generator, exponent) )
511
+ result.append((generator, exponent))
511
512
  return tuple(result)
512
513
 
513
514
  def __call__(self, *values):
@@ -937,6 +938,7 @@ class FreeGroup_class(CachedRepresentation, Group, ParentLibGAP):
937
938
  Finitely presented group < a, b, c, d | a*b*a^-1 >
938
939
  """
939
940
  from sage.groups.finitely_presented import FinitelyPresentedGroup
940
- return FinitelyPresentedGroup(self, tuple(map(self, relations) ), **kwds)
941
+ return FinitelyPresentedGroup(self,
942
+ tuple(map(self, relations)), **kwds)
941
943
 
942
944
  __truediv__ = quotient
sage/groups/group_exp.py CHANGED
@@ -6,15 +6,15 @@ AUTHORS:
6
6
 
7
7
  - Mark Shimozono (2013): initial version
8
8
  """
9
- #*****************************************************************************
9
+ # ***************************************************************************
10
10
  # Copyright (C) 2013 <mshimo at math.vt.edu>
11
11
  #
12
12
  # This program is free software: you can redistribute it and/or modify
13
13
  # it under the terms of the GNU General Public License as published by
14
14
  # the Free Software Foundation, either version 2 of the License, or
15
15
  # (at your option) any later version.
16
- # http://www.gnu.org/licenses/
17
- #*****************************************************************************
16
+ # https://www.gnu.org/licenses/
17
+ # ***************************************************************************
18
18
 
19
19
  from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups
20
20
  from sage.categories.functor import Functor
@@ -169,7 +169,10 @@ class GroupExp(Functor):
169
169
  """
170
170
  new_domain = self._apply_functor(f.domain())
171
171
  new_codomain = self._apply_functor(f.codomain())
172
- new_f = lambda a: new_codomain(f(a.value))
172
+
173
+ def new_f(a):
174
+ return new_codomain(f(a.value))
175
+
173
176
  return SetMorphism(Hom(new_domain, new_codomain, Groups()), new_f)
174
177
 
175
178
 
@@ -255,7 +258,7 @@ class GroupExp_Class(UniqueRepresentation, Parent):
255
258
  sage: GroupExp()(QQ)
256
259
  Multiplicative form of Rational Field
257
260
  """
258
- def __init__(self, G):
261
+ def __init__(self, G) -> None:
259
262
  r"""
260
263
 
261
264
  EXAMPLES::
@@ -268,7 +271,7 @@ class GroupExp_Class(UniqueRepresentation, Parent):
268
271
  self._G = G
269
272
  Parent.__init__(self, category=Groups())
270
273
 
271
- def _repr_(self):
274
+ def _repr_(self) -> str:
272
275
  r"""
273
276
  Return a string describing the multiplicative form of a commutative additive group.
274
277
 
@@ -308,7 +311,7 @@ class GroupExp_Class(UniqueRepresentation, Parent):
308
311
  """
309
312
  return GroupExpElement(self, self._G.zero())
310
313
 
311
- def an_element(self):
314
+ def _an_element_(self):
312
315
  r"""
313
316
  Return an element of the multiplicative group.
314
317
 
Binary file