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

Tietze transformations for semigroups #762

Merged
merged 6 commits into from
Nov 1, 2021

Conversation

tomcontileslie
Copy link
Collaborator

@tomcontileslie tomcontileslie commented Apr 14, 2021

Authors: Ben Spiers (@bspiers) and Tom Conti-Leslie (@tomcontileslie)
Ready for review

This PR creates methods for a "semigroup Tietze" object which contains the generators and relations of an fp semigroup. Tietze transformations can be manually applied to the object to change the presentation, giving an fp semigroup isomorphic to the original. The idea is to also have a "SimplifyPresentation" operation which will intelligently apply transformations in order to reduce the overall length of the presentation.

Once transformations have been applied to the Tietze object to taste, it can be converted back into an fp semigroup and a mapping object can be produced which provides an isomorphism between the original fp semigroup and the modified version.

Still needs doing:

  • Implement SimplifyPresentation
  • Change SEMIGROUPS.StzReplaceSubwordRel to be non-recursive
  • Implement a ViewPresentation method to print relations of stz object
  • Make sure we're happy with function names, etc
  • Format tietze.gd and tietze.gi correctly
  • Write documentation
  • Write tests
  • Remove argument checks from SEMIGROUPS.TietzeTransformation1... etc, but create wrapper functions for users that do check arguments (e.g. called TietzeRemoveGenerator, TietzeAddGenerator, etc, and potentially NC versions)
  • Implement something like StzPrintGeneratorImages (the Tz version in the GAP distribution is really nice)
  • Check that everything works if the stz object is StzPresentation(FreeSemigroup(2) / [ ]) (currently the relation list is assumed to be non-empty in some places; add this case to the test file)

@codecov-commenter

This comment has been minimized.

@@ -77,10 +77,11 @@
<#Include SYSTEM "z-chap16.xml"> <!-- properties and attributes of inverse semigroups -->
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I should specify I have shuffled doc chapters down so that this new "fp semigroups" chapter doesn't appear after the stuff on IO and visualising semigroups!

Co-authored-by: Ben Spiers <bspiers972@outlook.com>
Co-authored-by: Tom Conti-Leslie <tom.contileslie@gmail.com>
@james-d-mitchell james-d-mitchell changed the title Tietze Transformations for Semigroups Tietze transformations for semigroups May 26, 2021
Copy link
Collaborator

@james-d-mitchell james-d-mitchell left a comment

Choose a reason for hiding this comment

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

A host of minor corrections to the doc, but otherwise this looks awesome!

doc/tietze.xml Outdated
<ManSection>
<Oper Name="StzPresentation" Arg="s"/>
<Returns>
A Semigroup Tietze (Stz) object.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Semigroup -> semigroup

Suggested change
A Semigroup Tietze (Stz) object.
A semigroup Tietze (Stz) object.

doc/tietze.xml Outdated

<#GAPDoc Label="StzPresentation">
<ManSection>
<Oper Name="StzPresentation" Arg="s"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

s -> S

Suggested change
<Oper Name="StzPresentation" Arg="s"/>
<Oper Name="StzPresentation" Arg="S"/>

doc/tietze.xml Outdated
A Semigroup Tietze (Stz) object.
</Returns>
<Description>
If <A>s</A> is a fp semigroup
Copy link
Collaborator

Choose a reason for hiding this comment

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

"a fp semigroup" should be "an fp semigroup"

doc/tietze.xml Outdated
Every semigroup Tietze object is an element of the category
<C>IsStzPresentation</C>. Internally, each Stz object contains a list
of generators (each represented as a string) and a list of relations
(each represented as a pair of LetterRep words, see
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
(each represented as a pair of LetterRep words, see
(each represented as a pair of <C>LetterRep</C> words, see

doc/z-chap19.xml Outdated

This object is analogous to the "Tietze object" implemented for fp groups
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reference not quotes

doc/z-chap19.xml Outdated
in the main &GAP; distribution
(<Ref Chap="Presentations and Tietze Transformations" BookName="ref"/>),
but its features are semigroup-specific. Most of the functions used to
create, view and manipulate Semigroup Tietze objects are prefixed with
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
create, view and manipulate Semigroup Tietze objects are prefixed with
create, view and manipulate semigroup Tietze objects are prefixed with

doc/z-chap19.xml Outdated
Converting a modified presentation into a semigroup
</Heading>

Now that a presentation object has been established, we need to cover how
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, this could be a bit clearer.

gap/fp/tietze.gi Outdated

return ObjectifyWithAttributes(out, type,
RelationsOfStzPresentation,
out!.rels,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think to avoid duplication, you might want to rename these out!.rels -> out!.RelationsOfStzPresentation. Also if type doesn't belong to IsAttributeStoringRep, then does ObjectifyWithAttributes do anything?

stz!.gens := newGens;
end);

# TODO: TCL: maybe better to call this StzIsomorphism?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, this is probably a more uniform name.

################################################################################

DeclareOperation("StzPresentation", [IsFpSemigroup]);
DeclareCategory("IsStzPresentation", IsList);
Copy link
Collaborator

Choose a reason for hiding this comment

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

IsList -> IsRecord

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I run into issues I'm not familiar with when trying to change the representation. Something about the implementation of StzPresentation fails! I'll avoid addressing this for now

tomcontileslie and others added 4 commits June 9, 2021 00:05
Co-authored-by: James D. Mitchell <jdm3@st-andrews.ac.uk>
UnreducedSemigroupOfStzPresentation
UnreducedFpSemigroupOfFpSemigroup
both -> "UnreducedFpSemigroup"
stz!.rels -> stz!.RelationsOfStzPresentation
stz!.gens -> stz!.GeneratorsOfStzPresentation
stz!.unreducedSemigroup -> stz!.UnreducedFpSemigroup
stz!.tietzeForwardMap -> stz!.TietzeForwardMap
stz!.tietzeBackwardMap -> stz!.TietzeBackwardMap
TietzeIsomorphism -> StzIsomorphism
@tomcontileslie
Copy link
Collaborator Author

Since there hadn't been any action on this pull request for a couple weeks, I've attempted to address all of @james-d-mitchell's comments from the review. I believe that's everything sorted (mostly documentation and function renaming) except for changing DeclareCategory("IsStzPresentation", IsList); to DeclareCategory("IsStzPresentation", IsRecord); in gap/fp/tietze.gi which brought about unexpected issues.

@james-d-mitchell james-d-mitchell merged commit 1e7754e into semigroups:master Nov 1, 2021
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.

4 participants