passagemath-libbraiding 10.6.41__cp314-cp314t-macosx_13_0_arm64.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.
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-libbraiding
2
+
3
+ from sage.all__sagemath_libbraiding import *
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-libbraiding
3
+ Version: 10.6.41
4
+ Summary: passagemath: Braid computations with libbraiding
5
+ Author-email: The Sage Developers <sage-support@googlegroups.com>
6
+ Maintainer: Matthias Köppe, passagemath contributors
7
+ License-Expression: GPL-2.0-or-later
8
+ Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
+ Project-URL: repo (upstream), https://github.com/sagemath/sage
10
+ Project-URL: repo, https://github.com/passagemath/passagemath
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
+ Project-URL: homepage (upstream), https://www.sagemath.org
13
+ Project-URL: discourse, https://passagemath.discourse.group
14
+ Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
15
+ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
30
+ Requires-Python: <3.15,>=3.10
31
+ Description-Content-Type: text/x-rst
32
+ Requires-Dist: passagemath-objects~=10.6.41.0
33
+ Requires-Dist: memory_allocator
34
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
35
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
36
+ Provides-Extra: test
37
+ Requires-Dist: passagemath-combinat; extra == "test"
38
+ Requires-Dist: passagemath-graphs; extra == "test"
39
+ Requires-Dist: passagemath-groups; extra == "test"
40
+ Requires-Dist: passagemath-repl; extra == "test"
41
+ Requires-Dist: passagemath-schemes; extra == "test"
42
+
43
+ =============================================================================
44
+ passagemath: Braid computations with libbraiding
45
+ =============================================================================
46
+
47
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
48
+ source mathematical software in Python, released under the GNU General
49
+ Public Licence GPLv2+.
50
+
51
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
52
+ developed 2005-2025 under the motto “Creating a Viable Open Source
53
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
54
+
55
+ The passagemath fork uses the motto "Creating a Free Passage Between the
56
+ Scientific Python Ecosystem and Mathematical Software Communities."
57
+ It was created in October 2024 with the following goals:
58
+
59
+ - providing modularized installation with pip,
60
+ - establishing first-class membership in the scientific Python
61
+ ecosystem,
62
+ - giving `clear attribution of upstream
63
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
64
+ - providing independently usable Python interfaces to upstream
65
+ libraries,
66
+ - offering `platform portability and integration testing
67
+ services <https://github.com/passagemath/passagemath/issues/704>`__
68
+ to upstream projects,
69
+ - inviting collaborations with upstream projects,
70
+ - `building a professional, respectful, inclusive
71
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
72
+ - `empowering Sage users to participate in the scientific Python ecosystem
73
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
74
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
75
+ serverless deployment with Javascript,
76
+ - developing a native Windows port.
77
+
78
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
79
+ available online.
80
+
81
+ passagemath attempts to support and provides binary wheels suitable for
82
+ all major Linux distributions and recent versions of macOS.
83
+
84
+ Binary wheels for native Windows (x86_64) are are available for a subset of
85
+ the passagemath distributions. Use of the full functionality of passagemath
86
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
87
+ or virtualization.
88
+
89
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.14.x.
90
+
91
+
92
+ About this pip-installable distribution package
93
+ -----------------------------------------------
94
+
95
+ This pip-installable source distribution ``passagemath-libbraiding`` provides
96
+ an interface to `libbraiding <https://github.com/miguelmarco/libbraiding>`_,
97
+ a library to compute several properties of braids,
98
+ including centralizer and conjugacy check.
99
+
100
+
101
+ What is included
102
+ ----------------
103
+
104
+ * `sage.libs.braiding <https://github.com/passagemath/passagemath/blob/main/src/sage/libs/braiding.pyx>`_
105
+
106
+
107
+ Examples
108
+ --------
109
+
110
+ ::
111
+
112
+ $ pipx run --pip-args="--prefer-binary" --spec "passagemath-libbraiding[test]" ipython
113
+
114
+ In [1]: from passagemath_libbraiding import *
115
+
116
+ In [2]: from sage.libs.braiding import conjugatingbraid
117
+
118
+ In [3]: B = BraidGroup(3); b = B([1,2,1,-2]); c = B([1,2])
119
+
120
+ In [4]: conjugatingbraid(b,c)
121
+ Out[4]: [[0], [2]]
122
+
123
+
124
+ Development
125
+ -----------
126
+
127
+ ::
128
+
129
+ $ git clone --origin passagemath https://github.com/passagemath/passagemath.git
130
+ $ cd passagemath
131
+ passagemath $ ./bootstrap
132
+ passagemath $ python3 -m venv libbraiding-venv
133
+ passagemath $ source libbraiding-venv/bin/activate
134
+ (libbraiding-venv) passagemath $ pip install -v -e pkgs/sagemath-libbraiding
@@ -0,0 +1,10 @@
1
+ passagemath_libbraiding-10.6.41.dist-info/RECORD,,
2
+ passagemath_libbraiding-10.6.41.dist-info/WHEEL,sha256=nEAtTEo8zKB0Etf0OcFBf11mfJfxrhFw5PZkKHw0p5k,154
3
+ passagemath_libbraiding-10.6.41.dist-info/top_level.txt,sha256=Ue2gGvQbdPsHfGyFvLHifEgkSVKxBKV_ypkROEnsDK8,30
4
+ passagemath_libbraiding-10.6.41.dist-info/METADATA,sha256=8-M86r9ZxHxYVXIHNhvFXoRGg13B8v8LEBbPiBuTDl8,5556
5
+ passagemath_libbraiding/__init__.py,sha256=4Vmh8AKdWssBWW86Q-xr4dKUlohtATA8tfBvJb9Hr3g,96
6
+ passagemath_libbraiding/.dylibs/libbraiding.0.0.0.dylib,sha256=XkirfnKvFHWVP39YZP5lDH2ePfB5lKdRwqpvNqfelQw,299016
7
+ sage/all__sagemath_libbraiding.py,sha256=YFtacYzpNCVWMxSKZW0rwFrLVGiuBZ-eXSEcwouWpG4,350
8
+ sage/libs/all__sagemath_libbraiding.py,sha256=HzvyH9JZ1Fjh65Qx_jwx_UD5XSJg2iOTg7L5ajVVYvs,50
9
+ sage/libs/braiding.pyx,sha256=xJfL8rQhdliD5Z4PyZybDQzuVsr8bbMaUzUTwl0eIuc,14059
10
+ sage/libs/braiding.cpython-314t-darwin.so,sha256=6ixLNgsAqdWdaSQemp2lzEQ0ROIjzggwUjLaONiFZTE,163840
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314t-macosx_13_0_arm64
5
+ Generator: delocate 0.13.1.dev42+ga0af70b54
6
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_libbraiding
3
+ sage
@@ -0,0 +1,19 @@
1
+ # sage_setup: distribution = sagemath-libbraiding
2
+ # delvewheel: patch
3
+
4
+ from sage.all__sagemath_objects import *
5
+
6
+ try:
7
+ from sage.all__sagemath_groups import *
8
+ except ImportError:
9
+ pass
10
+
11
+ try:
12
+ from sage.all__sagemath_graphs import *
13
+ except ImportError:
14
+ pass
15
+
16
+ try:
17
+ from sage.all__sagemath_schemes import *
18
+ except ImportError:
19
+ pass
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-libbraiding
sage/libs/braiding.pyx ADDED
@@ -0,0 +1,550 @@
1
+ # sage_setup: distribution = sagemath-libbraiding
2
+ # distutils: libraries = braiding
3
+ # distutils: language = c++
4
+ # distutils: extra_compile_args = -std=c++11
5
+ r"""
6
+ Cython wrapper for the libbraiding library.
7
+
8
+ The libbraiding library is a modification of the braiding program
9
+ by Juan Gonzalez-Meneses (https://github.com/jeanluct/cbraid)
10
+ to expose the functions as a C++ library instead of an interactive
11
+ program.
12
+
13
+ Braids are returned in left normal form as a list of lists. The
14
+ first list contains only an integer, representing the power of
15
+ `\Delta`. The subsequent lists are the Tietze lists of the elementary
16
+ permutation braids.
17
+ """
18
+
19
+ # ****************************************************************************
20
+ # Copyright (C) 2016 Miguel Marco <mmarco@unizar.es>
21
+ #
22
+ # Distributed under the terms of the GNU General Public License (GPL)
23
+ # as published by the Free Software Foundation; either version 2 of
24
+ # the License, or (at youroption) any later version.
25
+ # https://www.gnu.org/licenses/
26
+ # ****************************************************************************
27
+
28
+
29
+ from cysignals.signals cimport sig_on, sig_off
30
+
31
+ from libcpp.list cimport list
32
+
33
+
34
+ cdef extern from "braiding.h" namespace "Braiding":
35
+ list[list[int]] ConjugatingBraid (int n, list[int] word, list[int] word2)
36
+ list[list[int]] LeftNormalForm (int n, list[int] word)
37
+ list[list[int]] RightNormalForm (int n, list[int] word)
38
+ list[list[int]] GreatestCommonDivisor(int n, list[int] word1, list[int] word2)
39
+ list[list[int]] LeastCommonMultiple(int n, list[int] word1, list[int] word2)
40
+ list[list[list[int]]] CentralizerGenerators(int n, list[int] word)
41
+ list[list[list[int]]] SuperSummitSet(int n, list[int] word)
42
+ list[list[list[list[int]]]] UltraSummitSet(int n, list[int] word)
43
+ int thurstontype(int n, list[int] word)
44
+ int Rigidity_ext(int n, list[int] word)
45
+ list[list[list[list[int]]]] SlidingCircuits(int n, list[int] word)
46
+ list[list[list[int]]] SendToSSS(int n, list[int] word)
47
+ list[list[list[int]]] SendToUSS(int n, list[int] word)
48
+ list[list[list[int]]] SendToSC(int n, list[int] word)
49
+ list[list[list[int]]] Trajectory(int n, list[int] word)
50
+ list[list[list[list[int]]]] CyclicSlidings(int n, list[int] word)
51
+
52
+
53
+ def conjugatingbraid(braid1, braid2):
54
+ r"""
55
+ Return a braid that conjugates ``braid1`` to ``braid2`` if
56
+ such a braid exists.
57
+
58
+ INPUT:
59
+
60
+ - ``braid1`` -- the braid to be conjugated
61
+ - ``braid2`` -- the braid to conjugate to
62
+
63
+ OUTPUT:
64
+
65
+ The list of lists that represent a conjugating braid. If the input braids
66
+ are not conjugate, an empty list is returned.
67
+
68
+ EXAMPLES::
69
+
70
+ sage: from sage.libs.braiding import conjugatingbraid
71
+ sage: B = BraidGroup(3)
72
+ sage: b = B([1,2,1,-2])
73
+ sage: c = B([1,2])
74
+ sage: conjugatingbraid(b,c)
75
+ [[0], [2]]
76
+ """
77
+ nstrands = max(braid1.parent().strands(), braid2.parent().strands())
78
+ l1 = braid1.Tietze()
79
+ l2 = braid2.Tietze()
80
+ sig_on()
81
+ cdef list[list[int]] rop = ConjugatingBraid(nstrands, l1, l2)
82
+ sig_off()
83
+ return rop
84
+
85
+
86
+ def leftnormalform(braid):
87
+ r"""
88
+ Return the left normal form of a braid.
89
+
90
+ INPUT:
91
+
92
+ - ``braid`` -- a braid
93
+
94
+ OUTPUT:
95
+
96
+ A list of lists with the left normal form. The first list contains
97
+ the power of `\Delta`. The subsequent lists are the elementary
98
+ permutation braids.
99
+
100
+ EXAMPLES::
101
+
102
+ sage: from sage.libs.braiding import leftnormalform
103
+ sage: B = BraidGroup(3)
104
+ sage: b = B([1,2,1,-2])
105
+ sage: leftnormalform(b)
106
+ [[0], [2, 1]]
107
+ """
108
+ nstrands = braid.parent().strands()
109
+ l1 = braid.Tietze()
110
+ sig_on()
111
+ cdef list[list[int]] rop = LeftNormalForm(nstrands, l1)
112
+ sig_off()
113
+ return rop
114
+
115
+
116
+ def rightnormalform(braid):
117
+ r"""
118
+ Return the right normal form of a braid.
119
+
120
+ INPUT:
121
+
122
+ - ``braid`` -- a braid
123
+
124
+ OUTPUT:
125
+
126
+ A list of lists with the right normal form. The first list contains
127
+ the power of `\Delta`. The subsequent lists are the elementary
128
+ permutation braids.
129
+
130
+ EXAMPLES::
131
+
132
+ sage: from sage.libs.braiding import rightnormalform
133
+ sage: B = BraidGroup(3)
134
+ sage: b = B([1,2,1,-2])
135
+ sage: rightnormalform(b)
136
+ [[2, 1], [0]]
137
+ """
138
+ nstrands = braid.parent().strands()
139
+ l1 = braid.Tietze()
140
+ sig_on()
141
+ cdef list[list[int]] rop = RightNormalForm(nstrands, l1)
142
+ sig_off()
143
+ return rop
144
+
145
+
146
+ def greatestcommondivisor(braid1, braid2):
147
+ r"""
148
+ Return the greatest common divisor of two braids.
149
+
150
+ INPUT:
151
+
152
+ - ``braid1`` -- a braid
153
+ - ``braid2`` -- a braid
154
+
155
+ OUTPUT: list of lists representing the gcd of ``braid1`` and ``braid2``
156
+
157
+ EXAMPLES::
158
+
159
+ sage: from sage.libs.braiding import greatestcommondivisor
160
+ sage: B = BraidGroup(3)
161
+ sage: b1 = B([1, 2, -1])
162
+ sage: b2 = B([2, 2, 2])
163
+ sage: greatestcommondivisor(b1, b2)
164
+ [[-1], [2, 1]]
165
+ """
166
+ nstrands = max(braid1.parent().strands(), braid2.parent().strands())
167
+ l1 = braid1.Tietze()
168
+ l2 = braid2.Tietze()
169
+ sig_on()
170
+ cdef list[list[int]] rop = GreatestCommonDivisor(nstrands, l1, l2)
171
+ sig_off()
172
+ return rop
173
+
174
+
175
+ def leastcommonmultiple(braid1, braid2):
176
+ r"""
177
+ Return the least common multiple of two braids.
178
+
179
+ INPUT:
180
+
181
+ - ``braid1`` -- a braid
182
+ - ``braid2`` -- a braid
183
+
184
+ OUTPUT: list of lists representing the lcm of ``braid1`` and ``braid2``
185
+
186
+ EXAMPLES::
187
+
188
+ sage: from sage.libs.braiding import leastcommonmultiple
189
+ sage: B = BraidGroup(3)
190
+ sage: b1 = B([1, 2, -1])
191
+ sage: b2 = B([2, 2, 2])
192
+ sage: leastcommonmultiple(b1, b2)
193
+ [[1], [1], [1]]
194
+ """
195
+ nstrands = max(braid1.parent().strands(), braid2.parent().strands())
196
+ l1 = braid1.Tietze()
197
+ l2 = braid2.Tietze()
198
+ sig_on()
199
+ cdef list[list[int]] rop = LeastCommonMultiple(nstrands, l1, l2)
200
+ sig_off()
201
+ return rop
202
+
203
+
204
+ def centralizer(braid):
205
+ r"""
206
+ Return a list of generators of the centralizer of a braid.
207
+
208
+ INPUT:
209
+
210
+ - ``braid`` -- a braid
211
+
212
+ OUTPUT:
213
+
214
+ A list of lists representing the generators of the centralizer
215
+ of ``braid``.
216
+
217
+ EXAMPLES::
218
+
219
+ sage: from sage.libs.braiding import centralizer
220
+ sage: B = BraidGroup(3)
221
+ sage: b = B([1,2,-1])
222
+ sage: centralizer(b)
223
+ [[[-1], [2, 1], [1, 2]], [[0], [1], [1, 2], [2]]]
224
+ """
225
+ nstrands = braid.parent().strands()
226
+ lnf = leftnormalform(braid)
227
+ if len(lnf) == 1: # (lib)braiding crashes when the input is a power of Delta.
228
+ if lnf[0][0] % 2 == 0:
229
+ return [[[0], [i+1]] for i in range(nstrands)]
230
+ elif nstrands % 2:
231
+ return [[[0], [i+1, nstrands - i -1]] for i in range(nstrands//2)]
232
+ else:
233
+ return [[[0], [i+1, nstrands - i -1]] for i in range(nstrands//2-1)] + [[[0], [nstrands//2]]]
234
+ l = braid.Tietze()
235
+ sig_on()
236
+ cdef list[list[list[int]]] rop = CentralizerGenerators(nstrands, l)
237
+ sig_off()
238
+ return rop
239
+
240
+
241
+ def supersummitset(braid):
242
+ r"""
243
+ Return a list with the super-summit-set of a braid.
244
+
245
+ INPUT:
246
+
247
+ - ``braid`` -- a braid
248
+
249
+ OUTPUT: list of lists representing the super summit set of ``braid``
250
+
251
+ EXAMPLES::
252
+
253
+ sage: from sage.libs.braiding import supersummitset
254
+ sage: B = BraidGroup(3)
255
+ sage: b = B([1,2,-1])
256
+ sage: supersummitset(b)
257
+ [[[0], [2]], [[0], [1]]]
258
+ """
259
+ nstrands = braid.parent().strands()
260
+ l = braid.Tietze()
261
+ sig_on()
262
+ cdef list[list[list[int]]] rop = SuperSummitSet(nstrands, l)
263
+ sig_off()
264
+ return rop
265
+
266
+
267
+ def ultrasummitset(braid):
268
+ r"""
269
+ Return a list with the orbits forming the ultra-summit-set of the braid.
270
+
271
+ INPUT:
272
+
273
+ - ``braid`` -- a braid
274
+
275
+ OUTPUT:
276
+
277
+ A list of lists of lists representing the orbits of the ultra summit
278
+ set of ``braid``.
279
+
280
+ EXAMPLES::
281
+
282
+ sage: from sage.libs.braiding import ultrasummitset
283
+ sage: B = BraidGroup(3)
284
+ sage: b = B([1,2,-1])
285
+ sage: ultrasummitset(b)
286
+ [[[[0], [2]]], [[[0], [1]]]]
287
+ """
288
+ nstrands = braid.parent().strands()
289
+ l = braid.Tietze()
290
+ sig_on()
291
+ cdef list[list[list[list[int]]]] rop = UltraSummitSet(nstrands, l)
292
+ sig_off()
293
+ return rop
294
+
295
+
296
+ def thurston_type(braid):
297
+ r"""
298
+ Return the Thurston type of the braid.
299
+
300
+ INPUT:
301
+
302
+ - ``braid`` -- a braid
303
+
304
+ OUTPUT:
305
+
306
+ One of ``'periodic'``, ``'reducible'`` or ``'pseudo-anosov'``.
307
+
308
+ EXAMPLES::
309
+
310
+ sage: from sage.libs.braiding import thurston_type
311
+ sage: B = BraidGroup(3)
312
+ sage: b = B([1,2,-1])
313
+ sage: thurston_type(b)
314
+ 'reducible'
315
+ sage: c = B([1,2,1])
316
+ sage: thurston_type(c)
317
+ 'periodic'
318
+ sage: d = B([1,1,1,2,2])
319
+ sage: thurston_type(d)
320
+ 'pseudo-anosov'
321
+ """
322
+ nstrands = braid.parent().strands()
323
+ l = braid.Tietze()
324
+ sig_on()
325
+ cdef int i = thurstontype(nstrands, l)
326
+ sig_off()
327
+ if i == 1:
328
+ return 'periodic'
329
+ if i == 2:
330
+ return 'reducible'
331
+ if i == 3:
332
+ return 'pseudo-anosov'
333
+
334
+
335
+ def rigidity(braid):
336
+ r"""
337
+ Return the rigidity of the braid.
338
+
339
+ INPUT:
340
+
341
+ - ``braid`` -- a braid
342
+
343
+ OUTPUT: the rigidity of the braid
344
+
345
+ EXAMPLES::
346
+
347
+ sage: from sage.libs.braiding import rigidity
348
+ sage: B = BraidGroup(3)
349
+ sage: c = B([1,1,1,2,2])
350
+ sage: rigidity(c)
351
+ 3
352
+ """
353
+ nstrands = braid.parent().strands()
354
+ l = braid.Tietze()
355
+ sig_on()
356
+ cdef int i = Rigidity_ext(nstrands, l)
357
+ sig_off()
358
+ return i
359
+
360
+
361
+ def sliding_circuits(braid):
362
+ r"""
363
+ Return the set of sliding circuits of the braid.
364
+
365
+ INPUT:
366
+
367
+ - ``braid`` -- a braid
368
+
369
+ OUTPUT:
370
+
371
+ A list with the sliding circuits of ``braid``. Each sliding circuit
372
+ is a list of braids.
373
+
374
+ EXAMPLES::
375
+
376
+ sage: from sage.libs.braiding import sliding_circuits
377
+ sage: B = BraidGroup(3)
378
+ sage: c = B([1,1,1,2,2])
379
+ sage: sliding_circuits(c)
380
+ [[[[0], [1], [1, 2], [2, 1]]],
381
+ [[[0], [2], [2, 1], [1, 2]]],
382
+ [[[0], [1, 2], [2, 1], [1]]],
383
+ [[[0], [2, 1], [1, 2], [2]]],
384
+ [[[0], [1, 2], [2], [2, 1]]],
385
+ [[[0], [2, 1], [1], [1, 2]]]]
386
+ """
387
+ nstrands = braid.parent().strands()
388
+ l = braid.Tietze()
389
+ sig_on()
390
+ cdef list[list[list[list[int]]]] rop = SlidingCircuits(nstrands, l)
391
+ sig_off()
392
+ return rop
393
+
394
+
395
+ def send_to_sss(braid):
396
+ r"""
397
+ Return an element of the braid's super summit set and the conjugating braid.
398
+
399
+ INPUT:
400
+
401
+ - ``braid`` -- a braid
402
+
403
+ OUTPUT:
404
+
405
+ A list with two braids, the first one is an element of ``braid`` super summit
406
+ set, the second one is the corresponding conjugating braid.
407
+
408
+ EXAMPLES::
409
+
410
+ sage: from sage.libs.braiding import send_to_sss
411
+ sage: B = BraidGroup(4)
412
+ sage: d = B([1, 2, 1, 2, 3, -1, 2,- 3])
413
+ sage: send_to_sss(d)
414
+ [[[0], [1, 2, 1, 3]], [[-1], [1, 2, 3, 2]]]
415
+
416
+ """
417
+ nstrands = braid.parent().strands()
418
+ l = braid.Tietze()
419
+ sig_on()
420
+ cdef list[list[list[int]]] rop = SendToSSS(nstrands, l)
421
+ sig_off()
422
+ return rop
423
+
424
+
425
+ def send_to_uss(braid):
426
+ r"""
427
+ Return an element of the braid's ultra summit set and the conjugating braid.
428
+
429
+ INPUT:
430
+
431
+ - ``braid`` -- a braid
432
+
433
+ OUTPUT:
434
+
435
+ A list with two braids, the first one is an element of ``braid`` ultra summit
436
+ set, the second one is the corresponding conjugating braid.
437
+
438
+ EXAMPLES::
439
+
440
+ sage: from sage.libs.braiding import send_to_uss
441
+ sage: B = BraidGroup(4)
442
+ sage: d = B([1, 2, 1, 2, 3, -1, 2,- 1])
443
+ sage: send_to_uss(d)
444
+ [[[0], [1, 2, 3, 2]], [[0], [1]]]
445
+
446
+ """
447
+ nstrands = braid.parent().strands()
448
+ l = braid.Tietze()
449
+ sig_on()
450
+ cdef list[list[list[int]]] rop = SendToUSS(nstrands, l)
451
+ sig_off()
452
+ return rop
453
+
454
+
455
+ def send_to_sc(braid):
456
+ r"""
457
+ Return an element of the braid's sliding circuits and the conjugating braid.
458
+
459
+ INPUT:
460
+
461
+ - ``braid`` -- a braid
462
+
463
+ OUTPUT:
464
+
465
+ A list with two braids, the first one is an element of ``braid`` sliding
466
+ circuits, the second one is the corresponding conjugating braid.
467
+
468
+ EXAMPLES::
469
+
470
+ sage: from sage.libs.braiding import send_to_sc
471
+ sage: B = BraidGroup(4)
472
+ sage: d = B([1, 2, 1, 2, 3, -1, 2, 2])
473
+ sage: send_to_sc(d)
474
+ [[[0], [1, 2, 3, 2], [2, 1]], [[0], [1]]]
475
+
476
+
477
+ """
478
+ nstrands = braid.parent().strands()
479
+ l = braid.Tietze()
480
+ sig_on()
481
+ cdef list[list[list[int]]] rop = SendToSC(nstrands, l)
482
+ sig_off()
483
+ return rop
484
+
485
+
486
+ def trajectory(braid):
487
+ r"""
488
+ Return the braid's trajectory.
489
+
490
+ INPUT:
491
+
492
+ - ``braid`` -- a braid
493
+
494
+ OUTPUT:
495
+
496
+ A list of braids, formed by the ``braid```trajectory.
497
+
498
+ EXAMPLES::
499
+
500
+ sage: from sage.libs.braiding import trajectory
501
+ sage: B = BraidGroup(4)
502
+ sage: d = B([1, 2, 1, 2, 3, -1, 2, 2])
503
+ sage: trajectory(d)
504
+ [[[0], [1, 3], [1, 2, 3, 2]],
505
+ [[0], [1, 2, 3, 2, 1], [3]],
506
+ [[0], [1, 2, 3, 2], [2, 1]],
507
+ [[0], [2, 1, 3], [1, 2, 3]]]
508
+
509
+
510
+ """
511
+ nstrands = braid.parent().strands()
512
+ l = braid.Tietze()
513
+ sig_on()
514
+ cdef list[list[list[int]]] rop = Trajectory(nstrands, l)
515
+ sig_off()
516
+ return rop
517
+
518
+
519
+ def cyclic_slidings(braid):
520
+ r"""
521
+ Return the cyclic slidings of the braid.
522
+
523
+ INPUT:
524
+
525
+ - ``braid`` -- a braid
526
+
527
+ OUTPUT:
528
+
529
+ A list of lists of braids, given by the input's cyclic slidings.
530
+
531
+ EXAMPLES::
532
+
533
+ sage: from sage.libs.braiding import cyclic_slidings
534
+ sage: B = BraidGroup(4)
535
+ sage: d = B([1, 2, 1, 2, 3, -1, 2, 2])
536
+ sage: cyclic_slidings(d)
537
+ [[[[0], [1, 2, 3, 2], [2, 1]],
538
+ [[0], [1, 2, 3, 2, 1], [3]],
539
+ [[0], [2, 1, 3], [1, 2, 3]]],
540
+ [[[0], [1, 3, 2, 1], [2, 3]],
541
+ [[0], [1, 2, 3, 2, 1], [1]],
542
+ [[0], [2, 1, 3], [3, 2, 1]]]]
543
+
544
+ """
545
+ nstrands = braid.parent().strands()
546
+ l = braid.Tietze()
547
+ sig_on()
548
+ cdef list[list[list[list[int]]]] rop = CyclicSlidings(nstrands, l)
549
+ sig_off()
550
+ return rop