passagemath-gap-pkg-semigroups 10.6.29__cp312-abi3-musllinux_1_2_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.
- 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/x86_64-pc-linux-musl-default64-kv10/semigroups.so +0 -0
- gap/pkg/semigroups/config.guess +1807 -0
- gap/pkg/semigroups/config.log +1068 -0
- gap/pkg/semigroups/config.status +1133 -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.29.dist-info/METADATA +93 -0
- passagemath_gap_pkg_semigroups-10.6.29.dist-info/METADATA.bak +94 -0
- passagemath_gap_pkg_semigroups-10.6.29.dist-info/RECORD +356 -0
- passagemath_gap_pkg_semigroups-10.6.29.dist-info/WHEEL +5 -0
- passagemath_gap_pkg_semigroups-10.6.29.dist-info/top_level.txt +1 -0
- passagemath_gap_pkg_semigroups.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_gap_pkg_semigroups.libs/libsemigroups-f0b7066b.so.2.0.0 +0 -0
- passagemath_gap_pkg_semigroups.libs/libstdc++-5d72f927.so.6.0.33 +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.abi3.so +0 -0
|
@@ -0,0 +1,886 @@
|
|
|
1
|
+
############################################################################
|
|
2
|
+
##
|
|
3
|
+
## congruences/conglatt.gi
|
|
4
|
+
## Copyright (C) 2016-2022 Michael C. Young
|
|
5
|
+
##
|
|
6
|
+
## Licensing information can be found in the README file of this package.
|
|
7
|
+
##
|
|
8
|
+
#############################################################################
|
|
9
|
+
##
|
|
10
|
+
## This file contains functions for a poset of congruences.
|
|
11
|
+
##
|
|
12
|
+
## When the congruences of a semigroup are computed, they form a lattice with
|
|
13
|
+
## respect to containment. The information about the congruences' positions in
|
|
14
|
+
## this lattice may be stored in an IsCongruencePoset object (a component object
|
|
15
|
+
## based on a record) and can be retrieved from this object using the methods in
|
|
16
|
+
## this file.
|
|
17
|
+
##
|
|
18
|
+
## The list of congruences in the poset is stored as an attribute
|
|
19
|
+
## CongruencesOfPoset. The partial order of the poset is stored as a digraph,
|
|
20
|
+
## where an edge (i,j) is present if and only if congruence i is a subrelation
|
|
21
|
+
## of congruence j. When a congruence poset is displayed, it appears to the
|
|
22
|
+
## user as the list of out-neighbours of that digraph.
|
|
23
|
+
##
|
|
24
|
+
|
|
25
|
+
#############################################################################
|
|
26
|
+
## Helper function for creating CongruencePosets
|
|
27
|
+
#############################################################################
|
|
28
|
+
|
|
29
|
+
SEMIGROUPS.MakeCongruencePoset := function(poset, congs)
|
|
30
|
+
if congs <> fail then
|
|
31
|
+
SetCongruencesOfPoset(poset, congs);
|
|
32
|
+
SetDigraphVertexLabels(poset, congs);
|
|
33
|
+
if not IsEmpty(congs) then
|
|
34
|
+
SetUnderlyingSemigroupOfCongruencePoset(poset, Range(congs[1]));
|
|
35
|
+
fi;
|
|
36
|
+
fi;
|
|
37
|
+
SetFilterObj(poset, IsCongruencePoset);
|
|
38
|
+
return poset;
|
|
39
|
+
end;
|
|
40
|
+
|
|
41
|
+
#############################################################################
|
|
42
|
+
## The main three functions
|
|
43
|
+
#############################################################################
|
|
44
|
+
|
|
45
|
+
SEMIGROUPS.PrincipalXCongruencesNC :=
|
|
46
|
+
function(S, pairs, SemigroupXCongruence)
|
|
47
|
+
local total, words, congs, congs_discrim, nrcongs, last_collected, nr,
|
|
48
|
+
keep, newcong, m, newcongdiscrim, i, old_pair, new_pair;
|
|
49
|
+
|
|
50
|
+
Assert(1, IsListOrCollection(pairs));
|
|
51
|
+
total := Size(pairs);
|
|
52
|
+
|
|
53
|
+
Info(InfoSemigroups, 1, "Finding principal congruences . . .");
|
|
54
|
+
words := List([1 .. Int(Log2(Float(Size(S))))], x -> Random(S));
|
|
55
|
+
words := List(words, x -> MinimalFactorization(S, x));
|
|
56
|
+
|
|
57
|
+
congs := []; # List of all congs found so far, partitioned by nr classes
|
|
58
|
+
congs_discrim := [];
|
|
59
|
+
|
|
60
|
+
nrcongs := 0; # Number of congs found so far
|
|
61
|
+
last_collected := 0;
|
|
62
|
+
nr := 0;
|
|
63
|
+
for new_pair in pairs do
|
|
64
|
+
nr := nr + 1;
|
|
65
|
+
if new_pair[1] = new_pair[2] then
|
|
66
|
+
continue;
|
|
67
|
+
fi;
|
|
68
|
+
keep := true;
|
|
69
|
+
newcong := SemigroupXCongruence(S, [new_pair]);
|
|
70
|
+
m := NrEquivalenceClasses(newcong);
|
|
71
|
+
newcongdiscrim := List(words, w -> CongruenceWordToClassIndex(newcong, w));
|
|
72
|
+
if not IsBound(congs[m]) then
|
|
73
|
+
congs[m] := [newcong];
|
|
74
|
+
congs_discrim[m] := [newcongdiscrim];
|
|
75
|
+
nrcongs := nrcongs + 1;
|
|
76
|
+
continue;
|
|
77
|
+
fi;
|
|
78
|
+
i := PositionSorted(congs_discrim[m], newcongdiscrim);
|
|
79
|
+
while i <= Length(congs_discrim[m])
|
|
80
|
+
and congs_discrim[m][i] = newcongdiscrim do
|
|
81
|
+
old_pair := GeneratingPairsOfLeftRightOrTwoSidedCongruence(congs[m][i]);
|
|
82
|
+
if not IsEmpty(old_pair) then
|
|
83
|
+
old_pair := old_pair[1];
|
|
84
|
+
if CongruenceTestMembershipNC(congs[m][i], new_pair[1], new_pair[2])
|
|
85
|
+
and CongruenceTestMembershipNC(newcong, old_pair[1], old_pair[2])
|
|
86
|
+
then
|
|
87
|
+
keep := false;
|
|
88
|
+
break;
|
|
89
|
+
fi;
|
|
90
|
+
fi;
|
|
91
|
+
i := i + 1;
|
|
92
|
+
od;
|
|
93
|
+
|
|
94
|
+
if nr > last_collected + 1999 then
|
|
95
|
+
Info(InfoSemigroups,
|
|
96
|
+
1,
|
|
97
|
+
StringFormatted("Pair {} of {}: {} congruences so far",
|
|
98
|
+
nr,
|
|
99
|
+
total,
|
|
100
|
+
nrcongs));
|
|
101
|
+
last_collected := nr;
|
|
102
|
+
GASMAN("collect");
|
|
103
|
+
fi;
|
|
104
|
+
if keep then
|
|
105
|
+
nrcongs := nrcongs + 1;
|
|
106
|
+
InsertElmList(congs[m], i, newcong);
|
|
107
|
+
InsertElmList(congs_discrim[m], i, newcongdiscrim);
|
|
108
|
+
fi;
|
|
109
|
+
od;
|
|
110
|
+
Info(InfoSemigroups,
|
|
111
|
+
1,
|
|
112
|
+
StringFormatted("Found {} principal congruences in total!",
|
|
113
|
+
nrcongs));
|
|
114
|
+
|
|
115
|
+
return Flat(congs);
|
|
116
|
+
end;
|
|
117
|
+
|
|
118
|
+
########################################################################
|
|
119
|
+
########################################################################
|
|
120
|
+
|
|
121
|
+
# We declare the following for the sole purpose of being able to use the
|
|
122
|
+
# Froidure-Pin (GAP implementation) algorithm for computing the join
|
|
123
|
+
# semilattice of congruences. We could not just implement multiplication of
|
|
124
|
+
# left, right, 2-sided congruences (which would have been less code) for family
|
|
125
|
+
# reasons (i.e. if we declare DeclareCategoryCollections for
|
|
126
|
+
# IsLeftMagmaCongruence, it turns out that [LeftSemigroupCongruence(*)] does
|
|
127
|
+
# not belong to IsLeftMagmaCongruenceCollection, because the family of these
|
|
128
|
+
# objects is GeneralMappingsFamily, and it is not the case that
|
|
129
|
+
# IsLeftMagmaCongruence is true for every elements of the
|
|
130
|
+
# GeneralMappingsFamily. This is a requirement according to the GAP reference
|
|
131
|
+
# manual entry for CategoryCollections.
|
|
132
|
+
DeclareCategory("IsWrappedLeftRightOrTwoSidedCongruence",
|
|
133
|
+
IsAssociativeElement and IsMultiplicativeElementWithOne);
|
|
134
|
+
DeclareCategory("IsWrappedRightCongruence",
|
|
135
|
+
IsWrappedLeftRightOrTwoSidedCongruence);
|
|
136
|
+
DeclareCategory("IsWrappedLeftCongruence",
|
|
137
|
+
IsWrappedLeftRightOrTwoSidedCongruence);
|
|
138
|
+
DeclareCategory("IsWrappedTwoSidedCongruence",
|
|
139
|
+
IsWrappedLeftRightOrTwoSidedCongruence);
|
|
140
|
+
|
|
141
|
+
DeclareCategoryCollections("IsWrappedLeftRightOrTwoSidedCongruence");
|
|
142
|
+
|
|
143
|
+
InstallTrueMethod(CanUseGapFroidurePin,
|
|
144
|
+
IsWrappedLeftRightOrTwoSidedCongruenceCollection and
|
|
145
|
+
IsSemigroup);
|
|
146
|
+
|
|
147
|
+
InstallTrueMethod(IsFinite,
|
|
148
|
+
IsWrappedLeftRightOrTwoSidedCongruenceCollection and
|
|
149
|
+
IsSemigroup);
|
|
150
|
+
|
|
151
|
+
BindGlobal("WrappedLeftCongruenceFamily",
|
|
152
|
+
NewFamily("WrappedLeftCongruenceFamily",
|
|
153
|
+
IsWrappedLeftCongruence));
|
|
154
|
+
BindGlobal("WrappedRightCongruenceFamily",
|
|
155
|
+
NewFamily("WrappedRightCongruenceFamily",
|
|
156
|
+
IsWrappedRightCongruence));
|
|
157
|
+
BindGlobal("WrappedTwoSidedCongruenceFamily",
|
|
158
|
+
NewFamily("WrappedTwoSidedCongruenceFamily",
|
|
159
|
+
IsWrappedTwoSidedCongruence));
|
|
160
|
+
|
|
161
|
+
BindGlobal("WrappedLeftCongruenceType",
|
|
162
|
+
NewType(WrappedLeftCongruenceFamily,
|
|
163
|
+
IsWrappedLeftCongruence and IsPositionalObjectRep));
|
|
164
|
+
BindGlobal("WrappedRightCongruenceType",
|
|
165
|
+
NewType(WrappedRightCongruenceFamily,
|
|
166
|
+
IsWrappedRightCongruence and IsPositionalObjectRep));
|
|
167
|
+
BindGlobal("WrappedTwoSidedCongruenceType",
|
|
168
|
+
NewType(WrappedTwoSidedCongruenceFamily,
|
|
169
|
+
IsWrappedTwoSidedCongruence and IsPositionalObjectRep));
|
|
170
|
+
|
|
171
|
+
BindGlobal("WrappedLeftCongruence",
|
|
172
|
+
x -> Objectify(WrappedLeftCongruenceType, [x]));
|
|
173
|
+
|
|
174
|
+
BindGlobal("WrappedRightCongruence",
|
|
175
|
+
x -> Objectify(WrappedRightCongruenceType, [x]));
|
|
176
|
+
|
|
177
|
+
BindGlobal("WrappedTwoSidedCongruence",
|
|
178
|
+
x -> Objectify(WrappedTwoSidedCongruenceType, [x]));
|
|
179
|
+
|
|
180
|
+
InstallMethod(\=, "for wrapped left, right, or 2-sided congruences",
|
|
181
|
+
[IsWrappedLeftRightOrTwoSidedCongruence,
|
|
182
|
+
IsWrappedLeftRightOrTwoSidedCongruence],
|
|
183
|
+
{x, y} -> x![1] = y![1]);
|
|
184
|
+
|
|
185
|
+
InstallMethod(\<, "for wrapped left, right, or 2-sided congruences",
|
|
186
|
+
[IsWrappedLeftRightOrTwoSidedCongruence,
|
|
187
|
+
IsWrappedLeftRightOrTwoSidedCongruence],
|
|
188
|
+
function(x, y)
|
|
189
|
+
return EquivalenceRelationCanonicalLookup(x![1])
|
|
190
|
+
< EquivalenceRelationCanonicalLookup(y![1]);
|
|
191
|
+
end);
|
|
192
|
+
|
|
193
|
+
InstallMethod(ChooseHashFunction,
|
|
194
|
+
"for a wrapped left, right, or 2-sided congruence and integer",
|
|
195
|
+
[IsLeftRightOrTwoSidedCongruence, IsInt],
|
|
196
|
+
function(cong, data)
|
|
197
|
+
local HashFunc;
|
|
198
|
+
HashFunc := function(cong, data)
|
|
199
|
+
local x;
|
|
200
|
+
x := EquivalenceRelationCanonicalLookup(cong![1]);
|
|
201
|
+
return ORB_HashFunctionForPlainFlatList(x, data);
|
|
202
|
+
end;
|
|
203
|
+
return rec(func := HashFunc, data := data);
|
|
204
|
+
end);
|
|
205
|
+
|
|
206
|
+
InstallMethod(\*, "for wrapped left semigroup congruences",
|
|
207
|
+
[IsWrappedLeftCongruence, IsWrappedLeftCongruence],
|
|
208
|
+
{x, y} -> WrappedLeftCongruence(JoinLeftSemigroupCongruences(x![1], y![1])));
|
|
209
|
+
|
|
210
|
+
InstallMethod(\*, "for wrapped right semigroup congruences",
|
|
211
|
+
[IsWrappedRightCongruence, IsWrappedRightCongruence],
|
|
212
|
+
{x, y} -> WrappedRightCongruence(JoinRightSemigroupCongruences(x![1], y![1])));
|
|
213
|
+
|
|
214
|
+
InstallMethod(\*, "for wrapped 2-sided semigroup congruences",
|
|
215
|
+
[IsWrappedTwoSidedCongruence, IsWrappedTwoSidedCongruence],
|
|
216
|
+
{x, y} -> WrappedTwoSidedCongruence(JoinSemigroupCongruences(x![1], y![1])));
|
|
217
|
+
|
|
218
|
+
InstallMethod(One, "for wrapped left semigroup congruence",
|
|
219
|
+
[IsWrappedLeftCongruence],
|
|
220
|
+
x -> WrappedLeftCongruence(TrivialCongruence(Source(x![1]))));
|
|
221
|
+
|
|
222
|
+
InstallMethod(One, "for wrapped right semigroup congruence",
|
|
223
|
+
[IsWrappedRightCongruence],
|
|
224
|
+
x -> WrappedRightCongruence(TrivialCongruence(Source(x![1]))));
|
|
225
|
+
|
|
226
|
+
InstallMethod(One, "for wrapped 2-sided semigroup congruence",
|
|
227
|
+
[IsWrappedTwoSidedCongruence],
|
|
228
|
+
x -> WrappedTwoSidedCongruence(TrivialCongruence(Source(x![1]))));
|
|
229
|
+
|
|
230
|
+
BindGlobal("_ClosureLattice",
|
|
231
|
+
function(S, gen_congs, WrappedXCongruence)
|
|
232
|
+
local gens, poset, all_congs, old_value, U;
|
|
233
|
+
|
|
234
|
+
# Trivial case
|
|
235
|
+
if IsEmpty(gen_congs) then
|
|
236
|
+
return SEMIGROUPS.MakeCongruencePoset(Digraph([[1]]),
|
|
237
|
+
[TrivialCongruence(S)]);
|
|
238
|
+
fi;
|
|
239
|
+
|
|
240
|
+
if ValueOption("FroidurePin") <> fail then
|
|
241
|
+
gens := List(gen_congs, WrappedXCongruence);
|
|
242
|
+
S := Monoid(gens);
|
|
243
|
+
poset := RightCayleyDigraph(S);
|
|
244
|
+
all_congs := List(AsListCanonical(S), x -> x![1]);
|
|
245
|
+
else # The default
|
|
246
|
+
S := List(gen_congs, EquivalenceRelationLookup);
|
|
247
|
+
old_value := libsemigroups.should_report();
|
|
248
|
+
if InfoLevel(InfoSemigroups) = 4 then
|
|
249
|
+
libsemigroups.set_report(true);
|
|
250
|
+
fi;
|
|
251
|
+
poset := DigraphNC(libsemigroups.LATTICE_OF_CONGRUENCES(S));
|
|
252
|
+
libsemigroups.set_report(old_value);
|
|
253
|
+
all_congs := fail;
|
|
254
|
+
fi;
|
|
255
|
+
Info(InfoSemigroups, 1, StringFormatted("Found {} congruences in total!",
|
|
256
|
+
DigraphNrVertices(poset)));
|
|
257
|
+
|
|
258
|
+
U := Source(Representative(gen_congs));
|
|
259
|
+
|
|
260
|
+
poset := SEMIGROUPS.MakeCongruencePoset(poset, all_congs);
|
|
261
|
+
SetUnderlyingSemigroupOfCongruencePoset(poset, U);
|
|
262
|
+
SetPosetOfPrincipalCongruences(poset,
|
|
263
|
+
Filtered(gen_congs,
|
|
264
|
+
x -> Size(GeneratingPairsOfLeftRightOrTwoSidedCongruence(x)) = 1));
|
|
265
|
+
SetGeneratingCongruencesOfJoinSemilattice(poset, gen_congs);
|
|
266
|
+
SetFilterObj(poset, IsCayleyDigraphOfCongruences);
|
|
267
|
+
return poset;
|
|
268
|
+
end);
|
|
269
|
+
|
|
270
|
+
BindGlobal("_CheckCongruenceLatticeArgs",
|
|
271
|
+
function(S, obj)
|
|
272
|
+
if not (IsFinite(S) and CanUseFroidurePin(S)) then
|
|
273
|
+
ErrorNoReturn("the 1st argument (a semigroup) must be finite and have ",
|
|
274
|
+
"CanUseFroidurePin");
|
|
275
|
+
elif IsIterator(obj) then
|
|
276
|
+
return;
|
|
277
|
+
elif not (IsEmpty(obj) or IsMultiplicativeElementCollColl(obj)) then
|
|
278
|
+
ErrorNoReturn("the 2nd argument (a list or collection) must be ",
|
|
279
|
+
"empty or a mult. elt. coll. coll.");
|
|
280
|
+
elif not ForAll(obj, x -> Size(x) = 2)
|
|
281
|
+
or not ForAll(obj, x -> x[1] in S and x[2] in S) then
|
|
282
|
+
ErrorNoReturn("the 2nd argument (a list) must consist of ",
|
|
283
|
+
"pairs of the 1st argument (a semigroup)");
|
|
284
|
+
fi;
|
|
285
|
+
end);
|
|
286
|
+
|
|
287
|
+
# Creates a poset object from a list of congruences, without generating any
|
|
288
|
+
# congruences.
|
|
289
|
+
|
|
290
|
+
InstallMethod(PosetOfCongruences, "for a list or collection",
|
|
291
|
+
[IsListOrCollection],
|
|
292
|
+
function(coll)
|
|
293
|
+
local congs, nrcongs, children, parents, i, ignore, j, poset;
|
|
294
|
+
congs := AsList(coll);
|
|
295
|
+
nrcongs := Length(congs);
|
|
296
|
+
|
|
297
|
+
# Setup children and parents lists
|
|
298
|
+
children := [];
|
|
299
|
+
parents := [];
|
|
300
|
+
for i in [1 .. nrcongs] do
|
|
301
|
+
children[i] := Set([i]);
|
|
302
|
+
parents[i] := Set([i]);
|
|
303
|
+
od;
|
|
304
|
+
|
|
305
|
+
# Find children of each cong in turn
|
|
306
|
+
for i in [1 .. nrcongs] do
|
|
307
|
+
# Ignore known parents
|
|
308
|
+
ignore := BlistList([1 .. nrcongs], [parents[i]]);
|
|
309
|
+
for j in [1 .. nrcongs] do
|
|
310
|
+
if not ignore[j] and IsSubrelation(congs[i], congs[j]) then
|
|
311
|
+
AddSet(children[i], j);
|
|
312
|
+
AddSet(parents[j], i);
|
|
313
|
+
fi;
|
|
314
|
+
od;
|
|
315
|
+
od;
|
|
316
|
+
|
|
317
|
+
# We are done: make the object and return
|
|
318
|
+
poset := Digraph(parents);
|
|
319
|
+
SetInNeighbours(poset, children);
|
|
320
|
+
return SEMIGROUPS.MakeCongruencePoset(poset, congs);
|
|
321
|
+
end);
|
|
322
|
+
|
|
323
|
+
InstallMethod(JoinSemilatticeOfCongruences, "for a congruence poset",
|
|
324
|
+
[IsCongruencePoset],
|
|
325
|
+
function(C)
|
|
326
|
+
local S;
|
|
327
|
+
if IsEmpty(CongruencesOfPoset(C)) then
|
|
328
|
+
if not HasUnderlyingSemigroupOfCongruencePoset(C) then
|
|
329
|
+
ErrorNoReturn("cannot form the join semilattice of an empty congruence ",
|
|
330
|
+
"poset without the underlying semigroup being set");
|
|
331
|
+
fi;
|
|
332
|
+
|
|
333
|
+
S := UnderlyingSemigroupOfCongruencePoset(C);
|
|
334
|
+
return SEMIGROUPS.MakeCongruencePoset(Digraph([[1]]),
|
|
335
|
+
[TrivialCongruence(S)]);
|
|
336
|
+
fi;
|
|
337
|
+
return JoinSemilatticeOfCongruences(CongruencesOfPoset(C));
|
|
338
|
+
end);
|
|
339
|
+
|
|
340
|
+
InstallMethod(JoinSemilatticeOfCongruences, "for a congruence poset",
|
|
341
|
+
[IsListOrCollection],
|
|
342
|
+
function(gen_congs)
|
|
343
|
+
local S, D, all_congs, trivial;
|
|
344
|
+
# TODO(FasterJoins) arg checks
|
|
345
|
+
if IsEmpty(gen_congs) then
|
|
346
|
+
ErrorNoReturn("the argument must not be empty");
|
|
347
|
+
fi;
|
|
348
|
+
S := Source(gen_congs[1]);
|
|
349
|
+
if ForAll(gen_congs, IsMagmaCongruence) then
|
|
350
|
+
D := _ClosureLattice(S, gen_congs, WrappedTwoSidedCongruence);
|
|
351
|
+
elif ForAll(gen_congs, IsLeftMagmaCongruence) then
|
|
352
|
+
D := _ClosureLattice(S, gen_congs, WrappedLeftCongruence);
|
|
353
|
+
else
|
|
354
|
+
Assert(1, ForAll(gen_congs, IsRightMagmaCongruence));
|
|
355
|
+
D := _ClosureLattice(S, gen_congs, WrappedRightCongruence);
|
|
356
|
+
fi;
|
|
357
|
+
all_congs := CongruencesOfPoset(D);
|
|
358
|
+
D := DigraphMutableCopy(D);
|
|
359
|
+
DigraphRemoveAllMultipleEdges(D);
|
|
360
|
+
if not TrivialCongruence(S) in gen_congs then
|
|
361
|
+
all_congs := ShallowCopy(all_congs);
|
|
362
|
+
DigraphRemoveLoops(D);
|
|
363
|
+
trivial := DigraphSources(D)[1];
|
|
364
|
+
DigraphRemoveVertex(D, trivial);
|
|
365
|
+
Remove(all_congs, trivial);
|
|
366
|
+
fi;
|
|
367
|
+
DigraphReflexiveTransitiveClosure(D);
|
|
368
|
+
MakeImmutable(D);
|
|
369
|
+
return SEMIGROUPS.MakeCongruencePoset(D, all_congs);
|
|
370
|
+
end);
|
|
371
|
+
|
|
372
|
+
# This method exists because when we use the "Simple" option with
|
|
373
|
+
# LatticeOfCongruences etc the congruences themselves are not present (only the
|
|
374
|
+
# CayleyDigraphOfCongruences), so we use this method to reconstruct the
|
|
375
|
+
# congruences themselves.
|
|
376
|
+
InstallMethod(CongruencesOfPoset, "for a congruence poset",
|
|
377
|
+
[IsCayleyDigraphOfCongruences],
|
|
378
|
+
function(D)
|
|
379
|
+
local S, result, gen_congs, Q, q, genstoapply, seen, Join, current, n, i;
|
|
380
|
+
|
|
381
|
+
S := UnderlyingSemigroupOfCongruencePoset(D);
|
|
382
|
+
result := [TrivialCongruence(S)];
|
|
383
|
+
gen_congs := GeneratingCongruencesOfJoinSemilattice(D);
|
|
384
|
+
if IsEmpty(gen_congs) then
|
|
385
|
+
return result;
|
|
386
|
+
fi;
|
|
387
|
+
Append(result, gen_congs);
|
|
388
|
+
|
|
389
|
+
# TODO(later): replace this with a Queue from the datastructures
|
|
390
|
+
# We do a simple BFS from the bottom of the lattice.
|
|
391
|
+
Q := [1];
|
|
392
|
+
q := 1;
|
|
393
|
+
# We prepended the TrivialCongruence and this is not one of the generators
|
|
394
|
+
genstoapply := [1 .. Length(result) - 1];
|
|
395
|
+
seen := BlistList([1 .. DigraphNrVertices(D)], []);
|
|
396
|
+
|
|
397
|
+
if IsMagmaCongruence(gen_congs[1]) then
|
|
398
|
+
Join := JoinSemigroupCongruences;
|
|
399
|
+
elif IsRightMagmaCongruence(gen_congs[1]) then
|
|
400
|
+
Join := JoinRightSemigroupCongruences;
|
|
401
|
+
else
|
|
402
|
+
Assert(1, IsLeftMagmaCongruence(gen_congs[1]));
|
|
403
|
+
Join := JoinLeftSemigroupCongruences;
|
|
404
|
+
fi;
|
|
405
|
+
|
|
406
|
+
while q <= Size(Q) do
|
|
407
|
+
current := Q[q];
|
|
408
|
+
for i in genstoapply do
|
|
409
|
+
n := OutNeighbours(D)[current][i];
|
|
410
|
+
if not seen[n] then
|
|
411
|
+
seen[n] := true;
|
|
412
|
+
result[n] := Join(result[current], result[i + 1]);
|
|
413
|
+
if n <> 1 then
|
|
414
|
+
Add(Q, n);
|
|
415
|
+
fi;
|
|
416
|
+
fi;
|
|
417
|
+
od;
|
|
418
|
+
q := q + 1;
|
|
419
|
+
od;
|
|
420
|
+
SetDigraphVertexLabels(D, result);
|
|
421
|
+
return result;
|
|
422
|
+
end);
|
|
423
|
+
|
|
424
|
+
########################################################################
|
|
425
|
+
# GeneratingPairsOfPrincipalCongruences
|
|
426
|
+
########################################################################
|
|
427
|
+
|
|
428
|
+
InstallMethod(GeneratingPairsOfPrincipalCongruences, "for a semigroup",
|
|
429
|
+
[IsSemigroup],
|
|
430
|
+
function(S)
|
|
431
|
+
if not (IsFinite(S) and CanUseFroidurePin(S)) then
|
|
432
|
+
ErrorNoReturn("the argument (a semigroup) must be finite and have ",
|
|
433
|
+
"CanUseFroidurePin");
|
|
434
|
+
fi;
|
|
435
|
+
return Combinations(AsList(S), 2);
|
|
436
|
+
# It'd be better to return an iterator here, but given that
|
|
437
|
+
# GeneratingPairsOfPrincipalCongruences is an attribute, the iterator can't
|
|
438
|
+
# be used when it's returned.
|
|
439
|
+
# return IteratorOfCombinations(AsList(S), 2);
|
|
440
|
+
end);
|
|
441
|
+
|
|
442
|
+
# Use the method just above
|
|
443
|
+
InstallMethod(GeneratingPairsOfPrincipalLeftCongruences,
|
|
444
|
+
"for a semigroup", [IsSemigroup], GeneratingPairsOfPrincipalCongruences);
|
|
445
|
+
|
|
446
|
+
# Use the method just above
|
|
447
|
+
InstallMethod(GeneratingPairsOfPrincipalRightCongruences,
|
|
448
|
+
"for a semigroup", [IsSemigroup], GeneratingPairsOfPrincipalCongruences);
|
|
449
|
+
|
|
450
|
+
InstallMethod(GeneratingPairsOfPrincipalCongruences, "for an acting semigroup",
|
|
451
|
+
[IsActingSemigroup],
|
|
452
|
+
function(S)
|
|
453
|
+
local M, MxM, map1, map2, Delta, pairs;
|
|
454
|
+
if not (IsFinite(S) and CanUseFroidurePin(S)) then
|
|
455
|
+
ErrorNoReturn("the argument (a semigroup) must be finite and have ",
|
|
456
|
+
"CanUseFroidurePin");
|
|
457
|
+
elif not IsMonoid(S) and not IsMonoidAsSemigroup(S) then
|
|
458
|
+
M := Monoid(S, rec(acting := true));
|
|
459
|
+
else
|
|
460
|
+
M := S;
|
|
461
|
+
fi;
|
|
462
|
+
|
|
463
|
+
MxM := DirectProduct(M, M);
|
|
464
|
+
SetFilterObj(MxM, IsActingSemigroup);
|
|
465
|
+
map1 := Embedding(MxM, 1);
|
|
466
|
+
map2 := Embedding(MxM, 2);
|
|
467
|
+
|
|
468
|
+
Delta := Set(GeneratorsOfSemigroup(S), x -> x ^ map1 * x ^ map2);
|
|
469
|
+
pairs := RelativeDClassReps(MxM, Semigroup(Delta, rec(acting := true)));
|
|
470
|
+
map1 := Projection(MxM, 1);
|
|
471
|
+
map2 := Projection(MxM, 2);
|
|
472
|
+
pairs := Set(pairs, x -> AsSortedList([x ^ map1, x ^ map2]));
|
|
473
|
+
return Filtered(pairs, x -> x[1] in S and x[2] in S);
|
|
474
|
+
end);
|
|
475
|
+
|
|
476
|
+
InstallMethod(GeneratingPairsOfPrincipalRightCongruences,
|
|
477
|
+
"for an acting semigroup",
|
|
478
|
+
[IsActingSemigroup],
|
|
479
|
+
function(S)
|
|
480
|
+
local M, MxM, map1, map2, Delta, pairs;
|
|
481
|
+
|
|
482
|
+
if not (IsFinite(S) and CanUseFroidurePin(S)) then
|
|
483
|
+
ErrorNoReturn("the argument (a semigroup) must be finite and have ",
|
|
484
|
+
"CanUseFroidurePin");
|
|
485
|
+
elif not IsMonoid(S) and not IsMonoidAsSemigroup(S) then
|
|
486
|
+
M := Monoid(S);
|
|
487
|
+
else
|
|
488
|
+
M := S;
|
|
489
|
+
fi;
|
|
490
|
+
|
|
491
|
+
MxM := DirectProduct(M, M);
|
|
492
|
+
SetFilterObj(MxM, IsActingSemigroup);
|
|
493
|
+
map1 := Embedding(MxM, 1);
|
|
494
|
+
map2 := Embedding(MxM, 2);
|
|
495
|
+
|
|
496
|
+
Delta := Set(GeneratorsOfSemigroup(S), x -> x ^ map1 * x ^ map2);
|
|
497
|
+
pairs := RelativeRClassReps(MxM, Semigroup(Delta, rec(acting := true)));
|
|
498
|
+
map1 := Projection(MxM, 1);
|
|
499
|
+
map2 := Projection(MxM, 2);
|
|
500
|
+
pairs := Set(pairs, x -> AsSortedList([x ^ map1, x ^ map2]));
|
|
501
|
+
return Filtered(pairs, x -> x[1] in S and x[2] in S);
|
|
502
|
+
end);
|
|
503
|
+
|
|
504
|
+
InstallMethod(GeneratingPairsOfPrincipalLeftCongruences,
|
|
505
|
+
"for an acting semigroup", [IsActingSemigroup],
|
|
506
|
+
function(S)
|
|
507
|
+
local map, T;
|
|
508
|
+
map := AntiIsomorphismTransformationSemigroup(S);
|
|
509
|
+
T := Range(map);
|
|
510
|
+
map := InverseGeneralMapping(map);
|
|
511
|
+
return List(GeneratingPairsOfPrincipalRightCongruences(T),
|
|
512
|
+
x -> List(x, y -> y ^ map));
|
|
513
|
+
end);
|
|
514
|
+
|
|
515
|
+
#############################################################################
|
|
516
|
+
## CayleyDigraphOfCongruences
|
|
517
|
+
#############################################################################
|
|
518
|
+
|
|
519
|
+
InstallMethod(CayleyDigraphOfCongruences,
|
|
520
|
+
"for a semigroup and a list or collection",
|
|
521
|
+
[IsSemigroup, IsListOrCollection],
|
|
522
|
+
function(S, pairs)
|
|
523
|
+
# pairs are checked in PrincipalCongruencesOfSemigroup
|
|
524
|
+
return _ClosureLattice(S,
|
|
525
|
+
PrincipalCongruencesOfSemigroup(S, pairs),
|
|
526
|
+
WrappedTwoSidedCongruence);
|
|
527
|
+
end);
|
|
528
|
+
|
|
529
|
+
InstallMethod(CayleyDigraphOfCongruences, "for a semigroup", [IsSemigroup],
|
|
530
|
+
function(S)
|
|
531
|
+
return _ClosureLattice(S,
|
|
532
|
+
PrincipalCongruencesOfSemigroup(S),
|
|
533
|
+
WrappedTwoSidedCongruence);
|
|
534
|
+
end);
|
|
535
|
+
|
|
536
|
+
InstallMethod(CayleyDigraphOfRightCongruences,
|
|
537
|
+
"for a semigroup and a list or collection",
|
|
538
|
+
[IsSemigroup, IsListOrCollection],
|
|
539
|
+
function(S, pairs)
|
|
540
|
+
# pairs are checked in PrincipalCongruencesOfSemigroup
|
|
541
|
+
return _ClosureLattice(S,
|
|
542
|
+
PrincipalRightCongruencesOfSemigroup(S, pairs),
|
|
543
|
+
WrappedRightCongruence);
|
|
544
|
+
end);
|
|
545
|
+
|
|
546
|
+
InstallMethod(CayleyDigraphOfRightCongruences, "for a semigroup",
|
|
547
|
+
[IsSemigroup],
|
|
548
|
+
function(S)
|
|
549
|
+
return _ClosureLattice(S,
|
|
550
|
+
PrincipalRightCongruencesOfSemigroup(S),
|
|
551
|
+
WrappedRightCongruence);
|
|
552
|
+
end);
|
|
553
|
+
|
|
554
|
+
InstallMethod(CayleyDigraphOfLeftCongruences,
|
|
555
|
+
"for a semigroup and a list or collection",
|
|
556
|
+
[IsSemigroup, IsListOrCollection],
|
|
557
|
+
function(S, pairs)
|
|
558
|
+
# pairs are checked in PrincipalCongruencesOfSemigroup
|
|
559
|
+
return _ClosureLattice(S,
|
|
560
|
+
PrincipalLeftCongruencesOfSemigroup(S, pairs),
|
|
561
|
+
WrappedLeftCongruence);
|
|
562
|
+
end);
|
|
563
|
+
|
|
564
|
+
InstallMethod(CayleyDigraphOfLeftCongruences, "for a semigroup", [IsSemigroup],
|
|
565
|
+
function(S)
|
|
566
|
+
return _ClosureLattice(S,
|
|
567
|
+
PrincipalLeftCongruencesOfSemigroup(S),
|
|
568
|
+
WrappedLeftCongruence);
|
|
569
|
+
end);
|
|
570
|
+
|
|
571
|
+
#############################################################################
|
|
572
|
+
## LatticeOfCongruences
|
|
573
|
+
#############################################################################
|
|
574
|
+
|
|
575
|
+
SEMIGROUPS.MakeLattice := function(C)
|
|
576
|
+
local D;
|
|
577
|
+
D := DigraphMutableCopy(C);
|
|
578
|
+
DigraphRemoveAllMultipleEdges(D);
|
|
579
|
+
DigraphReflexiveTransitiveClosure(D);
|
|
580
|
+
MakeImmutable(D);
|
|
581
|
+
return SEMIGROUPS.MakeCongruencePoset(D, CongruencesOfPoset(C));
|
|
582
|
+
end;
|
|
583
|
+
|
|
584
|
+
InstallMethod(LatticeOfCongruences,
|
|
585
|
+
"for a semigroup and a list or collection",
|
|
586
|
+
[IsSemigroup, IsListOrCollection],
|
|
587
|
+
{S, pairs} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S, pairs)));
|
|
588
|
+
|
|
589
|
+
InstallMethod(LatticeOfCongruences, "for a semigroup", [IsSemigroup],
|
|
590
|
+
S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S)));
|
|
591
|
+
|
|
592
|
+
InstallMethod(LatticeOfRightCongruences,
|
|
593
|
+
"for a semigroup and a list or collection",
|
|
594
|
+
[IsSemigroup, IsListOrCollection],
|
|
595
|
+
{S, p} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S, p)));
|
|
596
|
+
|
|
597
|
+
InstallMethod(LatticeOfRightCongruences, "for a semigroup", [IsSemigroup],
|
|
598
|
+
S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S)));
|
|
599
|
+
|
|
600
|
+
InstallMethod(LatticeOfLeftCongruences,
|
|
601
|
+
"for a semigroup and a list or collection",
|
|
602
|
+
[IsSemigroup, IsListOrCollection],
|
|
603
|
+
{S, pairs} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S, pairs)));
|
|
604
|
+
|
|
605
|
+
InstallMethod(LatticeOfLeftCongruences, "for a semigroup", [IsSemigroup],
|
|
606
|
+
S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S)));
|
|
607
|
+
|
|
608
|
+
########################################################################
|
|
609
|
+
# Left/Right/CongruencesOfSemigroup
|
|
610
|
+
########################################################################
|
|
611
|
+
|
|
612
|
+
InstallMethod(LeftCongruencesOfSemigroup,
|
|
613
|
+
"for a semigroup", [IsSemigroup],
|
|
614
|
+
S -> CongruencesOfPoset(CayleyDigraphOfLeftCongruences(S)));
|
|
615
|
+
|
|
616
|
+
InstallMethod(RightCongruencesOfSemigroup,
|
|
617
|
+
"for a semigroup", [IsSemigroup],
|
|
618
|
+
S -> CongruencesOfPoset(CayleyDigraphOfRightCongruences(S)));
|
|
619
|
+
|
|
620
|
+
InstallMethod(CongruencesOfSemigroup,
|
|
621
|
+
"for a semigroup", [IsSemigroup],
|
|
622
|
+
S -> CongruencesOfPoset(CayleyDigraphOfCongruences(S)));
|
|
623
|
+
|
|
624
|
+
########################################################################
|
|
625
|
+
# Principal congruences
|
|
626
|
+
########################################################################
|
|
627
|
+
|
|
628
|
+
InstallMethod(PrincipalLeftCongruencesOfSemigroup, "for a semigroup",
|
|
629
|
+
[IsSemigroup],
|
|
630
|
+
function(S)
|
|
631
|
+
local pairs;
|
|
632
|
+
pairs := GeneratingPairsOfPrincipalLeftCongruences(S);
|
|
633
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
634
|
+
pairs,
|
|
635
|
+
LeftSemigroupCongruence);
|
|
636
|
+
end);
|
|
637
|
+
|
|
638
|
+
InstallMethod(PrincipalRightCongruencesOfSemigroup, "for a semigroup",
|
|
639
|
+
[IsSemigroup],
|
|
640
|
+
function(S)
|
|
641
|
+
local pairs;
|
|
642
|
+
pairs := GeneratingPairsOfPrincipalRightCongruences(S);
|
|
643
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
644
|
+
pairs,
|
|
645
|
+
RightSemigroupCongruence);
|
|
646
|
+
end);
|
|
647
|
+
|
|
648
|
+
InstallMethod(PrincipalCongruencesOfSemigroup, "for a semigroup",
|
|
649
|
+
[IsSemigroup],
|
|
650
|
+
function(S)
|
|
651
|
+
local pairs;
|
|
652
|
+
pairs := GeneratingPairsOfPrincipalCongruences(S);
|
|
653
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
654
|
+
pairs,
|
|
655
|
+
SemigroupCongruence);
|
|
656
|
+
end);
|
|
657
|
+
|
|
658
|
+
InstallMethod(PrincipalLeftCongruencesOfSemigroup,
|
|
659
|
+
"for a semigroup and a list or collection",
|
|
660
|
+
[IsSemigroup, IsListOrCollection],
|
|
661
|
+
function(S, pairs)
|
|
662
|
+
_CheckCongruenceLatticeArgs(S, pairs);
|
|
663
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
664
|
+
pairs,
|
|
665
|
+
LeftSemigroupCongruence);
|
|
666
|
+
end);
|
|
667
|
+
|
|
668
|
+
InstallMethod(PrincipalRightCongruencesOfSemigroup,
|
|
669
|
+
"for a semigroup and a list or collection",
|
|
670
|
+
[IsSemigroup, IsListOrCollection],
|
|
671
|
+
function(S, pairs)
|
|
672
|
+
_CheckCongruenceLatticeArgs(S, pairs);
|
|
673
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
674
|
+
pairs,
|
|
675
|
+
RightSemigroupCongruence);
|
|
676
|
+
end);
|
|
677
|
+
|
|
678
|
+
InstallMethod(PrincipalCongruencesOfSemigroup,
|
|
679
|
+
"for a semigroup and a list or collection",
|
|
680
|
+
[IsSemigroup, IsListOrCollection],
|
|
681
|
+
function(S, pairs)
|
|
682
|
+
_CheckCongruenceLatticeArgs(S, pairs);
|
|
683
|
+
return SEMIGROUPS.PrincipalXCongruencesNC(S,
|
|
684
|
+
pairs,
|
|
685
|
+
SemigroupCongruence);
|
|
686
|
+
end);
|
|
687
|
+
|
|
688
|
+
########################################################################
|
|
689
|
+
## MinimalCongruences
|
|
690
|
+
########################################################################
|
|
691
|
+
|
|
692
|
+
InstallMethod(MinimalCongruences, "for a congruence poset",
|
|
693
|
+
[IsCongruencePoset],
|
|
694
|
+
poset -> CongruencesOfPoset(poset){Positions(InDegrees(poset), 1)});
|
|
695
|
+
|
|
696
|
+
InstallMethod(MinimalCongruencesOfSemigroup, "for a semigroup", [IsSemigroup],
|
|
697
|
+
function(S)
|
|
698
|
+
if HasLatticeOfCongruences(S) then
|
|
699
|
+
return MinimalCongruences(LatticeOfCongruences(S));
|
|
700
|
+
fi;
|
|
701
|
+
return MinimalCongruences(PosetOfPrincipalCongruences(S));
|
|
702
|
+
end);
|
|
703
|
+
|
|
704
|
+
InstallMethod(MinimalLeftCongruencesOfSemigroup, "for a semigroup",
|
|
705
|
+
[IsSemigroup],
|
|
706
|
+
function(S)
|
|
707
|
+
if HasLatticeOfLeftCongruences(S) then
|
|
708
|
+
return MinimalCongruences(LatticeOfLeftCongruences(S));
|
|
709
|
+
fi;
|
|
710
|
+
return MinimalCongruences(PosetOfPrincipalLeftCongruences(S));
|
|
711
|
+
end);
|
|
712
|
+
|
|
713
|
+
InstallMethod(MinimalRightCongruencesOfSemigroup, "for a semigroup",
|
|
714
|
+
[IsSemigroup],
|
|
715
|
+
function(S)
|
|
716
|
+
if HasLatticeOfRightCongruences(S) then
|
|
717
|
+
return MinimalCongruences(LatticeOfRightCongruences(S));
|
|
718
|
+
fi;
|
|
719
|
+
return MinimalCongruences(PosetOfPrincipalRightCongruences(S));
|
|
720
|
+
end);
|
|
721
|
+
|
|
722
|
+
InstallMethod(MinimalCongruencesOfSemigroup,
|
|
723
|
+
"for a semigroup and list or collection",
|
|
724
|
+
[IsSemigroup, IsListOrCollection],
|
|
725
|
+
{S, pairs} -> MinimalCongruences(PosetOfPrincipalCongruences(S, pairs)));
|
|
726
|
+
|
|
727
|
+
InstallMethod(MinimalRightCongruencesOfSemigroup,
|
|
728
|
+
"for a semigroup and list or collection",
|
|
729
|
+
[IsSemigroup, IsListOrCollection],
|
|
730
|
+
{S, pairs} -> MinimalCongruences(PosetOfPrincipalRightCongruences(S, pairs)));
|
|
731
|
+
|
|
732
|
+
InstallMethod(MinimalLeftCongruencesOfSemigroup,
|
|
733
|
+
"for a semigroup and list or collection",
|
|
734
|
+
[IsSemigroup, IsListOrCollection],
|
|
735
|
+
{S, pairs} -> MinimalCongruences(PosetOfPrincipalLeftCongruences(S, pairs)));
|
|
736
|
+
|
|
737
|
+
########################################################################
|
|
738
|
+
# PosetOfPrincipalRight/LeftCongruences
|
|
739
|
+
########################################################################
|
|
740
|
+
|
|
741
|
+
InstallMethod(PosetOfPrincipalCongruences, "for a semigroup", [IsSemigroup],
|
|
742
|
+
function(S)
|
|
743
|
+
if HasLatticeOfCongruences(S) then
|
|
744
|
+
return PosetOfPrincipalCongruences(LatticeOfCongruences(S));
|
|
745
|
+
fi;
|
|
746
|
+
return PosetOfCongruences(PrincipalCongruencesOfSemigroup(S));
|
|
747
|
+
end);
|
|
748
|
+
|
|
749
|
+
InstallMethod(PosetOfPrincipalRightCongruences, "for a semigroup",
|
|
750
|
+
[IsSemigroup],
|
|
751
|
+
function(S)
|
|
752
|
+
if HasLatticeOfRightCongruences(S) then
|
|
753
|
+
return PosetOfPrincipalRightCongruences(LatticeOfRightCongruences(S));
|
|
754
|
+
fi;
|
|
755
|
+
return PosetOfCongruences(PrincipalRightCongruencesOfSemigroup(S));
|
|
756
|
+
end);
|
|
757
|
+
|
|
758
|
+
InstallMethod(PosetOfPrincipalLeftCongruences, "for a semigroup",
|
|
759
|
+
[IsSemigroup],
|
|
760
|
+
function(S)
|
|
761
|
+
if HasLatticeOfLeftCongruences(S) then
|
|
762
|
+
return PosetOfPrincipalLeftCongruences(LatticeOfLeftCongruences(S));
|
|
763
|
+
fi;
|
|
764
|
+
return PosetOfCongruences(PrincipalLeftCongruencesOfSemigroup(S));
|
|
765
|
+
end);
|
|
766
|
+
|
|
767
|
+
InstallMethod(PosetOfPrincipalCongruences,
|
|
768
|
+
"for a semigroup and list or collection",
|
|
769
|
+
[IsSemigroup, IsListOrCollection],
|
|
770
|
+
{S, pairs} -> PosetOfCongruences(PrincipalCongruencesOfSemigroup(S, pairs)));
|
|
771
|
+
|
|
772
|
+
InstallMethod(PosetOfPrincipalRightCongruences,
|
|
773
|
+
"for a semigroup and list or collection",
|
|
774
|
+
[IsSemigroup, IsListOrCollection],
|
|
775
|
+
{S, pairs}
|
|
776
|
+
-> PosetOfCongruences(PrincipalRightCongruencesOfSemigroup(S, pairs)));
|
|
777
|
+
|
|
778
|
+
InstallMethod(PosetOfPrincipalLeftCongruences,
|
|
779
|
+
"for a semigroup and list or collection",
|
|
780
|
+
[IsSemigroup, IsListOrCollection],
|
|
781
|
+
{S, p} -> PosetOfCongruences(PrincipalLeftCongruencesOfSemigroup(S, p)));
|
|
782
|
+
|
|
783
|
+
########################################################################
|
|
784
|
+
# Printing, viewing, dot strings etc
|
|
785
|
+
########################################################################
|
|
786
|
+
|
|
787
|
+
InstallMethod(ViewObj, "for a congruence poset", [IsCongruencePoset],
|
|
788
|
+
function(poset)
|
|
789
|
+
local prefix, S, C, hand;
|
|
790
|
+
if DigraphNrVertices(poset) = 0 then
|
|
791
|
+
Print("<empty congruence poset>");
|
|
792
|
+
else
|
|
793
|
+
if not IsMultiDigraph(poset) and IsLatticeDigraph(poset) then
|
|
794
|
+
prefix := "lattice";
|
|
795
|
+
else
|
|
796
|
+
prefix := "poset";
|
|
797
|
+
fi;
|
|
798
|
+
S := UnderlyingSemigroupOfCongruencePoset(poset);
|
|
799
|
+
# Find a non-trivial non-universal congruence if it exists
|
|
800
|
+
C := First(CongruencesOfPoset(poset),
|
|
801
|
+
x -> not NrEquivalenceClasses(x) in [1, Size(S)]);
|
|
802
|
+
if C = fail or IsMagmaCongruence(C) then
|
|
803
|
+
hand := "two-sided";
|
|
804
|
+
else
|
|
805
|
+
hand := ShallowCopy(CongruenceHandednessString(C));
|
|
806
|
+
fi;
|
|
807
|
+
Append(hand, " congruence");
|
|
808
|
+
PrintFormatted("<\>{} of {} over \<",
|
|
809
|
+
prefix,
|
|
810
|
+
Pluralize(DigraphNrVertices(poset), hand));
|
|
811
|
+
ViewObj(S);
|
|
812
|
+
Print(">");
|
|
813
|
+
fi;
|
|
814
|
+
end);
|
|
815
|
+
|
|
816
|
+
InstallMethod(PrintObj, "for a congruence poset", [IsCongruencePoset],
|
|
817
|
+
function(poset)
|
|
818
|
+
Print("PosetOfCongruences( ", CongruencesOfPoset(poset), " )");
|
|
819
|
+
end);
|
|
820
|
+
|
|
821
|
+
InstallMethod(DotString,
|
|
822
|
+
"for a congruence poset",
|
|
823
|
+
[IsCongruencePoset],
|
|
824
|
+
function(poset)
|
|
825
|
+
# Call the below function, with default options
|
|
826
|
+
return DotString(poset, rec());
|
|
827
|
+
end);
|
|
828
|
+
|
|
829
|
+
InstallMethod(DotString,
|
|
830
|
+
"for a congruence poset and a record",
|
|
831
|
+
[IsCongruencePoset, IsRecord],
|
|
832
|
+
function(poset, opts)
|
|
833
|
+
local nrcongs, congs, S, symbols, i, nr, in_nbs, rel, str, j, k;
|
|
834
|
+
nrcongs := DigraphNrVertices(poset);
|
|
835
|
+
# Setup unbound options
|
|
836
|
+
if not IsBound(opts.info) then
|
|
837
|
+
opts.info := false;
|
|
838
|
+
fi;
|
|
839
|
+
if not IsBound(opts.numbers) then
|
|
840
|
+
opts.numbers := (nrcongs < 40);
|
|
841
|
+
fi;
|
|
842
|
+
# If the user wants info, then change the node labels
|
|
843
|
+
if opts.info = true then
|
|
844
|
+
# The congruences are stored inside the poset object
|
|
845
|
+
congs := CongruencesOfPoset(poset);
|
|
846
|
+
S := Range(congs[1]);
|
|
847
|
+
symbols := EmptyPlist(nrcongs);
|
|
848
|
+
for i in [1 .. nrcongs] do
|
|
849
|
+
nr := NrEquivalenceClasses(congs[i]);
|
|
850
|
+
if nr = 1 then
|
|
851
|
+
symbols[i] := "U";
|
|
852
|
+
elif nr = Size(S) then
|
|
853
|
+
symbols[i] := "T";
|
|
854
|
+
elif IsReesCongruence(congs[i]) then
|
|
855
|
+
symbols[i] := Concatenation("R", String(i));
|
|
856
|
+
else
|
|
857
|
+
symbols[i] := String(i);
|
|
858
|
+
fi;
|
|
859
|
+
od;
|
|
860
|
+
else
|
|
861
|
+
symbols := List([1 .. nrcongs], String);
|
|
862
|
+
fi;
|
|
863
|
+
|
|
864
|
+
in_nbs := InNeighbours(poset);
|
|
865
|
+
rel := List([1 .. nrcongs], x -> Filtered(in_nbs[x], y -> x <> y));
|
|
866
|
+
str := "";
|
|
867
|
+
|
|
868
|
+
if opts.numbers then
|
|
869
|
+
Append(str, "//dot\ngraph graphname {\n node [shape=circle]\n");
|
|
870
|
+
else
|
|
871
|
+
Append(str, "//dot\ngraph graphname {\n node [shape=point]\n");
|
|
872
|
+
fi;
|
|
873
|
+
|
|
874
|
+
for i in [1 .. Length(rel)] do
|
|
875
|
+
j := Difference(rel[i], Union(rel{rel[i]}));
|
|
876
|
+
i := symbols[i];
|
|
877
|
+
for k in j do
|
|
878
|
+
k := symbols[k];
|
|
879
|
+
Append(str, Concatenation(i, " -- ", k, "\n"));
|
|
880
|
+
od;
|
|
881
|
+
od;
|
|
882
|
+
|
|
883
|
+
Append(str, " }");
|
|
884
|
+
|
|
885
|
+
return str;
|
|
886
|
+
end);
|