-
Notifications
You must be signed in to change notification settings - Fork 36
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
Tianrun-Y
wants to merge
25
commits into
semigroups:main
Choose a base branch
from
Tianrun-Y:mitsch-new
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mitsch Order #1024
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
affb39b
mitsch order methods
Tianrun-Y 27eb838
fix declaration and method problem and remove ExistsTransversal as a …
Tianrun-Y 3f1f82d
fix formatting for gaplint
Tianrun-Y 790c32a
fix formatting for gaplint
Tianrun-Y 46f97d7
remove redundant filter
Tianrun-Y c0f5385
add nambooripad method
Tianrun-Y 8a02024
add nambooripad method
Tianrun-Y 653a959
add IsRefinementKernelOfTransformation
Tianrun-Y 1baed0e
fix IsRefinementKernelOfTransformation
Tianrun-Y 6edd905
Update gap/attributes/attr.gi
Tianrun-Y 18edcfd
Update gap/attributes/attr.gi
Tianrun-Y 47a7653
Update gap/attributes/attr.gi
Tianrun-Y 1ec7731
Update gap/attributes/attr.gi
Tianrun-Y 9ff45bb
move the kernerl containment away
Tianrun-Y 185fdde
Merge branch 'mitsch-new' of github.com:/Tianrun-Y/Semigroups into mi…
Tianrun-Y e679757
add documentation for IsRefinementKernelOfTransformation
Tianrun-Y 3d7bd8c
small changes
Tianrun-Y 5119849
small changes
Tianrun-Y 6fb4a4a
add test
Tianrun-Y 334d361
small edits
Tianrun-Y 49e775b
add two argument version of IsRefinementKernelOfTransformation
Tianrun-Y dfc6a66
fix test
Tianrun-Y ae4f45d
small edits
Tianrun-Y 2e17d1b
documentation
Tianrun-Y fac9442
Merge branch 'main' of http://github.com/semigroups/semigroups into m…
Tianrun-Y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1045,13 +1045,173 @@ function(S) | |||||||||
|
||||||||||
return | ||||||||||
function(x, y) | ||||||||||
local R; | ||||||||||
R := RClass(S, x); | ||||||||||
return IsGreensLessThanOrEqual(R, RClass(S, y)) | ||||||||||
and ForAny(Idempotents(R), e -> e * y = x); | ||||||||||
local E; | ||||||||||
E := Idempotents(S); | ||||||||||
return ForAny(E, e -> e * y = x) | ||||||||||
and ForAny(E, f -> y * f = x); | ||||||||||
end; | ||||||||||
end); | ||||||||||
|
||||||||||
SEMIGROUPS.ExistsTransversal := function(a, b, n) | ||||||||||
local exists, class, i; | ||||||||||
if DegreeOfTransformation(a) > n or | ||||||||||
DegreeOfTransformation(b) > n then | ||||||||||
ErrorNoReturn("Transformation does not", | ||||||||||
"belong to a transformation semigroup of degree n"); | ||||||||||
fi; | ||||||||||
for class in KernelOfTransformation(a, n) do | ||||||||||
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; | ||||||||||
od; | ||||||||||
return true; | ||||||||||
end; | ||||||||||
|
||||||||||
InstallMethod(RegularLeqTransformationSemigroupNC, | ||||||||||
#intended for internal use; see MitschLeqSemigroup for public use | ||||||||||
"for a transformation semigroup", | ||||||||||
[IsTransformationSemigroup], | ||||||||||
function(S) | ||||||||||
local deg; | ||||||||||
deg := DegreeOfTransformationSemigroup(S); | ||||||||||
return | ||||||||||
function(x, y) | ||||||||||
# Only returns the correct answer if y is a regular element | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add check that Also what happens if |
||||||||||
return IsRefinementKernelOfTransformation(x, y, deg) | ||||||||||
and SEMIGROUPS.ExistsTransversal(x, y, deg); | ||||||||||
end; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(MitschLeqSemigroupNC, | ||||||||||
"for a semigroup", | ||||||||||
[IsSemigroup], | ||||||||||
function(S) | ||||||||||
return | ||||||||||
function(x, y) | ||||||||||
if x = y then | ||||||||||
return true; | ||||||||||
else | ||||||||||
return ForAny(Elements(S), s -> x = x * s and x = y * s) and | ||||||||||
ForAny(Elements(S), t -> t * y = x and t * x = x); | ||||||||||
Comment on lines
+1101
to
+1102
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||||||||||
fi; | ||||||||||
end; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(MitschLeqSemigroup, | ||||||||||
"for a semigroup", | ||||||||||
[IsSemigroup], | ||||||||||
function(S) | ||||||||||
if IsInverseSemigroup(S) then | ||||||||||
return NaturalLeqInverseSemigroup(S); | ||||||||||
elif IsRegularSemigroup(S) and IsTransformationSemigroup(S) then | ||||||||||
return RegularLeqTransformationSemigroupNC(S); | ||||||||||
elif IsRegularSemigroup(S) then | ||||||||||
return NambooripadLeqRegularSemigroup(S); | ||||||||||
else | ||||||||||
return MitschLeqSemigroupNC(S); | ||||||||||
fi; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(MitschOrderOfSemigroup, | ||||||||||
"for a finite transformation semigroup", | ||||||||||
[IsTransformationSemigroup], | ||||||||||
function(S) | ||||||||||
local elts, p, func1, func2, out, i, j, regular, D, a; | ||||||||||
elts := ShallowCopy(AsListCanonical(S)); | ||||||||||
p := Sortex(elts, {x, y} -> IsGreensDGreaterThanFunc(S)(y, x)) ^ -1; | ||||||||||
func1 := RegularLeqTransformationSemigroupNC(S); | ||||||||||
func2 := MitschLeqSemigroupNC(S); | ||||||||||
out := List([1 .. Size(S)], x -> []); | ||||||||||
regular := BlistList([1 .. Size(S)], []); | ||||||||||
for D in RegularDClasses(S) do | ||||||||||
Tianrun-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
for a in D do | ||||||||||
i := PositionCanonical(S, a) ^ (p ^ -1); | ||||||||||
regular[i] := true; | ||||||||||
od; | ||||||||||
od; | ||||||||||
for j in [Size(S), Size(S) - 1 .. 1] do | ||||||||||
if regular[j] then | ||||||||||
for i in [j - 1, j - 2 .. 1] do | ||||||||||
if func1(elts[i], elts[j]) then | ||||||||||
AddSet(out[j ^ p], i ^ p); | ||||||||||
fi; | ||||||||||
od; | ||||||||||
else | ||||||||||
for i in [j - 1, j - 2 .. 1] do | ||||||||||
if func2(elts[i], elts[j]) then | ||||||||||
AddSet(out[j ^ p], i ^ p); | ||||||||||
fi; | ||||||||||
od; | ||||||||||
fi; | ||||||||||
od; | ||||||||||
return out; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(MitschOrderOfSemigroup, | ||||||||||
"for a finite regular transformation semigroup", | ||||||||||
[IsRegularSemigroup and IsTransformationSemigroup], | ||||||||||
function(S) | ||||||||||
local elts, p, func, out, i, j; | ||||||||||
elts := ShallowCopy(Elements(S)); | ||||||||||
p := Sortex(elts, {x, y} -> IsGreensDGreaterThanFunc(S)(y, x)) ^ -1; | ||||||||||
func := RegularLeqTransformationSemigroupNC(S); | ||||||||||
out := List([1 .. Size(S)], x -> []); | ||||||||||
for i in [1 .. Size(S)] do | ||||||||||
for j in [i + 1 .. Size(S)] do | ||||||||||
if func(elts[i], elts[j]) then | ||||||||||
AddSet(out[j ^ p], i ^ p); | ||||||||||
fi; | ||||||||||
od; | ||||||||||
od; | ||||||||||
return out; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(MitschOrderOfSemigroup, | ||||||||||
"for a finite semigroup", | ||||||||||
[IsFinite and IsSemigroup], | ||||||||||
function(S) | ||||||||||
local i, iso, T, MT, MS, eltsS, eltsT, idx_map, q; | ||||||||||
iso := IsomorphismTransformationSemigroup(S); | ||||||||||
T := Range(iso); | ||||||||||
eltsS := Elements(S); | ||||||||||
eltsT := Elements(T); | ||||||||||
idx_map := List([1 .. Size(S)], i -> Position(eltsT, eltsS[i] ^ iso)); | ||||||||||
q := PermList(idx_map); | ||||||||||
MT := MitschOrderOfSemigroup(T); | ||||||||||
MS := []; | ||||||||||
for i in [1 .. Size(S)] do | ||||||||||
MS[i] := AsSet(OnTuples(MT[i ^ q], q ^ -1)); | ||||||||||
od; | ||||||||||
return MS; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(DumbMitschOrderOfSemigroup, | ||||||||||
"for a finite semigroup", | ||||||||||
[IsSemigroup and IsFinite], | ||||||||||
function(S) | ||||||||||
local func, out, i, j, elts; | ||||||||||
func := MitschLeqSemigroup(S); | ||||||||||
elts := Elements(S); | ||||||||||
out := List([1 .. Size(S)], x -> []); | ||||||||||
for i in [1 .. Size(S)] do | ||||||||||
for j in [1 .. Size(S)] do | ||||||||||
if i = j then | ||||||||||
continue; | ||||||||||
elif func(elts[i], elts[j]) then | ||||||||||
AddSet(out[j], i); | ||||||||||
fi; | ||||||||||
od; | ||||||||||
od; | ||||||||||
return out; | ||||||||||
end); | ||||||||||
|
||||||||||
InstallMethod(LeftIdentity, | ||||||||||
"for semigroup with CanUseFroidurePin and mult. elt.", | ||||||||||
[IsSemigroup and CanUseFroidurePin, IsMultiplicativeElement], | ||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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):