Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitsch Order #1024

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Mitsch Order #1024

wants to merge 25 commits into from

Conversation

Tianrun-Y
Copy link
Collaborator

Add methods for finding the Mitsch order of a semigroup

@james-d-mitchell james-d-mitchell added the new-feature A label for PRs that contain new features label Jul 30, 2024
@@ -1052,6 +1052,188 @@ function(S)
end;
end);

InstallMethod(KernelContainment,
Copy link
Collaborator

@james-d-mitchell james-d-mitchell Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please:

  • move this to gap/elements/transf.g*
  • add tests
  • add doc
  • rename to IsRefinementKernelOfTransformation
  • improve the error message using the format: "where, what went wrong, what was expected, and what was found"

deg := DegreeOfTransformationSemigroup(S);
return
function(x, y)
# Only returns the correct answer if y is a regular element
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add check that y is regular.

Also what happens if x or y not in S?

return out;
end);

InstallMethod(MitschOrderOfTransformationSemigroup,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, unless it is actually much faster.

Comment on lines +1063 to +1072
exists := false;
for i in [1 .. Size(class)] do
if class[i] ^ a = class[i] ^ b then
exists := true;
break;
fi;
od;
if not exists then
return false;
fi;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saying this is better, but I think you could also write it like this (assuming class is an iterable object):

Suggested change
exists := false;
for i in [1 .. Size(class)] do
if class[i] ^ a = class[i] ^ b then
exists := true;
break;
fi;
od;
if not exists then
return false;
fi;
if ForAll(class, x -> x ^ a <> x ^ b) then
return false;
fi;

Comment on lines +1101 to +1102
return ForAny(Elements(S), s -> x = x * s and x = y * s) and
ForAny(Elements(S), t -> t * y = x and t * x = x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't semigroups iterable? Because if they are, can't you just write

Suggested change
return ForAny(Elements(S), s -> x = x * s and x = y * s) and
ForAny(Elements(S), t -> t * y = x and t * x = x);
return ForAny(S, s -> x = x * s and x = y * s) and
ForAny(S, t -> t * y = x and t * x = x);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for PRs that contain new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants