-
Notifications
You must be signed in to change notification settings - Fork 175
Disallow duplicate named generators when constructing magmas, semigroups, groups, etc #6097
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
base: master
Are you sure you want to change the base?
Disallow duplicate named generators when constructing magmas, semigroups, groups, etc #6097
Conversation
6d01a95 to
3e0b8e5
Compare
|
It seems there are manual examples that explicitly use duplicate generators, see for example the part of the manual titled "Comparison of Associative Words" ( gap> f:= FreeGroup( "a", "b", "b" );;
gap> gens:= GeneratorsOfGroup(f);
[ a, b, b ]
gap> gens[2] = gens[3];
false
gap> x:= gens[1]*gens[2];
a*b
gap> y:= gens[2]/gens[2]*gens[1]*gens[2];
a*b
gap> x = y;
true
gap> z:= gens[2]/gens[2]*gens[1]*gens[3];
a*b
gap> x = z;
falseWhich demonstrates that We can also see that gap> G := FreeGroup("a", "b", "b");
<free group on the generators [ a, b, b ]>
gap> AssignGeneratorVariables(G);
#I Global variable `b' is already defined and will be overwritten
#I Assigned the global variables [ a, b, b ] |
|
I am tempted to forbid it, because I find it hard to imagine someone is using this on purpose, and hasn't just made a typo and is confusing themselves. |
|
I agree with @ChrisJefferson. My guess is that the idea of this manual example is to demonstrate that words which look equal need not be equal. |
|
I agree with @ThomasBreuer and @ChrisJefferson |
3e0b8e5 to
e287507
Compare
FreeMagma, FreeGroup, FreeMonoid, etcb113d15 to
d35871e
Compare
d35871e to
04b4fa9
Compare
|
I'd be fine with this as well. |
|
I'll try to get it finished soon. |
|
I agree with @ChrisJefferson, @james-d-mitchell and @fingolfin. |
To me it seems like doing something like
FreeGroup("x", "x");can only possibly lead to potential confusion, I can't see a use case for it and I think it should be disallowed. But I'm open to contrary opinions.To add:
generatorNamesoption for pc groupsFreeMagmaFreeMagmaWithOneFreeSemigroupFreeMonoidFreeGroupFreeAlgebraFreeAlgebraWithOneFreeAssociativeAlgebraFreeAssociativeAlgebraWithOneFreeLieAlgebraFreeBandandFreeInverseSemigroup: Disallow duplicate named generators inFreeBandandFreeInverseSemigroupsemigroups/Semigroups#1118Plus: