Skip to content

Add PowerSemigroup - #1230

Open
William-Kenyon wants to merge 3 commits into
semigroups:mainfrom
William-Kenyon:fix-issue-1092
Open

William-Kenyon wants to merge 3 commits into
semigroups:mainfrom
William-Kenyon:fix-issue-1092

Conversation

@William-Kenyon

@William-Kenyon William-Kenyon commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1092, adding PowerSemigroup(S) for a finite semigroup S. The power semigroup of S is the set of non-empty subsets of S, equipped with the operation $XY = \{xy : x \in X, y \in Y\}$.

Some literature includes the empty set in the power semigroup, so it might be useful to add an optional argument for this. I also added a warning if the resulting semigroup is likely to exhaust your memory, given how quickly it grows in relation to the size of S.

My version differs from the suggested code in the issue:

  • Each $xY = \{xy : y \in Y\}$ is computed beforehand, so $XY$ is found with $x_1Y \cup x_2Y \cup \cdots $, avoiding further multiplication in S
  • Subsets are generated in binary-code order, which makes them easy to inded, avoiding calls to Position()

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement rudimentary PowerSemigroup attribute/operation

1 participant