forked from libsemigroups/libsemigroups_pybind11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpresentation-examples.cpp
More file actions
1971 lines (1507 loc) · 61 KB
/
presentation-examples.cpp
File metadata and controls
1971 lines (1507 loc) · 61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// libsemigroups_pybind11
// Copyright (C) 2022-2024 Murray T. Whyte
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// libsemigroups headers
#include <libsemigroups/libsemigroups.hpp>
// pybind11....
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
// libsemigroups_pybind11....
#include "main.hpp" // for init_presentation_examples
namespace libsemigroups {
namespace py = pybind11;
void init_presentation_examples(py::module& m) {
namespace examples = presentation::examples;
m.def("presentation_examples_stellar_monoid_GH19",
&examples::stellar_monoid_GH19,
py::arg("l"),
R"pbdoc(
:sig=(l: int) -> Presentation:
A presentation for the stellar monoid.
This function returns a monoid presentation defining the stellar monoid with *l*
generators, as in Theorem 4.39 of :cite:`Gay1999aa`.
:param l: the number of generators.
:type l: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``l < 2``.
)pbdoc");
m.def("presentation_examples_dual_symmetric_inverse_monoid_EEF07",
&examples::dual_symmetric_inverse_monoid_EEF07,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the dual symmetric inverse monoid.
This function returns a monoid presentation defining the dual symmetric inverse
monoid of degree *n*, as in Section 3 of :cite:`Easdown2007aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_uniform_block_bijection_monoid_Fit03",
&examples::uniform_block_bijection_monoid_Fit03,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the uniform block bijection monoid.
This function returns a monoid presentation defining the uniform block bijection
monoid of degree *n*, as in :cite:`FitzGerald2003aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_partition_monoid_HR05",
&examples::partition_monoid_HR05,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the partition monoid.
This function returns a monoid presentation defining the partition monoid of
degree *n*, as in :cite:`Halverson2005aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
)pbdoc");
m.def("presentation_examples_partition_monoid_Eas11",
&examples::partition_monoid_Eas11,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the partition monoid.
This function returns a monoid presentation defining the partition monoid of
degree *n*, as in Theorem 41 of :cite:`East2011aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_sigma_plactic_monoid_AHMNT24",
&examples::sigma_plactic_monoid_AHMNT24,
py::arg("sigma"),
R"pbdoc(
:sig=(sigma: list[int]) -> Presentation:
A presentation for the :math:`\sigma`-plactic monoid.
This function returns a presentation for the :math:`\sigma`-plactic monoid with
``sigma.size()`` generators as in Section 3.1 :cite:`Abram2024aa`. The image of
:math:`\sigma` is given by the values in *sigma*.
The :math:`\sigma`-plactic monoid is the quotient of the plactic monoid by the
least congruence containing the relation :math:`a^{\sigma(a)} = a` for each
:math:`a` in the alphabet. When :math:`\sigma(a) = 2` for all :math:`a`, the
resultant :math:`\sigma`-plactic monoid is known as the stylic monoid, and is
given in :any:`stylic_monoid`.
:param sigma: a list representing the image of $\sigma$.
:type sigma: list[int]
:returns: The specified presentation
:rtype: Presentation
:raises LibsemigroupsError: if ``len(sigma) < 1``.
)pbdoc");
m.def("presentation_examples_singular_brauer_monoid_MM07",
&examples::singular_brauer_monoid_MM07,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the singular part of the Brauer monoid.
This function returns a monoid presentation for the singular part of the Brauer
monoid of degree *n*, as in Theorem 5 of :cite:`Maltcev2007aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_orientation_preserving_monoid_AR00",
&examples::orientation_preserving_monoid_AR00,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the monoid of orientation preserving mappings.
This function returns a monoid presentation defining the monoid of orientation
preserving mappings on a finite chain of order *n*, as described in
:cite:`Arthur2000aa`.
:param n: the order of the chain.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_orientation_preserving_reversing_monoid_AR00",
&examples::orientation_preserving_reversing_monoid_AR00,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the monoid of orientation preserving or reversing mappings.
This function returns a monoid presentation defining the monoid of orientation
preserving or reversing mappings on a finite chain of order *n*, as
described in :cite:`Arthur2000aa`.
:param n: the order of the chain.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_temperley_lieb_monoid_Eas21",
&examples::temperley_lieb_monoid_Eas21,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the Temperley-Lieb monoid.
This function returns a monoid presentation defining the Temperley-Lieb monoid
with *n* generators, as described in Theorem 2.2 of :cite:`East2022aa`.
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_brauer_monoid_KM07",
&examples::brauer_monoid_KM07,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the Brauer monoid.
This function returns a monoid presentation defining the Brauer monoid of degree
*n*, as described in Theorem 3.1 of :cite:`Kudryavtseva2006aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
)pbdoc");
m.def("presentation_examples_partial_brauer_monoid_KM07",
&examples::partial_brauer_monoid_KM07,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the partial Brauer monoid.
This function returns a monoid presentation defining the partial Brauer monoid
of degree *n*, as described in Theorem 5.1 of :cite:`Kudryavtseva2006aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
)pbdoc");
m.def("presentation_examples_motzkin_monoid_PHL13",
&examples::motzkin_monoid_PHL13,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the Motzkin monoid.
This function returns a monoid presentation defining the Motzkin monoid of
degree *n*, as described in Theorem 4.1 of :cite:`Posner2013aa`, with the
additional relations :math:` r_i t_i l_i = r_i^ 2 ` added to fix a hole in
Lemma 4.10 which rendered the presentation as stated in the paper incorrect.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
)pbdoc");
m.def("presentation_examples_fibonacci_semigroup_CRRT94",
&examples::fibonacci_semigroup_CRRT94,
py::arg("r"),
py::arg("n"),
R"pbdoc(
:sig=(r: int, n: int) -> Presentation:
A presentation for a Fibonacci semigroup.
This function returns a semigroup presentation defining the Fibonacci semigroup
:math:`F(r, n)`, where :math:`r` is *r* and :math:`n` is *n*, as described in
:cite:`Campbell1994aa`.
:param r: the length of the left hand sides of the relations.
:type r: int
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
:raises LibsemigroupsError: if ``r < 1``.
)pbdoc");
m.def("presentation_examples_plactic_monoid_Knu70",
&examples::plactic_monoid_Knu70,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the plactic monoid.
This function returns a monoid presentation defining the plactic monoid with *n*
generators, as in see Theorem 6 of :cite:`Knuth1970aa`.
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_stylic_monoid_AR22",
&examples::stylic_monoid_AR22,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the stylic monoid.
This function returns a monoid presentation defining the stylic monoid with *n*
generators, as in Theorem 8.1 of :cite:`Abram2022aa`.
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_group_Bur12",
&examples::symmetric_group_Bur12,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric group.
This function returns a monoid presentation for the symmetric group of degree
*n*, as in p.464 of :cite:`Burnside2012aa`. This presentation has :math:`n - 1`
generators and :math:`n^3 - 5n^2 + 9n - 5` relations.
:param n: the degree of the symmetric group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_group_Car56",
&examples::symmetric_group_Car56,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric group.
This function returns a monoid presentation for the symmetric group of degree
*n*, as on page 169 of :cite:`Carmichael1956aa`. This presentation has
:math:`n - 1` generators and :math:`(n - 1)^2` relations.
:param n: the degree of the symmetric group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_group_Moo97_a",
&examples::symmetric_group_Moo97_a,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric group.
This function returns a monoid presentation for the symmetric group of degree
*n*, as in Theorem A of :cite:`Moore1897aa`. This presentation has :math:`n - 1`
generators and :math:`\frac{1}{2}n(n - 1)` relations.
:param n: the degree of the symmetric group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_group_Moo97_b",
&examples::symmetric_group_Moo97_b,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric group.
This function returns a monoid presentation for the symmetric group of degree
*n*, as in in Theorem A' of :cite:`Moore1897aa`. This presentation has :math:`2`
generators and :math:`n + 1` relations for :math:`n \geq 4`. If :math:`n<4`
then there are :math:`4` relations.
:param n: the degree of the symmetric group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_alternating_group_Moo97",
&examples::alternating_group_Moo97,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the alternating group.
This function returns a monoid presentation defining the alternating group of
degree *n*, as in Theorem B of :cite:`Moore1897aa`.
:param n: the degree of the alternating group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_rectangular_band_ACOR00",
&examples::rectangular_band_ACOR00,
py::arg("m"),
py::arg("n"),
R"pbdoc(
:sig=(m: int, n: int) -> Presentation:
A presentation for a rectangular band.
This function returns a semigroup presentation defining the *m* by *n*
rectangular band, as given in Proposition 4.2 of :cite:`Ayik2000aa`.
:param m: the number of rows.
:type m: int
:param n: the number of columns.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``m == 0``.
:raises LibsemigroupsError: if ``n == 0``.
)pbdoc");
m.def("presentation_examples_full_transformation_monoid_Aiz58",
&examples::full_transformation_monoid_Aiz58,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the full transformation monoid.
This function returns a monoid presentation defining the full transformation
monoid of degree *n*, as in Section 5, Theorem 2 of :cite:`Aizenstat1958aa`
(Russian) and Chapter 3, Proposition 1.7 of :cite:`Ruskuc1995aa` (English).
:param n: the degree of the full transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_full_transformation_monoid_II74",
&examples::full_transformation_monoid_II74,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the full transformation monoid.
This function returns a monoid presentation defining the full transformation
monoid of degree *n* due to Iwahori and Iwahori :cite:`Iwahori1974aa`, as in
Theorem 9.3.1 of :cite:`Ganyushkin2009aa`.
:param n: the degree of the full transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_full_transformation_monoid_MW24_a",
&examples::full_transformation_monoid_MW24_a,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the full transformation monoid.
This function returns a monoid presentation defining the full transformation
monoid of degree *n*, corresponding to :math:`\mathcal{T}` in Theorem 1.5 of
:cite:`Mitchell2024aa`. For ``n >= 4`` this presentation has five
non-symmetric-group relations.
:param n: the degree of the full transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_full_transformation_monoid_MW24_b",
&examples::full_transformation_monoid_MW24_b,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the full transformation monoid.
This function returns a monoid presentation defining the full transformation
monoid of degree *n*, corresponding to :math:`\mathcal{T}'` in Theorem 1.5 of
:cite:`Mitchell2024aa`. This presentation is only valid for odd values of *n*,
and for ``n >= 5`` this presentation has four non-symmetric-group relations.
:param n: the degree of the full transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
:raises LibsemigroupsError: if *n* is not odd.
)pbdoc");
m.def("presentation_examples_partial_transformation_monoid_Shu60",
&examples::partial_transformation_monoid_Shu60,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the partial transformation monoid.
This function returns a monoid presentation defining the partial transformation
monoid of degree *n* due to Shutov :cite:`Shutov1960aa`, as in
Theorem 9.4.1 of :cite:`Ganyushkin2009aa`.
:param n: the degree of the partial transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_partial_transformation_monoid_MW24",
&examples::partial_transformation_monoid_MW24,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the partial transformation monoid.
This function returns a monoid presentation defining the partial transformation
monoid of degree *n*, as in Theorem 1.6 of :cite:`Mitchell2024aa`.
:param n: the degree of the partial transformation monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_inverse_monoid_Sol04",
&examples::symmetric_inverse_monoid_Sol04,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric inverse monoid.
This function returns a monoid presentation defining the symmetric inverse
monoid of degree *n*, as in Example 7.1.2 of :cite:`Gay2018aa`.
:param n: the degree of the symmetric inverse monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_symmetric_inverse_monoid_Shu60",
&examples::symmetric_inverse_monoid_Shu60,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric inverse monoid.
This function returns a monoid presentation defining the symmetric inverse
monoid of degree *n* due to Shutov :cite:`Shutov1960aa`, as in Theorem
9.2.2 of :cite:`Ganyushkin2009aa`.
:param n: the degree of the symmetric inverse monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_symmetric_inverse_monoid_MW24",
&examples::symmetric_inverse_monoid_MW24,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the symmetric inverse monoid.
This function returns a monoid presentation defining the partial transformation
monoid of degree *n*, as in Theorem 1.4 of :cite:`Mitchell2024aa`.
:param n: the degree of the symmetric inverse monoid.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_chinese_monoid_CEKNH01",
&examples::chinese_monoid_CEKNH01,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the Chinese monoid.
This function returns a monoid presentation defining the Chinese monoid with *n*
generators, as in :cite:`Cassaigne2001aa`.
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_order_preserving_monoid_AR00",
&examples::order_preserving_monoid_AR00,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the monoid of order preserving mappings.
This function returns a monoid presentation defining the monoid of
order preserving transformations of degree *n*, as described in Section 2 of
:cite:`Arthur2000aa`. This presentation has :math:`2n - 2` generators and
:math:`n^2` relations.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_cyclic_inverse_monoid_Fer22_a",
&examples::cyclic_inverse_monoid_Fer22_a,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the cyclic inverse monoid.
This function returns a monoid presentation defining the cyclic inverse monoid
of degree *n*, as in Theorem 2.6 of :cite:`Fernandes2022aa`. This has
:math:`n + 1` generators and :math:`\frac{1}{2} \left(n^2 + 3n + 4\right)`
relations.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_cyclic_inverse_monoid_Fer22_b",
&examples::cyclic_inverse_monoid_Fer22_b,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the cyclic inverse monoid.
This function returns a monoid presentation defining the cyclic inverse monoid
of degree *n*, as in Theorem 2.7 of :cite:`Fernandes2022aa`. This presentation
has :math:`2` generators and :math:`\frac{1}{2}\left(n^2 - n + 6\right)`
relations.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_order_preserving_cyclic_inverse_monoid_Fer22",
&examples::order_preserving_cyclic_inverse_monoid_Fer22,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the order preserving part of the cyclic inverse monoid.
This function returns a monoid presentation defining the order preserving part
of the cyclic inverse monoid of degree *n*, as in Theorem 2.17 of
:cite:`Fernandes2022aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_partial_isometries_cycle_graph_monoid_FP22",
&examples::partial_isometries_cycle_graph_monoid_FP22,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the monoid of partial isometries of a cycle graph.
This function returns a monoid presentation defining the monoid of partial
isometries of an :math:`n` -cycle graph, as in Theorem 2.8 of
:cite:`Fernandes2022ab`
:param n: the number of vertices of the cycle graph.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
)pbdoc");
m.def("presentation_examples_not_symmetric_group_GKKL08",
&examples::not_symmetric_group_GKKL08,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A non-presentation for the symmetric group.
This function returns a monoid presentation which is claimed to define the
symmetric group of degree *n*, but does not, as in Section 2.2 of
:cite:`Guralnick2008aa`.
:param n: the claimed degree of the symmetric group.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 4``.
)pbdoc");
m.def("presentation_examples_special_linear_group_2_CR80",
&examples::special_linear_group_2_CR80,
py::arg("q"),
R"pbdoc(
:sig=(q: int) -> Presentation:
A presentation for the special linear group :math:`\mathrm{SL}(2, q)`.
This function returns a presentation for the special linear group
:math:`\mathrm{SL}(2, q)` (also written :math:`\mathrm{SL(2,
\mathbb{Z}_q)}`), where *q* is an odd prime, as in Theorem 4 of
:cite:`Campbell1980aa`.
:param q: the order of the finite field over which the special linear group is
constructed. This should be an odd prime for the returned presentation to
define claimed group.
:type q: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``q < 3``.
)pbdoc");
m.def("presentation_examples_hypo_plactic_monoid_Nov00",
&examples::hypo_plactic_monoid_Nov00,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the hypoplactic monoid.
This function returns a presentation for the hypoplactic monoid with *n*
generators, as in Definition 4.2 of :cite:`Novelli2000aa`. This monoid is a
quotient monoid of the plactic monoid, and this presentation includes the rules
from :any:`plactic_monoid_Knu70`.
:param n: the number of generators.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 1``.
)pbdoc");
m.def("presentation_examples_zero_rook_monoid_Gay18",
&examples::zero_rook_monoid_Gay18,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the :math:`0`-rook monoid.
This function returns a presentation for the :math:`0` -rook monoid of degree
*n*, as in Definition 4.1.1 in :cite:`Gay2018aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 2``.
)pbdoc");
m.def("presentation_examples_renner_type_B_monoid_Gay18",
&examples::renner_type_B_monoid_Gay18,
py::arg("l"),
py::arg("q"),
R"pbdoc(
:sig=(l: int, q: int) -> Presentation:
A presentation for the Renner monoid of type B.
This functions returns a presentation for the Renner monoid of type B with size
*l* and Iwahori-Hecke deformation *q*.
When ``q == 0``, this corresponds to Definition 8.4.1 and Example 8.4.2 of
:cite:`Gay2018aa`.
When ``q == 1``, this corresponds to Theorem 8.4.19 of :cite:`Gay2018aa`.
:param l: the size of the monoid.
:type l: int
:param q: the Iwahori-Hecke deformation.
:type q: int
:returns: The specified presentation
:rtype: Presentation
:raises LibsemigroupsError: if ``q != 0`` or ``q != 1``.
)pbdoc");
m.def("presentation_examples_not_renner_type_B_monoid_Gay18",
&examples::not_renner_type_B_monoid_Gay18,
py::arg("l"),
py::arg("q"),
R"pbdoc(
:sig=(l: int, q: int) -> Presentation:
A presentation that incorrectly claims to be the Renner monoid of type B.
This functions returns a presentation that incorrectly claims to be the Renner
monoid of type B with size *l* and Iwahori-Hecke deformation *q*.
When ``q == 0``, this corresponds to Example 7.1.2 of :cite:`Gay2018aa`.
When ``q == 1``, this corresponds to Section 3.2 of :cite:`Godelle2009aa`.
:param l: the size of the monoid.
:type l: int
:param q: the Iwahori-Hecke deformation.
:type q: int
:returns: The specified presentation
:rtype: Presentation
:raises LibsemigroupsError: if ``q != 0`` or ``q != 1``.
)pbdoc");
m.def("presentation_examples_renner_type_D_monoid_Gay18",
&examples::renner_type_D_monoid_Gay18,
py::arg("l"),
py::arg("q"),
R"pbdoc(
:sig=(l: int, q: int) -> Presentation:
A presentation for the Renner monoid of type D.
This functions returns a presentation for the Renner monoid of type D with size
*l* and Iwahori-Hecke deformation *q*.
When ``q == 0``, this corresponds Definition 8.4.22 of :cite:`Gay2018aa`.
When ``q == 1``, this corresponds to Theorem 8.4.43 of :cite:`Gay2018aa`.
:param l: the size of the monoid.
:type l: int
:param q: the Iwahori-Hecke deformation.
:type q: int
:returns: The specified presentation
:rtype: Presentation
:raises LibsemigroupsError: if ``q != 0`` or ``q != 1``.
)pbdoc");
m.def("presentation_examples_not_renner_type_D_monoid_God09",
&examples::not_renner_type_D_monoid_God09,
py::arg("l"),
py::arg("q"),
R"pbdoc(
:sig=(l: int, q: int) -> Presentation:
A presentation that incorrectly claims to be the Renner monoid of type D.
This functions returns a presentation that incorrectly claims to be the Renner
monoid of type D with size *l* and Iwahori-Hecke deformation *q*.
When ``q == 1``, this corresponds to Section 3.3 of :cite:`Godelle2009aa`.
:param l: the size of the monoid.
:type l: int
:param q: the Iwahori-Hecke deformation.
:type q: int
:returns: The specified presentation
:rtype: Presentation
:raises LibsemigroupsError: if ``q != 0`` or ``q != 1``.
)pbdoc");
m.def("presentation_examples_stellar_monoid",
&examples::stellar_monoid,
py::arg("l"),
R"pbdoc(
:sig=(l: int) -> Presentation:
A presentation for the stellar monoid.
This function returns a monoid presentation defining the stellar monoid with
*l* generators, as in Theorem 4.39 of :cite:`Gay1999aa`.
:param l: the number of generators.
:type l: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``l < 2``.
.. note::
This function returns exactly the same presentation as :any:`stellar_monoid_GH19`,
and exists as a convenience function for when a presentation for the
alternating group is required, but the specific presentation
is not important.
)pbdoc");
m.def("presentation_examples_dual_symmetric_inverse_monoid",
&examples::dual_symmetric_inverse_monoid,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the dual symmetric inverse monoid.
This function returns a monoid presentation defining the dual symmetric inverse
monoid of degree *n*, as in Section 3 of :cite:`Easdown2007aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.
.. note::
This function returns exactly the same presentation as :any:`dual_symmetric_inverse_monoid`,
and exists as a convenience function for when a presentation for the
alternating group is required, but the specific presentation
is not important.
)pbdoc");
m.def("presentation_examples_uniform_block_bijection_monoid",
&examples::uniform_block_bijection_monoid,
py::arg("n"),
R"pbdoc(
:sig=(n: int) -> Presentation:
A presentation for the uniform block bijection monoid.
This function returns a monoid presentation defining the uniform block bijection
monoid of degree *n*, as in :cite:`FitzGerald2003aa`.
:param n: the degree.
:type n: int
:returns: The specified presentation.
:rtype: Presentation
:raises LibsemigroupsError: if ``n < 3``.