passagemath-gap-pkg-semigroups 10.6.29__cp312-abi3-macosx_13_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

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/x86_64-apple-darwin22-default64-kv10/semigroups.so +0 -0
  15. gap/pkg/semigroups/config.guess +1807 -0
  16. gap/pkg/semigroups/config.log +1082 -0
  17. gap/pkg/semigroups/config.status +1134 -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.dylibs/libsemigroups.2.dylib +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,11 @@
1
+ ############################################################################
2
+ ##
3
+ ## elements/elements.gd
4
+ ## Copyright (C) 2016-2022 Wilf A. Wilson
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+
10
+ DeclareOperation("IndexPeriodOfSemigroupElement", [IsMultiplicativeElement]);
11
+ DeclareAttribute("SmallestIdempotentPower", IsMultiplicativeElement);
@@ -0,0 +1,121 @@
1
+ ############################################################################
2
+ ##
3
+ ## elements/elements.gi
4
+ ## Copyright (C) 2016-2022 Wilf A. Wilson
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+
10
+ SEMIGROUPS.IndexPeriodByRank := function(x, rank)
11
+ local k, p, s, rank_s, powers, min_rank, index, lower, next, mid, y, z,
12
+ period, S;
13
+
14
+ k := rank(x);
15
+ p := 1;
16
+ s := x ^ 2;
17
+ rank_s := rank(s);
18
+ powers := [x, s]; # powers[i] = x ^ (2 ^ (i - 1)), e.g. powers[5] = x ^ 16.
19
+
20
+ # Locate the index between its closest powers of 2
21
+ while rank_s <= k - (2 ^ (p - 1)) do
22
+ k := rank_s;
23
+ p := p + 1;
24
+ s := s ^ 2;
25
+ rank_s := rank(s);
26
+ Add(powers, s);
27
+ od;
28
+
29
+ min_rank := rank_s;
30
+
31
+ if rank(x) = min_rank then
32
+ index := 1;
33
+ else
34
+ # Get the specific values of the closest powers of 2 to index
35
+ if k = min_rank then
36
+ lower := p - 2;
37
+ else
38
+ lower := p - 1;
39
+ fi;
40
+ # (2 ^ lower) < index of x <= (2 ^ (lower + 1))
41
+
42
+ # index is always a lower bound for the true index
43
+ index := (2 ^ lower) + 1;
44
+ next := lower;
45
+ lower := powers[lower + 1];
46
+
47
+ # Perform a 'binary search' to completion to nail down the position of index
48
+ # The index is the *least* number such that x ^ index = min_rank
49
+ while next > 0 do
50
+ mid := lower * powers[next];
51
+ next := next - 1;
52
+ if rank(mid) <> min_rank then
53
+ lower := mid;
54
+ index := index + (2 ^ next);
55
+ fi;
56
+ od;
57
+ fi;
58
+
59
+ y := x ^ index;
60
+ z := y * x;
61
+ if y = z then
62
+ period := 1;
63
+ elif IsMultiplicativeElementWithOne(y) and One(y) <> fail and z = One(y) then
64
+ period := 2;
65
+ else
66
+ S := Semigroup(y, z);
67
+ SetIsGroupAsSemigroup(S, true);
68
+ period := Size(S);
69
+ fi;
70
+ return [index, period];
71
+ end;
72
+
73
+ InstallMethod(IndexPeriodOfSemigroupElement, "for a multiplicative element",
74
+ [IsMultiplicativeElement],
75
+ function(x)
76
+ local index, y, z, period, S;
77
+
78
+ if not IsGeneratorsOfSemigroup([x]) then
79
+ ErrorNoReturn("the argument (a mult. elt.) is not the generator of a ",
80
+ "semigroup");
81
+ fi;
82
+ index := NrDClasses(Semigroup(x));
83
+ y := x ^ index;
84
+ z := y * x;
85
+ if y = z then
86
+ period := 1;
87
+ elif IsMultiplicativeElementWithOne(y) and One(y) <> fail and z = One(y) then
88
+ period := 2;
89
+ else
90
+ S := Semigroup(y, z);
91
+ SetIsGroupAsSemigroup(S, true);
92
+ period := Size(S);
93
+ fi;
94
+ return [index, period];
95
+ end);
96
+
97
+ InstallMethod(SmallestIdempotentPower, "for a multiplicative element",
98
+ [IsMultiplicativeElement],
99
+ function(x)
100
+ local a, index, period, r;
101
+
102
+ if not IsGeneratorsOfSemigroup([x]) then
103
+ ErrorNoReturn("the argument (a mult. elt.) is not the generator of a ",
104
+ "semigroup");
105
+ fi;
106
+ a := IndexPeriodOfSemigroupElement(x);
107
+ index := a[1];
108
+ period := a[2];
109
+ # From Howie 1995, page 11
110
+ r := index mod period;
111
+ if r = 0 then
112
+ return index;
113
+ fi;
114
+ return index + period - r;
115
+ end);
116
+
117
+ InstallMethod(IsMultiplicativeZero,
118
+ "for a semigroup with multiplicative zero and multiplicative element",
119
+ [IsSemigroup and HasMultiplicativeZero, IsMultiplicativeElement],
120
+ SUM_FLAGS,
121
+ {S, x} -> MultiplicativeZero(S) <> fail and x = MultiplicativeZero(S));
@@ -0,0 +1,71 @@
1
+ ############################################################################
2
+ ##
3
+ ## elements/ffmat.gd
4
+ ## Copyright (C) 2016-2022 James D. Mitchell
5
+ ## Markus Pfeiffer
6
+ ##
7
+ ## Licensing information can be found in the README file of this package.
8
+ ##
9
+ ############################################################################
10
+ ##
11
+
12
+ # This file contains some minimal declarations that allow us to use the
13
+ # features of IsActingSemigroup with MatrixObj's of finite fields from the GAP
14
+ # library.
15
+
16
+ # We often need to detect whether or not a given mult. elt. is a MatrixObj with
17
+ # entries in a finite field, so we have the following property that answers
18
+ # this question.
19
+ DeclareProperty("IsMatrixObjOverFiniteField", IsMultiplicativeElement);
20
+
21
+ #############################################################################
22
+ # Declarations specifically for finite field vectors
23
+ #############################################################################
24
+
25
+ # The following relate to LambdaOrb and RhoOrb of a semigroup or monoid of
26
+ # matrices over IsMatrixObjOverFiniteField. We do not use GAP library vectors
27
+ # here (if they even exist) because these are essentially internal and are not
28
+ # expected to be created or manipulated directly by the user.
29
+
30
+ # Note that because matrices of dimension 0 are not permitted in the GAP
31
+ # library (possibly for good reasons, such as Is8BitMatrixRep not storing their
32
+ # base domain but using their entries to compute the base domain, which
33
+ # obviously doesn't work for 0-dim matrices which have no entries), everything
34
+ # inside the "acting" data structures (SemigroupData, LambdaOrb, RhoOrb etc)
35
+ # for a semigroup of matrices over a finite field use matrices and row bases
36
+ # etc of dimension 1 greater than the dimension of the matrices that are user
37
+ # facing.
38
+
39
+ DeclareCategory("IsRowBasisOverFiniteField", IsCollection);
40
+ DeclareCategoryCollections("IsRowBasisOverFiniteField");
41
+ DeclareConstructor("NewRowBasisOverFiniteField",
42
+ [IsRowBasisOverFiniteField, IsRing, IsList]);
43
+
44
+ DeclareRepresentation("IsPlistRowBasisOverFiniteFieldRep",
45
+ IsRowBasisOverFiniteField and IsComponentObjectRep and
46
+ IsAttributeStoringRep, ["rows"]);
47
+
48
+ DeclareAttribute("BaseDomain", IsRowBasisOverFiniteField);
49
+
50
+ #############################################################################
51
+ # Declarations specifically for finite field matrices
52
+ #############################################################################
53
+
54
+ # We require a number of operations for IsMatrixObjOverFiniteField that are not
55
+ # provided by the GAP library AFAIK at time of writing in June 2022.
56
+
57
+ # These bases are in normal form
58
+ DeclareAttribute("RowSpaceBasis", IsMatrixObj);
59
+ DeclareAttribute("RowSpaceTransformation", IsMatrixObj);
60
+ DeclareAttribute("RowSpaceTransformationInv", IsMatrixObj);
61
+
62
+ DeclareAttribute("RightInverse", IsMatrixObj);
63
+ DeclareAttribute("LeftInverse", IsMatrixObj);
64
+
65
+ DeclareOperation("OneMutable", [IsFFECollCollColl]);
66
+
67
+ #############################################################################
68
+ # Helper functions
69
+ #############################################################################
70
+
71
+ DeclareGlobalFunction("ComputeRowSpaceAndTransformation");
@@ -0,0 +1,311 @@
1
+ ############################################################################
2
+ ##
3
+ ## elements/ffmat.gi
4
+ ## Copyright (C) 2016-2022 James D. Mitchell
5
+ ## Markus Pfeiffer
6
+ ##
7
+ ## Licensing information can be found in the README file of this package.
8
+ ##
9
+ #############################################################################
10
+ ##
11
+
12
+ #############################################################################
13
+ # This file contains the implementations of the operations etc declared in
14
+ # ffmat.gd for matrix objects over finite fields.
15
+ #############################################################################
16
+
17
+ #############################################################################
18
+ # The file is organised as follows:
19
+ #
20
+ # 1. Random matrices
21
+ # 2. Rows bases etc
22
+ # 3. Attributes etc for IsMatrixObjOverFiniteField
23
+ # 4. Helper functions
24
+ #############################################################################
25
+
26
+ # The following are only used in this file and so are declared here in the gi
27
+ # file.
28
+
29
+ BindGlobal("PlistRowBasisOverFiniteFieldFamily",
30
+ NewFamily("PlistRowBasisOverFiniteFieldFamily",
31
+ IsRowBasisOverFiniteField, CanEasilyCompareElements));
32
+
33
+ BindGlobal("PlistRowBasisOverFiniteFieldType",
34
+ NewType(PlistRowBasisOverFiniteFieldFamily,
35
+ IsRowBasisOverFiniteField
36
+ and IsPlistRowBasisOverFiniteFieldRep));
37
+
38
+ InstallMethod(IsMatrixObjOverFiniteField, "for a matrix obj",
39
+ [IsMultiplicativeElement],
40
+ function(m)
41
+ return IsMatrixObj(m)
42
+ and IsField(BaseDomain(m))
43
+ and IsFinite(BaseDomain(m))
44
+ and NrRows(m) = NrCols(m);
45
+ end);
46
+
47
+ InstallMethod(OneMutable, "for an FFE coll coll coll",
48
+ [IsFFECollCollColl], coll -> One(Representative(coll)));
49
+
50
+ ###############################################################################
51
+ # 1. Random matrices
52
+ ###############################################################################
53
+
54
+ # Note that: the following methods implement the RandomMatrix interface for
55
+ # IsMatrixOverSemiring in the Semigroups package and do not related to anything
56
+ # similar in the GAP library for IsMatrixObj (if they exist).
57
+
58
+ InstallMethod(RandomMatrixOp, "for a finite field and pos int",
59
+ [IsField and IsFinite, IsPosInt],
60
+ function(field, n)
61
+ local xy, i, j;
62
+
63
+ xy := List([1 .. n], x -> EmptyPlist(n));
64
+ for i in [1 .. n] do
65
+ for j in [1 .. n] do
66
+ xy[i][j] := Random(field);
67
+ od;
68
+ od;
69
+ return Matrix(field, xy);
70
+ end);
71
+
72
+ InstallMethod(RandomMatrixOp,
73
+ "for a finite field, dimension, and list of ranks",
74
+ [IsField and IsFinite, IsPosInt, IsList],
75
+ function(R, n, ranks)
76
+ local z, rk, mat, zv, conj, j;
77
+
78
+ if ForAny(ranks, x -> (x < 0) or (x > n)) then
79
+ ErrorNoReturn("the list of ranks has to consist of numbers > 0 and < n");
80
+ fi;
81
+
82
+ z := Zero(R);
83
+ # Choose a matrix of given rank
84
+ rk := Random(ranks);
85
+ if rk = 0 then
86
+ return ZeroMatrix(R, n, n);
87
+ fi;
88
+ mat := Unpack(Random(GL(rk, R)));
89
+ # Extend it to n x n
90
+ zv := [1 .. n - rk] * z;
91
+ for j in [1 .. rk] do
92
+ Append(mat[j], zv);
93
+ od;
94
+ zv := [1 .. n] * z;
95
+ for j in [1 .. n - rk] do
96
+ Add(mat, zv);
97
+ od;
98
+ # Swirl around
99
+ # Is Permuting rows/columns enough?
100
+ conj := Random(GL(n, R)); # PermutationMat(Random(Sym(n)), n, R);
101
+ return Matrix(R, mat ^ conj);
102
+ end);
103
+
104
+ InstallMethod(RandomMatrixOp,
105
+ "for a finite field, dimension, and pos int",
106
+ [IsField and IsFinite, IsPosInt, IsPosInt],
107
+ {R, n, rank} -> RandomMatrixOp(R, n, [rank]));
108
+
109
+ #############################################################################
110
+ # 2. Rows bases etc
111
+ #############################################################################
112
+
113
+ InstallMethod(NewRowBasisOverFiniteField,
114
+ "for IsPlistRowBasisOverFiniteFieldRep, a ring, and a list",
115
+ [IsPlistRowBasisOverFiniteFieldRep, IsRing, IsList],
116
+ function(_, basedomain, l)
117
+ local b;
118
+ b := Objectify(PlistRowBasisOverFiniteFieldType, rec(rows := l));
119
+ SetBaseDomain(b, basedomain);
120
+ return b;
121
+ end);
122
+
123
+ InstallMethod(Rank, "for a plist rowbasis",
124
+ [IsPlistRowBasisOverFiniteFieldRep],
125
+ v -> Length(v!.rows));
126
+
127
+ InstallMethod(\=, "for an rowbasis",
128
+ [IsPlistRowBasisOverFiniteFieldRep, IsPlistRowBasisOverFiniteFieldRep],
129
+ {x, y} -> BaseDomain(x) = BaseDomain(y) and x!.rows = y!.rows);
130
+
131
+ InstallMethod(\<, "for an rowbasis",
132
+ [IsPlistRowBasisOverFiniteFieldRep, IsPlistRowBasisOverFiniteFieldRep],
133
+ {x, y} -> Rank(x) < Rank(y) or (Rank(x) = Rank(y) and (x!.rows < y!.rows)));
134
+
135
+ InstallMethod(ViewString, "for a plist rowbasis",
136
+ [IsPlistRowBasisOverFiniteFieldRep],
137
+ function(v)
138
+ return STRINGIFY("<rowbasis of rank ",
139
+ Rank(v),
140
+ " over ",
141
+ BaseDomain(v),
142
+ ">");
143
+ end);
144
+
145
+ InstallMethod(String, "for a plist rowbasis",
146
+ [IsPlistRowBasisOverFiniteFieldRep],
147
+ function(v)
148
+ return STRINGIFY("NewRowBasisOverFiniteField(",
149
+ "IsPlistRowBasisOverFiniteFieldRep, ",
150
+ BaseDomain(v),
151
+ ", ",
152
+ v!.rows, ")");
153
+ end);
154
+
155
+ SEMIGROUPS.HashFunctionForPlistRowBasisOverFiniteField := function(x, data)
156
+ if Rank(x) = 0 then
157
+ return 1;
158
+ fi;
159
+ Assert(1, IsRecord(data));
160
+ return data.func(x!.rows, data.data);
161
+ end;
162
+
163
+ InstallMethod(ChooseHashFunction, "for plist row basis over finite field",
164
+ [IsPlistRowBasisOverFiniteFieldRep, IsInt],
165
+ function(x, hashlen)
166
+ local data;
167
+ if Rank(x) <> 0 then
168
+ data := ChooseHashFunction(x!.rows, hashlen);
169
+ else
170
+ data := hashlen;
171
+ fi;
172
+ return rec(func := SEMIGROUPS.HashFunctionForPlistRowBasisOverFiniteField,
173
+ data := data);
174
+ end);
175
+
176
+ #############################################################################
177
+ # 3. Attributes etc for IsMatrixObjOverFiniteField
178
+ #############################################################################
179
+
180
+ InstallMethod(RowSpaceBasis, "for a matrix obj over finite field",
181
+ [IsMatrixObj],
182
+ function(m)
183
+ if not IsMatrixObjOverFiniteField(m) then
184
+ TryNextMethod();
185
+ fi;
186
+ return ComputeRowSpaceAndTransformation(m)[1];
187
+ end);
188
+
189
+ InstallMethod(RowSpaceTransformation, "for a matrix obj over finite field",
190
+ [IsMatrixObj],
191
+ function(m)
192
+ if not IsMatrixObjOverFiniteField(m) then
193
+ TryNextMethod();
194
+ fi;
195
+ return ComputeRowSpaceAndTransformation(m)[2];
196
+ end);
197
+
198
+ InstallMethod(RowSpaceTransformationInv, "for a matrix obj over finite field",
199
+ [IsMatrixObj],
200
+ function(m)
201
+ if not IsMatrixObjOverFiniteField(m) then
202
+ TryNextMethod();
203
+ fi;
204
+ return ComputeRowSpaceAndTransformation(m)[3];
205
+ end);
206
+
207
+ # Should this go in a helper function, it also works similarly to the thing
208
+ # done below.
209
+ InstallMethod(RightInverse, "for a matrix obj over finite field",
210
+ [IsMatrixObj],
211
+ function(m)
212
+ local deg, u, rsp, zv, se, i;
213
+
214
+ if not IsMatrixObjOverFiniteField(m) then
215
+ TryNextMethod();
216
+ fi;
217
+
218
+ deg := NrRows(m);
219
+ u := One(BaseDomain(m));
220
+
221
+ rsp := Unpack(m);
222
+ zv := [1 .. deg] * Zero(BaseDomain(m));
223
+ for i in [1 .. deg] do
224
+ Append(rsp[i], zv);
225
+ rsp[i][deg + i] := u;
226
+ od;
227
+ se := SemiEchelonMat(rsp);
228
+
229
+ for i in [1 .. Length(se.vectors)] do
230
+ rsp[i] := ShallowCopy(se.vectors[i]);
231
+ od;
232
+ for i in [1 .. deg] do
233
+ if se.heads[i] = 0 then
234
+ rsp[i][i] := u;
235
+ rsp[i][deg + i] := Zero(BaseDomain(m));
236
+ fi;
237
+ od;
238
+ TriangulizeMat(rsp);
239
+
240
+ return Matrix(rsp{[1 .. deg]}{[deg + 1 .. 2 * deg]}, m);
241
+ end);
242
+
243
+ InstallMethod(LeftInverse, "for a matrix obj over finite field",
244
+ [IsMatrixObj],
245
+ function(m)
246
+ if not IsMatrixObjOverFiniteField(m) then
247
+ TryNextMethod();
248
+ fi;
249
+ return TransposedMat(RightInverse(TransposedMat(m)));
250
+ end);
251
+
252
+ #############################################################################
253
+ # 4. Helper functions
254
+ #############################################################################
255
+
256
+ InstallGlobalFunction(ComputeRowSpaceAndTransformation,
257
+ function(m)
258
+ local deg, bd, bas, tr, tri, sinv, rsp, zv, heads, tm, i;
259
+
260
+ Assert(1, IsMatrixObjOverFiniteField(m));
261
+
262
+ deg := NrRows(m);
263
+ bd := BaseDomain(m);
264
+ if IsZero(m) then
265
+ bas := [];
266
+ tr := IdentityMat(deg, bd);
267
+ tri := tr;
268
+ sinv := fail;
269
+ else
270
+ rsp := Unpack(m);
271
+ zv := [1 .. deg] * Zero(bd);
272
+ for i in [1 .. deg] do
273
+ Append(rsp[i], ShallowCopy(zv));
274
+ rsp[i][deg + i] := One(bd);
275
+ od;
276
+ TriangulizeMat(rsp);
277
+
278
+ heads := [];
279
+ bas := rsp{[1 .. deg]}{[1 .. deg]};
280
+ for i in [deg, deg - 1 .. 1] do
281
+ if IsZero(bas[i]) then
282
+ Remove(bas, i);
283
+ else
284
+ heads[PositionNonZero(bas[i])] := i;
285
+ fi;
286
+ od;
287
+ # Check whether this matrix has a semigroup inverse, i.e. a matrix t such
288
+ # that t * m * t = t and m * t * m = m. If it does this matrix is the
289
+ # transformation we computed otherwise we set fail
290
+ tm := TransposedMat(bas);
291
+ sinv := true;
292
+ for i in [1 .. deg] do
293
+ if not IsBound(heads[i]) then
294
+ if not IsZero(tm[i]) then
295
+ sinv := fail;
296
+ fi;
297
+ fi;
298
+ od;
299
+ # This is obviously totally ridiculous to do the same computation twice
300
+ if sinv = true then
301
+ sinv := RightInverse(m);
302
+ fi;
303
+ tr := rsp{[1 .. deg]}{[deg + 1 .. 2 * deg]};
304
+ tri := tr ^ (-1);
305
+ fi;
306
+
307
+ ConvertToVectorRep(bas);
308
+ MakeImmutable(bas);
309
+ bas := NewRowBasisOverFiniteField(IsPlistRowBasisOverFiniteFieldRep, bd, bas);
310
+ return [bas, tr, tri];
311
+ end);
@@ -0,0 +1,131 @@
1
+ ############################################################################
2
+ ##
3
+ ## elements/maxplusmat.gd
4
+ ## Copyright (C) 2015-2022 James D. Mitchell
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+ ##
10
+
11
+ # This file contains declarations for max-plus, min-plus, tropical max-plus,
12
+ # tropical min-plus matrices, and natural number matrices.
13
+
14
+ DeclareProperty("IsTorsion", IsMatrixObj);
15
+ DeclareOperation("Matrix", [IsIntegers, IsTransformation]);
16
+ DeclareOperation("Matrix", [IsIntegers, IsTransformation, IsPosInt]);
17
+
18
+ #############################################################################
19
+ ## 1. Max-plus matrices
20
+ #############################################################################
21
+
22
+ DeclareCategory("IsMaxPlusMatrix", IsMatrixOverSemiring and
23
+ IsPlistMatrixOverSemiringPositionalRep);
24
+ DeclareCategoryCollections("IsMaxPlusMatrix");
25
+ DeclareCategoryCollections("IsMaxPlusMatrixCollection");
26
+
27
+ BindGlobal("MaxPlusMatrixType",
28
+ NewType(NewFamily("MaxPlusMatrixFamily",
29
+ IsMaxPlusMatrix,
30
+ CanEasilySortElements,
31
+ CanEasilySortElements),
32
+ IsMaxPlusMatrix));
33
+
34
+ DeclareOperation("SpectralRadius", [IsMaxPlusMatrix]);
35
+ DeclareOperation("UnweightedPrecedenceDigraph", [IsMaxPlusMatrix]);
36
+ DeclareOperation("RadialEigenvector", [IsMaxPlusMatrix]);
37
+
38
+ #############################################################################
39
+ ## 2. Min-plus matrices
40
+ #############################################################################
41
+
42
+ DeclareCategory("IsMinPlusMatrix",
43
+ IsMatrixOverSemiring
44
+ and IsPlistMatrixOverSemiringPositionalRep);
45
+ DeclareCategoryCollections("IsMinPlusMatrix");
46
+ DeclareCategoryCollections("IsMinPlusMatrixCollection");
47
+
48
+ BindGlobal("MinPlusMatrixType",
49
+ NewType(NewFamily("MinPlusMatrixFamily",
50
+ IsMinPlusMatrix,
51
+ CanEasilySortElements,
52
+ CanEasilySortElements),
53
+ IsMinPlusMatrix));
54
+
55
+ #############################################################################
56
+ ## 3. Tropical matrices
57
+ #############################################################################
58
+
59
+ DeclareCategory("IsTropicalMatrix",
60
+ IsMatrixOverSemiring
61
+ and IsPlistMatrixOverSemiringPositionalRep);
62
+ DeclareCategoryCollections("IsTropicalMatrix");
63
+
64
+ DeclareAttribute("ThresholdTropicalMatrix", IsTropicalMatrix);
65
+
66
+ #############################################################################
67
+ ## 4. Tropical max-plus matrices
68
+ #############################################################################
69
+
70
+ DeclareCategory("IsTropicalMaxPlusMatrix", IsTropicalMatrix);
71
+ DeclareCategoryCollections("IsTropicalMaxPlusMatrix");
72
+ DeclareCategoryCollections("IsTropicalMaxPlusMatrixCollection");
73
+
74
+ BindGlobal("TropicalMaxPlusMatrixType",
75
+ NewType(NewFamily("TropicalMaxPlusMatrixFamily",
76
+ IsTropicalMaxPlusMatrix,
77
+ CanEasilySortElements,
78
+ CanEasilySortElements),
79
+ IsTropicalMaxPlusMatrix));
80
+
81
+ #############################################################################
82
+ ## 5. Tropical min-plus matrices
83
+ #############################################################################
84
+
85
+ DeclareCategory("IsTropicalMinPlusMatrix", IsTropicalMatrix);
86
+ DeclareCategoryCollections("IsTropicalMinPlusMatrix");
87
+ DeclareCategoryCollections("IsTropicalMinPlusMatrixCollection");
88
+
89
+ BindGlobal("TropicalMinPlusMatrixType",
90
+ NewType(NewFamily("TropicalMinPlusMatrixFamily",
91
+ IsTropicalMinPlusMatrix,
92
+ CanEasilySortElements,
93
+ CanEasilySortElements),
94
+ IsTropicalMinPlusMatrix));
95
+
96
+ #############################################################################
97
+ ## 6. Projective max-plus matrices
98
+ #############################################################################
99
+
100
+ DeclareCategory("IsProjectiveMaxPlusMatrix",
101
+ IsMatrixOverSemiring
102
+ and IsPlistMatrixOverSemiringPositionalRep);
103
+ DeclareCategoryCollections("IsProjectiveMaxPlusMatrix");
104
+ DeclareCategoryCollections("IsProjectiveMaxPlusMatrixCollection");
105
+
106
+ BindGlobal("ProjectiveMaxPlusMatrixType",
107
+ NewType(NewFamily("ProjectiveMaxPlusMatrixFamily",
108
+ IsProjectiveMaxPlusMatrix,
109
+ CanEasilySortElements,
110
+ CanEasilySortElements),
111
+ IsProjectiveMaxPlusMatrix));
112
+
113
+ #############################################################################
114
+ ## 7. NTP (Natural Threshold Period) matrices
115
+ #############################################################################
116
+
117
+ DeclareCategory("IsNTPMatrix",
118
+ IsMatrixOverSemiring
119
+ and IsPlistMatrixOverSemiringPositionalRep);
120
+ DeclareCategoryCollections("IsNTPMatrix");
121
+ DeclareCategoryCollections("IsNTPMatrixCollection");
122
+
123
+ BindGlobal("NTPMatrixType",
124
+ NewType(NewFamily("NTPMatrixFamily",
125
+ IsNTPMatrix,
126
+ CanEasilySortElements,
127
+ CanEasilySortElements),
128
+ IsNTPMatrix));
129
+
130
+ DeclareAttribute("ThresholdNTPMatrix", IsNTPMatrix);
131
+ DeclareAttribute("PeriodNTPMatrix", IsNTPMatrix);