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

McAlister triples #271

Merged
merged 8 commits into from
Aug 31, 2017
Merged

Conversation

ChristopherRussell
Copy link
Collaborator

This pull request implements the function McAlisterTriple which creates McAlister triple semigroups, along with basic operations for McAlister triples and their elements.

A McAlister triple is a representation of an E-unitary inverse semigroup defined by a partial order and a join semilattice, a group and a group. Amongst several other conditions, the semilattice is a suborder of the partial order and the group acts on them both.

TODO: improve the method for GeneratorsOfSemigroup for these objects in the future.

@mtorpey mtorpey added the 3.1 label May 29, 2017
@wilfwilson
Copy link
Collaborator

@ChristopherRussell You'll need to update the required version of Digraphs. Your stuff uses things like IsPartialOrderDigraph. However these don't exist yet in Digraphs 0.7.1, which is the version required by the Semigroups package currently. To fix this, you should open the file PackageInfo.g and replace the occurrences of 0.7.1 with a newer version of Digraphs - I think 0.8.0 should work, although 0.8.1 has been released since then too. Once you've done this, the Travis tests should pass (I hope).

@mtorpey mtorpey added the do not merge Label for PR that should not be merged label Jun 14, 2017
@ChristopherRussell ChristopherRussell changed the title McAlister triples McAlister triples - work in progress Jun 14, 2017
@ChristopherRussell ChristopherRussell changed the title McAlister triples - work in progress McAlister triples - ready for review Jul 19, 2017
@mtorpey mtorpey removed the do not merge Label for PR that should not be merged label Jul 19, 2017
Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Some initial comments about your documentation.

A <E>McAlister triple semigroup</E> is an E-unitary inverse semigroup
<Ref Oper= "IsEUnitaryInverseSemigroup" BookName= "Semigroups" />
defined by a partial order, a semilattice and a group which acts by
order automorphisms on the partial order. All E-unitary inverse
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 "Any E-unitary inverse semigroup..." sounds better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are you referring to line 19 or line 16?

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. The way it is written now could be interpreted as "there exists a mcalister triple semigroup S such that every e-unitary inverse semigroup is isomorphic to S".

<List>
<Mark> M1 </Mark>
<Item>
<C>Y</C> is a semilattice which is a subdigraph of <C>X</C>.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is X?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Change "which is" to "that is"

<A>G</A>, and a function <A>act</A> defining an action of <A>G</A> on
<A>X</A>. <C>McAlisterTripleSemigroup</C> also has a three argument
version which assumes that <A>act</A> is <Ref Func= "OnPoints"
BookName= "GAPDoc"/>. Furthermore there are three and four argument
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't be GAPDoc here. Probably should be ref. Change it to ref and see if the warnings go away when you compile the documentation.

<Returns><K>true</K> or <K>false</K>.</Returns>
<Description>
A <E>McAlister triple semigroup</E> is an E-unitary inverse semigroup
<Ref Oper= "IsEUnitaryInverseSemigroup" BookName= "Semigroups" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Get rid of the book name bit here. You don't need to do it when you're referring to stuff in the current package. If you've got BookName = "Semigroups" elsewhere then get rid of it too.

<Mark> M2 </Mark>
<Item>
For all <C>A</C> in <C>X</C> and for all <C>B</C> in <C>Y</C>:
if <C>A</C> <M>\leq</M> <C>B</C> then <C>A</C> in <C>Y</C>.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comma before then


<#GAPDoc Label="McAlisterTripleSemigroup">
<ManSection>
<Oper Name = "McAlisterTripleSemigroup" Arg = "G, act, X, Y"
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 the order of arguments in the 4-argument versions should be the same as in the 3-argument versions.

So you have G, X, Y, act or G, X, Y, and similarly G, X, sub_ver, act and G, X, sub_ver.

<Prop Name = "IsMcAlisterTripleSemigroup" Arg = "S"/>
<Returns><K>true</K> or <K>false</K>.</Returns>
<Description>
A <E>McAlister triple semigroup</E> is an E-unitary inverse semigroup
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should talk with James already about how to organise this documentation. My intuition would be to have this part of the doc explain literally what filter IsMcAlisterTripleSemigroup describes (technically), and for all this mathematical info to be in the documentation for the creation functions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@james-d-mitchell will have better advice about this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You also need to add doc for everything you defined, including IsMcAlisterTripleSemigroupElementRep etc.

Copy link
Collaborator Author

@ChristopherRussell ChristopherRussell Jul 27, 2017

Choose a reason for hiding this comment

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

I currently have the mathematical details in z-chap15.xml at the start of my section and some of it mentioned again later. Should I rearrange like this:

-Introduction without too much detail at start of the section
-Technical details in IsMcAlisterTripleSemigroup section
-Mathematical details in McAlisterTripleSemigroup section

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah okay I hadn't realised. However it should work, it should be clear, when I type ?IsMcAlisterTripleSemigroup what the documentation means - if it relies on notions defined elsewhere, then it should say so and link to that place.

versions where the homogeneous list <A>sub_ver</A> of vertices of
<A>X</A> replaces <A>Y</A> as an argument. When <A>sub_ver</A> is
provided, a McAlister triple semigroup is created with semilattice
<C>InducedSubdigraph(<A>X</A>, <A>sub_ver</A>)</C>. <P/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I read this documentation, I have absolutely no idea what properties the arguments must satisfy.

Copy link
Collaborator

@wilfwilson wilfwilson Jul 27, 2017

Choose a reason for hiding this comment

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

Sorry this is too harsh! What I meant is that, from this bit of text, it's not clear how G, X, Y etc have to be related. If all you did was type ?McAlisterTripleSemigroup into the command line, it wouldn't be obvious where to get these details.

Returns the <E>McAlister triple semigroup</E> element of the McAlister
triple semigroup <A>S</A> which corresponds to the semilattice vertex
<A>A</A> and group element <A>g</A>, if this specifices an element of
<A>S</A>. The functions <Ref Prop= "MTE"/> and <Ref Prop=
Copy link
Collaborator

Choose a reason for hiding this comment

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

You've called them Props here - are they?

triple semigroup <A>S</A> which corresponds to the semilattice vertex
<A>A</A> and group element <A>g</A>, if this specifices an element of
<A>S</A>. The functions <Ref Prop= "MTE"/> and <Ref Prop=
"McAlisterTripleSemigroupElement"/> are identicial.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you declare them as synonyms? You should if possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These should be referred to as operations. MTE is just:

function(S, A, g)
return McAlisterTripleSemigroupElement(S, A, g);
end);

Is that ok?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In the gd file one of them should be declared as an operation, yes (probably the one with the long name). The other one, MTE, should be declared using DeclareSynonym (see this chapter of the GAP manual) for how to do it - pretty sure that is the right way of doing it.

Since this is the piece of the documentation that is about these things, you don't need to have these bits as Refs here. This sentence can be replaced by: <C>MTE</C> is a synonym for <C>McAlisterTripleSemigroupElement</C>, or something similar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You've also spelt identical wrongly.

@wilfwilson
Copy link
Collaborator

OneImmutable for a McAlister triple semigroup has no code coverage.

@wilfwilson wilfwilson changed the title McAlister triples - ready for review McAlister triples Jul 27, 2017
@ChristopherRussell
Copy link
Collaborator Author

Thank you @wilfwilson for all the good suggestions. I have acted on them all but I am still deciding on the organisation of the mathematical and technical details amongst the doc at start of the section as well as the doc for IsMcAlisterTripleSemigroup and McAlisterTripleSemigroup. Will post again when this is done.

@wilfwilson
Copy link
Collaborator

Thanks @ChristopherRussell, I'll take a look at it again sometime soon. James will be able to give you some guidance about how best to organise the documentation - it's certainly a good idea to give it some thought.

Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

I've done a bit more reviewing. Mostly focuses on missing/unlinked documentation, and questions that I have about your some of code (I can't work out what it all does/is meant to do).

<Oper Name = "AsMcAlisterTripleSemigroup" Arg = "S"/>
<Returns>A McAlister triple semigroup.</Returns>
<Description>
This function can be used to find a McAlister triple semigroup which is
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should say this this only works for e-unitary inverse semigroups, and have a reference to <Ref Prop="IsEUnitaryInverseSemigroup"/>.

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 have just realised. IsomorphismMcAlisterTripleSemigroup should by implemented as IsomorphismSemigroup and I think AsSemigroup with filter IsMcAlisterTripleSemigroup will then work based on that. Does this sound right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh yes, these should be intregrated into IsomorphismSemigroup and AsSemigroup, as you say.

<Description>
This function can be used to find an isomorphism from a given semigroup
<A>S</A> to an isomorphic McAlister triple semigroup, provided such an
isomorphism exists.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As above, you can be more specific here. You should say this this only works for e-unitary inverse semigroups, and have a reference to <Ref Prop="IsEUnitaryInverseSemigroup"/>

the partial order digraph <C>X</C> is a join-semilattice digraph. This
function uses <Ref Oper = "AsMcAlisterTripleSemigroup"/> to find a
McAlister triple semigroup isomorphic to <A>S</A> then checks if the
McAlister triple semigroup is F-inverse.
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 you should change this documentation - the last sentence in particular. We don't normally put implementational details in the doc, unless that information is particularly relevant to the user and might change the way they want to use the function.

I think it might be nicer if you can characterise this in a more elementary way. Is it true that an F-inverse semigroup is an E-unitary inverse semigroup in which the partial order of D-classes defines a join-semilattice? If so, that would be a shorter way of describing it, and you could include references to IsEUnitaryInverseSemigroup, PartialOrderOfDClasses, etc.

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 hadn't thought of that characterisation and it seems much less complicated that the typical definition of F-Inverse semigroup. I will investigate and get back to you.

Copy link
Collaborator Author

@ChristopherRussell ChristopherRussell Aug 7, 2017

Choose a reason for hiding this comment

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

Actually this idea doesn't work.

McAlisterTripleSemigroup(Group((4,5)), Digraph([[1],[1,2],[1,3],[1,2,3,4],[1,2,3,5]]), [1 .. 4]);

is not an F-inverse semigroup since the 2nd argument is not a join-semilattice yet the partial order of D-classes

[ [ 1 ], [ 1, 2 ], [ 1, 3 ], [ 1, 2, 3, 4 ] ]

defines a join-semilattice digraph.

Copy link
Collaborator

Choose a reason for hiding this comment

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

gap> Digraph([[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,5]]);
<digraph with 5 vertices, 14 edges>
gap> IsJoinSemilatticeDigraph(last);
true

It says it's a join-semilattice for me

Copy link
Collaborator Author

@ChristopherRussell ChristopherRussell Aug 8, 2017

Choose a reason for hiding this comment

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

Sorry, the Digraph was meant to be Digraph([[1],[1,2],[1,3],[1,2,3,4],[1,2,3,5]]) with no edge from 3 to 2. Then there is no join for vertices 4 & 5.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay good work, you'll have to go back to your old method then.

doc/z-chap15.xml Outdated
the subsemigroup of a semigroup consisting of its idempotents by <C>E</C>.
A semigroup <C>S</C> is said to be <E>E-unitary</E> if for all <C>e</C> in
<C>E</C> and for all <C>s</C> in
<C>S</C> we have that:
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can get rid of 'we have that'

DeclareOperation("ELM_LIST", [IsMcAlisterTripleSemigroupElementRep, IsPosInt]);

# F-inverse semigroup property
DeclareOperation("IsFInverseSemigroup", [IsSemigroup]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a property rather than an operation

"the fourth argument must be a join semilattice digraph,");
fi;

# Check condition M2 (check that Y is an order ideal of X.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

M2 says that if x in X is less than some y in Y, then x is in Y. Could you explain to me what the next block of code is doing? I can't work it out.

for x in DigraphVertexLabels(X) do
if not x in DigraphVertexLabels(Y) then
for y in DigraphVertexLabels(Y) do
if Intersection(out_nbrs[x], out_nbrs[y]) = out_nbrs[x] then
Copy link
Collaborator

Choose a reason for hiding this comment

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

This bit is especially confusing to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For each vertex of X which does not correspond to a vertex of Y we check whether there are any vertices which are 'less' than it which correspond to a vertex of Y. Vertex a is less than vertex b when there is an edge from b to a.
The intersection of the out neighbours of two vertices is equal to their join. The join of a vertex in X with a vertex in Y is either less than or equal to a vertex of Y or is equal to that vertex in X. I should be using PartialOrderDigraphJoinOfVertices here!

Copy link
Collaborator

@wilfwilson wilfwilson Aug 1, 2017

Choose a reason for hiding this comment

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

So you're doing this by contrapositive basically: for each vertex of X that is not in Y, if the vertex is less than something in Y, then we fail.

Since X is a partial order, it is transitive. So if we want to know whether a is less than b, we can simply check whether b is in the out-neighbours of a, rather than doing intersections, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's also another vertex number/label of X conundrum here: x is one of the vertex labels of X, not necessarily the actualy vertex number. However, out_nbrs[x] gives the out-neighbours (as vertex numbers, not labels) of the vertex whose number (not label) is x. Do you see the problem?

i.e x might be vertex 1, however it could have label 2. And out_nbrs[x] is out_nbrs[2], which might have no relation to out_nbrs[1], which describes the actual out-neighbours of x.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are correct regarding just checking out-neighbours vs intersections.

I see that using the labels of X is a bit of an issue and I don't really recall why I chose to do so now. Using the labels of Y was necessary to know how Y embeds into X but perhaps I used them mistakingly here or thought the user might like to label their digraph! I think it should be changed to loop over DigraphVertices(X) instead of the labels.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. Using vertex labels of Y makes sense, but using the vertex labels of X seems to complicate things. So the label of a vertex of Y should refer to a vertex number of a vertex of X. There might be a few parts of your code where you'll need to check that the right thing is being done, and of course the documentation needs to be precise.

fi;

iso_x := IsomorphismDigraphs(McAlisterTripleSemigroupPartialOrder(S),
McAlisterTripleSemigroupPartialOrder(T));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wondering: are you assuming that iso_x (an iso between the partial orders) restricts to an isomorphism between the respective semilattice sub digraphs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right, I need to check that. Should I do this by using RestrictedMapping... then is there something existing which can check if this is an isomorphism?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure how is best to do this. Certainly iso_x is an isomorphism from the X for S to the X for T, and iso_x embeds the Y for S into some copy in the X for T. However, perhaps it gets mapped to a different one than the actual Y for T. If there exists some iso_x however, then there must exist one that does what you want it to. The question is how do you get your hands on it? Not sure right now.

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 will comment this function out until we can think of something.

[IsMcAlisterTripleSemigroup and HasGeneratorsOfSemigroup,
IsMcAlisterTripleSemigroup and HasGeneratorsOfSemigroup],
function(S, T)
if IsomorphismSemigroups(S, T) = fail then
Copy link
Collaborator

Choose a reason for hiding this comment

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

this function could be shortened to return IsomorphismSemigroups(S, T) <> fail;

InstallMethod(IsFInverseMonoid, "for a McAlister triple semigroup",
[IsMcAlisterTripleSemigroup],
function(S)
return IsFInverseSemigroup(S) and IsMonoid(S);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Swap these conditions around. It's easier to check IsMonoid (in fact it's immediate) so it should come first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point

@wilfwilson
Copy link
Collaborator

In the master branch, the required version of Digraphs has been increased to 0.10.0. This change will conflict with your change, which increased the version to 0.8.1. To resolve this conflict, go with 0.10.0.

@ChristopherRussell
Copy link
Collaborator Author

ChristopherRussell commented Aug 3, 2017

I made some commits but I'm not finished yet. I still need to:

-Fix IsomorphismSemigroups for two McAlister triple semigroups, as discussed above not sure how to do this.
-Document McAlisterTripleSemigroupElementReps

@ChristopherRussell
Copy link
Collaborator Author

ChristopherRussell commented Aug 7, 2017

I tried searching for other examples of Reps. There is IsEnumerableSemigroupRep but other examples I found by searching .gd files (ag DeclareRepresentation -G .gd) were undocumented:

IsEnumerableSemigroupGreensClassRep
IsEnumerableSemigroupGreensRelationRep
IsPlistRowBasisOverFiniteFieldRep
IsPlistMatrixOverFiniteFieldRep
IsCongruenceByGeneratingPairsRep
IsCongruenceClassByGeneratingPairsRep

I am not sure how to document this rep. The only thing I can think to say in the doc for McAlisterTripleSemigroupElementReps is that these are objects created by McAlisterTripleSemigroupElement. Anything about McAlister triple semigroups and their elements would be repeating things I have already covered elsewhere.

@wilfwilson @james-d-mitchell

@ChristopherRussell
Copy link
Collaborator Author

I have now pushed a fix to IsomorphismSemigroups for two McAlisterTripleSemigroup semigroups, added comments in the .gd file describing McAlisterTripleSemigroupElementRep and McAlisterTripleSemigroupDefaultRep (as opposed to writing documentation for them) and created a new chapter (now chapter 12) for McAlister triple semigroup documentation.

Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Good work @ChristopherRussell, my comments now are mostly just correcting typos.

The are two serious things: there's still a problem with IsomorphismSemigroups. I suggested a fix on the relevant bit of code. This is an example of the problem:

gap> gr := DigraphFromDigraph6String("+H_A?GC_Q@G~wA?G");
<digraph with 9 vertices, 20 edges>
gap> G := Group((1,2,3)(4,5,6), (8,9));
Group([ (1,2,3)(4,5,6), (8,9) ])
gap> S1 := McAlisterTripleSemigroup(G, gr, [1, 4, 5, 7, 8]);
<McAlister triple semigroup over Group([ (1,2,3)(4,5,6), (8,9) ])>
gap> S2 := McAlisterTripleSemigroup(G, gr, [3, 6, 7, 8, 9]);
<McAlister triple semigroup over Group([ (1,2,3)(4,5,6), (8,9) ])>
gap> IsomorphismSemigroups(S1, S2);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
The 1st argument is 'fail' which might point to an earlier problem
Error, no 1st choice method found for `*' on 2 arguments at /Users/Wilf/GAP/lib/methsel2.g:241 called from
rep
* iso_x
  at /Users/Wilf/GAP/pkg/semigroups/gap/semigroups/semieunit.gi:260 called fro\
m
func( elm ) at /Users/Wilf/GAP/lib/coll.gi:1613 called from
ForAll( DigraphVertices( McAlisterTripleSemigroupPartialOrder( S ) ),
 function ( x )
      return McAlisterTripleSemigroupAction( S )( x, g ) ^ (rep * iso_x)
        = McAlisterTripleSemigroupAction( T )( x ^ iso_x, g ^ iso_g ) ^ rep;
  end
 ) at /Users/Wilf/GAP/pkg/semigroups/gap/semigroups/semieunit.gi:261

The problem is that you can have two MTS's with the same partial orders and groups, and with isomorphic semilattices, but where there is no automorphism of the whole digraph that takes the first semilattice to the second. Therefore the rep that you get by using RepresentativeAction could be fail.

The second problem is that Print doesn't seem to work (using the above semigroup S1) in all cases:

gap> Print(S1);
Semigroup(
[
  MTSE(McAlisterTripleSemigroup(Group( [ (1,2,3)(4,5,6), (8,9) ] ), Digraph( [ \
[ 1, 4, 7 ], [ 2, 5, 7 ], [ 3, 6, 7 ], [ 4, 7 ], [ 5, 7 ], [ 6, 7 ], [ 7 ], [ \
7, 8 ], [ 7, 9 ] ] ), Digraph( [ [ 1, 2, 4 ], [ 2, 4 ], [ 3, 4 ], [ 4 ], [ 4, \
5 ] ] )), 1, ()),
  MTSE(McAlisterTripleSemigroup(Group( [ (1,2,3)(4,5,6), (8,9) ] ), Digraph( [\
 [ 1, 4, 7 ], [ 2, 5, 7 ], [ 3, 6, 7 ], [ 4, 7 ], [ 5, 7 ], [ 6, 7 ], [ 7 ], [\
 7, 8 ], [ 7, 9 ] ] ), Digraph( [ [ 1, 2, 4 ], [ 2, 4 ], [ 3, 4 ], [ 4 ], [ 4,\
 5 ] ] )), 7, ()),
  MTSE(McAlisterTripleSemigroup(Group( [ (1,2,3)(4,5,6), (8,9) ] ), Digraph( [\
 [ 1, 4, 7 ], [ 2, 5, 7 ], [ 3, 6, 7 ], [ 4, 7 ], [ 5, 7 ], [ 6, 7 ], [ 7 ], [\
 7, 8 ], [ 7, 9 ] ] ), Digraph( [ [ 1, 2, 4 ], [ 2, 4 ], [ 3, 4 ], [ 4 ], [ 4,\
Error, List Element: <list>[7] must have an assigned value in
   5 ] ] )), 8, ()),
  return Concatenation( "MTSE(", String( x![3] ), ", ",
       String(
         DigraphVertexLabels( McAlisterTripleSemigroupSemilattice( x![3] ) )[
           x[1]] ), ", ", String( x[2] ), ")" )
     ; at /Users/Wilf/GAP/pkg/semigroups/gap/semigroups/semieunit.gi:323 called from
PrintString( o )

doc/z-chap12.xml Outdated
For inverse semigroups these two conditions are equivalent. We are only
interested in <E>E-unitary inverse semigroups</E>.
Before defining McAlister triple semigroups we define a McAlister triple.
A <E>McAlister triple</E> is a triple <C>(G,X,Y)</C> which consisting of:
Copy link
Collaborator

@wilfwilson wilfwilson Aug 17, 2017

Choose a reason for hiding this comment

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

which consisting of -> which consists of

doc/z-chap12.xml Outdated

where <C>Join</C> is the natural join operation of the semilattice and
<C>Bg^-1</C> is <C>B</C> acted on by the inverse of <C>g</C>. With this
operation, <C>M(G,X,Y)</C> is semigroup which we call a <E>McAlister triple
Copy link
Collaborator

Choose a reason for hiding this comment

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

is semigroup -> is a semigroup

<Description>

The following documentation covers the technical information needed to
create McAlister triple semigroups in GAP, the underlying theorey can be
Copy link
Collaborator

Choose a reason for hiding this comment

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

theorey -> theory


The following documentation covers the technical information needed to
create McAlister triple semigroups in GAP, the underlying theorey can be
read in the introduction of Section
Copy link
Collaborator

Choose a reason for hiding this comment

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

Section -> Chapter
of -> to

<Ref Chap = "McAlister triple semigroups"/>.
<P/>

In this implementation the partial order <C>x</C> of a McAlister triple is
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 x should be capitalised as X here (since you use <C>X</C> in the introduction to Chapter 12)

return fail;
end);

InstallMethod(IsIsomorphicSemigroup, "for two McAlister triple semigroups",
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can get rid of this method: the one in gap/attributes/isomorph.gi works perfectly fine for MTSs.

return Concatenation("<McAlister triple semigroup over ", ViewString(G), ">");
end);

# Currently this does not work. iso_x restricted to the semilattice is not
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this comment out of date now?

# iso_x will restrict to an isomorphism from (the labels of) YS to YT.
if not im_YS = DigraphVertexLabels(YT) then
A := AutomorphismGroup(XT);
rep := RepresentativeAction(A, im_YS, DigraphVertexLabels(YT), OnSets);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is possible that RepresentativeAction returns fail here: in this case, the method should return fail.
i.e

if rep = fail then
  return fail;
fi;

I'll post an example below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for spotting this and the example.

function(S, A, g)
if not A in DigraphVertexLabels(McAlisterTripleSemigroupSemilattice(S)) then
ErrorNoReturn("Semigroups: McAlisterTripleSemigroupElement: usage,\n",
"second input should be a vertex label of the ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

input -> argument

"join-semilattice of the McAlister triple,");
elif not g in McAlisterTripleSemigroupGroup(S) then
ErrorNoReturn("Semigroups: McAlisterTripleSemigroupElement: usage,\n",
"third input must an element of the group of the McAlister ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

input -> argument

@ChristopherRussell
Copy link
Collaborator Author

I have made the most recent suggested changes now @wilfwilson. Apologies for the delay, I was away and without my laptop.

@wilfwilson
Copy link
Collaborator

@james-d-mitchell Can you tell me what you think the correct behaviour should be here?

I'll create two McAlisterTripleSemigroup objects:

gap> S := McAlisterTripleSemigroup(Group([(1, 2, 3)(4, 5, 6), (8, 9)]),
>  DigraphFromGraph6String("+H_A?GC_Q@G~wA?G"), [1, 4, 5, 7, 8]);
gap> T := McAlisterTripleSemigroup(Group([(1, 2, 3)(4, 5, 6), (8, 9)]),
>  DigraphFromGraph6String("+H_A?GC_Q@G~wA?G"), [1, 4, 5, 7, 8]);

S and T are mathematically identical, because they're created in exactly the same way. But they're different objects, and their elements belong to different families, since each McAlisterTripleSemigroup has its own family. However, the equality method for these two objects returns true:

gap> S = T;
true

If I create two mathematically identical objects in each of these semigroups:

s := MTSE(S, 1, ());
t := MTSE(T, 1, ());

then, again, the equality method for McAlisterTripleSemigroupElements will say that they are equal, since their semigroups and parameters are equal:

gap> s = t;
true

But then the in method is not consistent with this:

gap> s in S and t in T;
true
gap> s in T or t in S;
false

This has knock-on implications, such as when it comes to re-creating something from its Print or String value. If String gives the following:

"Semigroup([
  MTSE(McAlisterTripleSemigroup(SymmetricGroup([2 .. 5]),
        Digraph([[1], [1, 2], [1, 3], [1, 4], [1, 5]]), [1 .. 4]), 3, (3, 4)),
  MTSE(McAlisterTripleSemigroup(SymmetricGroup([2 .. 5]),
        Digraph([[1], [1, 2], [1, 3], [1, 4], [1, 5]]), [1 .. 4]), 1, (2, 4))])"

then EvalString(last) fails for obvious reasons: the two generators are created relative to two semigroups that, although mathematically the same, have different families, and you can't create a semigroup out of objects in different families.

How should things be? Certainly I think that the behaviour should be consistent, and would preferably allow a McAlisterTripleSemigroup or subsemigroup to be re-created from its String, but I'm not sure if that's possible.

@wilfwilson
Copy link
Collaborator

@ChristopherRussell I made some minor changes following my most recent review, and I've put them in a pull request to your e-unitary branch in your fork of the repository. So you just need to merge that once to get those changes. They'll then appear as part of this pull request.

Once you merge in my PR, and once @james-d-mitchell and I have resolved the way that equality should work with MTS's and MTSE's, I'm happy for this to be merged in. I'm hoping to do it at the Wednesday meeting tomorrow.

@james-d-mitchell
Copy link
Collaborator

Semigroups consist of sets, and two sets are equal if and only if they have there same elements. Therefore the correct solution is for elements of distinct McAlister triples should never be equal. I think this is the case with Rees matrix semigroups, and it would be consistent if McAlister triples behaved the same. I don't see how to fix the string method. I'll write some more about this tomorrow

@wilfwilson
Copy link
Collaborator

wilfwilson commented Aug 29, 2017 via email

ChristopherRussell and others added 2 commits August 30, 2017 15:59
This commit moves the documentation for McAlister triple semigroups to
their own chapter - Chapter 12. It also re-implements
IsomorphismSemigroups, which previously was not working, and adds more
tests for it.
@ChristopherRussell
Copy link
Collaborator Author

I made the fix to the equality methods and changed tests accordingly.

@wilfwilson
Copy link
Collaborator

@ChristopherRussell Can you push your changes please?

@ChristopherRussell
Copy link
Collaborator Author

I did push them. I put them in with my last commit (95e1d9f). It's the one before your fix to String. Sorry if that was confusing.

@wilfwilson
Copy link
Collaborator

Thanks @ChristopherRussell

@wilfwilson wilfwilson merged commit f298a0c into semigroups:master Aug 31, 2017
@james-d-mitchell
Copy link
Collaborator

Hmm, I have some comments on this too. @ChristopherRussell can you make a new pull request to fix the one or two minor issues I am about to point out?

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.

Please review my two comments, and make a new pull request to fix these minor issues (if necessary).

#############################################################################
# Methods for McAlister triple semigroups
#############################################################################
# InstallMethod(\=, "for two McAlister triple semigroups",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This commented out method should either be deleted, or you could include this in the isomorphism semigroup code if it would be worthwhile doing this.

# This is a representation for McAlister triple semigroup elements, which are
# created via the function McAlisterTripleSemigroupElement.
#
# The components are:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This says that there are 3 components, it should really say that there are 3 positions, and what is stored in each position, and then in DeclareRepresentation you only declare 2 positions, so which is it, 2 or 3?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The components 'Vertex' and 'Group element' are accessible by [] but parent is not. Instead parent is accessed via McAlisterTripleSemigroupElementParent (at some point we decided it was not user friendly for it to be accessible by [] because these elements are printed as pairs, not triples).

Should there be 2 positions declared or 3?
(Is this number the positions accesible by [] or the ones accessible by ![]?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be a description of the internal representation, so the ones accessible by ![], and so it should be 2 positions, according to your description.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are 3 positions accessible by ![]. Did you mean to say it should be 3?

@james-d-mitchell
Copy link
Collaborator

james-d-mitchell commented Aug 31, 2017 via email

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.

None yet

4 participants