passagemath-gap-pkg-semigroups 10.6.30__cp310-cp310-macosx_13_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-gap-pkg-semigroups might be problematic. Click here for more details.
- gap/pkg/semigroups/CHANGELOG.md +1699 -0
- gap/pkg/semigroups/CONTRIBUTING.md +91 -0
- gap/pkg/semigroups/GNUmakefile +110 -0
- gap/pkg/semigroups/GNUmakefile.in +110 -0
- gap/pkg/semigroups/GPL +674 -0
- gap/pkg/semigroups/LICENSE +16 -0
- gap/pkg/semigroups/Makefile +26 -0
- gap/pkg/semigroups/Makefile.gappkg +225 -0
- gap/pkg/semigroups/PackageInfo.g +529 -0
- gap/pkg/semigroups/README.md +102 -0
- gap/pkg/semigroups/VERSIONS +112 -0
- gap/pkg/semigroups/aclocal.m4 +375 -0
- gap/pkg/semigroups/autogen.sh +25 -0
- gap/pkg/semigroups/bin/aarch64-apple-darwin23-default64-kv10/semigroups.so +0 -0
- gap/pkg/semigroups/config.guess +1807 -0
- gap/pkg/semigroups/config.log +1158 -0
- gap/pkg/semigroups/config.status +1131 -0
- gap/pkg/semigroups/config.sub +1960 -0
- gap/pkg/semigroups/configure +9742 -0
- gap/pkg/semigroups/configure.ac +71 -0
- gap/pkg/semigroups/data/doc/greens.pickle +1 -0
- gap/pkg/semigroups/data/gens/fullbool-8.pickle.gz +0 -0
- gap/pkg/semigroups/data/gens/fullbool.pickle.gz +0 -0
- gap/pkg/semigroups/data/gens/hall.pickle.gz +0 -0
- gap/pkg/semigroups/data/gens/reflex-6.pickle.gz +0 -0
- gap/pkg/semigroups/data/gens/reflex.pickle.gz +0 -0
- gap/pkg/semigroups/data/tst/bipart4 +10 -0
- gap/pkg/semigroups/data/tst/pperm10 +1 -0
- gap/pkg/semigroups/data/tst/tables.gz +0 -0
- gap/pkg/semigroups/data/tst/testdata +1 -0
- gap/pkg/semigroups/data/tst/testinstall.pickle +1 -0
- gap/pkg/semigroups/data/tst/trans3 +7 -0
- gap/pkg/semigroups/data/tst/trans3-old +7 -0
- gap/pkg/semigroups/environment.yml +7 -0
- gap/pkg/semigroups/gap/attributes/acting.gd +15 -0
- gap/pkg/semigroups/gap/attributes/acting.gi +297 -0
- gap/pkg/semigroups/gap/attributes/attr.gd +91 -0
- gap/pkg/semigroups/gap/attributes/attr.gi +1214 -0
- gap/pkg/semigroups/gap/attributes/dual.gd +25 -0
- gap/pkg/semigroups/gap/attributes/dual.gi +209 -0
- gap/pkg/semigroups/gap/attributes/factor.gd +17 -0
- gap/pkg/semigroups/gap/attributes/factor.gi +453 -0
- gap/pkg/semigroups/gap/attributes/homomorph.gd +84 -0
- gap/pkg/semigroups/gap/attributes/homomorph.gi +591 -0
- gap/pkg/semigroups/gap/attributes/inverse.gd +38 -0
- gap/pkg/semigroups/gap/attributes/inverse.gi +708 -0
- gap/pkg/semigroups/gap/attributes/isomorph.gd +16 -0
- gap/pkg/semigroups/gap/attributes/isomorph.gi +377 -0
- gap/pkg/semigroups/gap/attributes/isorms.gd +49 -0
- gap/pkg/semigroups/gap/attributes/isorms.gi +1383 -0
- gap/pkg/semigroups/gap/attributes/maximal.gd +16 -0
- gap/pkg/semigroups/gap/attributes/maximal.gi +1876 -0
- gap/pkg/semigroups/gap/attributes/properties.gd +109 -0
- gap/pkg/semigroups/gap/attributes/properties.gi +1658 -0
- gap/pkg/semigroups/gap/attributes/rms-translat.gd +39 -0
- gap/pkg/semigroups/gap/attributes/rms-translat.gi +1078 -0
- gap/pkg/semigroups/gap/attributes/semifp.gd +12 -0
- gap/pkg/semigroups/gap/attributes/semifp.gi +84 -0
- gap/pkg/semigroups/gap/attributes/translat.gd +474 -0
- gap/pkg/semigroups/gap/attributes/translat.gi +1779 -0
- gap/pkg/semigroups/gap/congruences/cong.gd +154 -0
- gap/pkg/semigroups/gap/congruences/cong.gi +351 -0
- gap/pkg/semigroups/gap/congruences/conginv.gd +38 -0
- gap/pkg/semigroups/gap/congruences/conginv.gi +589 -0
- gap/pkg/semigroups/gap/congruences/conglatt.gd +101 -0
- gap/pkg/semigroups/gap/congruences/conglatt.gi +886 -0
- gap/pkg/semigroups/gap/congruences/congpairs.gd +21 -0
- gap/pkg/semigroups/gap/congruences/congpairs.gi +272 -0
- gap/pkg/semigroups/gap/congruences/congpart.gd +90 -0
- gap/pkg/semigroups/gap/congruences/congpart.gi +449 -0
- gap/pkg/semigroups/gap/congruences/congrees.gd +20 -0
- gap/pkg/semigroups/gap/congruences/congrees.gi +313 -0
- gap/pkg/semigroups/gap/congruences/congrms.gd +54 -0
- gap/pkg/semigroups/gap/congruences/congrms.gi +1467 -0
- gap/pkg/semigroups/gap/congruences/congsemigraph.gd +28 -0
- gap/pkg/semigroups/gap/congruences/congsemigraph.gi +289 -0
- gap/pkg/semigroups/gap/congruences/congsimple.gd +27 -0
- gap/pkg/semigroups/gap/congruences/congsimple.gi +236 -0
- gap/pkg/semigroups/gap/congruences/conguniv.gd +20 -0
- gap/pkg/semigroups/gap/congruences/conguniv.gi +271 -0
- gap/pkg/semigroups/gap/congruences/congwordgraph.gd +21 -0
- gap/pkg/semigroups/gap/congruences/congwordgraph.gi +250 -0
- gap/pkg/semigroups/gap/elements/bipart.gd +71 -0
- gap/pkg/semigroups/gap/elements/bipart.gi +995 -0
- gap/pkg/semigroups/gap/elements/blocks.gd +31 -0
- gap/pkg/semigroups/gap/elements/blocks.gi +134 -0
- gap/pkg/semigroups/gap/elements/boolmat.gd +74 -0
- gap/pkg/semigroups/gap/elements/boolmat.gi +726 -0
- gap/pkg/semigroups/gap/elements/elements.gd +11 -0
- gap/pkg/semigroups/gap/elements/elements.gi +121 -0
- gap/pkg/semigroups/gap/elements/ffmat.gd +71 -0
- gap/pkg/semigroups/gap/elements/ffmat.gi +311 -0
- gap/pkg/semigroups/gap/elements/maxplusmat.gd +131 -0
- gap/pkg/semigroups/gap/elements/maxplusmat.gi +782 -0
- gap/pkg/semigroups/gap/elements/pbr.gd +51 -0
- gap/pkg/semigroups/gap/elements/pbr.gi +740 -0
- gap/pkg/semigroups/gap/elements/pperm.gd +11 -0
- gap/pkg/semigroups/gap/elements/pperm.gi +14 -0
- gap/pkg/semigroups/gap/elements/semiringmat.gd +136 -0
- gap/pkg/semigroups/gap/elements/semiringmat.gi +717 -0
- gap/pkg/semigroups/gap/elements/star.gd +21 -0
- gap/pkg/semigroups/gap/elements/star.gi +21 -0
- gap/pkg/semigroups/gap/elements/trans.gd +13 -0
- gap/pkg/semigroups/gap/elements/trans.gi +50 -0
- gap/pkg/semigroups/gap/fp/freeband.gd +22 -0
- gap/pkg/semigroups/gap/fp/freeband.gi +502 -0
- gap/pkg/semigroups/gap/fp/freeinverse.gd +30 -0
- gap/pkg/semigroups/gap/fp/freeinverse.gi +465 -0
- gap/pkg/semigroups/gap/fp/tietze.gd +89 -0
- gap/pkg/semigroups/gap/fp/tietze.gi +1578 -0
- gap/pkg/semigroups/gap/fp/word.gd +15 -0
- gap/pkg/semigroups/gap/fp/word.gi +67 -0
- gap/pkg/semigroups/gap/greens/acting-inverse.gi +774 -0
- gap/pkg/semigroups/gap/greens/acting-regular.gi +553 -0
- gap/pkg/semigroups/gap/greens/acting.gd +81 -0
- gap/pkg/semigroups/gap/greens/acting.gi +2433 -0
- gap/pkg/semigroups/gap/greens/froidure-pin.gd +25 -0
- gap/pkg/semigroups/gap/greens/froidure-pin.gi +741 -0
- gap/pkg/semigroups/gap/greens/generic.gd +117 -0
- gap/pkg/semigroups/gap/greens/generic.gi +630 -0
- gap/pkg/semigroups/gap/ideals/acting.gd +17 -0
- gap/pkg/semigroups/gap/ideals/acting.gi +1155 -0
- gap/pkg/semigroups/gap/ideals/froidure-pin.gd +11 -0
- gap/pkg/semigroups/gap/ideals/froidure-pin.gi +105 -0
- gap/pkg/semigroups/gap/ideals/ideals.gd +45 -0
- gap/pkg/semigroups/gap/ideals/ideals.gi +442 -0
- gap/pkg/semigroups/gap/ideals/lambda-rho.gd +16 -0
- gap/pkg/semigroups/gap/ideals/lambda-rho.gi +614 -0
- gap/pkg/semigroups/gap/libsemigroups/cong.gd +24 -0
- gap/pkg/semigroups/gap/libsemigroups/cong.gi +431 -0
- gap/pkg/semigroups/gap/libsemigroups/fpsemi.gd +16 -0
- gap/pkg/semigroups/gap/libsemigroups/fpsemi.gi +53 -0
- gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gd +17 -0
- gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gi +945 -0
- gap/pkg/semigroups/gap/libsemigroups/sims1.gd +38 -0
- gap/pkg/semigroups/gap/libsemigroups/sims1.gi +308 -0
- gap/pkg/semigroups/gap/main/acting.gd +36 -0
- gap/pkg/semigroups/gap/main/acting.gi +779 -0
- gap/pkg/semigroups/gap/main/froidure-pin.gd +72 -0
- gap/pkg/semigroups/gap/main/froidure-pin.gi +655 -0
- gap/pkg/semigroups/gap/main/graded.gd +26 -0
- gap/pkg/semigroups/gap/main/graded.gi +355 -0
- gap/pkg/semigroups/gap/main/lambda-rho.gd +29 -0
- gap/pkg/semigroups/gap/main/lambda-rho.gi +514 -0
- gap/pkg/semigroups/gap/main/orbits.gd +24 -0
- gap/pkg/semigroups/gap/main/orbits.gi +512 -0
- gap/pkg/semigroups/gap/main/semiact.gd +20 -0
- gap/pkg/semigroups/gap/main/semiact.gi +821 -0
- gap/pkg/semigroups/gap/main/setup.gd +61 -0
- gap/pkg/semigroups/gap/main/setup.gi +1094 -0
- gap/pkg/semigroups/gap/obsolete.gd +9 -0
- gap/pkg/semigroups/gap/obsolete.gi +14 -0
- gap/pkg/semigroups/gap/options.g +55 -0
- gap/pkg/semigroups/gap/semigroups/grpperm.gd +12 -0
- gap/pkg/semigroups/gap/semigroups/grpperm.gi +177 -0
- gap/pkg/semigroups/gap/semigroups/semibipart.gd +28 -0
- gap/pkg/semigroups/gap/semigroups/semibipart.gi +570 -0
- gap/pkg/semigroups/gap/semigroups/semiboolmat.gd +20 -0
- gap/pkg/semigroups/gap/semigroups/semiboolmat.gi +104 -0
- gap/pkg/semigroups/gap/semigroups/semicons.gd +52 -0
- gap/pkg/semigroups/gap/semigroups/semicons.gi +1194 -0
- gap/pkg/semigroups/gap/semigroups/semidp.gd +13 -0
- gap/pkg/semigroups/gap/semigroups/semidp.gi +509 -0
- gap/pkg/semigroups/gap/semigroups/semieunit.gd +126 -0
- gap/pkg/semigroups/gap/semigroups/semieunit.gi +889 -0
- gap/pkg/semigroups/gap/semigroups/semiex.gd +104 -0
- gap/pkg/semigroups/gap/semigroups/semiex.gi +1590 -0
- gap/pkg/semigroups/gap/semigroups/semiffmat.gd +37 -0
- gap/pkg/semigroups/gap/semigroups/semiffmat.gi +565 -0
- gap/pkg/semigroups/gap/semigroups/semifp.gd +28 -0
- gap/pkg/semigroups/gap/semigroups/semifp.gi +1364 -0
- gap/pkg/semigroups/gap/semigroups/semigraph.gd +40 -0
- gap/pkg/semigroups/gap/semigroups/semigraph.gi +292 -0
- gap/pkg/semigroups/gap/semigroups/semigrp.gd +165 -0
- gap/pkg/semigroups/gap/semigroups/semigrp.gi +1225 -0
- gap/pkg/semigroups/gap/semigroups/semimaxplus.gd +72 -0
- gap/pkg/semigroups/gap/semigroups/semimaxplus.gi +710 -0
- gap/pkg/semigroups/gap/semigroups/semintmat.gd +13 -0
- gap/pkg/semigroups/gap/semigroups/semintmat.gi +74 -0
- gap/pkg/semigroups/gap/semigroups/semipbr.gd +19 -0
- gap/pkg/semigroups/gap/semigroups/semipbr.gi +139 -0
- gap/pkg/semigroups/gap/semigroups/semipperm.gd +27 -0
- gap/pkg/semigroups/gap/semigroups/semipperm.gi +711 -0
- gap/pkg/semigroups/gap/semigroups/semiquo.gd +14 -0
- gap/pkg/semigroups/gap/semigroups/semiquo.gi +97 -0
- gap/pkg/semigroups/gap/semigroups/semiringmat.gd +16 -0
- gap/pkg/semigroups/gap/semigroups/semiringmat.gi +21 -0
- gap/pkg/semigroups/gap/semigroups/semirms.gd +19 -0
- gap/pkg/semigroups/gap/semigroups/semirms.gi +977 -0
- gap/pkg/semigroups/gap/semigroups/semitrans.gd +49 -0
- gap/pkg/semigroups/gap/semigroups/semitrans.gi +909 -0
- gap/pkg/semigroups/gap/tools/display.gd +24 -0
- gap/pkg/semigroups/gap/tools/display.gi +749 -0
- gap/pkg/semigroups/gap/tools/io.gd +17 -0
- gap/pkg/semigroups/gap/tools/io.gi +543 -0
- gap/pkg/semigroups/gap/tools/iterators.gd +16 -0
- gap/pkg/semigroups/gap/tools/iterators.gi +253 -0
- gap/pkg/semigroups/gap/tools/utils.gd +19 -0
- gap/pkg/semigroups/gap/tools/utils.gi +756 -0
- gap/pkg/semigroups/gapbind14/.ccls +18 -0
- gap/pkg/semigroups/gapbind14/.clang-format +104 -0
- gap/pkg/semigroups/gapbind14/CPPLINT.cfg +5 -0
- gap/pkg/semigroups/gapbind14/LICENSE +674 -0
- gap/pkg/semigroups/gapbind14/README.md +76 -0
- gap/pkg/semigroups/gapbind14/demo/.gitignore +4 -0
- gap/pkg/semigroups/gapbind14/demo/LICENSE +293 -0
- gap/pkg/semigroups/gapbind14/demo/Makefile.gappkg +220 -0
- gap/pkg/semigroups/gapbind14/demo/Makefile.in +19 -0
- gap/pkg/semigroups/gapbind14/demo/PackageInfo.g +87 -0
- gap/pkg/semigroups/gapbind14/demo/README.md +17 -0
- gap/pkg/semigroups/gapbind14/demo/configure +34 -0
- gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gd +19 -0
- gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gi +10 -0
- gap/pkg/semigroups/gapbind14/demo/init.g +16 -0
- gap/pkg/semigroups/gapbind14/demo/makedoc.g +10 -0
- gap/pkg/semigroups/gapbind14/demo/read.g +6 -0
- gap/pkg/semigroups/gapbind14/demo/src/gapbind_demo.cc +142 -0
- gap/pkg/semigroups/gapbind14/demo/tst/testall.g +12 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/cpp_fn.hpp +223 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/gap_include.hpp +26 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/gapbind14.hpp +445 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/tame_free_fn.hpp +420 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/tame_mem_fn.hpp +556 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/to_cpp.hpp +162 -0
- gap/pkg/semigroups/gapbind14/include/gapbind14/to_gap.hpp +158 -0
- gap/pkg/semigroups/gapbind14/src/.clang-format +108 -0
- gap/pkg/semigroups/gapbind14/src/gapbind14.cpp +334 -0
- gap/pkg/semigroups/init.g +150 -0
- gap/pkg/semigroups/m4/ax_append_flag.m4 +50 -0
- gap/pkg/semigroups/m4/ax_check_compile_flag.m4 +53 -0
- gap/pkg/semigroups/m4/ax_check_hpcombi.m4 +121 -0
- gap/pkg/semigroups/m4/ax_check_libsemigroup.m4 +68 -0
- gap/pkg/semigroups/m4/ax_compare_version.m4 +177 -0
- gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx.m4 +1009 -0
- gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx_14.m4 +34 -0
- gap/pkg/semigroups/m4/ax_prefix_config_h.m4 +203 -0
- gap/pkg/semigroups/m4/ax_pthread.m4 +522 -0
- gap/pkg/semigroups/m4/find_gap.m4 +94 -0
- gap/pkg/semigroups/makedoc.g +153 -0
- gap/pkg/semigroups/prerequisites.sh +62 -0
- gap/pkg/semigroups/read.g +105 -0
- gap/pkg/semigroups/release.toml +6 -0
- gap/pkg/semigroups/tst/extreme/README +2 -0
- gap/pkg/semigroups/tst/extreme/attrinv.tst +703 -0
- gap/pkg/semigroups/tst/extreme/bipart.tst +2803 -0
- gap/pkg/semigroups/tst/extreme/closure.tst +652 -0
- gap/pkg/semigroups/tst/extreme/cong.tst +286 -0
- gap/pkg/semigroups/tst/extreme/conginv.tst +43 -0
- gap/pkg/semigroups/tst/extreme/examples.tst +2449 -0
- gap/pkg/semigroups/tst/extreme/freeband.tst +37 -0
- gap/pkg/semigroups/tst/extreme/greens-acting-regular.tst +27 -0
- gap/pkg/semigroups/tst/extreme/greens-acting.tst +1999 -0
- gap/pkg/semigroups/tst/extreme/ideals.tst +858 -0
- gap/pkg/semigroups/tst/extreme/inverse.tst +1025 -0
- gap/pkg/semigroups/tst/extreme/maximal.tst +856 -0
- gap/pkg/semigroups/tst/extreme/misc.tst +4236 -0
- gap/pkg/semigroups/tst/extreme/monoid_pkg.tst +1488 -0
- gap/pkg/semigroups/tst/extreme/properties.tst +914 -0
- gap/pkg/semigroups/tst/extreme/semibipart.tst +2837 -0
- gap/pkg/semigroups/tst/extreme/semieunit.tst +49 -0
- gap/pkg/semigroups/tst/extreme/semiffmat.tst +353 -0
- gap/pkg/semigroups/tst/extreme/semigroups.tst +245 -0
- gap/pkg/semigroups/tst/extreme/semiiter.tst +58 -0
- gap/pkg/semigroups/tst/extreme/semirms.tst +1091 -0
- gap/pkg/semigroups/tst/extreme/transform.tst +305 -0
- gap/pkg/semigroups/tst/extreme/translat.tst +44 -0
- gap/pkg/semigroups/tst/standard/README +2 -0
- gap/pkg/semigroups/tst/standard/attributes/acting.tst +388 -0
- gap/pkg/semigroups/tst/standard/attributes/attr.tst +2404 -0
- gap/pkg/semigroups/tst/standard/attributes/dual.tst +308 -0
- gap/pkg/semigroups/tst/standard/attributes/factor.tst +629 -0
- gap/pkg/semigroups/tst/standard/attributes/homomorph.tst +1134 -0
- gap/pkg/semigroups/tst/standard/attributes/inverse.tst +1521 -0
- gap/pkg/semigroups/tst/standard/attributes/isomorph.tst +435 -0
- gap/pkg/semigroups/tst/standard/attributes/isorms.tst +1147 -0
- gap/pkg/semigroups/tst/standard/attributes/maximal.tst +853 -0
- gap/pkg/semigroups/tst/standard/attributes/properties.tst +2028 -0
- gap/pkg/semigroups/tst/standard/attributes/semifp.tst +53 -0
- gap/pkg/semigroups/tst/standard/attributes/translat.tst +796 -0
- gap/pkg/semigroups/tst/standard/congruences/cong.tst +1044 -0
- gap/pkg/semigroups/tst/standard/congruences/conginv.tst +292 -0
- gap/pkg/semigroups/tst/standard/congruences/conglatt.tst +421 -0
- gap/pkg/semigroups/tst/standard/congruences/congpairs.tst +1011 -0
- gap/pkg/semigroups/tst/standard/congruences/congrees.tst +288 -0
- gap/pkg/semigroups/tst/standard/congruences/congrms.tst +701 -0
- gap/pkg/semigroups/tst/standard/congruences/congsemigraph.tst +422 -0
- gap/pkg/semigroups/tst/standard/congruences/congsimple.tst +311 -0
- gap/pkg/semigroups/tst/standard/congruences/conguniv.tst +259 -0
- gap/pkg/semigroups/tst/standard/congruences/congwordgraph.tst +330 -0
- gap/pkg/semigroups/tst/standard/elements/bipart.tst +783 -0
- gap/pkg/semigroups/tst/standard/elements/blocks.tst +166 -0
- gap/pkg/semigroups/tst/standard/elements/boolmat.tst +608 -0
- gap/pkg/semigroups/tst/standard/elements/elements.tst +117 -0
- gap/pkg/semigroups/tst/standard/elements/ffmat.tst +349 -0
- gap/pkg/semigroups/tst/standard/elements/maxplusmat.tst +613 -0
- gap/pkg/semigroups/tst/standard/elements/pbr.tst +506 -0
- gap/pkg/semigroups/tst/standard/elements/pperm.tst +32 -0
- gap/pkg/semigroups/tst/standard/elements/semiringmat.tst +601 -0
- gap/pkg/semigroups/tst/standard/elements/trans.tst +58 -0
- gap/pkg/semigroups/tst/standard/fp/freeband.tst +311 -0
- gap/pkg/semigroups/tst/standard/fp/freeinverse.tst +147 -0
- gap/pkg/semigroups/tst/standard/fp/tietze.tst +780 -0
- gap/pkg/semigroups/tst/standard/fp/word.tst +106 -0
- gap/pkg/semigroups/tst/standard/greens/acting-inverse.tst +545 -0
- gap/pkg/semigroups/tst/standard/greens/acting-regular.tst +396 -0
- gap/pkg/semigroups/tst/standard/greens/acting.tst +2033 -0
- gap/pkg/semigroups/tst/standard/greens/froidure-pin.tst +1831 -0
- gap/pkg/semigroups/tst/standard/greens/generic.tst +1436 -0
- gap/pkg/semigroups/tst/standard/ideals/acting.tst +279 -0
- gap/pkg/semigroups/tst/standard/ideals/froidure-pin.tst +178 -0
- gap/pkg/semigroups/tst/standard/ideals/ideals.tst +380 -0
- gap/pkg/semigroups/tst/standard/libsemigroups/cong.tst +310 -0
- gap/pkg/semigroups/tst/standard/libsemigroups/froidure-pin.tst +778 -0
- gap/pkg/semigroups/tst/standard/libsemigroups/sims1.tst +379 -0
- gap/pkg/semigroups/tst/standard/main/acting.tst +411 -0
- gap/pkg/semigroups/tst/standard/main/froidure-pin.tst +392 -0
- gap/pkg/semigroups/tst/standard/main/semiact.tst +203 -0
- gap/pkg/semigroups/tst/standard/main/setup.tst +1144 -0
- gap/pkg/semigroups/tst/standard/obsolete.tst +19 -0
- gap/pkg/semigroups/tst/standard/options.tst +54 -0
- gap/pkg/semigroups/tst/standard/semigroups/grpperm.tst +581 -0
- gap/pkg/semigroups/tst/standard/semigroups/semibipart.tst +2635 -0
- gap/pkg/semigroups/tst/standard/semigroups/semiboolmat.tst +1871 -0
- gap/pkg/semigroups/tst/standard/semigroups/semicons.tst +1173 -0
- gap/pkg/semigroups/tst/standard/semigroups/semidp.tst +739 -0
- gap/pkg/semigroups/tst/standard/semigroups/semieunit.tst +339 -0
- gap/pkg/semigroups/tst/standard/semigroups/semiex.tst +2055 -0
- gap/pkg/semigroups/tst/standard/semigroups/semiffmat.tst +746 -0
- gap/pkg/semigroups/tst/standard/semigroups/semifp.tst +2702 -0
- gap/pkg/semigroups/tst/standard/semigroups/semigraph.tst +133 -0
- gap/pkg/semigroups/tst/standard/semigroups/semigrp.tst +1112 -0
- gap/pkg/semigroups/tst/standard/semigroups/semimaxplus.tst +654 -0
- gap/pkg/semigroups/tst/standard/semigroups/semipbr.tst +2142 -0
- gap/pkg/semigroups/tst/standard/semigroups/semipperm.tst +2169 -0
- gap/pkg/semigroups/tst/standard/semigroups/semiquo.tst +278 -0
- gap/pkg/semigroups/tst/standard/semigroups/semirms.tst +3010 -0
- gap/pkg/semigroups/tst/standard/semigroups/semitrans.tst +2758 -0
- gap/pkg/semigroups/tst/standard/tools/display.tst +1040 -0
- gap/pkg/semigroups/tst/standard/tools/io.tst +363 -0
- gap/pkg/semigroups/tst/testinstall.tst +1815 -0
- gap/pkg/semigroups/tst/teststandard.g +22 -0
- gap/pkg/semigroups/tst/workspaces/load-workspace.tst +142 -0
- gap/pkg/semigroups/tst/workspaces/load.g +11 -0
- gap/pkg/semigroups/tst/workspaces/save-workspace.tst +166 -0
- gap/pkg/semigroups/tst/workspaces/save.g +14 -0
- passagemath_gap_pkg_semigroups-10.6.30.dist-info/METADATA +93 -0
- passagemath_gap_pkg_semigroups-10.6.30.dist-info/METADATA.bak +94 -0
- passagemath_gap_pkg_semigroups-10.6.30.dist-info/RECORD +354 -0
- passagemath_gap_pkg_semigroups-10.6.30.dist-info/WHEEL +6 -0
- passagemath_gap_pkg_semigroups-10.6.30.dist-info/top_level.txt +1 -0
- passagemath_gap_pkg_semigroups.dylibs/libsemigroups.2.dylib +0 -0
- sage/all__sagemath_gap_pkg_semigroups.py +1 -0
- sage/libs/all__sagemath_gap_pkg_semigroups.py +1 -0
- sage/libs/gap_pkg_semigroups.cpython-310-darwin.so +0 -0
|
@@ -0,0 +1,909 @@
|
|
|
1
|
+
#############################################################################
|
|
2
|
+
##
|
|
3
|
+
## semigroups/semitrans.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
|
+
# This file contains methods for every operation/attribute/property that is
|
|
12
|
+
# specific to transformation semigroups.
|
|
13
|
+
|
|
14
|
+
#############################################################################
|
|
15
|
+
## Random
|
|
16
|
+
#############################################################################
|
|
17
|
+
|
|
18
|
+
InstallMethod(SEMIGROUPS_ProcessRandomArgsCons,
|
|
19
|
+
[IsTransformationSemigroup, IsList],
|
|
20
|
+
{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params));
|
|
21
|
+
|
|
22
|
+
InstallMethod(SEMIGROUPS_ProcessRandomArgsCons,
|
|
23
|
+
[IsTransformationMonoid, IsList],
|
|
24
|
+
{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params));
|
|
25
|
+
|
|
26
|
+
InstallMethod(RandomSemigroupCons, "for IsTransformationSemigroup and a list",
|
|
27
|
+
[IsTransformationSemigroup, IsList],
|
|
28
|
+
function(_, params)
|
|
29
|
+
return Semigroup(List([1 .. params[1]], i ->
|
|
30
|
+
RandomTransformation(params[2])));
|
|
31
|
+
end);
|
|
32
|
+
|
|
33
|
+
InstallMethod(RandomMonoidCons, "for IsTransformationMonoid and a list",
|
|
34
|
+
[IsTransformationMonoid, IsList], {filt, params} ->
|
|
35
|
+
Monoid(List([1 .. params[1]], i -> RandomTransformation(params[2]))));
|
|
36
|
+
|
|
37
|
+
InstallMethod(RandomInverseSemigroupCons,
|
|
38
|
+
"for IsTransformationSemigroup and a list",
|
|
39
|
+
[IsTransformationSemigroup, IsList],
|
|
40
|
+
SEMIGROUPS.DefaultRandomInverseSemigroup);
|
|
41
|
+
|
|
42
|
+
InstallMethod(RandomInverseMonoidCons,
|
|
43
|
+
"for IsTransformationMonoid and a list",
|
|
44
|
+
[IsTransformationMonoid, IsList],
|
|
45
|
+
SEMIGROUPS.DefaultRandomInverseMonoid);
|
|
46
|
+
|
|
47
|
+
#############################################################################
|
|
48
|
+
## Operators
|
|
49
|
+
#############################################################################
|
|
50
|
+
|
|
51
|
+
InstallMethod(\<, "for transformation semigroups",
|
|
52
|
+
[IsTransformationSemigroup, IsTransformationSemigroup],
|
|
53
|
+
function(S, T)
|
|
54
|
+
if DegreeOfTransformationSemigroup(S)
|
|
55
|
+
<> DegreeOfTransformationSemigroup(T) then
|
|
56
|
+
return DegreeOfTransformationSemigroup(S)
|
|
57
|
+
< DegreeOfTransformationSemigroup(T);
|
|
58
|
+
fi;
|
|
59
|
+
TryNextMethod();
|
|
60
|
+
end);
|
|
61
|
+
|
|
62
|
+
InstallMethod(\^, "for a transformation semigroup with generators and perm",
|
|
63
|
+
[IsTransformationCollection, IsPerm],
|
|
64
|
+
{coll, p} -> List(coll, x -> x ^ p));
|
|
65
|
+
|
|
66
|
+
InstallMethod(\^, "for a transformation semigroup with generators and perm",
|
|
67
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsPerm],
|
|
68
|
+
{S, p} -> Semigroup(GeneratorsOfSemigroup(S) ^ p));
|
|
69
|
+
|
|
70
|
+
#############################################################################
|
|
71
|
+
## Isomorphisms
|
|
72
|
+
#############################################################################
|
|
73
|
+
|
|
74
|
+
InstallMethod(IsomorphismSemigroup,
|
|
75
|
+
"for IsTransformationSemigroup and a semigroup",
|
|
76
|
+
[IsTransformationSemigroup, IsSemigroup],
|
|
77
|
+
{filt, S} -> IsomorphismTransformationSemigroup(S));
|
|
78
|
+
|
|
79
|
+
InstallMethod(IsomorphismMonoid,
|
|
80
|
+
"for IsTransformationMonoid and a semigroup",
|
|
81
|
+
[IsTransformationMonoid, IsSemigroup],
|
|
82
|
+
{filt, S} -> IsomorphismTransformationMonoid(S));
|
|
83
|
+
|
|
84
|
+
# TODO(later) AntiIsomorphismTransformationSemigroup using LeftCayleyGraph
|
|
85
|
+
|
|
86
|
+
InstallMethod(IsomorphismTransformationSemigroup,
|
|
87
|
+
"for a semigroup with CanUseFroidurePin",
|
|
88
|
+
[CanUseFroidurePin],
|
|
89
|
+
ToBeat([CanUseFroidurePin], [IsFpMonoid]),
|
|
90
|
+
function(S)
|
|
91
|
+
local cay, deg, gen, next, T, i, iso, inv;
|
|
92
|
+
if not IsFinite(S) then
|
|
93
|
+
ErrorNoReturn("the argument (a semigroup) is not finite");
|
|
94
|
+
elif IsPartialPermSemigroup(S) or IsTransformationSemigroup(S) then
|
|
95
|
+
# Apparently this clause is required in GAP 4.10
|
|
96
|
+
TryNextMethod();
|
|
97
|
+
fi;
|
|
98
|
+
|
|
99
|
+
cay := OutNeighbours(RightCayleyDigraph(S));
|
|
100
|
+
deg := Size(S);
|
|
101
|
+
gen := [];
|
|
102
|
+
|
|
103
|
+
for i in [1 .. Length(cay[1])] do
|
|
104
|
+
next := List([1 .. deg], j -> cay[j][i]);
|
|
105
|
+
if MultiplicativeNeutralElement(S) = fail then
|
|
106
|
+
Add(next, i);
|
|
107
|
+
fi;
|
|
108
|
+
Add(gen, Transformation(next));
|
|
109
|
+
od;
|
|
110
|
+
|
|
111
|
+
T := Semigroup(gen);
|
|
112
|
+
UseIsomorphismRelation(S, T);
|
|
113
|
+
|
|
114
|
+
iso := x -> EvaluateWord(gen, MinimalFactorization(S, x));
|
|
115
|
+
inv := x -> EvaluateWord(GeneratorsOfSemigroup(S), Factorization(T, x));
|
|
116
|
+
|
|
117
|
+
return SemigroupIsomorphismByFunctionNC(S, T, iso, inv);
|
|
118
|
+
end);
|
|
119
|
+
|
|
120
|
+
InstallMethod(IsomorphismTransformationSemigroup,
|
|
121
|
+
"for a boolean matrix semigroup with generators",
|
|
122
|
+
[IsBooleanMatSemigroup and HasGeneratorsOfSemigroup],
|
|
123
|
+
SUM_FLAGS,
|
|
124
|
+
function(S)
|
|
125
|
+
local T, map, inv, n, pts, o, pos, i;
|
|
126
|
+
n := Length(Representative(S)![1]);
|
|
127
|
+
if ForAll(GeneratorsOfSemigroup(S), IsTransformationBooleanMat) then
|
|
128
|
+
T := Semigroup(List(GeneratorsOfSemigroup(S), AsTransformation));
|
|
129
|
+
map := AsTransformation;
|
|
130
|
+
inv := x -> AsBooleanMat(x, n);
|
|
131
|
+
else
|
|
132
|
+
pts := [];
|
|
133
|
+
for i in [1 .. n] do
|
|
134
|
+
o := Enumerate(Orb(S, BlistList([1 .. n], [i]), OnBlist));
|
|
135
|
+
pts := Union(pts, AsList(o));
|
|
136
|
+
od;
|
|
137
|
+
pos := List([1 .. n], x -> Position(pts, BlistList([1 .. n], [x])));
|
|
138
|
+
T := Semigroup(List(GeneratorsOfSemigroup(S),
|
|
139
|
+
x -> TransformationOpNC(x, pts, OnBlist)));
|
|
140
|
+
map := x -> TransformationOpNC(x, pts, OnBlist);
|
|
141
|
+
inv := x -> BooleanMat(List([1 .. n], i -> pts[pos[i] ^ x]));
|
|
142
|
+
fi;
|
|
143
|
+
UseIsomorphismRelation(S, T);
|
|
144
|
+
|
|
145
|
+
return SemigroupIsomorphismByFunctionNC(S, T, map, inv);
|
|
146
|
+
end);
|
|
147
|
+
|
|
148
|
+
InstallMethod(IsomorphismTransformationSemigroup,
|
|
149
|
+
"for a bipartition semigroup with generators",
|
|
150
|
+
[IsBipartitionSemigroup and HasGeneratorsOfSemigroup],
|
|
151
|
+
function(S)
|
|
152
|
+
local T, n;
|
|
153
|
+
|
|
154
|
+
if not ForAll(GeneratorsOfSemigroup(S), IsTransBipartition) then
|
|
155
|
+
TryNextMethod();
|
|
156
|
+
fi;
|
|
157
|
+
|
|
158
|
+
T := Semigroup(List(GeneratorsOfSemigroup(S), AsTransformation));
|
|
159
|
+
n := DegreeOfBipartitionSemigroup(S);
|
|
160
|
+
UseIsomorphismRelation(S, T);
|
|
161
|
+
|
|
162
|
+
return SemigroupIsomorphismByFunctionNC(S,
|
|
163
|
+
T,
|
|
164
|
+
AsTransformation,
|
|
165
|
+
x -> AsBipartition(x, n));
|
|
166
|
+
end);
|
|
167
|
+
|
|
168
|
+
InstallMethod(IsomorphismTransformationSemigroup,
|
|
169
|
+
"for semigroup of binary relations with generators",
|
|
170
|
+
[IsSemigroup and IsGeneralMappingCollection and HasGeneratorsOfSemigroup],
|
|
171
|
+
function(S)
|
|
172
|
+
local n, pts, o, pos, T, map, inv, i;
|
|
173
|
+
|
|
174
|
+
if not IsBinaryRelationOnPointsRep(Representative(S)) then
|
|
175
|
+
TryNextMethod();
|
|
176
|
+
fi;
|
|
177
|
+
n := DegreeOfBinaryRelation(GeneratorsOfSemigroup(S)[1]);
|
|
178
|
+
pts := EmptyPlist(2 ^ n);
|
|
179
|
+
|
|
180
|
+
for i in [1 .. n] do
|
|
181
|
+
o := Orb(S, [i], OnPoints);
|
|
182
|
+
Enumerate(o);
|
|
183
|
+
pts := Union(pts, AsList(o));
|
|
184
|
+
od;
|
|
185
|
+
ShrinkAllocationPlist(pts);
|
|
186
|
+
pos := List([1 .. n], x -> Position(pts, [x]));
|
|
187
|
+
T := Semigroup(List(GeneratorsOfSemigroup(S),
|
|
188
|
+
x -> TransformationOpNC(x, pts, OnPoints)));
|
|
189
|
+
|
|
190
|
+
map := x -> TransformationOpNC(x, pts, OnPoints);
|
|
191
|
+
inv := x -> BinaryRelationOnPoints(List([1 .. n], i -> pts[pos[i] ^ x]));
|
|
192
|
+
return SemigroupIsomorphismByFunctionNC(S, T, map, inv);
|
|
193
|
+
end);
|
|
194
|
+
|
|
195
|
+
# The next method is copied directly from the GAP library the only change is
|
|
196
|
+
# the return value which uses SemigroupIsomorphismByFunctionNC here but
|
|
197
|
+
# MagmaIsomorphismByFunctionsNC in the GAP library.
|
|
198
|
+
|
|
199
|
+
InstallMethod(IsomorphismTransformationMonoid, "for a semigroup",
|
|
200
|
+
[IsSemigroup],
|
|
201
|
+
1, # to beat the GAP library version
|
|
202
|
+
function(S)
|
|
203
|
+
local iso1, inv1, iso2, inv2;
|
|
204
|
+
if MultiplicativeNeutralElement(S) = fail then
|
|
205
|
+
ErrorNoReturn("the argument must be a semigroup with a ",
|
|
206
|
+
"multiplicative neutral element");
|
|
207
|
+
fi;
|
|
208
|
+
iso1 := IsomorphismTransformationSemigroup(S);
|
|
209
|
+
inv1 := InverseGeneralMapping(iso1);
|
|
210
|
+
iso2 := IsomorphismTransformationMonoid(Range(iso1));
|
|
211
|
+
inv2 := InverseGeneralMapping(iso2);
|
|
212
|
+
UseIsomorphismRelation(S, Range(iso2));
|
|
213
|
+
return SemigroupIsomorphismByFunctionNC(S,
|
|
214
|
+
Range(iso2),
|
|
215
|
+
x -> (x ^ iso1) ^ iso2,
|
|
216
|
+
x -> (x ^ inv2) ^ inv1);
|
|
217
|
+
end);
|
|
218
|
+
|
|
219
|
+
# The next method is copied directly from the GAP library the only change is
|
|
220
|
+
# the return value which uses SemigroupIsomorphismByFunctionNC here but
|
|
221
|
+
# MagmaIsomorphismByFunctionsNC in the GAP library.
|
|
222
|
+
|
|
223
|
+
InstallMethod(IsomorphismTransformationMonoid,
|
|
224
|
+
"for a transformation semigroup with known generators",
|
|
225
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
226
|
+
1, # to beat the GAP library version
|
|
227
|
+
function(S)
|
|
228
|
+
local id, dom, T, inv;
|
|
229
|
+
if IsMonoid(S) then
|
|
230
|
+
return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc);
|
|
231
|
+
elif MultiplicativeNeutralElement(S) = fail then
|
|
232
|
+
ErrorNoReturn("the argument must be a semigroup with a ",
|
|
233
|
+
"multiplicative neutral element");
|
|
234
|
+
fi;
|
|
235
|
+
id := MultiplicativeNeutralElement(S);
|
|
236
|
+
dom := ImageSetOfTransformation(id, DegreeOfTransformationSemigroup(S));
|
|
237
|
+
T := Monoid(List(GeneratorsOfSemigroup(S), x -> TransformationOp(x, dom)));
|
|
238
|
+
UseIsomorphismRelation(S, T);
|
|
239
|
+
inv := function(x)
|
|
240
|
+
local out, i;
|
|
241
|
+
out := [1 .. DegreeOfTransformationSemigroup(S)];
|
|
242
|
+
for i in [1 .. Length(dom)] do
|
|
243
|
+
out[dom[i]] := dom[i ^ x];
|
|
244
|
+
od;
|
|
245
|
+
return id * Transformation(out);
|
|
246
|
+
end;
|
|
247
|
+
return SemigroupIsomorphismByFunctionNC(S,
|
|
248
|
+
T,
|
|
249
|
+
x -> TransformationOp(x, dom),
|
|
250
|
+
inv);
|
|
251
|
+
end);
|
|
252
|
+
|
|
253
|
+
# The next method is copied directly from the GAP library the only change is
|
|
254
|
+
# the return value which uses SemigroupIsomorphismByFunctionNC here but
|
|
255
|
+
# MagmaIsomorphismByFunctionsNC in the GAP library.
|
|
256
|
+
|
|
257
|
+
InstallMethod(IsomorphismTransformationSemigroup, "for partial perm semigroup",
|
|
258
|
+
[IsPartialPermSemigroup],
|
|
259
|
+
function(S)
|
|
260
|
+
local n, T, inv;
|
|
261
|
+
|
|
262
|
+
n := Maximum(DegreeOfPartialPermCollection(S),
|
|
263
|
+
CodegreeOfPartialPermCollection(S)) + 1;
|
|
264
|
+
|
|
265
|
+
T := Semigroup(List(GeneratorsOfSemigroup(S), x -> AsTransformation(x, n)));
|
|
266
|
+
UseIsomorphismRelation(S, T);
|
|
267
|
+
|
|
268
|
+
inv := function(x)
|
|
269
|
+
local out, j, i;
|
|
270
|
+
out := [];
|
|
271
|
+
for i in [1 .. n - 1] do
|
|
272
|
+
j := i ^ x;
|
|
273
|
+
if j <> n then
|
|
274
|
+
out[i] := j;
|
|
275
|
+
else
|
|
276
|
+
out[i] := 0;
|
|
277
|
+
fi;
|
|
278
|
+
od;
|
|
279
|
+
return PartialPerm(out);
|
|
280
|
+
end;
|
|
281
|
+
|
|
282
|
+
return SemigroupIsomorphismByFunctionNC(S,
|
|
283
|
+
T,
|
|
284
|
+
x -> AsTransformation(x, n),
|
|
285
|
+
inv);
|
|
286
|
+
end);
|
|
287
|
+
|
|
288
|
+
#############################################################################
|
|
289
|
+
## Algebraic attributes
|
|
290
|
+
#############################################################################
|
|
291
|
+
|
|
292
|
+
# same method for ideals
|
|
293
|
+
|
|
294
|
+
InstallMethod(GroupOfUnits, "for a transformation semigroup",
|
|
295
|
+
[IsTransformationSemigroup],
|
|
296
|
+
function(S)
|
|
297
|
+
local H, map, G, U, iso;
|
|
298
|
+
|
|
299
|
+
if MultiplicativeNeutralElement(S) = fail then
|
|
300
|
+
return fail;
|
|
301
|
+
fi;
|
|
302
|
+
|
|
303
|
+
H := GreensHClassOfElementNC(S, MultiplicativeNeutralElement(S));
|
|
304
|
+
map := InverseGeneralMapping(IsomorphismPermGroup(H));
|
|
305
|
+
G := Source(map);
|
|
306
|
+
U := Semigroup(List(GeneratorsOfGroup(G), x -> x ^ map));
|
|
307
|
+
SetIsGroupAsSemigroup(U, true);
|
|
308
|
+
UseIsomorphismRelation(U, G);
|
|
309
|
+
|
|
310
|
+
iso := SemigroupIsomorphismByFunctionNC(U,
|
|
311
|
+
G,
|
|
312
|
+
PermutationOfImage,
|
|
313
|
+
x -> x ^ map);
|
|
314
|
+
SetIsomorphismPermGroup(U, iso);
|
|
315
|
+
|
|
316
|
+
return U;
|
|
317
|
+
end);
|
|
318
|
+
|
|
319
|
+
# can probably do better than this
|
|
320
|
+
|
|
321
|
+
InstallMethod(Idempotents, "for a transformation semigroup and pos int",
|
|
322
|
+
[IsTransformationSemigroup, IsPosInt],
|
|
323
|
+
function(S, rank)
|
|
324
|
+
local deg;
|
|
325
|
+
deg := DegreeOfTransformationSemigroup(S);
|
|
326
|
+
if rank > deg then
|
|
327
|
+
return [];
|
|
328
|
+
fi;
|
|
329
|
+
return Filtered(Idempotents(S),
|
|
330
|
+
x -> RankOfTransformation(x, deg) = rank);
|
|
331
|
+
end);
|
|
332
|
+
|
|
333
|
+
#############################################################################
|
|
334
|
+
## Degree
|
|
335
|
+
#############################################################################
|
|
336
|
+
|
|
337
|
+
InstallMethod(DegreeOfTransformationCollection,
|
|
338
|
+
"for a transformation semigroup",
|
|
339
|
+
[IsTransformationSemigroup], DegreeOfTransformationSemigroup);
|
|
340
|
+
|
|
341
|
+
InstallMethod(DegreeOfTransformationSemigroup,
|
|
342
|
+
"for a transformation semigroup ideal",
|
|
343
|
+
[IsTransformationSemigroup and IsSemigroupIdeal],
|
|
344
|
+
{I} -> DegreeOfTransformationSemigroup(SupersemigroupOfIdeal(I)));
|
|
345
|
+
|
|
346
|
+
#############################################################################
|
|
347
|
+
## Action on points and pairs
|
|
348
|
+
#############################################################################
|
|
349
|
+
|
|
350
|
+
InstallMethod(DigraphOfAction,
|
|
351
|
+
"for a transformation collection, list, and action",
|
|
352
|
+
[IsTransformationCollection, IsList, IsFunction],
|
|
353
|
+
function(coll, list, act)
|
|
354
|
+
local n, map, out, in_, labels, genstoapply, i, y, index, D, j;
|
|
355
|
+
|
|
356
|
+
# TODO(later) arg checks
|
|
357
|
+
|
|
358
|
+
n := Length(list);
|
|
359
|
+
if n = 0 then
|
|
360
|
+
return EmptyDigraph(n);
|
|
361
|
+
fi;
|
|
362
|
+
|
|
363
|
+
map := HashMap(Length(list));
|
|
364
|
+
for i in [1 .. Length(list)] do
|
|
365
|
+
map[list[i]] := i;
|
|
366
|
+
od;
|
|
367
|
+
|
|
368
|
+
# We track the out-neighbours and in-neighbours because at least one
|
|
369
|
+
# application (finding the representative of the minimal ideal) requires
|
|
370
|
+
# this.
|
|
371
|
+
out := List([1 .. n], x -> []);
|
|
372
|
+
in_ := List([1 .. n], x -> []);
|
|
373
|
+
labels := List([1 .. n], x -> []);
|
|
374
|
+
genstoapply := [1 .. Length(coll)];
|
|
375
|
+
|
|
376
|
+
i := 1;
|
|
377
|
+
repeat
|
|
378
|
+
for j in genstoapply do
|
|
379
|
+
y := act(list[i], coll[j]);
|
|
380
|
+
if y <> fail then
|
|
381
|
+
index := map[y];
|
|
382
|
+
if index = fail then
|
|
383
|
+
n := n + 1;
|
|
384
|
+
list[n] := y;
|
|
385
|
+
map[y] := n;
|
|
386
|
+
Add(out, []);
|
|
387
|
+
Add(in_, []);
|
|
388
|
+
Add(labels, []);
|
|
389
|
+
index := n;
|
|
390
|
+
fi;
|
|
391
|
+
if not i in in_[index] then
|
|
392
|
+
Add(out[i], index);
|
|
393
|
+
Add(in_[index], i);
|
|
394
|
+
Add(labels[i], j);
|
|
395
|
+
fi;
|
|
396
|
+
fi;
|
|
397
|
+
od;
|
|
398
|
+
i := i + 1;
|
|
399
|
+
until i > n;
|
|
400
|
+
|
|
401
|
+
D := DigraphNC(out);
|
|
402
|
+
SetDigraphVertexLabels(D, list);
|
|
403
|
+
SetDigraphEdgeLabelsNC(D, labels);
|
|
404
|
+
SetInNeighbours(D, in_);
|
|
405
|
+
return D;
|
|
406
|
+
end);
|
|
407
|
+
|
|
408
|
+
InstallMethod(DigraphOfAction,
|
|
409
|
+
"for a transformation semigroup with generators, list, and action",
|
|
410
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsList, IsFunction],
|
|
411
|
+
{S, list, act} -> DigraphOfAction(GeneratorsOfSemigroup(S), list, act));
|
|
412
|
+
|
|
413
|
+
InstallMethod(DigraphOfActionOnPoints,
|
|
414
|
+
"for a transformation collection and int",
|
|
415
|
+
[IsTransformationCollection, IsInt],
|
|
416
|
+
function(coll, n)
|
|
417
|
+
local act;
|
|
418
|
+
|
|
419
|
+
if n < 0 then
|
|
420
|
+
ErrorNoReturn("the 2nd argument (an integer) must be non-negative");
|
|
421
|
+
fi;
|
|
422
|
+
|
|
423
|
+
act := function(pt, x)
|
|
424
|
+
local y;
|
|
425
|
+
y := OnPoints(pt, x);
|
|
426
|
+
if y >= 1 and y <= n then
|
|
427
|
+
return y;
|
|
428
|
+
fi;
|
|
429
|
+
return fail;
|
|
430
|
+
end;
|
|
431
|
+
|
|
432
|
+
return DigraphOfAction(coll, [1 .. n], act);
|
|
433
|
+
end);
|
|
434
|
+
|
|
435
|
+
InstallMethod(DigraphOfActionOnPoints,
|
|
436
|
+
"for a transformation semigroup with known generators and int",
|
|
437
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsInt],
|
|
438
|
+
{S, n} -> DigraphOfActionOnPoints(GeneratorsOfSemigroup(S), n));
|
|
439
|
+
|
|
440
|
+
InstallMethod(DigraphOfActionOnPoints,
|
|
441
|
+
"for a transformation semigroup with known generators",
|
|
442
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
443
|
+
S -> DigraphOfActionOnPoints(S, DegreeOfTransformationSemigroup(S)));
|
|
444
|
+
|
|
445
|
+
InstallMethod(FixedPointsOfTransformationSemigroup,
|
|
446
|
+
"for a transformation semigroup with generators",
|
|
447
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
448
|
+
function(S)
|
|
449
|
+
local n, gens;
|
|
450
|
+
n := DegreeOfTransformationSemigroup(S);
|
|
451
|
+
gens := GeneratorsOfSemigroup(S);
|
|
452
|
+
return Filtered([1 .. n], i -> ForAll(gens, x -> i ^ x = i));
|
|
453
|
+
end);
|
|
454
|
+
|
|
455
|
+
InstallMethod(MovedPoints, "for a transformation semigroup with generators",
|
|
456
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
457
|
+
function(S)
|
|
458
|
+
return Difference([1 .. DegreeOfTransformationSemigroup(S)],
|
|
459
|
+
FixedPointsOfTransformationSemigroup(S));
|
|
460
|
+
end);
|
|
461
|
+
|
|
462
|
+
InstallMethod(IsConnectedTransformationSemigroup,
|
|
463
|
+
"for a transformation semigroup",
|
|
464
|
+
[IsTransformationSemigroup],
|
|
465
|
+
{S} -> IsConnectedDigraph(DigraphOfActionOnPoints(S)));
|
|
466
|
+
|
|
467
|
+
InstallMethod(IsTransitive,
|
|
468
|
+
"for a transformation collection and a positive int",
|
|
469
|
+
[IsTransformationCollection, IsPosInt],
|
|
470
|
+
{coll, n} -> IsStronglyConnectedDigraph(DigraphOfActionOnPoints(coll, n)));
|
|
471
|
+
|
|
472
|
+
InstallMethod(IsTransitive,
|
|
473
|
+
"for a transformation collection and homog. list",
|
|
474
|
+
[IsTransformationCollection, IsHomogeneousList],
|
|
475
|
+
function(coll, set)
|
|
476
|
+
local n, p;
|
|
477
|
+
# The check for IsSSortedList is here because <set> might be strictly sorted
|
|
478
|
+
# but not know it.
|
|
479
|
+
if not (IsPosInt(set[1]) and IsSSortedList(set)) then
|
|
480
|
+
ErrorNoReturn("the 2nd argument (a list) must be a set of positive ",
|
|
481
|
+
"integers");
|
|
482
|
+
fi;
|
|
483
|
+
|
|
484
|
+
n := Length(set);
|
|
485
|
+
p := MappingPermListList(set, [1 .. n]);
|
|
486
|
+
return IsTransitive(coll ^ p, n);
|
|
487
|
+
end);
|
|
488
|
+
|
|
489
|
+
InstallMethod(IsTransitive,
|
|
490
|
+
"for a transformation semigroup with generators and a pos. int.",
|
|
491
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsPosInt],
|
|
492
|
+
{S, n} -> IsTransitive(GeneratorsOfSemigroup(S), n));
|
|
493
|
+
|
|
494
|
+
InstallMethod(IsTransitive,
|
|
495
|
+
"for a transformation semigroup with generators",
|
|
496
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
497
|
+
{S} -> IsTransitive(S, DegreeOfTransformationSemigroup(S)));
|
|
498
|
+
|
|
499
|
+
InstallMethod(IsTransitive,
|
|
500
|
+
"for a transformation semigroup with generators and a list",
|
|
501
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsList],
|
|
502
|
+
{S, set} -> IsTransitive(GeneratorsOfSemigroup(S), set));
|
|
503
|
+
|
|
504
|
+
InstallMethod(ComponentRepsOfTransformationSemigroup,
|
|
505
|
+
"for a transformation semigroup", [IsTransformationSemigroup],
|
|
506
|
+
ComponentRepresentatives);
|
|
507
|
+
|
|
508
|
+
InstallMethod(ComponentsOfTransformationSemigroup,
|
|
509
|
+
"for a transformation semigroup", [IsTransformationSemigroup],
|
|
510
|
+
{S} -> DigraphConnectedComponents(DigraphOfActionOnPoints(S)).comps);
|
|
511
|
+
|
|
512
|
+
InstallMethod(CyclesOfTransformationSemigroup,
|
|
513
|
+
"for a transformation semigroup", [IsTransformationSemigroup],
|
|
514
|
+
{S} -> DigraphStronglyConnectedComponents(DigraphOfActionOnPoints(S)).comps);
|
|
515
|
+
|
|
516
|
+
InstallMethod(RepresentativeOfMinimalIdealNC,
|
|
517
|
+
"for a transformation semigroup with known generators",
|
|
518
|
+
[IsTransformationSemigroup and HasGeneratorsOfSemigroup],
|
|
519
|
+
RankFilter(IsActingSemigroup),
|
|
520
|
+
# to beat the default method for acting semigroups
|
|
521
|
+
function(S)
|
|
522
|
+
local n, result, rank, image, labels, D, squashable, paths, seen, neighbours,
|
|
523
|
+
map, nothing_squashed, pos, x, y, i, pair;
|
|
524
|
+
|
|
525
|
+
n := DegreeOfTransformationSemigroup(S);
|
|
526
|
+
result := Product(GeneratorsOfSemigroup(S));
|
|
527
|
+
rank := RankOfTransformation(result, n);
|
|
528
|
+
|
|
529
|
+
# Take the product of the generators is an arbitrary choice, the aim is to
|
|
530
|
+
# try to find a smallish set to use to generate the nodes in the digraph
|
|
531
|
+
# below, and also we might get lucky and find that the product of the
|
|
532
|
+
# generators is of rank 1 or n, in which case we can stop right away.
|
|
533
|
+
|
|
534
|
+
if rank = n then
|
|
535
|
+
SetIsGroupAsSemigroup(S, true);
|
|
536
|
+
return result;
|
|
537
|
+
elif rank = 1 then
|
|
538
|
+
return result;
|
|
539
|
+
elif HasSize(S) and Size(S) < Binomial(n, 2) then
|
|
540
|
+
TryNextMethod();
|
|
541
|
+
elif HasLambdaOrb(S) and IsClosedOrbit(LambdaOrb(S)) then
|
|
542
|
+
TryNextMethod();
|
|
543
|
+
fi;
|
|
544
|
+
|
|
545
|
+
# Form the digraph of action on points and pairs of points inside the image
|
|
546
|
+
# set of the product of the generators. If n is very large, then it isn't
|
|
547
|
+
# feasible to create a digraph with O(n ^ 2) vertices, so we use the image
|
|
548
|
+
# set of the product of the generators in the hope that this is smaller.
|
|
549
|
+
image := ImageSetOfTransformation(result, n);
|
|
550
|
+
labels := List(ImageSetOfTransformation(result, n), x -> [x]);
|
|
551
|
+
Append(labels, Combinations(ImageSetOfTransformation(result, n), 2));
|
|
552
|
+
D := DigraphOfAction(S, labels, OnSets);
|
|
553
|
+
|
|
554
|
+
# Perform a bfs through the reverse of the digraph D to find all those "pair"
|
|
555
|
+
# nodes from which a "point" node is reachable, and to find the edge labels
|
|
556
|
+
# of the path from the "pair" node to the "point" node. When such paths are
|
|
557
|
+
# known we can squash all possible pairs of points in the image of <result>
|
|
558
|
+
# into single points.
|
|
559
|
+
|
|
560
|
+
# Sets of size 1 are squashable!
|
|
561
|
+
squashable := PositionsProperty(DigraphVertexLabels(D),
|
|
562
|
+
x -> Size(x) = 1);
|
|
563
|
+
paths := [];
|
|
564
|
+
paths{squashable} := List([1 .. Length(squashable)], x -> []);
|
|
565
|
+
seen := BlistList(DigraphVertices(D), squashable);
|
|
566
|
+
|
|
567
|
+
for x in squashable do
|
|
568
|
+
neighbours := InNeighboursOfVertex(D, x);
|
|
569
|
+
for y in neighbours do
|
|
570
|
+
if not seen[y] then
|
|
571
|
+
seen[y] := true;
|
|
572
|
+
Add(squashable, y);
|
|
573
|
+
paths[y] := Concatenation([DigraphEdgeLabel(D, y, x)], paths[x]);
|
|
574
|
+
fi;
|
|
575
|
+
od;
|
|
576
|
+
od;
|
|
577
|
+
|
|
578
|
+
# The labels may have changed because ActionDigraph may generate additional
|
|
579
|
+
# nodes, so we must renew the labels.
|
|
580
|
+
labels := Filtered(DigraphVertices(D),
|
|
581
|
+
i -> Size(DigraphVertexLabel(D, i)) = 2
|
|
582
|
+
and IsBound(paths[i]));
|
|
583
|
+
if IsEmpty(labels) then
|
|
584
|
+
# This means there are no paths from any pair of points in the image of
|
|
585
|
+
# result that can be collapsed.
|
|
586
|
+
return result;
|
|
587
|
+
fi;
|
|
588
|
+
paths := paths{labels};
|
|
589
|
+
labels := DigraphVertexLabels(D){labels};
|
|
590
|
+
map := HashMap(Length(labels));
|
|
591
|
+
for i in [1 .. Length(labels)] do
|
|
592
|
+
map[labels[i]] := i;
|
|
593
|
+
od;
|
|
594
|
+
|
|
595
|
+
# Form an element of the semigroup that squashes every possible pair of
|
|
596
|
+
# points in the image of <result>.
|
|
597
|
+
repeat
|
|
598
|
+
nothing_squashed := true;
|
|
599
|
+
for pair in IteratorOfCombinations(image, 2) do
|
|
600
|
+
# To ensure that every pair is eventually squashed, we have to see where
|
|
601
|
+
# the pair has ended up under result.
|
|
602
|
+
pair := OnSets(pair, result);
|
|
603
|
+
if Size(pair) = 1 then
|
|
604
|
+
result := result * result;
|
|
605
|
+
image := ImageSetOfTransformation(result, n);
|
|
606
|
+
nothing_squashed := false;
|
|
607
|
+
break;
|
|
608
|
+
fi;
|
|
609
|
+
pos := map[pair];
|
|
610
|
+
if pos <> fail then
|
|
611
|
+
result := result * EvaluateWord(GeneratorsOfSemigroup(S), paths[pos]);
|
|
612
|
+
image := ImageSetOfTransformation(result, n);
|
|
613
|
+
nothing_squashed := false;
|
|
614
|
+
break;
|
|
615
|
+
fi;
|
|
616
|
+
od;
|
|
617
|
+
until nothing_squashed or Size(image) = 1;
|
|
618
|
+
return result;
|
|
619
|
+
end);
|
|
620
|
+
|
|
621
|
+
# same method for ideals
|
|
622
|
+
|
|
623
|
+
InstallMethod(IsSynchronizingSemigroup, "for a transformation semigroup",
|
|
624
|
+
[IsTransformationSemigroup],
|
|
625
|
+
function(S)
|
|
626
|
+
local N;
|
|
627
|
+
N := DegreeOfTransformationSemigroup(S);
|
|
628
|
+
if N = 0 then
|
|
629
|
+
return false;
|
|
630
|
+
elif HasMultiplicativeZero(S) and MultiplicativeZero(S) <> fail then
|
|
631
|
+
return RankOfTransformation(MultiplicativeZero(S), N) = 1;
|
|
632
|
+
else
|
|
633
|
+
return RankOfTransformation(RepresentativeOfMinimalIdeal(S), N) = 1;
|
|
634
|
+
fi;
|
|
635
|
+
end);
|
|
636
|
+
|
|
637
|
+
#############################################################################
|
|
638
|
+
## Smallest, largest element
|
|
639
|
+
#############################################################################
|
|
640
|
+
|
|
641
|
+
BindGlobal("SEMIGROUPS_SmallestLargestElementRClass",
|
|
642
|
+
function(R, BaseModifier, Cmp)
|
|
643
|
+
local o, m, rep, n, base1, S, out, scc, gens, y, base2, p, x, i;
|
|
644
|
+
|
|
645
|
+
if Size(R) = 1 then
|
|
646
|
+
return Representative(R);
|
|
647
|
+
fi;
|
|
648
|
+
|
|
649
|
+
o := LambdaOrb(R);
|
|
650
|
+
m := LambdaOrbSCCIndex(R);
|
|
651
|
+
rep := Representative(R);
|
|
652
|
+
n := DegreeOfTransformationSemigroup(Parent(R));
|
|
653
|
+
base1 := BaseModifier(DuplicateFreeList(ImageListOfTransformation(rep, n)));
|
|
654
|
+
S := StabChainOp(LambdaOrbSchutzGp(o, m), rec(base := base1));
|
|
655
|
+
out := rep * LargestElementStabChain(S, ());
|
|
656
|
+
scc := OrbSCC(o)[m];
|
|
657
|
+
gens := o!.gens;
|
|
658
|
+
|
|
659
|
+
for i in [2 .. Length(scc)] do
|
|
660
|
+
y := rep * EvaluateWord(gens,
|
|
661
|
+
TraceSchreierTreeOfSCCForward(o, m, scc[i]));
|
|
662
|
+
base2 := BaseModifier(DuplicateFreeList(ImageListOfTransformation(y, n)));
|
|
663
|
+
p := MappingPermListList(base1, base2);
|
|
664
|
+
|
|
665
|
+
x := y * LargestElementConjugateStabChain(S, p);
|
|
666
|
+
if Cmp(x, out) then
|
|
667
|
+
out := x;
|
|
668
|
+
fi;
|
|
669
|
+
od;
|
|
670
|
+
|
|
671
|
+
return out;
|
|
672
|
+
end);
|
|
673
|
+
|
|
674
|
+
InstallMethod(LargestElementRClass, "for an R-class of an acting semigroup",
|
|
675
|
+
[IsGreensRClass and IsActingSemigroupGreensClass],
|
|
676
|
+
function(R)
|
|
677
|
+
if not IsTransformationSemigroup(Parent(R)) then
|
|
678
|
+
TryNextMethod();
|
|
679
|
+
fi;
|
|
680
|
+
return SEMIGROUPS_SmallestLargestElementRClass(R, IdFunc, {x, y} -> x > y);
|
|
681
|
+
end);
|
|
682
|
+
|
|
683
|
+
InstallMethod(SmallestElementRClass, "for an R-class of an acting semigroup",
|
|
684
|
+
[IsGreensRClass and IsActingSemigroupGreensClass],
|
|
685
|
+
function(R)
|
|
686
|
+
if not IsTransformationSemigroup(Parent(R)) then
|
|
687
|
+
TryNextMethod();
|
|
688
|
+
fi;
|
|
689
|
+
return SEMIGROUPS_SmallestLargestElementRClass(R, Reversed, \<);
|
|
690
|
+
end);
|
|
691
|
+
|
|
692
|
+
InstallMethod(SmallestElementSemigroup,
|
|
693
|
+
"for an acting transformation semigroup",
|
|
694
|
+
[IsTransformationSemigroup and IsActingSemigroup],
|
|
695
|
+
function(S)
|
|
696
|
+
local n, min;
|
|
697
|
+
|
|
698
|
+
n := DegreeOfTransformationSemigroup(S);
|
|
699
|
+
if n = 0 then
|
|
700
|
+
return IdentityTransformation;
|
|
701
|
+
elif HasAsSSortedList(S) then
|
|
702
|
+
return AsSSortedList(S)[1];
|
|
703
|
+
elif HasEnumeratorSorted(S) then
|
|
704
|
+
return EnumeratorSorted(S)[1];
|
|
705
|
+
fi;
|
|
706
|
+
|
|
707
|
+
min := Minimum(Union(List(GeneratorsOfSemigroup(S),
|
|
708
|
+
x -> ImageSetOfTransformation(x, n))));
|
|
709
|
+
|
|
710
|
+
if ConstantTransformation(n, min) in MinimalIdeal(S) then
|
|
711
|
+
return ConstantTransformation(n, min);
|
|
712
|
+
fi;
|
|
713
|
+
|
|
714
|
+
return Minimum(List(RClasses(S), SmallestElementRClass));
|
|
715
|
+
end);
|
|
716
|
+
|
|
717
|
+
InstallMethod(LargestElementSemigroup, "for an acting transformation semigroup",
|
|
718
|
+
[IsTransformationSemigroup and IsActingSemigroup],
|
|
719
|
+
function(S)
|
|
720
|
+
local n, max;
|
|
721
|
+
|
|
722
|
+
n := DegreeOfTransformationSemigroup(S);
|
|
723
|
+
if n = 0 then
|
|
724
|
+
return IdentityTransformation;
|
|
725
|
+
elif HasAsSSortedList(S) then
|
|
726
|
+
return AsSSortedList(S)[Size(S)];
|
|
727
|
+
elif HasEnumeratorSorted(S) then
|
|
728
|
+
return EnumeratorSorted(S)[Size(S)];
|
|
729
|
+
fi;
|
|
730
|
+
|
|
731
|
+
max := Maximum(Union(List(GeneratorsOfSemigroup(S),
|
|
732
|
+
x -> ImageSetOfTransformation(x, n))));
|
|
733
|
+
|
|
734
|
+
if ConstantTransformation(n, max) in MinimalIdeal(S) then
|
|
735
|
+
return ConstantTransformation(n, max);
|
|
736
|
+
fi;
|
|
737
|
+
|
|
738
|
+
return Maximum(List(RClasses(S), LargestElementRClass));
|
|
739
|
+
end);
|
|
740
|
+
|
|
741
|
+
#############################################################################
|
|
742
|
+
# Constructions (e.g. wreath product)
|
|
743
|
+
#############################################################################
|
|
744
|
+
|
|
745
|
+
InstallMethod(WreathProduct,
|
|
746
|
+
"for a transformation monoid and a permutation group",
|
|
747
|
+
[IsTransformationMonoid, IsPermGroup],
|
|
748
|
+
{M, G} -> WreathProduct(M, AsMonoid(IsTransformationMonoid, G)));
|
|
749
|
+
|
|
750
|
+
InstallMethod(WreathProduct,
|
|
751
|
+
"for a permutation group and a transformation semigroup",
|
|
752
|
+
[IsPermGroup, IsTransformationSemigroup],
|
|
753
|
+
{G, S} -> WreathProduct(AsMonoid(IsTransformationMonoid, G), S));
|
|
754
|
+
|
|
755
|
+
InstallMethod(WreathProduct,
|
|
756
|
+
"for a transformation monoid and a transformation semigroup",
|
|
757
|
+
[IsTransformationMonoid, IsTransformationSemigroup],
|
|
758
|
+
function(M, S)
|
|
759
|
+
local m, gensM, gensS, orbs, n, rimage, maps, next, gen1, newmap, x, y, s, i;
|
|
760
|
+
|
|
761
|
+
if not IsMonoidAsSemigroup(S) then
|
|
762
|
+
ErrorNoReturn("the 2nd argument (a transformation semigroup) ",
|
|
763
|
+
"should be a monoid (as semigroup)");
|
|
764
|
+
fi;
|
|
765
|
+
|
|
766
|
+
m := DegreeOfTransformationCollection(M);
|
|
767
|
+
|
|
768
|
+
gensM := List(GeneratorsOfMonoid(M), x -> ImageListOfTransformation(x, m));
|
|
769
|
+
gensS := GeneratorsOfSemigroup(S);
|
|
770
|
+
|
|
771
|
+
orbs := List(ComponentsOfTransformationSemigroup(S), Minimum);
|
|
772
|
+
n := DegreeOfTransformationCollection(S);
|
|
773
|
+
rimage := [1 .. n];
|
|
774
|
+
|
|
775
|
+
for x in orbs do
|
|
776
|
+
for y in gensS do
|
|
777
|
+
RemoveSet(rimage, x ^ y);
|
|
778
|
+
od;
|
|
779
|
+
od;
|
|
780
|
+
|
|
781
|
+
maps := []; # final generating set for the wreath product
|
|
782
|
+
|
|
783
|
+
# move copies of M as by the action induced by S
|
|
784
|
+
next := [1 .. m * n];
|
|
785
|
+
for s in gensS do
|
|
786
|
+
for i in [1 .. n] do
|
|
787
|
+
next{[1 .. m] + (i - 1) * m} := [1 .. m] + (i ^ s - 1) * m;
|
|
788
|
+
od;
|
|
789
|
+
Add(maps, Transformation(next));
|
|
790
|
+
od;
|
|
791
|
+
|
|
792
|
+
gen1 := gensS[1];
|
|
793
|
+
for i in orbs do
|
|
794
|
+
newmap := ShallowCopy(ImageListOfTransformation(maps[1], m * n));
|
|
795
|
+
for x in gensM do
|
|
796
|
+
newmap{[1 .. m] + (i - 1) * m} := x + (i ^ gen1 - 1) * m;
|
|
797
|
+
Add(maps, Transformation(newmap));
|
|
798
|
+
od;
|
|
799
|
+
od;
|
|
800
|
+
|
|
801
|
+
for i in rimage do
|
|
802
|
+
newmap := OnTuples([1 .. m * n], maps[1]);
|
|
803
|
+
for x in gensM do
|
|
804
|
+
newmap{[1 .. m] + (i - 1) * m} := x + (i ^ gen1 - 1) * m;
|
|
805
|
+
Add(maps, Transformation(newmap));
|
|
806
|
+
od;
|
|
807
|
+
od;
|
|
808
|
+
|
|
809
|
+
return Semigroup(maps);
|
|
810
|
+
end);
|
|
811
|
+
|
|
812
|
+
#############################################################################
|
|
813
|
+
# Endomorphisms of digraphs
|
|
814
|
+
#############################################################################
|
|
815
|
+
|
|
816
|
+
InstallMethod(EndomorphismMonoid, "for a digraph", [IsDigraph],
|
|
817
|
+
function(digraph)
|
|
818
|
+
local hook, S;
|
|
819
|
+
|
|
820
|
+
if HasGeneratorsOfEndomorphismMonoidAttr(digraph)
|
|
821
|
+
or SEMIGROUPS.DefaultOptionsRec.acting = false then
|
|
822
|
+
return Monoid(GeneratorsOfEndomorphismMonoidAttr(digraph),
|
|
823
|
+
rec(small := true));
|
|
824
|
+
fi;
|
|
825
|
+
|
|
826
|
+
S := [AsMonoid(IsTransformationMonoid, AutomorphismGroup(digraph))];
|
|
827
|
+
|
|
828
|
+
hook := function(S, f)
|
|
829
|
+
S[1] := ClosureMonoid(S[1], f);
|
|
830
|
+
end;
|
|
831
|
+
|
|
832
|
+
return HomomorphismDigraphsFinder(digraph,
|
|
833
|
+
digraph,
|
|
834
|
+
hook,
|
|
835
|
+
S,
|
|
836
|
+
infinity,
|
|
837
|
+
fail,
|
|
838
|
+
false,
|
|
839
|
+
DigraphVertices(digraph),
|
|
840
|
+
[],
|
|
841
|
+
fail,
|
|
842
|
+
fail)[1];
|
|
843
|
+
end);
|
|
844
|
+
|
|
845
|
+
InstallMethod(EndomorphismMonoid, "for a digraph and a homogeneous list",
|
|
846
|
+
[IsDigraph, IsHomogeneousList],
|
|
847
|
+
function(digraph, colors)
|
|
848
|
+
local hook, S;
|
|
849
|
+
|
|
850
|
+
hook := function(S, f)
|
|
851
|
+
S[1] := ClosureSemigroup(S[1], f);
|
|
852
|
+
end;
|
|
853
|
+
|
|
854
|
+
S := [AsMonoid(IsTransformationMonoid,
|
|
855
|
+
AutomorphismGroup(digraph, colors))];
|
|
856
|
+
|
|
857
|
+
return HomomorphismDigraphsFinder(digraph, digraph, hook, S, infinity,
|
|
858
|
+
fail, false, DigraphVertices(digraph), [],
|
|
859
|
+
colors, colors)[1];
|
|
860
|
+
|
|
861
|
+
end);
|
|
862
|
+
|
|
863
|
+
InstallMethod(DigraphCore,
|
|
864
|
+
"for a digraph with generators of endomorphism monoid",
|
|
865
|
+
[IsDigraph and HasGeneratorsOfEndomorphismMonoidAttr],
|
|
866
|
+
function(D)
|
|
867
|
+
local x;
|
|
868
|
+
x := RepresentativeOfMinimalIdeal(EndomorphismMonoid(D));
|
|
869
|
+
return ImageSetOfTransformation(x, DigraphNrVertices(D));
|
|
870
|
+
end);
|
|
871
|
+
|
|
872
|
+
#############################################################################
|
|
873
|
+
# Iterators
|
|
874
|
+
#############################################################################
|
|
875
|
+
|
|
876
|
+
# This is faster than using the iterator method for LibsemigroupsFroidurePin
|
|
877
|
+
# for n = 7 or so onwards
|
|
878
|
+
|
|
879
|
+
InstallMethod(Iterator, "for a full transformation semigroup",
|
|
880
|
+
[IsTransformationSemigroup and IsFullTransformationSemigroup and
|
|
881
|
+
HasGeneratorsOfSemigroup],
|
|
882
|
+
function(S)
|
|
883
|
+
local iter;
|
|
884
|
+
|
|
885
|
+
if HasAsSSortedList(S) or HasAsListCanonical(S) then
|
|
886
|
+
# This is much faster
|
|
887
|
+
TryNextMethod();
|
|
888
|
+
fi;
|
|
889
|
+
|
|
890
|
+
iter := IteratorByFunctions(rec(
|
|
891
|
+
tups := IteratorOfTuples([1 .. DegreeOfTransformationSemigroup(S)],
|
|
892
|
+
DegreeOfTransformationSemigroup(S)),
|
|
893
|
+
parent := S,
|
|
894
|
+
|
|
895
|
+
NextIterator := iter -> TransformationNC(NextIterator(iter!.tups)),
|
|
896
|
+
|
|
897
|
+
IsDoneIterator := iter -> IsDoneIterator(iter!.tups),
|
|
898
|
+
|
|
899
|
+
ShallowCopy := iter ->
|
|
900
|
+
rec(parent := S,
|
|
901
|
+
tups := IteratorOfTuples([1 .. DegreeOfTransformationSemigroup(S)],
|
|
902
|
+
DegreeOfTransformationSemigroup(S))),
|
|
903
|
+
|
|
904
|
+
PrintObj := function(iter)
|
|
905
|
+
Print("<iterator of semigroup>");
|
|
906
|
+
return;
|
|
907
|
+
end));
|
|
908
|
+
return iter;
|
|
909
|
+
end);
|