passagemath-gap-pkg-semigroups 10.6.29__cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.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.

Potentially problematic release.


This version of passagemath-gap-pkg-semigroups might be problematic. Click here for more details.

Files changed (354) hide show
  1. gap/pkg/semigroups/CHANGELOG.md +1699 -0
  2. gap/pkg/semigroups/CONTRIBUTING.md +91 -0
  3. gap/pkg/semigroups/GNUmakefile +110 -0
  4. gap/pkg/semigroups/GNUmakefile.in +110 -0
  5. gap/pkg/semigroups/GPL +674 -0
  6. gap/pkg/semigroups/LICENSE +16 -0
  7. gap/pkg/semigroups/Makefile +26 -0
  8. gap/pkg/semigroups/Makefile.gappkg +225 -0
  9. gap/pkg/semigroups/PackageInfo.g +529 -0
  10. gap/pkg/semigroups/README.md +102 -0
  11. gap/pkg/semigroups/VERSIONS +112 -0
  12. gap/pkg/semigroups/aclocal.m4 +375 -0
  13. gap/pkg/semigroups/autogen.sh +25 -0
  14. gap/pkg/semigroups/bin/aarch64-unknown-linux-gnu-default64-kv10/semigroups.so +0 -0
  15. gap/pkg/semigroups/config.guess +1807 -0
  16. gap/pkg/semigroups/config.log +1016 -0
  17. gap/pkg/semigroups/config.status +1132 -0
  18. gap/pkg/semigroups/config.sub +1960 -0
  19. gap/pkg/semigroups/configure +9742 -0
  20. gap/pkg/semigroups/configure.ac +71 -0
  21. gap/pkg/semigroups/data/doc/greens.pickle +1 -0
  22. gap/pkg/semigroups/data/gens/fullbool-8.pickle.gz +0 -0
  23. gap/pkg/semigroups/data/gens/fullbool.pickle.gz +0 -0
  24. gap/pkg/semigroups/data/gens/hall.pickle.gz +0 -0
  25. gap/pkg/semigroups/data/gens/reflex-6.pickle.gz +0 -0
  26. gap/pkg/semigroups/data/gens/reflex.pickle.gz +0 -0
  27. gap/pkg/semigroups/data/tst/bipart4 +10 -0
  28. gap/pkg/semigroups/data/tst/pperm10 +1 -0
  29. gap/pkg/semigroups/data/tst/tables.gz +0 -0
  30. gap/pkg/semigroups/data/tst/testdata +1 -0
  31. gap/pkg/semigroups/data/tst/testinstall.pickle +1 -0
  32. gap/pkg/semigroups/data/tst/trans3 +7 -0
  33. gap/pkg/semigroups/data/tst/trans3-old +7 -0
  34. gap/pkg/semigroups/environment.yml +7 -0
  35. gap/pkg/semigroups/gap/attributes/acting.gd +15 -0
  36. gap/pkg/semigroups/gap/attributes/acting.gi +297 -0
  37. gap/pkg/semigroups/gap/attributes/attr.gd +91 -0
  38. gap/pkg/semigroups/gap/attributes/attr.gi +1214 -0
  39. gap/pkg/semigroups/gap/attributes/dual.gd +25 -0
  40. gap/pkg/semigroups/gap/attributes/dual.gi +209 -0
  41. gap/pkg/semigroups/gap/attributes/factor.gd +17 -0
  42. gap/pkg/semigroups/gap/attributes/factor.gi +453 -0
  43. gap/pkg/semigroups/gap/attributes/homomorph.gd +84 -0
  44. gap/pkg/semigroups/gap/attributes/homomorph.gi +591 -0
  45. gap/pkg/semigroups/gap/attributes/inverse.gd +38 -0
  46. gap/pkg/semigroups/gap/attributes/inverse.gi +708 -0
  47. gap/pkg/semigroups/gap/attributes/isomorph.gd +16 -0
  48. gap/pkg/semigroups/gap/attributes/isomorph.gi +377 -0
  49. gap/pkg/semigroups/gap/attributes/isorms.gd +49 -0
  50. gap/pkg/semigroups/gap/attributes/isorms.gi +1383 -0
  51. gap/pkg/semigroups/gap/attributes/maximal.gd +16 -0
  52. gap/pkg/semigroups/gap/attributes/maximal.gi +1876 -0
  53. gap/pkg/semigroups/gap/attributes/properties.gd +109 -0
  54. gap/pkg/semigroups/gap/attributes/properties.gi +1658 -0
  55. gap/pkg/semigroups/gap/attributes/rms-translat.gd +39 -0
  56. gap/pkg/semigroups/gap/attributes/rms-translat.gi +1078 -0
  57. gap/pkg/semigroups/gap/attributes/semifp.gd +12 -0
  58. gap/pkg/semigroups/gap/attributes/semifp.gi +84 -0
  59. gap/pkg/semigroups/gap/attributes/translat.gd +474 -0
  60. gap/pkg/semigroups/gap/attributes/translat.gi +1779 -0
  61. gap/pkg/semigroups/gap/congruences/cong.gd +154 -0
  62. gap/pkg/semigroups/gap/congruences/cong.gi +351 -0
  63. gap/pkg/semigroups/gap/congruences/conginv.gd +38 -0
  64. gap/pkg/semigroups/gap/congruences/conginv.gi +589 -0
  65. gap/pkg/semigroups/gap/congruences/conglatt.gd +101 -0
  66. gap/pkg/semigroups/gap/congruences/conglatt.gi +886 -0
  67. gap/pkg/semigroups/gap/congruences/congpairs.gd +21 -0
  68. gap/pkg/semigroups/gap/congruences/congpairs.gi +272 -0
  69. gap/pkg/semigroups/gap/congruences/congpart.gd +90 -0
  70. gap/pkg/semigroups/gap/congruences/congpart.gi +449 -0
  71. gap/pkg/semigroups/gap/congruences/congrees.gd +20 -0
  72. gap/pkg/semigroups/gap/congruences/congrees.gi +313 -0
  73. gap/pkg/semigroups/gap/congruences/congrms.gd +54 -0
  74. gap/pkg/semigroups/gap/congruences/congrms.gi +1467 -0
  75. gap/pkg/semigroups/gap/congruences/congsemigraph.gd +28 -0
  76. gap/pkg/semigroups/gap/congruences/congsemigraph.gi +289 -0
  77. gap/pkg/semigroups/gap/congruences/congsimple.gd +27 -0
  78. gap/pkg/semigroups/gap/congruences/congsimple.gi +236 -0
  79. gap/pkg/semigroups/gap/congruences/conguniv.gd +20 -0
  80. gap/pkg/semigroups/gap/congruences/conguniv.gi +271 -0
  81. gap/pkg/semigroups/gap/congruences/congwordgraph.gd +21 -0
  82. gap/pkg/semigroups/gap/congruences/congwordgraph.gi +250 -0
  83. gap/pkg/semigroups/gap/elements/bipart.gd +71 -0
  84. gap/pkg/semigroups/gap/elements/bipart.gi +995 -0
  85. gap/pkg/semigroups/gap/elements/blocks.gd +31 -0
  86. gap/pkg/semigroups/gap/elements/blocks.gi +134 -0
  87. gap/pkg/semigroups/gap/elements/boolmat.gd +74 -0
  88. gap/pkg/semigroups/gap/elements/boolmat.gi +726 -0
  89. gap/pkg/semigroups/gap/elements/elements.gd +11 -0
  90. gap/pkg/semigroups/gap/elements/elements.gi +121 -0
  91. gap/pkg/semigroups/gap/elements/ffmat.gd +71 -0
  92. gap/pkg/semigroups/gap/elements/ffmat.gi +311 -0
  93. gap/pkg/semigroups/gap/elements/maxplusmat.gd +131 -0
  94. gap/pkg/semigroups/gap/elements/maxplusmat.gi +782 -0
  95. gap/pkg/semigroups/gap/elements/pbr.gd +51 -0
  96. gap/pkg/semigroups/gap/elements/pbr.gi +740 -0
  97. gap/pkg/semigroups/gap/elements/pperm.gd +11 -0
  98. gap/pkg/semigroups/gap/elements/pperm.gi +14 -0
  99. gap/pkg/semigroups/gap/elements/semiringmat.gd +136 -0
  100. gap/pkg/semigroups/gap/elements/semiringmat.gi +717 -0
  101. gap/pkg/semigroups/gap/elements/star.gd +21 -0
  102. gap/pkg/semigroups/gap/elements/star.gi +21 -0
  103. gap/pkg/semigroups/gap/elements/trans.gd +13 -0
  104. gap/pkg/semigroups/gap/elements/trans.gi +50 -0
  105. gap/pkg/semigroups/gap/fp/freeband.gd +22 -0
  106. gap/pkg/semigroups/gap/fp/freeband.gi +502 -0
  107. gap/pkg/semigroups/gap/fp/freeinverse.gd +30 -0
  108. gap/pkg/semigroups/gap/fp/freeinverse.gi +465 -0
  109. gap/pkg/semigroups/gap/fp/tietze.gd +89 -0
  110. gap/pkg/semigroups/gap/fp/tietze.gi +1578 -0
  111. gap/pkg/semigroups/gap/fp/word.gd +15 -0
  112. gap/pkg/semigroups/gap/fp/word.gi +67 -0
  113. gap/pkg/semigroups/gap/greens/acting-inverse.gi +774 -0
  114. gap/pkg/semigroups/gap/greens/acting-regular.gi +553 -0
  115. gap/pkg/semigroups/gap/greens/acting.gd +81 -0
  116. gap/pkg/semigroups/gap/greens/acting.gi +2433 -0
  117. gap/pkg/semigroups/gap/greens/froidure-pin.gd +25 -0
  118. gap/pkg/semigroups/gap/greens/froidure-pin.gi +741 -0
  119. gap/pkg/semigroups/gap/greens/generic.gd +117 -0
  120. gap/pkg/semigroups/gap/greens/generic.gi +630 -0
  121. gap/pkg/semigroups/gap/ideals/acting.gd +17 -0
  122. gap/pkg/semigroups/gap/ideals/acting.gi +1155 -0
  123. gap/pkg/semigroups/gap/ideals/froidure-pin.gd +11 -0
  124. gap/pkg/semigroups/gap/ideals/froidure-pin.gi +105 -0
  125. gap/pkg/semigroups/gap/ideals/ideals.gd +45 -0
  126. gap/pkg/semigroups/gap/ideals/ideals.gi +442 -0
  127. gap/pkg/semigroups/gap/ideals/lambda-rho.gd +16 -0
  128. gap/pkg/semigroups/gap/ideals/lambda-rho.gi +614 -0
  129. gap/pkg/semigroups/gap/libsemigroups/cong.gd +24 -0
  130. gap/pkg/semigroups/gap/libsemigroups/cong.gi +431 -0
  131. gap/pkg/semigroups/gap/libsemigroups/fpsemi.gd +16 -0
  132. gap/pkg/semigroups/gap/libsemigroups/fpsemi.gi +53 -0
  133. gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gd +17 -0
  134. gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gi +945 -0
  135. gap/pkg/semigroups/gap/libsemigroups/sims1.gd +38 -0
  136. gap/pkg/semigroups/gap/libsemigroups/sims1.gi +308 -0
  137. gap/pkg/semigroups/gap/main/acting.gd +36 -0
  138. gap/pkg/semigroups/gap/main/acting.gi +779 -0
  139. gap/pkg/semigroups/gap/main/froidure-pin.gd +72 -0
  140. gap/pkg/semigroups/gap/main/froidure-pin.gi +655 -0
  141. gap/pkg/semigroups/gap/main/graded.gd +26 -0
  142. gap/pkg/semigroups/gap/main/graded.gi +355 -0
  143. gap/pkg/semigroups/gap/main/lambda-rho.gd +29 -0
  144. gap/pkg/semigroups/gap/main/lambda-rho.gi +514 -0
  145. gap/pkg/semigroups/gap/main/orbits.gd +24 -0
  146. gap/pkg/semigroups/gap/main/orbits.gi +512 -0
  147. gap/pkg/semigroups/gap/main/semiact.gd +20 -0
  148. gap/pkg/semigroups/gap/main/semiact.gi +821 -0
  149. gap/pkg/semigroups/gap/main/setup.gd +61 -0
  150. gap/pkg/semigroups/gap/main/setup.gi +1094 -0
  151. gap/pkg/semigroups/gap/obsolete.gd +9 -0
  152. gap/pkg/semigroups/gap/obsolete.gi +14 -0
  153. gap/pkg/semigroups/gap/options.g +55 -0
  154. gap/pkg/semigroups/gap/semigroups/grpperm.gd +12 -0
  155. gap/pkg/semigroups/gap/semigroups/grpperm.gi +177 -0
  156. gap/pkg/semigroups/gap/semigroups/semibipart.gd +28 -0
  157. gap/pkg/semigroups/gap/semigroups/semibipart.gi +570 -0
  158. gap/pkg/semigroups/gap/semigroups/semiboolmat.gd +20 -0
  159. gap/pkg/semigroups/gap/semigroups/semiboolmat.gi +104 -0
  160. gap/pkg/semigroups/gap/semigroups/semicons.gd +52 -0
  161. gap/pkg/semigroups/gap/semigroups/semicons.gi +1194 -0
  162. gap/pkg/semigroups/gap/semigroups/semidp.gd +13 -0
  163. gap/pkg/semigroups/gap/semigroups/semidp.gi +509 -0
  164. gap/pkg/semigroups/gap/semigroups/semieunit.gd +126 -0
  165. gap/pkg/semigroups/gap/semigroups/semieunit.gi +889 -0
  166. gap/pkg/semigroups/gap/semigroups/semiex.gd +104 -0
  167. gap/pkg/semigroups/gap/semigroups/semiex.gi +1590 -0
  168. gap/pkg/semigroups/gap/semigroups/semiffmat.gd +37 -0
  169. gap/pkg/semigroups/gap/semigroups/semiffmat.gi +565 -0
  170. gap/pkg/semigroups/gap/semigroups/semifp.gd +28 -0
  171. gap/pkg/semigroups/gap/semigroups/semifp.gi +1364 -0
  172. gap/pkg/semigroups/gap/semigroups/semigraph.gd +40 -0
  173. gap/pkg/semigroups/gap/semigroups/semigraph.gi +292 -0
  174. gap/pkg/semigroups/gap/semigroups/semigrp.gd +165 -0
  175. gap/pkg/semigroups/gap/semigroups/semigrp.gi +1225 -0
  176. gap/pkg/semigroups/gap/semigroups/semimaxplus.gd +72 -0
  177. gap/pkg/semigroups/gap/semigroups/semimaxplus.gi +710 -0
  178. gap/pkg/semigroups/gap/semigroups/semintmat.gd +13 -0
  179. gap/pkg/semigroups/gap/semigroups/semintmat.gi +74 -0
  180. gap/pkg/semigroups/gap/semigroups/semipbr.gd +19 -0
  181. gap/pkg/semigroups/gap/semigroups/semipbr.gi +139 -0
  182. gap/pkg/semigroups/gap/semigroups/semipperm.gd +27 -0
  183. gap/pkg/semigroups/gap/semigroups/semipperm.gi +711 -0
  184. gap/pkg/semigroups/gap/semigroups/semiquo.gd +14 -0
  185. gap/pkg/semigroups/gap/semigroups/semiquo.gi +97 -0
  186. gap/pkg/semigroups/gap/semigroups/semiringmat.gd +16 -0
  187. gap/pkg/semigroups/gap/semigroups/semiringmat.gi +21 -0
  188. gap/pkg/semigroups/gap/semigroups/semirms.gd +19 -0
  189. gap/pkg/semigroups/gap/semigroups/semirms.gi +977 -0
  190. gap/pkg/semigroups/gap/semigroups/semitrans.gd +49 -0
  191. gap/pkg/semigroups/gap/semigroups/semitrans.gi +909 -0
  192. gap/pkg/semigroups/gap/tools/display.gd +24 -0
  193. gap/pkg/semigroups/gap/tools/display.gi +749 -0
  194. gap/pkg/semigroups/gap/tools/io.gd +17 -0
  195. gap/pkg/semigroups/gap/tools/io.gi +543 -0
  196. gap/pkg/semigroups/gap/tools/iterators.gd +16 -0
  197. gap/pkg/semigroups/gap/tools/iterators.gi +253 -0
  198. gap/pkg/semigroups/gap/tools/utils.gd +19 -0
  199. gap/pkg/semigroups/gap/tools/utils.gi +756 -0
  200. gap/pkg/semigroups/gapbind14/.ccls +18 -0
  201. gap/pkg/semigroups/gapbind14/.clang-format +104 -0
  202. gap/pkg/semigroups/gapbind14/CPPLINT.cfg +5 -0
  203. gap/pkg/semigroups/gapbind14/LICENSE +674 -0
  204. gap/pkg/semigroups/gapbind14/README.md +76 -0
  205. gap/pkg/semigroups/gapbind14/demo/.gitignore +4 -0
  206. gap/pkg/semigroups/gapbind14/demo/LICENSE +293 -0
  207. gap/pkg/semigroups/gapbind14/demo/Makefile.gappkg +220 -0
  208. gap/pkg/semigroups/gapbind14/demo/Makefile.in +19 -0
  209. gap/pkg/semigroups/gapbind14/demo/PackageInfo.g +87 -0
  210. gap/pkg/semigroups/gapbind14/demo/README.md +17 -0
  211. gap/pkg/semigroups/gapbind14/demo/configure +34 -0
  212. gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gd +19 -0
  213. gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gi +10 -0
  214. gap/pkg/semigroups/gapbind14/demo/init.g +16 -0
  215. gap/pkg/semigroups/gapbind14/demo/makedoc.g +10 -0
  216. gap/pkg/semigroups/gapbind14/demo/read.g +6 -0
  217. gap/pkg/semigroups/gapbind14/demo/src/gapbind_demo.cc +142 -0
  218. gap/pkg/semigroups/gapbind14/demo/tst/testall.g +12 -0
  219. gap/pkg/semigroups/gapbind14/include/gapbind14/cpp_fn.hpp +223 -0
  220. gap/pkg/semigroups/gapbind14/include/gapbind14/gap_include.hpp +26 -0
  221. gap/pkg/semigroups/gapbind14/include/gapbind14/gapbind14.hpp +445 -0
  222. gap/pkg/semigroups/gapbind14/include/gapbind14/tame_free_fn.hpp +420 -0
  223. gap/pkg/semigroups/gapbind14/include/gapbind14/tame_mem_fn.hpp +556 -0
  224. gap/pkg/semigroups/gapbind14/include/gapbind14/to_cpp.hpp +162 -0
  225. gap/pkg/semigroups/gapbind14/include/gapbind14/to_gap.hpp +158 -0
  226. gap/pkg/semigroups/gapbind14/src/.clang-format +108 -0
  227. gap/pkg/semigroups/gapbind14/src/gapbind14.cpp +334 -0
  228. gap/pkg/semigroups/init.g +150 -0
  229. gap/pkg/semigroups/m4/ax_append_flag.m4 +50 -0
  230. gap/pkg/semigroups/m4/ax_check_compile_flag.m4 +53 -0
  231. gap/pkg/semigroups/m4/ax_check_hpcombi.m4 +121 -0
  232. gap/pkg/semigroups/m4/ax_check_libsemigroup.m4 +68 -0
  233. gap/pkg/semigroups/m4/ax_compare_version.m4 +177 -0
  234. gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx.m4 +1009 -0
  235. gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx_14.m4 +34 -0
  236. gap/pkg/semigroups/m4/ax_prefix_config_h.m4 +203 -0
  237. gap/pkg/semigroups/m4/ax_pthread.m4 +522 -0
  238. gap/pkg/semigroups/m4/find_gap.m4 +94 -0
  239. gap/pkg/semigroups/makedoc.g +153 -0
  240. gap/pkg/semigroups/prerequisites.sh +62 -0
  241. gap/pkg/semigroups/read.g +105 -0
  242. gap/pkg/semigroups/release.toml +6 -0
  243. gap/pkg/semigroups/tst/extreme/README +2 -0
  244. gap/pkg/semigroups/tst/extreme/attrinv.tst +703 -0
  245. gap/pkg/semigroups/tst/extreme/bipart.tst +2803 -0
  246. gap/pkg/semigroups/tst/extreme/closure.tst +652 -0
  247. gap/pkg/semigroups/tst/extreme/cong.tst +286 -0
  248. gap/pkg/semigroups/tst/extreme/conginv.tst +43 -0
  249. gap/pkg/semigroups/tst/extreme/examples.tst +2449 -0
  250. gap/pkg/semigroups/tst/extreme/freeband.tst +37 -0
  251. gap/pkg/semigroups/tst/extreme/greens-acting-regular.tst +27 -0
  252. gap/pkg/semigroups/tst/extreme/greens-acting.tst +1999 -0
  253. gap/pkg/semigroups/tst/extreme/ideals.tst +858 -0
  254. gap/pkg/semigroups/tst/extreme/inverse.tst +1025 -0
  255. gap/pkg/semigroups/tst/extreme/maximal.tst +856 -0
  256. gap/pkg/semigroups/tst/extreme/misc.tst +4236 -0
  257. gap/pkg/semigroups/tst/extreme/monoid_pkg.tst +1488 -0
  258. gap/pkg/semigroups/tst/extreme/properties.tst +914 -0
  259. gap/pkg/semigroups/tst/extreme/semibipart.tst +2837 -0
  260. gap/pkg/semigroups/tst/extreme/semieunit.tst +49 -0
  261. gap/pkg/semigroups/tst/extreme/semiffmat.tst +353 -0
  262. gap/pkg/semigroups/tst/extreme/semigroups.tst +245 -0
  263. gap/pkg/semigroups/tst/extreme/semiiter.tst +58 -0
  264. gap/pkg/semigroups/tst/extreme/semirms.tst +1091 -0
  265. gap/pkg/semigroups/tst/extreme/transform.tst +305 -0
  266. gap/pkg/semigroups/tst/extreme/translat.tst +44 -0
  267. gap/pkg/semigroups/tst/standard/README +2 -0
  268. gap/pkg/semigroups/tst/standard/attributes/acting.tst +388 -0
  269. gap/pkg/semigroups/tst/standard/attributes/attr.tst +2404 -0
  270. gap/pkg/semigroups/tst/standard/attributes/dual.tst +308 -0
  271. gap/pkg/semigroups/tst/standard/attributes/factor.tst +629 -0
  272. gap/pkg/semigroups/tst/standard/attributes/homomorph.tst +1134 -0
  273. gap/pkg/semigroups/tst/standard/attributes/inverse.tst +1521 -0
  274. gap/pkg/semigroups/tst/standard/attributes/isomorph.tst +435 -0
  275. gap/pkg/semigroups/tst/standard/attributes/isorms.tst +1147 -0
  276. gap/pkg/semigroups/tst/standard/attributes/maximal.tst +853 -0
  277. gap/pkg/semigroups/tst/standard/attributes/properties.tst +2028 -0
  278. gap/pkg/semigroups/tst/standard/attributes/semifp.tst +53 -0
  279. gap/pkg/semigroups/tst/standard/attributes/translat.tst +796 -0
  280. gap/pkg/semigroups/tst/standard/congruences/cong.tst +1044 -0
  281. gap/pkg/semigroups/tst/standard/congruences/conginv.tst +292 -0
  282. gap/pkg/semigroups/tst/standard/congruences/conglatt.tst +421 -0
  283. gap/pkg/semigroups/tst/standard/congruences/congpairs.tst +1011 -0
  284. gap/pkg/semigroups/tst/standard/congruences/congrees.tst +288 -0
  285. gap/pkg/semigroups/tst/standard/congruences/congrms.tst +701 -0
  286. gap/pkg/semigroups/tst/standard/congruences/congsemigraph.tst +422 -0
  287. gap/pkg/semigroups/tst/standard/congruences/congsimple.tst +311 -0
  288. gap/pkg/semigroups/tst/standard/congruences/conguniv.tst +259 -0
  289. gap/pkg/semigroups/tst/standard/congruences/congwordgraph.tst +330 -0
  290. gap/pkg/semigroups/tst/standard/elements/bipart.tst +783 -0
  291. gap/pkg/semigroups/tst/standard/elements/blocks.tst +166 -0
  292. gap/pkg/semigroups/tst/standard/elements/boolmat.tst +608 -0
  293. gap/pkg/semigroups/tst/standard/elements/elements.tst +117 -0
  294. gap/pkg/semigroups/tst/standard/elements/ffmat.tst +349 -0
  295. gap/pkg/semigroups/tst/standard/elements/maxplusmat.tst +613 -0
  296. gap/pkg/semigroups/tst/standard/elements/pbr.tst +506 -0
  297. gap/pkg/semigroups/tst/standard/elements/pperm.tst +32 -0
  298. gap/pkg/semigroups/tst/standard/elements/semiringmat.tst +601 -0
  299. gap/pkg/semigroups/tst/standard/elements/trans.tst +58 -0
  300. gap/pkg/semigroups/tst/standard/fp/freeband.tst +311 -0
  301. gap/pkg/semigroups/tst/standard/fp/freeinverse.tst +147 -0
  302. gap/pkg/semigroups/tst/standard/fp/tietze.tst +780 -0
  303. gap/pkg/semigroups/tst/standard/fp/word.tst +106 -0
  304. gap/pkg/semigroups/tst/standard/greens/acting-inverse.tst +545 -0
  305. gap/pkg/semigroups/tst/standard/greens/acting-regular.tst +396 -0
  306. gap/pkg/semigroups/tst/standard/greens/acting.tst +2033 -0
  307. gap/pkg/semigroups/tst/standard/greens/froidure-pin.tst +1831 -0
  308. gap/pkg/semigroups/tst/standard/greens/generic.tst +1436 -0
  309. gap/pkg/semigroups/tst/standard/ideals/acting.tst +279 -0
  310. gap/pkg/semigroups/tst/standard/ideals/froidure-pin.tst +178 -0
  311. gap/pkg/semigroups/tst/standard/ideals/ideals.tst +380 -0
  312. gap/pkg/semigroups/tst/standard/libsemigroups/cong.tst +310 -0
  313. gap/pkg/semigroups/tst/standard/libsemigroups/froidure-pin.tst +778 -0
  314. gap/pkg/semigroups/tst/standard/libsemigroups/sims1.tst +379 -0
  315. gap/pkg/semigroups/tst/standard/main/acting.tst +411 -0
  316. gap/pkg/semigroups/tst/standard/main/froidure-pin.tst +392 -0
  317. gap/pkg/semigroups/tst/standard/main/semiact.tst +203 -0
  318. gap/pkg/semigroups/tst/standard/main/setup.tst +1144 -0
  319. gap/pkg/semigroups/tst/standard/obsolete.tst +19 -0
  320. gap/pkg/semigroups/tst/standard/options.tst +54 -0
  321. gap/pkg/semigroups/tst/standard/semigroups/grpperm.tst +581 -0
  322. gap/pkg/semigroups/tst/standard/semigroups/semibipart.tst +2635 -0
  323. gap/pkg/semigroups/tst/standard/semigroups/semiboolmat.tst +1871 -0
  324. gap/pkg/semigroups/tst/standard/semigroups/semicons.tst +1173 -0
  325. gap/pkg/semigroups/tst/standard/semigroups/semidp.tst +739 -0
  326. gap/pkg/semigroups/tst/standard/semigroups/semieunit.tst +339 -0
  327. gap/pkg/semigroups/tst/standard/semigroups/semiex.tst +2055 -0
  328. gap/pkg/semigroups/tst/standard/semigroups/semiffmat.tst +746 -0
  329. gap/pkg/semigroups/tst/standard/semigroups/semifp.tst +2702 -0
  330. gap/pkg/semigroups/tst/standard/semigroups/semigraph.tst +133 -0
  331. gap/pkg/semigroups/tst/standard/semigroups/semigrp.tst +1112 -0
  332. gap/pkg/semigroups/tst/standard/semigroups/semimaxplus.tst +654 -0
  333. gap/pkg/semigroups/tst/standard/semigroups/semipbr.tst +2142 -0
  334. gap/pkg/semigroups/tst/standard/semigroups/semipperm.tst +2169 -0
  335. gap/pkg/semigroups/tst/standard/semigroups/semiquo.tst +278 -0
  336. gap/pkg/semigroups/tst/standard/semigroups/semirms.tst +3010 -0
  337. gap/pkg/semigroups/tst/standard/semigroups/semitrans.tst +2758 -0
  338. gap/pkg/semigroups/tst/standard/tools/display.tst +1040 -0
  339. gap/pkg/semigroups/tst/standard/tools/io.tst +363 -0
  340. gap/pkg/semigroups/tst/testinstall.tst +1815 -0
  341. gap/pkg/semigroups/tst/teststandard.g +22 -0
  342. gap/pkg/semigroups/tst/workspaces/load-workspace.tst +142 -0
  343. gap/pkg/semigroups/tst/workspaces/load.g +11 -0
  344. gap/pkg/semigroups/tst/workspaces/save-workspace.tst +166 -0
  345. gap/pkg/semigroups/tst/workspaces/save.g +14 -0
  346. passagemath_gap_pkg_semigroups-10.6.29.dist-info/METADATA +93 -0
  347. passagemath_gap_pkg_semigroups-10.6.29.dist-info/METADATA.bak +94 -0
  348. passagemath_gap_pkg_semigroups-10.6.29.dist-info/RECORD +354 -0
  349. passagemath_gap_pkg_semigroups-10.6.29.dist-info/WHEEL +6 -0
  350. passagemath_gap_pkg_semigroups-10.6.29.dist-info/top_level.txt +1 -0
  351. passagemath_gap_pkg_semigroups.libs/libsemigroups-8ea3c4e7.so.2.0.0 +0 -0
  352. sage/all__sagemath_gap_pkg_semigroups.py +1 -0
  353. sage/libs/all__sagemath_gap_pkg_semigroups.py +1 -0
  354. sage/libs/gap_pkg_semigroups.abi3.so +0 -0
@@ -0,0 +1,1590 @@
1
+ #############################################################################
2
+ ##
3
+ ## semigroups/semiex.gi
4
+ ## Copyright (C) 2013-2022 James D. Mitchell
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+ ##
10
+
11
+ # for testing purposes
12
+
13
+ # BlocksOfPartition := function(partition)
14
+ # local blocks, lookup, n, i, j;
15
+ #
16
+ # blocks := []; lookup := []; n := 0;
17
+ # for i in [1 .. Length(partition)] do
18
+ # blocks[i] := [n + 1 .. partition[i] + n];
19
+ # for j in blocks[i] do
20
+ # lookup[j] := i;
21
+ # od;
22
+ # n := n + partition[i];
23
+ # od;
24
+ # return [blocks, lookup];
25
+ # end;
26
+ #
27
+ # IsEndomorphismOfPartition := function(bl, f)
28
+ # local imblock, x;
29
+ #
30
+ # for x in bl[1] do #blocks
31
+ # imblock := bl[1][bl[2][x[1] ^ f]];
32
+ # if not ForAll(x, y -> y ^ f in imblock) then
33
+ # return false;
34
+ # fi;
35
+ # od;
36
+ # return true;
37
+ # end;
38
+ #
39
+ # NrEndomorphismsPartition := function(partition)
40
+ # local bl;
41
+ # bl := BlocksOfPartition(partition);
42
+ # return Number(FullTransformationSemigroup(Sum(partition)), x ->
43
+ # IsEndomorphismOfPartition(bl, x));
44
+ # end;
45
+
46
+ # From the `The rank of the semigroup of transformations stabilising a
47
+ # partition of a finite set', by Araujo, Bentz, Mitchell, and Schneider (2014).
48
+
49
+ InstallMethod(EndomorphismsPartition, "for a list of positive integers",
50
+ [IsCyclotomicCollection],
51
+ function(partition)
52
+ local s, r, distinct, equal, prev, n, blocks, unique, didprevrepeat, gens, x,
53
+ m, y, w, p, i, j, k, block;
54
+
55
+ if not ForAll(partition, IsPosInt) then
56
+ ErrorNoReturn("the argument (a cyclo. coll.) does not consist of ",
57
+ "positive integers");
58
+ elif ForAll(partition, x -> x = 1) then
59
+ return FullTransformationMonoid(Length(partition));
60
+ elif Length(partition) = 1 then
61
+ return FullTransformationMonoid(partition[1]);
62
+ elif not IsSortedList(partition) then
63
+ partition := ShallowCopy(partition);
64
+ Sort(partition);
65
+ fi;
66
+
67
+ # preprocessing...
68
+
69
+ s := 0; # nr of distinct block sizes
70
+ r := 0; # nr of block sizes with at least one other block of equal
71
+ # size
72
+ distinct := []; # indices of blocks with distinct block sizes
73
+ equal := []; # indices of blocks with at least one other block of equal
74
+ # size, partitioned according to the sizes of the blocks
75
+ prev := 0; # size of the previous block
76
+ n := 0; # the degree of the transformations
77
+ blocks := []; # the actual blocks of the partition
78
+ unique := []; # blocks of a unique size
79
+
80
+ for i in [1 .. Length(partition)] do
81
+ blocks[i] := [n + 1 .. partition[i] + n];
82
+ n := n + partition[i];
83
+ if partition[i] > prev then
84
+ s := s + 1;
85
+ distinct[s] := i;
86
+ prev := partition[i];
87
+ didprevrepeat := false;
88
+ AddSet(unique, i);
89
+ elif not didprevrepeat then
90
+ # repeat block size
91
+ r := r + 1;
92
+ equal[r] := [i - 1, i];
93
+ didprevrepeat := true;
94
+ RemoveSet(unique, i - 1);
95
+ else
96
+ Add(equal[r], i);
97
+ fi;
98
+ od;
99
+
100
+ # get the generators of T(X,P) over Sigma(X,P)...
101
+ # from the proof of Theorem 3.3
102
+ gens := [];
103
+ for i in [1 .. Length(distinct) - 1] do
104
+ for j in [i + 1 .. Length(distinct)] do
105
+ x := [1 .. n];
106
+ for k in [1 .. Length(blocks[distinct[i]])] do
107
+ x[blocks[distinct[i]][k]] := blocks[distinct[j]][k];
108
+ od;
109
+ Add(gens, Transformation(x));
110
+ od;
111
+ od;
112
+
113
+ for block in equal do
114
+ x := [1 .. n];
115
+ x{blocks[block[1]]} := blocks[block[2]];
116
+ Add(gens, Transformation(x));
117
+ od;
118
+
119
+ # get the generators of Sigma(X,P) over S(X,P)...
120
+
121
+ # the generators from B (swap blocks of adjacent distinct sizes)...
122
+ for i in [1 .. s - 1] do
123
+ x := [1 .. n];
124
+ # map up
125
+ for j in [1 .. Length(blocks[distinct[i]])] do
126
+ x[blocks[distinct[i]][j]] := blocks[distinct[i + 1]][j];
127
+ x[blocks[distinct[i + 1]][j]] := blocks[distinct[i]][j];
128
+ od;
129
+ # map down
130
+ for j in [Length(blocks[distinct[i]]) + 1 ..
131
+ Length(blocks[distinct[i + 1]])] do
132
+ x[blocks[distinct[i + 1]][j]] := blocks[distinct[i]][1];
133
+ od;
134
+ Add(gens, Transformation(x));
135
+ od;
136
+
137
+ # the generators from C...
138
+ if Length(blocks[distinct[1]]) <> 1 then
139
+ x := [1 .. n];
140
+ x[1] := 2;
141
+ Add(gens, Transformation(x));
142
+ fi;
143
+
144
+ for i in [2 .. s] do
145
+ if Length(blocks[distinct[i]]) - Length(blocks[distinct[i - 1]]) > 1 then
146
+ x := [1 .. n];
147
+ x[blocks[distinct[i]][1]] := x[blocks[distinct[i]][2]];
148
+ Add(gens, Transformation(x));
149
+ fi;
150
+ od;
151
+
152
+ # get the generators of S(X,P)...
153
+ if s = r or s - r >= 2 then
154
+ # 2 generators for the r wreath products of symmetric groups
155
+ for i in [1 .. r] do
156
+ m := Length(equal[i]); # WreathProduct(S_n, S_m) m blocks of size n
157
+ n := partition[equal[i][1]];
158
+ x := blocks{equal[i]};
159
+
160
+ if n > 1 then
161
+ x[2] := Permuted(x[2], (1, 2));
162
+ fi;
163
+
164
+ if IsOddInt(m) or IsOddInt(n) then
165
+ x := Permuted(x, PermList(Concatenation([2 .. m], [1])));
166
+ else
167
+ x := Permuted(x, PermList(Concatenation([1], [3 .. m], [2])));
168
+ fi;
169
+
170
+ x := MappingPermListList(Concatenation(blocks{equal[i]}),
171
+ Concatenation(x));
172
+ Add(gens, AsTransformation(x));
173
+
174
+ y := blocks{equal[i]};
175
+ y[1] := Permuted(y[1], PermList(Concatenation([2 .. n], [1])));
176
+ y := Permuted(y, (1, 2));
177
+ y := MappingPermListList(Concatenation(blocks{equal[i]}),
178
+ Concatenation(y));
179
+ Add(gens, AsTransformation(y));
180
+ od;
181
+ elif s - r = 1 and r >= 1 then
182
+ # JDM this case should be changed as in the previous case
183
+ # 2 generators for the r-1 wreath products of symmetric groups
184
+ for i in [1 .. r - 1] do
185
+ m := Length(equal[i]); # WreathProduct(S_n, S_m) m blocks of size n
186
+ n := partition[equal[i][1]];
187
+ x := blocks{equal[i]};
188
+
189
+ if n > 1 then
190
+ x[2] := Permuted(x[2], (1, 2));
191
+ fi;
192
+
193
+ if IsOddInt(m) or IsOddInt(n) then
194
+ x := Permuted(x, PermList(Concatenation([2 .. m], [1])));
195
+ else
196
+ x := Permuted(x, PermList(Concatenation([1], [3 .. m], [2])));
197
+ fi;
198
+
199
+ x := MappingPermListList(Concatenation(blocks{equal[i]}),
200
+ Concatenation(x));
201
+ Add(gens, AsTransformation(x));
202
+
203
+ y := blocks{equal[i]};
204
+ y[1] := Permuted(y[1], PermList(Concatenation([2 .. n], [1])));
205
+ y := Permuted(y, (1, 2));
206
+ y := MappingPermListList(Concatenation(blocks{equal[i]}),
207
+ Concatenation(y));
208
+ Add(gens, AsTransformation(y));
209
+ od;
210
+
211
+ # 3 generators for (S_{n_k}wrS_{m_k})\times S_{l_1}
212
+ m := Length(equal[r]);
213
+ n := partition[equal[r][1]];
214
+ if IsOddInt(m) or IsOddInt(n) then
215
+ x := Permuted(blocks{equal[r]}, PermList(Concatenation([2 .. m], [1])));
216
+ else
217
+ x := Permuted(blocks{equal[r]},
218
+ PermList(Concatenation([1], [3 .. m], [2])));
219
+ fi;
220
+
221
+ if n > 1 then
222
+ x[2] := Permuted(x[2], (1, 2));
223
+ fi;
224
+ x := MappingPermListList(Concatenation(blocks{equal[r]}),
225
+ Concatenation(x));
226
+ Add(gens, AsTransformation(x)); # (x, id)=u in the paper
227
+
228
+ y := Permuted(blocks{equal[r]}, (1, 2));
229
+ y[1] := Permuted(y[1], PermList(Concatenation([2 .. n], [1])));
230
+ y := MappingPermListList(Concatenation(blocks{equal[r]}),
231
+ Concatenation(y));
232
+ # (y, (1,2,\ldots, l_1))=v in the paper
233
+ y := y * MappingPermListList(blocks[unique[1]],
234
+ Concatenation(blocks[unique[1]]{[2 ..
235
+ Length(blocks[unique[1]])]},
236
+ [blocks[unique[1]][1]]));
237
+ Add(gens, AsTransformation(y));
238
+
239
+ if Length(blocks[unique[1]]) > 1 then
240
+ w := MappingPermListList(blocks[unique[1]],
241
+ Permuted(blocks[unique[1]], (1, 2)));
242
+ Add(gens, AsTransformation(w)); # (id, (1,2))=w in the paper
243
+ fi;
244
+ fi;
245
+ if s - r >= 2 then # the (s-r) generators of W_2 in the proof
246
+ for i in [1 .. s - r - 1] do
247
+ if Length(blocks[unique[i]]) <> 1 then
248
+ x := Permuted(blocks[unique[i]], (1, 2));
249
+ else
250
+ x := ShallowCopy(blocks[unique[i]]);
251
+ fi;
252
+ if IsOddInt(Length(blocks[unique[i + 1]])) then
253
+ p := PermList(Concatenation([2 .. Length(blocks[unique[i + 1]])],
254
+ [1]));
255
+ Append(x, Permuted(blocks[unique[i + 1]], p));
256
+ else
257
+
258
+ p := PermList(Concatenation([1], [3 .. Length(blocks[unique[i + 1]])],
259
+ [2]));
260
+ Append(x, Permuted(blocks[unique[i + 1]], p));
261
+ fi;
262
+ x := MappingPermListList(Union(blocks[unique[i]],
263
+ blocks[unique[i + 1]]), x);
264
+ if x <> () then
265
+ Add(gens, AsTransformation(x));
266
+ fi;
267
+ od;
268
+
269
+ x := [];
270
+ if partition[unique[1]] <> 1 then
271
+ if IsOddInt(partition[unique[1]]) then
272
+ Append(x, Permuted(blocks[unique[1]],
273
+ PermList(Concatenation([2 ..
274
+ Length(blocks[unique[1]])], [1]))));
275
+ else
276
+ Append(x, Permuted(blocks[unique[1]],
277
+ PermList(Concatenation([1],
278
+ [3 .. Length(blocks[unique[1]])], [2]))));
279
+ fi;
280
+ else
281
+ Append(x, blocks[unique[1]]);
282
+ fi;
283
+ Append(x, Permuted(blocks[unique[s - r]], (1, 2)));
284
+ x := MappingPermListList(Concatenation(blocks[unique[1]],
285
+ blocks[unique[s - r]]), x);
286
+ Add(gens, AsTransformation(x));
287
+ fi;
288
+
289
+ return Semigroup(gens);
290
+ end);
291
+
292
+ # Matrix semigroups . . .
293
+
294
+ # The full matrix semigroup is generated by a generating set
295
+ # for the general linear group plus one element of rank n - 1
296
+
297
+ InstallMethod(GeneralLinearMonoid, "for pos int and pos int",
298
+ [IsPosInt, IsPosInt],
299
+ function(d, q)
300
+ local gens, x, S;
301
+ gens := GeneratorsOfGroup(GL(d, q));
302
+ gens := List(gens, x -> Matrix(GF(q), x));
303
+ x := OneMutable(gens[1]);
304
+ x[d][d] := Z(q) * 0;
305
+ Add(gens, x);
306
+ S := Monoid(gens);
307
+ SetSize(S, q ^ (d * d));
308
+ SetIsGeneralLinearMonoid(S, true);
309
+ SetFilterObj(S, IsRegularActingSemigroupRep);
310
+ return S;
311
+ end);
312
+
313
+ InstallMethod(SpecialLinearMonoid, "for pos int and pos int",
314
+ [IsPosInt, IsPosInt],
315
+ function(d, q)
316
+ local gens, x, S;
317
+ gens := GeneratorsOfGroup(SL(d, q));
318
+ x := OneMutable(gens[1]);
319
+ x[d][d] := Z(q) * 0;
320
+ gens := List(gens, x -> Matrix(GF(q), x));
321
+ Add(gens, x);
322
+ S := Monoid(gens);
323
+ SetFilterObj(S, IsRegularActingSemigroupRep);
324
+ return S;
325
+ end);
326
+
327
+ InstallMethod(MunnSemigroup, "for a semilattice", [IsSemigroup],
328
+ S -> InverseSemigroup(GeneratorsOfMunnSemigroup(S), rec(small := true)));
329
+
330
+ InstallMethod(GeneratorsOfMunnSemigroup, "for a semilattice", [IsSemigroup],
331
+ function(S)
332
+ local po, au, id, su, gr, out, e, map, p, min, pos, x, i, j, k;
333
+
334
+ if not IsSemilattice(S) then
335
+ ErrorNoReturn("the argument (a semigroup) is not a semilattice");
336
+ fi;
337
+
338
+ po := DigraphReflexiveTransitiveClosure(PartialOrderOfDClasses(S));
339
+ au := []; # automorphism groups partitions by size
340
+ id := []; # ideals (as sets of indices) partitioned by size
341
+ su := []; # induced subdigraphs corresponding to ideals
342
+
343
+ for x in OutNeighbors(po) do
344
+ gr := InducedSubdigraph(po, SortedList(x));
345
+ if not IsBound(au[Length(x)]) then
346
+ au[Length(x)] := [];
347
+ id[Length(x)] := [];
348
+ su[Length(x)] := [];
349
+ fi;
350
+ Add(au[Length(x)], AutomorphismGroup(gr)
351
+ ^ MappingPermListList(DigraphVertices(gr),
352
+ SortedList(x)));
353
+ Add(id[Length(x)], SortedList(x));
354
+ Add(su[Length(x)], gr);
355
+ od;
356
+
357
+ out := [PartialPerm(Last(id)[1], Last(id)[1])];
358
+
359
+ for i in [Length(id), Length(id) - 1 .. 3] do
360
+ if not IsBound(id[i]) then
361
+ continue;
362
+ fi;
363
+ for j in [1 .. Length(id[i])] do
364
+ e := PartialPerm(id[i][j], id[i][j]);
365
+ for p in GeneratorsOfGroup(au[i][j]) do
366
+ Add(out, e * p);
367
+ od;
368
+ for k in [j + 1 .. Length(id[i])] do
369
+ map := IsomorphismDigraphs(su[i][j], su[i][k]);
370
+ if map <> fail then
371
+ p := MappingPermListList(id[i][j], DigraphVertices(su[i][j]))
372
+ * map * MappingPermListList(DigraphVertices(su[i][k]),
373
+ id[i][k]);
374
+ Add(out, e * p);
375
+ fi;
376
+ od;
377
+ od;
378
+ od;
379
+
380
+ min := id[1][1][1]; # the index of the element in the minimal ideal
381
+ Add(out, PartialPerm([min], [min]));
382
+
383
+ # All ideals of size 2 are isomorphic and have trivial automorphism group
384
+ for j in [1 .. Length(id[2])] do
385
+ e := PartialPermNC(id[2][j], id[2][j]);
386
+ Add(out, e);
387
+ pos := Position(id[2][j], min);
388
+ for k in [j + 1 .. Length(id[2])] do
389
+ if Position(id[2][k], min) = pos then
390
+ Add(out, PartialPerm(id[2][j], id[2][k]));
391
+ else
392
+ Add(out, PartialPerm(id[2][j], Reversed(id[2][k])));
393
+ fi;
394
+ od;
395
+ od;
396
+
397
+ return out;
398
+ end);
399
+
400
+ InstallMethod(OrderEndomorphisms, "for a positive integer",
401
+ [IsPosInt],
402
+ function(n)
403
+ local gens, S, i;
404
+
405
+ gens := EmptyPlist(n);
406
+ gens[1] := Transformation(Concatenation([1], [1 .. n - 1]));
407
+
408
+ for i in [1 .. n - 1] do
409
+ gens[i + 1] := [1 .. n];
410
+ gens[i + 1][i] := i + 1;
411
+ gens[i + 1] := TransformationNC(gens[i + 1]);
412
+ od;
413
+
414
+ S := Monoid(gens);
415
+ SetFilterObj(S, IsRegularActingSemigroupRep);
416
+ return S;
417
+ end);
418
+
419
+ InstallMethod(PartialOrderEndomorphisms, "for a positive integer",
420
+ [IsPosInt],
421
+ function(n)
422
+ local x, gens, S, i;
423
+
424
+ x := [1 .. n + 1];
425
+ gens := [];
426
+ for i in [1 .. n] do
427
+ x[i] := n + 1;
428
+ Add(gens, Transformation(x));
429
+ x[i] := i;
430
+ od;
431
+
432
+ S := Monoid(OrderEndomorphisms(n), gens);
433
+ SetFilterObj(S, IsRegularActingSemigroupRep);
434
+ return S;
435
+ end);
436
+
437
+ InstallMethod(OrderAntiEndomorphisms, "for a positive integer",
438
+ [IsPosInt],
439
+ function(n)
440
+ local S;
441
+ S := Monoid(OrderEndomorphisms(n), Transformation(Reversed([1 .. n])));
442
+ SetFilterObj(S, IsRegularActingSemigroupRep);
443
+ return S;
444
+ end);
445
+
446
+ InstallMethod(PartialOrderAntiEndomorphisms, "for a positive integer",
447
+ [IsPosInt],
448
+ function(n)
449
+ local S;
450
+ S := Monoid(PartialOrderEndomorphisms(n), Transformation(Reversed([1 .. n])));
451
+ SetFilterObj(S, IsRegularActingSemigroupRep);
452
+ return S;
453
+ end);
454
+
455
+ InstallMethod(PartialTransformationMonoid, "for a positive integer",
456
+ [IsPosInt],
457
+ function(n)
458
+ local a, b, c, d, S;
459
+
460
+ a := [2, 1];
461
+ b := [0 .. n - 1];
462
+ b[1] := n;
463
+ c := [1 .. n + 1];
464
+ c[1] := n + 1; # partial
465
+ d := [2, 2];
466
+
467
+ if n = 1 then
468
+ S := Monoid(TransformationNC(c));
469
+ elif n = 2 then
470
+ S := Monoid(List([a, c, d], TransformationNC));
471
+ else
472
+ S := Monoid(List([a, b, c, d], TransformationNC));
473
+ fi;
474
+
475
+ SetFilterObj(S, IsRegularActingSemigroupRep);
476
+ return S;
477
+ end);
478
+
479
+ InstallMethod(CatalanMonoid, "for a positive integer",
480
+ [IsPosInt],
481
+ function(n)
482
+ local gens, next, i;
483
+
484
+ if n = 1 then
485
+ return Monoid(IdentityTransformation);
486
+ fi;
487
+
488
+ gens := [];
489
+
490
+ for i in [1 .. n - 1] do
491
+ next := [1 .. n];
492
+ next[i + 1] := i;
493
+ Add(gens, Transformation(next));
494
+ od;
495
+
496
+ return Monoid(gens, rec(acting := false));
497
+ end);
498
+
499
+ InstallMethod(PartitionMonoid, "for an integer", [IsInt],
500
+ function(n)
501
+ local gens, M;
502
+
503
+ if n < 0 then
504
+ ErrorNoReturn("the argument (an int) is not >= 0");
505
+ elif n = 0 then
506
+ return Monoid(Bipartition([]));
507
+ elif n = 1 then
508
+ return Monoid(Bipartition([[1], [-1]]));
509
+ fi;
510
+
511
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
512
+ Add(gens, AsBipartition(PartialPermNC([2 .. n], [2 .. n]), n));
513
+ Add(gens, Bipartition(Concatenation([[1, 2, -1, -2]],
514
+ List([3 .. n], x -> [x, -x]))));
515
+
516
+ M := Monoid(gens);
517
+ SetFilterObj(M, IsRegularActingSemigroupRep);
518
+ SetIsStarSemigroup(M, true);
519
+ SetSize(M, Bell(2 * n));
520
+ return M;
521
+ end);
522
+
523
+ InstallMethod(DualSymmetricInverseMonoid, "for an integer", [IsInt],
524
+ function(n)
525
+ local gens;
526
+
527
+ if n < 0 then
528
+ ErrorNoReturn("the argument (an int) is not >= 0");
529
+ elif n = 0 then
530
+ return Monoid(Bipartition([]));
531
+ elif n = 1 then
532
+ return Monoid(Bipartition([[1, -1]]));
533
+ fi;
534
+
535
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
536
+
537
+ if n = 2 then
538
+ Add(gens, Bipartition([[1, 2, -1, -2]]));
539
+ else
540
+ Add(gens, Bipartition(Concatenation([[1, 2, -3], [3, -1, -2]],
541
+ List([4 .. n], x -> [x, -x]))));
542
+ fi;
543
+ return InverseMonoid(gens);
544
+ end);
545
+
546
+ InstallMethod(PartialDualSymmetricInverseMonoid, "for an integer", [IsInt],
547
+ function(n)
548
+ local gens;
549
+
550
+ if n < 0 then
551
+ ErrorNoReturn("the argument (an int) is not >= 0");
552
+ elif n = 0 then
553
+ return Monoid(Bipartition([]));
554
+ elif n = 1 or n = 2 then
555
+ return PartialUniformBlockBijectionMonoid(n);
556
+ fi;
557
+
558
+ gens := Set([PermList(Concatenation([2 .. n], [1])), (1, 2)]);
559
+ gens := List(gens, x -> AsBipartition(x, n + 1));
560
+ Add(gens, Bipartition(Concatenation([[1, 2, -3], [-1, -2, 3]],
561
+ List([4 .. n + 1], x -> [x, -x]))));
562
+ Add(gens, Bipartition(Concatenation([[1, n + 1, -1, - n - 1]],
563
+ List([2 .. n], x -> [x, -x]))));
564
+ return InverseMonoid(gens);
565
+ end);
566
+
567
+ InstallMethod(BrauerMonoid, "for an integer", [IsInt],
568
+ function(n)
569
+ local gens, M;
570
+
571
+ if n < 0 then
572
+ ErrorNoReturn("the argument (an int) is not >= 0");
573
+ elif n = 0 then
574
+ return Monoid(Bipartition([]));
575
+ elif n = 1 then
576
+ return Monoid(Bipartition([[1, -1]]));
577
+ fi;
578
+
579
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
580
+ Add(gens, Bipartition(Concatenation([[1, 2]],
581
+ List([3 .. n],
582
+ x -> [x, -x]), [[-1, -2]])));
583
+ M := Monoid(gens);
584
+ SetFilterObj(M, IsRegularActingSemigroupRep);
585
+ SetIsStarSemigroup(M, true);
586
+ return M;
587
+ end);
588
+
589
+ InstallMethod(PartialBrauerMonoid, "for an integer", [IsInt],
590
+ function(n)
591
+ local S;
592
+
593
+ if n < 0 then
594
+ ErrorNoReturn("the argument (an int) is not >= 0");
595
+ fi;
596
+
597
+ S := Semigroup(BrauerMonoid(n),
598
+ AsSemigroup(IsBipartitionSemigroup,
599
+ SymmetricInverseMonoid(n)));
600
+ SetFilterObj(S, IsRegularActingSemigroupRep);
601
+ SetIsStarSemigroup(S, true);
602
+ return S;
603
+ end);
604
+
605
+ InstallMethod(JonesMonoid, "for an integer",
606
+ [IsInt],
607
+ function(n)
608
+ local gens, next, i, j, M;
609
+
610
+ if n < 0 then
611
+ ErrorNoReturn("the argument (an int) is not >= 0");
612
+ elif n = 0 then
613
+ return Monoid(Bipartition([]));
614
+ elif n = 1 then
615
+ return Monoid(Bipartition([[1, -1]]));
616
+ fi;
617
+
618
+ gens := [];
619
+ for i in [1 .. n - 1] do
620
+ next := [[i, i + 1], [-i, -i - 1]];
621
+ for j in [1 .. i - 1] do
622
+ Add(next, [j, -j]);
623
+ od;
624
+ for j in [i + 2 .. n] do
625
+ Add(next, [j, -j]);
626
+ od;
627
+ Add(gens, Bipartition(next));
628
+ od;
629
+
630
+ M := Monoid(gens);
631
+ SetFilterObj(M, IsRegularActingSemigroupRep);
632
+ SetIsStarSemigroup(M, true);
633
+ return M;
634
+ end);
635
+
636
+ InstallMethod(AnnularJonesMonoid, "for an integer", [IsInt],
637
+ function(n)
638
+ local p, x, M, j;
639
+
640
+ if n < 0 then
641
+ ErrorNoReturn("the argument (an int) is not >= 0");
642
+ elif n = 0 or n = 1 then
643
+ return JonesMonoid(n);
644
+ fi;
645
+
646
+ p := PermList(Concatenation([n], [1 .. n - 1]));
647
+
648
+ x := [[1, 2], [-1, -2]];
649
+ for j in [3 .. n] do
650
+ Add(x, [j, -j]);
651
+ od;
652
+ x := Bipartition(x);
653
+
654
+ M := Monoid(x, AsBipartition(p));
655
+ SetFilterObj(M, IsRegularActingSemigroupRep);
656
+ SetIsStarSemigroup(M, true);
657
+ return M;
658
+ end);
659
+
660
+ InstallMethod(PartialJonesMonoid, "for an integer",
661
+ [IsInt],
662
+ function(n)
663
+ local gens, next, i, j, M;
664
+
665
+ if n < 0 then
666
+ ErrorNoReturn("the argument (an int) is not >= 0");
667
+ elif n = 0 then
668
+ return Monoid(Bipartition([]));
669
+ elif n = 1 then
670
+ return Monoid(Bipartition([[1, -1]]), Bipartition([[1], [-1]]));
671
+ fi;
672
+
673
+ gens := ShallowCopy(GeneratorsOfMonoid(JonesMonoid(n)));
674
+
675
+ for i in [1 .. n] do
676
+ next := [[i], [-i]];
677
+ for j in [1 .. i - 1] do
678
+ Add(next, [j, -j]);
679
+ od;
680
+ for j in [i + 1 .. n] do
681
+ Add(next, [j, -j]);
682
+ od;
683
+ Add(gens, Bipartition(next));
684
+ od;
685
+
686
+ M := Monoid(gens);
687
+ SetFilterObj(M, IsRegularActingSemigroupRep);
688
+ SetIsStarSemigroup(M, true);
689
+ return M;
690
+ end);
691
+
692
+ InstallMethod(MotzkinMonoid, "for an integer",
693
+ [IsInt],
694
+ function(n)
695
+ local gens, M;
696
+
697
+ if n < 0 then
698
+ ErrorNoReturn("the argument (an int) is not >= 0");
699
+ elif n = 0 then
700
+ return Monoid(Bipartition([]));
701
+ fi;
702
+
703
+ gens := List(GeneratorsOfInverseSemigroup(POI(n)),
704
+ x -> AsBipartition(x, n));
705
+ M := Monoid(JonesMonoid(n), gens);
706
+ SetFilterObj(M, IsRegularActingSemigroupRep);
707
+ SetIsStarSemigroup(M, true);
708
+ return M;
709
+ end);
710
+
711
+ InstallMethod(POI, "for a positive integer", [IsPosInt],
712
+ function(n)
713
+ local out, i;
714
+
715
+ if n = 1 then
716
+ return SymmetricInverseMonoid(n);
717
+ fi;
718
+
719
+ out := EmptyPlist(n);
720
+ out[1] := PartialPermNC([0 .. n - 1]);
721
+ for i in [0 .. n - 2] do
722
+ out[i + 2] := [1 .. n];
723
+ out[i + 2][(n - i) - 1] := n - i;
724
+ out[i + 2][n - i] := 0;
725
+ out[i + 2] := PartialPermNC(out[i + 2]);
726
+ od;
727
+ return InverseMonoid(out);
728
+ end);
729
+
730
+ InstallMethod(POPI, "for a positive integer", [IsPosInt],
731
+ function(n)
732
+ if n <= 2 then
733
+ return SymmetricInverseMonoid(n);
734
+ fi;
735
+ return InverseMonoid(PartialPermNC(Concatenation([2 .. n], [1])),
736
+ PartialPermNC(Concatenation([1 .. n - 2], [n])));
737
+ end);
738
+
739
+ InstallMethod(PODI, "for a positive integer", [IsPosInt],
740
+ function(n)
741
+ if n <= 2 then
742
+ return SymmetricInverseMonoid(n);
743
+ fi;
744
+ return InverseMonoid(POI(n), PartialPerm(Reversed([1 .. n])));
745
+ end);
746
+
747
+ InstallMethod(PORI, "for a positive integer", [IsPosInt],
748
+ function(n)
749
+ if n <= 3 then
750
+ return SymmetricInverseMonoid(n);
751
+ fi;
752
+ return InverseMonoid(PartialPermNC(Concatenation([2 .. n], [1])),
753
+ PartialPermNC(Concatenation([1 .. n - 2], [n])),
754
+ PartialPerm(Reversed([1 .. n])));
755
+ end);
756
+
757
+ InstallMethod(PlanarUniformBlockBijectionMonoid, "for a positive integer",
758
+ [IsPosInt],
759
+ function(n)
760
+ local gens, next, i, j;
761
+
762
+ if n = 1 then
763
+ return InverseMonoid(Bipartition([[1, -1]]));
764
+ fi;
765
+
766
+ gens := [];
767
+
768
+ # (2,2)-transapsis generators
769
+ for i in [1 .. n - 1] do
770
+ next := [];
771
+ for j in [1 .. i - 1] do
772
+ next[j] := j;
773
+ next[n + j] := j;
774
+ od;
775
+ next[i] := i;
776
+ next[i + 1] := i;
777
+ next[i + n] := i;
778
+ next[i + n + 1] := i;
779
+ for j in [i + 2 .. n] do
780
+ next[j] := j - 1;
781
+ next[n + j] := j - 1;
782
+ od;
783
+ gens[i] := BipartitionByIntRep(next);
784
+ od;
785
+
786
+ return InverseMonoid(gens);
787
+ end);
788
+
789
+ InstallMethod(UniformBlockBijectionMonoid, "for a positive integer",
790
+ [IsPosInt],
791
+ function(n)
792
+ local gens;
793
+ if n = 1 then
794
+ return InverseMonoid(Bipartition([[1, -1]]));
795
+ fi;
796
+
797
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
798
+ Add(gens, Bipartition(Concatenation([[1, 2, -1, -2]],
799
+ List([3 .. n], x -> [x, -x]))));
800
+ return InverseMonoid(gens);
801
+ end);
802
+
803
+ InstallMethod(PartialUniformBlockBijectionMonoid, "for a positive integer",
804
+ [IsPosInt],
805
+ function(n)
806
+ local gens;
807
+ if n = 1 then
808
+ return InverseMonoid(Bipartition([[1, -1], [2, -2]]),
809
+ Bipartition([[1, 2, -1, -2]]));
810
+ fi;
811
+
812
+ gens := Set([PermList(Concatenation([2 .. n], [1])), (1, 2)]);
813
+ gens := List(gens, x -> AsBipartition(x, n + 1));
814
+ Add(gens, Bipartition(Concatenation([[1, 2, -1, -2]],
815
+ List([3 .. n + 1], x -> [x, -x]))));
816
+ Add(gens, Bipartition(Concatenation([[1, n + 1, -1, - n - 1]],
817
+ List([2 .. n], x -> [x, -x]))));
818
+ return InverseMonoid(gens);
819
+ end);
820
+
821
+ InstallMethod(RookPartitionMonoid, "for a positive integer", [IsPosInt],
822
+ function(n)
823
+ local S;
824
+ S := Monoid(PartialUniformBlockBijectionMonoid(n),
825
+ Bipartition(Concatenation([[1], [-1]],
826
+ List([2 .. n + 1], x -> [x, -x]))));
827
+ SetFilterObj(S, IsRegularActingSemigroupRep);
828
+ SetIsStarSemigroup(S, true);
829
+ return S;
830
+ end);
831
+
832
+ InstallMethod(ApsisMonoid,
833
+ "for a positive integer and positive integer",
834
+ [IsPosInt, IsPosInt],
835
+ function(m, n)
836
+ local gens, next, S, b, i, j;
837
+
838
+ if n = 1 and m = 1 then
839
+ return InverseMonoid(Bipartition([[1], [-1]]));
840
+ fi;
841
+
842
+ gens := [];
843
+
844
+ if n < m then
845
+ next := [];
846
+
847
+ # degree k identity bipartition
848
+ for i in [1 .. n] do
849
+ next[i] := i;
850
+ next[n + i] := i;
851
+ od;
852
+ gens[1] := BipartitionByIntRep(next);
853
+ S := InverseMonoid(gens);
854
+ SetFilterObj(S, IsRegularActingSemigroupRep);
855
+ SetIsStarSemigroup(S, true);
856
+ return S;
857
+ fi;
858
+
859
+ # m-apsis generators
860
+ for i in [1 .. n - m + 1] do
861
+ next := [];
862
+ b := 1;
863
+
864
+ for j in [1 .. i - 1] do
865
+ next[j] := b;
866
+ next[n + j] := b;
867
+ b := b + 1;
868
+ od;
869
+
870
+ for j in [i .. i + m - 1] do
871
+ next[j] := b;
872
+ od;
873
+ b := b + 1;
874
+
875
+ for j in [i + m .. n] do
876
+ next[j] := b;
877
+ next[n + j] := b;
878
+ b := b + 1;
879
+ od;
880
+
881
+ for j in [i .. i + m - 1] do
882
+ next[n + j] := b;
883
+ od;
884
+
885
+ gens[i] := BipartitionByIntRep(next);
886
+ od;
887
+
888
+ S := Monoid(gens);
889
+ SetFilterObj(S, IsRegularActingSemigroupRep);
890
+ SetIsStarSemigroup(S, true);
891
+ return S;
892
+ end);
893
+
894
+ InstallMethod(CrossedApsisMonoid,
895
+ "for a positive integer and positive integer",
896
+ [IsPosInt, IsPosInt],
897
+ function(m, n)
898
+ local gens, S;
899
+
900
+ if n = 1 then
901
+ if m = 1 then
902
+ return InverseMonoid(Bipartition([[1], [-1]]));
903
+ else
904
+ return InverseMonoid(Bipartition([[1, -1]]));
905
+ fi;
906
+ fi;
907
+
908
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
909
+ if m <= n then
910
+ Add(gens, Bipartition(Concatenation([[1 .. m]],
911
+ List([m + 1 .. n],
912
+ x -> [x, -x]), [[-m .. -1]])));
913
+ fi;
914
+
915
+ S := Monoid(gens);
916
+ SetFilterObj(S, IsRegularActingSemigroupRep);
917
+ SetIsStarSemigroup(S, true);
918
+ return S;
919
+ end);
920
+
921
+ InstallMethod(PlanarModularPartitionMonoid,
922
+ "for a positive integer and positive integer",
923
+ [IsPosInt, IsPosInt],
924
+ function(m, n)
925
+ local gens, next, b, S, i, j;
926
+
927
+ if n < m then
928
+ return PlanarUniformBlockBijectionMonoid(n);
929
+ elif n = 1 then
930
+ return InverseMonoid(Bipartition([[1], [-1]]));
931
+ fi;
932
+
933
+ gens := [];
934
+
935
+ # (2,2)-transapsis generators
936
+ for i in [1 .. n - 1] do
937
+ next := [];
938
+ for j in [1 .. i - 1] do
939
+ next[j] := j;
940
+ next[n + j] := j;
941
+ od;
942
+ next[i] := i;
943
+ next[i + 1] := i;
944
+ next[i + n] := i;
945
+ next[i + n + 1] := i;
946
+ for j in [i + 2 .. n] do
947
+ next[j] := j - 1;
948
+ next[n + j] := j - 1;
949
+ od;
950
+ gens[i] := BipartitionByIntRep(next);
951
+ od;
952
+
953
+ # m-apsis generators
954
+ for i in [1 .. n - m + 1] do
955
+ next := [];
956
+ b := 1;
957
+
958
+ for j in [1 .. i - 1] do
959
+ next[j] := b;
960
+ next[n + j] := b;
961
+ b := b + 1;
962
+ od;
963
+
964
+ for j in [i .. i + m - 1] do
965
+ next[j] := b;
966
+ od;
967
+ b := b + 1;
968
+
969
+ for j in [i + m .. n] do
970
+ next[j] := b;
971
+ next[n + j] := b;
972
+ b := b + 1;
973
+ od;
974
+
975
+ for j in [i .. i + m - 1] do
976
+ next[n + j] := b;
977
+ od;
978
+
979
+ gens[n - 1 + i] := BipartitionByIntRep(next);
980
+ od;
981
+
982
+ S := Monoid(gens);
983
+ SetFilterObj(S, IsRegularActingSemigroupRep);
984
+ SetIsStarSemigroup(S, true);
985
+ return S;
986
+ end);
987
+
988
+ InstallMethod(PlanarPartitionMonoid, "for a positive integer",
989
+ [IsPosInt], n -> PlanarModularPartitionMonoid(1, n));
990
+
991
+ InstallMethod(ModularPartitionMonoid,
992
+ "for a positive integer and positive integer",
993
+ [IsPosInt, IsPosInt],
994
+ function(m, n)
995
+ local gens, S;
996
+
997
+ if n = 1 then
998
+ return InverseMonoid(Bipartition([[1], [-1]]));
999
+ fi;
1000
+
1001
+ gens := List(GeneratorsOfGroup(SymmetricGroup(n)), x -> AsBipartition(x, n));
1002
+ Add(gens, Bipartition(Concatenation([[1, 2, -1, -2]],
1003
+ List([3 .. n], x -> [x, -x]))));
1004
+ if m <= n then
1005
+ Add(gens, Bipartition(Concatenation([[1 .. m]],
1006
+ List([m + 1 .. n],
1007
+ x -> [x, -x]), [[-m .. -1]])));
1008
+ fi;
1009
+ S := Monoid(gens);
1010
+ SetFilterObj(S, IsRegularActingSemigroupRep);
1011
+ SetIsStarSemigroup(S, true);
1012
+ return S;
1013
+ end);
1014
+
1015
+ InstallMethod(SingularPartitionMonoid, "for a positive integer",
1016
+ [IsPosInt],
1017
+ function(n)
1018
+ local blocks, i;
1019
+
1020
+ if n = 1 then
1021
+ return SemigroupIdeal(PartitionMonoid(1), Bipartition([[1], [-1]]));
1022
+ fi;
1023
+
1024
+ blocks := [[1, 2, -1, -2]];
1025
+ for i in [3 .. n] do
1026
+ blocks[i - 1] := [i, -i];
1027
+ od;
1028
+ return SemigroupIdeal(PartitionMonoid(n), Bipartition(blocks));
1029
+ end);
1030
+
1031
+ InstallMethod(SingularTransformationSemigroup, "for a positive integer",
1032
+ [IsPosInt],
1033
+ function(n)
1034
+ local x, S;
1035
+ if n = 1 then
1036
+ ErrorNoReturn("the argument (an int) is not > 1");
1037
+ fi;
1038
+ x := TransformationNC(Concatenation([1 .. n - 1], [n - 1]));
1039
+ S := FullTransformationSemigroup(n);
1040
+ return SemigroupIdeal(S, x);
1041
+ end);
1042
+
1043
+ InstallMethod(SingularOrderEndomorphisms, "for a positive integer",
1044
+ [IsPosInt],
1045
+ function(n)
1046
+ local x, S;
1047
+ if n = 1 then
1048
+ ErrorNoReturn("the argument (an int) is not > 1");
1049
+ fi;
1050
+ x := TransformationNC(Concatenation([1 .. n - 1], [n - 1]));
1051
+ S := OrderEndomorphisms(n);
1052
+ return SemigroupIdeal(S, x);
1053
+ end);
1054
+
1055
+ InstallMethod(SingularBrauerMonoid, "for a positive integer",
1056
+ [IsPosInt],
1057
+ function(n)
1058
+ local blocks, x, S, i;
1059
+
1060
+ if n = 1 then
1061
+ ErrorNoReturn("the argument (an int) is not > 1");
1062
+ fi;
1063
+
1064
+ blocks := [[1, 2], [-1, -2]];
1065
+ for i in [3 .. n] do
1066
+ blocks[i] := [i, -i];
1067
+ od;
1068
+ x := Bipartition(blocks);
1069
+ S := BrauerMonoid(n);
1070
+ return SemigroupIdeal(S, x);
1071
+ end);
1072
+
1073
+ InstallMethod(SingularJonesMonoid, "for a positive integer",
1074
+ [IsPosInt],
1075
+ function(n)
1076
+ local blocks, x, S, i;
1077
+ if n = 1 then
1078
+ ErrorNoReturn("the argument (an int) is not > 1");
1079
+ fi;
1080
+
1081
+ blocks := [[1, 2], [-1, -2]];
1082
+ for i in [3 .. n] do
1083
+ blocks[i] := [i, -i];
1084
+ od;
1085
+ x := Bipartition(blocks);
1086
+ S := JonesMonoid(n);
1087
+ return SemigroupIdeal(S, x);
1088
+ end);
1089
+
1090
+ InstallMethod(SingularDualSymmetricInverseMonoid, "for a positive integer",
1091
+ [IsPosInt],
1092
+ function(n)
1093
+ local blocks, x, S, i;
1094
+ if n = 1 then
1095
+ ErrorNoReturn("the argument (an int) is not > 1");
1096
+ fi;
1097
+
1098
+ blocks := [[1, 2, -1, -2]];
1099
+ for i in [3 .. n] do
1100
+ blocks[i - 1] := [i, -i];
1101
+ od;
1102
+ x := Bipartition(blocks);
1103
+ S := DualSymmetricInverseMonoid(n);
1104
+ return SemigroupIdeal(S, x);
1105
+ end);
1106
+
1107
+ InstallMethod(SingularPlanarUniformBlockBijectionMonoid,
1108
+ "for a positive integer", [IsPosInt],
1109
+ function(n)
1110
+ local blocks, x, S, i;
1111
+ if n = 1 then
1112
+ ErrorNoReturn("the argument (an int) is not > 1");
1113
+ fi;
1114
+
1115
+ blocks := [[1, 2, -1, -2]];
1116
+ for i in [3 .. n] do
1117
+ blocks[i - 1] := [i, -i];
1118
+ od;
1119
+
1120
+ x := Bipartition(blocks);
1121
+ S := PlanarUniformBlockBijectionMonoid(n);
1122
+ return SemigroupIdeal(S, x);
1123
+ end);
1124
+
1125
+ InstallMethod(SingularUniformBlockBijectionMonoid,
1126
+ "for a positive integer", [IsPosInt],
1127
+ function(n)
1128
+ local blocks, x, S, i;
1129
+ if n = 1 then
1130
+ ErrorNoReturn("the argument (an int) is not > 1");
1131
+ fi;
1132
+
1133
+ blocks := [[1, 2, -1, -2]];
1134
+ for i in [3 .. n] do
1135
+ blocks[i - 1] := [i, -i];
1136
+ od;
1137
+
1138
+ x := Bipartition(blocks);
1139
+ S := UniformBlockBijectionMonoid(n);
1140
+ return SemigroupIdeal(S, x);
1141
+ end);
1142
+
1143
+ InstallMethod(SingularApsisMonoid,
1144
+ "for a positive integer and positive integer",
1145
+ [IsPosInt, IsPosInt],
1146
+ function(m, n)
1147
+ local blocks, x, S, i;
1148
+ if m > n then
1149
+ ErrorNoReturn("the 1st argument (a pos. int.) is not <= to the ",
1150
+ "2nd argument (a pos. int.)");
1151
+ fi;
1152
+
1153
+ blocks := [[1 .. m], [-m .. -1]];
1154
+ for i in [m + 1 .. n] do
1155
+ blocks[i - m + 2] := [i, -i];
1156
+ od;
1157
+
1158
+ x := Bipartition(blocks);
1159
+ S := ApsisMonoid(m, n);
1160
+ return SemigroupIdeal(S, x);
1161
+ end);
1162
+
1163
+ InstallMethod(SingularCrossedApsisMonoid,
1164
+ "for a positive integer and positive integer",
1165
+ [IsPosInt, IsPosInt],
1166
+ function(m, n)
1167
+ local blocks, x, S, i;
1168
+ if m > n then
1169
+ ErrorNoReturn("the 1st argument (a pos. int.) is not <= to the ",
1170
+ "2nd argument (a pos. int.)");
1171
+ fi;
1172
+
1173
+ blocks := [[1 .. m], [-m .. -1]];
1174
+ for i in [m + 1 .. n] do
1175
+ blocks[i - m + 2] := [i, -i];
1176
+ od;
1177
+
1178
+ x := Bipartition(blocks);
1179
+ S := CrossedApsisMonoid(m, n);
1180
+ return SemigroupIdeal(S, x);
1181
+ end);
1182
+
1183
+ InstallMethod(SingularPlanarModularPartitionMonoid,
1184
+ "for a positive integer and positive integer",
1185
+ [IsPosInt, IsPosInt],
1186
+ function(m, n)
1187
+ local blocks, x, S, i;
1188
+ if n = 1 then
1189
+ if m = 1 then
1190
+ return SemigroupIdeal(PlanarModularPartitionMonoid(1, 1),
1191
+ Bipartition([[1], [-1]]));
1192
+ else
1193
+ ErrorNoReturn("the 2nd argument (a pos. int.) must be > 1",
1194
+ " when the 1st argument (a pos. int.) is also > 1");
1195
+ fi;
1196
+ fi;
1197
+
1198
+ blocks := [[1, 2, -1, -2]];
1199
+ for i in [3 .. n] do
1200
+ blocks[i - 1] := [i, -i];
1201
+ od;
1202
+
1203
+ x := Bipartition(blocks);
1204
+ S := PlanarModularPartitionMonoid(m, n);
1205
+ return SemigroupIdeal(S, x);
1206
+ end);
1207
+
1208
+ InstallMethod(SingularPlanarPartitionMonoid, "for a positive integer",
1209
+ [IsPosInt],
1210
+ function(n)
1211
+ local blocks, x, S, i;
1212
+ if n = 1 then
1213
+ return SemigroupIdeal(PlanarPartitionMonoid(1), Bipartition([[1], [-1]]));
1214
+ fi;
1215
+
1216
+ blocks := [[1, 2, -1, -2]];
1217
+ for i in [3 .. n] do
1218
+ blocks[i - 1] := [i, -i];
1219
+ od;
1220
+
1221
+ x := Bipartition(blocks);
1222
+ S := PlanarPartitionMonoid(n);
1223
+ return SemigroupIdeal(S, x);
1224
+ end);
1225
+
1226
+ InstallMethod(SingularModularPartitionMonoid,
1227
+ "for a positive integer and positive integer",
1228
+ [IsPosInt, IsPosInt],
1229
+ function(m, n)
1230
+ local blocks, x, S, i;
1231
+ if n = 1 then
1232
+ if m = 1 then
1233
+ return SemigroupIdeal(ModularPartitionMonoid(1, 1),
1234
+ Bipartition([[1], [-1]]));
1235
+ else
1236
+ ErrorNoReturn("the 2nd argument (a pos. int.) must be > 1",
1237
+ " when the 1st argument (a pos. int.) is also > 1");
1238
+ fi;
1239
+ fi;
1240
+
1241
+ blocks := [[1, 2, -1, -2]];
1242
+ for i in [3 .. n] do
1243
+ blocks[i - 1] := [i, -i];
1244
+ od;
1245
+
1246
+ x := Bipartition(blocks);
1247
+ S := ModularPartitionMonoid(m, n);
1248
+ return SemigroupIdeal(S, x);
1249
+ end);
1250
+
1251
+ #############################################################################
1252
+ ## 2. Standard examples - known generators
1253
+ #############################################################################
1254
+
1255
+ InstallMethod(RegularBooleanMatMonoid, "for a pos int",
1256
+ [IsPosInt],
1257
+ function(n)
1258
+ local gens, i, j;
1259
+
1260
+ if n = 1 then
1261
+ return Monoid(BooleanMat([[true]]), BooleanMat([[false]]));
1262
+ elif n = 2 then
1263
+ return Monoid(Matrix(IsBooleanMat, [[0, 1], [1, 0]]),
1264
+ Matrix(IsBooleanMat, [[1, 0], [0, 0]]),
1265
+ Matrix(IsBooleanMat, [[1, 0], [1, 1]]));
1266
+ fi;
1267
+
1268
+ gens := [];
1269
+
1270
+ gens[2] := List([1 .. n], x -> BlistList([1 .. n], []));
1271
+ for j in [1 .. n - 1] do
1272
+ gens[2][j][j + 1] := true;
1273
+ od;
1274
+ gens[2][n][1] := true;
1275
+
1276
+ for i in [3, 4] do
1277
+ gens[i] := List([1 .. n], x -> BlistList([1 .. n], []));
1278
+ for j in [1 .. n - 1] do
1279
+ gens[i][j][j] := true;
1280
+ od;
1281
+ od;
1282
+ gens[3][n][1] := true;
1283
+ gens[3][n][n] := true;
1284
+
1285
+ Apply(gens, BooleanMat);
1286
+
1287
+ gens[1] := AsBooleanMat((1, 2), n);
1288
+
1289
+ return Monoid(gens);
1290
+ end);
1291
+
1292
+ InstallMethod(GossipMonoid, "for a positive integer",
1293
+ [IsPosInt],
1294
+ function(n)
1295
+ local gens, i, j, x, m;
1296
+
1297
+ if n = 1 then
1298
+ return Semigroup(Matrix(IsBooleanMat, [[true]]));
1299
+ fi;
1300
+
1301
+ gens := [];
1302
+ for i in [1 .. n - 1] do
1303
+ for j in [i + 1 .. n] do
1304
+ x := List([1 .. n], k -> BlistList([1 .. n], [k]));
1305
+ x[i][j] := true;
1306
+ x[j][i] := true;
1307
+ Add(gens, BooleanMat(x));
1308
+ od;
1309
+ od;
1310
+
1311
+ m := Monoid(gens);
1312
+ SetNrIdempotents(m, Bell(n));
1313
+ return m;
1314
+ end);
1315
+
1316
+ InstallMethod(UnitriangularBooleanMatMonoid, "for a positive integer",
1317
+ [IsPosInt],
1318
+ function(n)
1319
+ local gens, x, i, j;
1320
+
1321
+ if n = 1 then
1322
+ return Semigroup(Matrix(IsBooleanMat, [[true]]));
1323
+ fi;
1324
+
1325
+ gens := [];
1326
+ for i in [1 .. n - 1] do
1327
+ for j in [i + 1 .. n] do
1328
+ x := List([1 .. n], k -> BlistList([1 .. n], [k]));
1329
+ x[i][j] := true;
1330
+ Add(gens, BooleanMat(x));
1331
+ od;
1332
+ od;
1333
+
1334
+ return Monoid(gens);
1335
+ end);
1336
+
1337
+ InstallMethod(TriangularBooleanMatMonoid, "for a positive integer",
1338
+ [IsPosInt],
1339
+ function(n)
1340
+ local gens, x, i;
1341
+
1342
+ if n = 1 then
1343
+ return Semigroup(Matrix(IsBooleanMat, [[true]]));
1344
+ fi;
1345
+
1346
+ gens := [];
1347
+ for i in [1 .. n] do
1348
+ x := List([1 .. n], k -> BlistList([1 .. n], [k]));
1349
+ x[i][i] := false;
1350
+ Add(gens, BooleanMat(x));
1351
+ od;
1352
+
1353
+ return Monoid(UnitriangularBooleanMatMonoid(n), gens);
1354
+ end);
1355
+
1356
+ #############################################################################
1357
+ ## 3. Standard examples - calculated generators
1358
+ #############################################################################
1359
+
1360
+ InstallMethod(ReflexiveBooleanMatMonoid, "for a positive integer",
1361
+ [IsPosInt],
1362
+ function(n)
1363
+ if not IsBound(SEMIGROUPS.GENERATORS.Reflex) then
1364
+ SEMIGROUPS.GENERATORS.Reflex :=
1365
+ ReadGenerators(Concatenation(SEMIGROUPS.PackageDir,
1366
+ "/data/gens/reflex.pickle.gz"));
1367
+ fi;
1368
+
1369
+ if n = 6 and not IsBound(SEMIGROUPS.GENERATORS.Reflex[6]) then
1370
+ Info(InfoSemigroups, 2, "reading generators; this may take some time");
1371
+ Add(SEMIGROUPS.GENERATORS.Reflex,
1372
+ ReadGenerators(Concatenation(SEMIGROUPS.PackageDir,
1373
+ "/data/gens/reflex-6.pickle.gz")));
1374
+ fi;
1375
+
1376
+ if not IsBound(SEMIGROUPS.GENERATORS.Reflex[n]) then
1377
+ ErrorNoReturn("generators for this monoid are only provided up to ",
1378
+ "dimension 6");
1379
+ fi;
1380
+
1381
+ return Monoid(SEMIGROUPS.GENERATORS.Reflex[n]);
1382
+ end);
1383
+
1384
+ InstallMethod(HallMonoid, "for a positive integer",
1385
+ [IsPosInt],
1386
+ function(n)
1387
+ local gens, p;
1388
+
1389
+ if not IsBound(SEMIGROUPS.GENERATORS.Hall) then
1390
+ SEMIGROUPS.GENERATORS.Hall :=
1391
+ ReadGenerators(Concatenation(SEMIGROUPS.PackageDir,
1392
+ "/data/gens/hall.pickle.gz"));
1393
+ fi;
1394
+
1395
+ if n = 8 then
1396
+ gens := GeneratorsOfSemigroup(FullBooleanMatMonoid(8));
1397
+ p := PositionProperty(gens,
1398
+ x -> ListWithIdenticalEntries(8, false)
1399
+ in AsList(x));
1400
+ return Monoid(gens{[1 .. p - 1]}, gens{[p + 1 .. Length(gens)]});
1401
+ fi;
1402
+
1403
+ if not IsBound(SEMIGROUPS.GENERATORS.Hall[n]) then
1404
+ ErrorNoReturn("generators for this monoid are only known up to dimension ",
1405
+ "8");
1406
+ fi;
1407
+
1408
+ return Monoid(SEMIGROUPS.GENERATORS.Hall[n]);
1409
+ end);
1410
+
1411
+ InstallMethod(FullBooleanMatMonoid, "for a positive integer",
1412
+ [IsPosInt],
1413
+ function(n)
1414
+ if not IsBound(SEMIGROUPS.GENERATORS.FullBool) then
1415
+ SEMIGROUPS.GENERATORS.FullBool :=
1416
+ ReadGenerators(Concatenation(SEMIGROUPS.PackageDir,
1417
+ "/data/gens/fullbool.pickle.gz"));
1418
+ fi;
1419
+
1420
+ if n = 8 and not IsBound(SEMIGROUPS.GENERATORS.FullBool[8]) then
1421
+ Info(InfoSemigroups, 2, "reading generators; this may take some time");
1422
+ Add(SEMIGROUPS.GENERATORS.FullBool,
1423
+ ReadGenerators(Concatenation(SEMIGROUPS.PackageDir,
1424
+ "/data/gens/fullbool-8.pickle.gz")));
1425
+ fi;
1426
+
1427
+ if not IsBound(SEMIGROUPS.GENERATORS.FullBool[n]) then
1428
+ ErrorNoReturn("generators for this monoid are only known up to dimension ",
1429
+ "8");
1430
+ fi;
1431
+
1432
+ return Monoid(SEMIGROUPS.GENERATORS.FullBool[n]);
1433
+ end);
1434
+
1435
+ #############################################################################
1436
+ ## Tropical matrix monoids
1437
+ #############################################################################
1438
+
1439
+ InstallMethod(FullTropicalMaxPlusMonoid, "for pos int and pos int",
1440
+ [IsPosInt, IsPosInt],
1441
+ function(dim, threshold)
1442
+ local gens, i, j;
1443
+
1444
+ if dim <> 2 then
1445
+ ErrorNoReturn("the 1st argument (dimension) must be 2");
1446
+ fi;
1447
+
1448
+ gens := [Matrix(IsTropicalMaxPlusMatrix, [[-infinity, 0],
1449
+ [-infinity, -infinity]],
1450
+ threshold),
1451
+ Matrix(IsTropicalMaxPlusMatrix, [[-infinity, 0],
1452
+ [0, -infinity]],
1453
+ threshold),
1454
+ Matrix(IsTropicalMaxPlusMatrix, [[-infinity, 0],
1455
+ [0, 0]],
1456
+ threshold),
1457
+ Matrix(IsTropicalMaxPlusMatrix, [[-infinity, 1],
1458
+ [0, -infinity]],
1459
+ threshold)];
1460
+
1461
+ for i in [1 .. threshold] do
1462
+ Add(gens, Matrix(IsTropicalMaxPlusMatrix,
1463
+ [[-infinity, 0], [0, i]],
1464
+ threshold));
1465
+ for j in [1 .. i] do
1466
+ Add(gens, Matrix(IsTropicalMaxPlusMatrix,
1467
+ [[0, j], [i, 0]],
1468
+ threshold));
1469
+ od;
1470
+ od;
1471
+
1472
+ return Monoid(gens);
1473
+ end);
1474
+
1475
+ InstallMethod(FullTropicalMinPlusMonoid, "for pos int and pos int",
1476
+ [IsPosInt, IsPosInt],
1477
+ function(dim, threshold)
1478
+ local gens, i, j, k;
1479
+
1480
+ if dim = 2 then
1481
+ gens := [Matrix(IsTropicalMinPlusMatrix, [[infinity, 0],
1482
+ [0, infinity]],
1483
+ threshold),
1484
+ Matrix(IsTropicalMinPlusMatrix, [[infinity, 0],
1485
+ [1, infinity]],
1486
+ threshold),
1487
+ Matrix(IsTropicalMinPlusMatrix, [[infinity, 0],
1488
+ [infinity, infinity]],
1489
+ threshold)];
1490
+ for i in [0 .. threshold] do
1491
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1492
+ [[infinity, 0], [0, i]],
1493
+ threshold));
1494
+ od;
1495
+ elif dim = 3 then
1496
+ gens := [Matrix(IsTropicalMinPlusMatrix,
1497
+ [[infinity, infinity, 0],
1498
+ [0, infinity, infinity],
1499
+ [infinity, 0, infinity]],
1500
+ threshold),
1501
+ Matrix(IsTropicalMinPlusMatrix,
1502
+ [[infinity, infinity, 0],
1503
+ [infinity, 0, infinity],
1504
+ [0, infinity, infinity]],
1505
+ threshold),
1506
+ Matrix(IsTropicalMinPlusMatrix,
1507
+ [[infinity, infinity, 0],
1508
+ [infinity, 0, infinity],
1509
+ [infinity, infinity, infinity]],
1510
+ threshold),
1511
+ Matrix(IsTropicalMinPlusMatrix,
1512
+ [[infinity, infinity, 0],
1513
+ [infinity, 0, infinity],
1514
+ [1, infinity, infinity]],
1515
+ threshold)];
1516
+
1517
+ for i in [0 .. threshold] do
1518
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1519
+ [[infinity, infinity, 0],
1520
+ [infinity, 0, infinity],
1521
+ [0, i, infinity]],
1522
+ threshold));
1523
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1524
+ [[infinity, 0, i],
1525
+ [i, infinity, 0],
1526
+ [0, i, infinity]],
1527
+ threshold));
1528
+ for j in [1 .. i] do
1529
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1530
+ [[infinity, 0, 0],
1531
+ [0, infinity, i],
1532
+ [0, j, infinity]],
1533
+ threshold));
1534
+ od;
1535
+
1536
+ for j in [1 .. threshold] do
1537
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1538
+ [[infinity, 0, 0],
1539
+ [0, infinity, i],
1540
+ [j, 0, infinity]],
1541
+ threshold));
1542
+ od;
1543
+ od;
1544
+
1545
+ for i in [1 .. threshold] do
1546
+ for j in [i .. threshold] do
1547
+ for k in [1 .. j - 1] do
1548
+ Add(gens, Matrix(IsTropicalMinPlusMatrix,
1549
+ [[infinity, 0, i],
1550
+ [j, infinity, 0],
1551
+ [0, k, infinity]],
1552
+ threshold));
1553
+ od;
1554
+ od;
1555
+ od;
1556
+ else
1557
+ ErrorNoReturn("the 1st argument (dimension) must be 2 or 3");
1558
+ fi;
1559
+
1560
+ return Monoid(gens);
1561
+ end);
1562
+
1563
+ ########################################################################
1564
+ # PBR monoids
1565
+ ########################################################################
1566
+
1567
+ InstallMethod(FullPBRMonoid, "for a positive integer", [IsPosInt],
1568
+ function(n)
1569
+ local gens;
1570
+
1571
+ gens := [[PBR([[]], [[1]]), PBR([[-1, 1]], [[1]]),
1572
+ PBR([[-1]], [[]]), PBR([[-1]], [[1]]),
1573
+ PBR([[-1]], [[-1, 1]])],
1574
+
1575
+ [PBR([[], [-1]], [[2], [-2, 1]]),
1576
+ PBR([[-2, 1], [-1]], [[2], []]),
1577
+ PBR([[-1, 2], [-2]], [[1], [2]]),
1578
+ PBR([[-1], [-2]], [[1], [-2, 2]]),
1579
+ PBR([[-2], [2]], [[1], [2]]),
1580
+ PBR([[-2], [-1]], [[1], [1, 2]]),
1581
+ PBR([[-2], [-1]], [[1], [2]]),
1582
+ PBR([[-2], [-1]], [[1], [-2]]),
1583
+ PBR([[-2], [-1]], [[2], [1]]),
1584
+ PBR([[-2], [-2, -1]], [[1], [2]])]];
1585
+
1586
+ if n > 2 then
1587
+ ErrorNoReturn("the argument (a pos. int.) must be at most 2");
1588
+ fi;
1589
+ return Monoid(gens[n]);
1590
+ end);