Fix One/Zero/MultiplicativeZero for partial perms #1040
Merged
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.
Please make sure that this pull request:
Tick all what applies to this pull request
Write below the description of changes (for the release notes)
There were several issues here:
some declarations were missing
for a partial perm semigroup without generators the default method or
a
One
of a partial perm collection was used. This always returned ananswer, when it shouldn't have it if the
One
was not in the semigroup.partial perms and semigroups of partial perms had methods for
Zero
,which according to the manual "return the additive neutral element of
the additive element". Since partial perms are not additive these
methods were inappropriate. As such they are removed in this PR and
methods for
MultiplicativeZero
are introduced instead. Partial permsshould have belonged to the category
IsMultiplicativeElementWithZero
,and so I added this to the definition of
IsPartialPerm
inpperm.g
.This meant moving the declaration of
IsMultiplicativeElementWithZero
from
mgmadj.gd
toarith.gd
so that it is available whenpperm.g
isread (from
read1.g
). There was no default method for the attributeMultiplicativeZero
for an object inIsMultipicativeElementWithZero
so I added one of these too, it simply calls
MultiplicativeZeroOp
.This commit fixes these issues.