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

Bug fix: IsRightAlgebraModule is a right module, not left (DO NOT MERGE) #2221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fingolfin
Copy link
Member

No description provided.

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: library labels Feb 28, 2018
@fingolfin
Copy link
Member Author

Perhaps @willemdegraaf (who wrote this code) has some insights on this? Or perhaps @hulpke or @ThomasBreuer who simply have been around for a long time and know a lot about a lot of GAP code in general?

Naively, this fix is "obviously right", but I am slightly worried that I might be missing something subtle here?

Also, I guess a test case which checks the change would be a useful addition for this PR...

@willemdegraaf
Copy link
Contributor

willemdegraaf commented Mar 2, 2018 via email

@fingolfin
Copy link
Member Author

fingolfin commented Mar 2, 2018

@willemdegraaf thanks for the quick reply!

OK, I see now: IsAlgebraModule is defined as a property of objects in the filter IsLeftModule., and then both IsLeftAlgebraModule and also, confusingly, IsRightAlgebraModule are properties for objects in the filter IsLeftModule.

Perhaps IsLeftAlgebraModule really should be a synonym for IsAlgebraModule and IsLeftModule? But as I wrote, IsAlgebraModule is right now only defined for IsLeftModule anyway...

Then again, to the best of my knowledge, neither IsLeftAlgebraModule nor IsRightAlgebraModule are ever used: Other than in the definition, the two don't occur elsewhere, neither in the GAP library nor in any deposited package.

So perhaps we should just remove them: they are unusable anyway, as no methods or implications are installed for them

@fingolfin
Copy link
Member Author

Note that e.g. IsRightAlgebraModuleElement, as well as the constructors RightAlgebraModuleByGenerators and RightAlgebraModule, are used.

So perhaps that they are not set is just an oversight?

Note that the property IsAlgebraModule also has no method or implications installed, so the only way it is set on something are explicit SetIsAlgebraModule calls, which is what the code does.

But then, it seems to me that IsAlgebraModule, IsRightAlgebraModule and IsLeftAlgebraModule then perhaps should not be properties, but rather categories -- you can't sensibly take some left module, and "test" if it is also a right module, can you? (I mean, sure, if e.g. the acting domain is commutative, then one could rightfully treat this as a right module, even a bi-module -- but that's not what I think IsRightAlgebraModule, IsRightAlgebraModuleElement etc. are meant to indicate -- rather, they are technical flags which indicate that "multiplication from the right" is supported, which a pure left-module element might not, even if the acting domain is abelian.

Hum.

@willemdegraaf
Copy link
Contributor

willemdegraaf commented Mar 2, 2018 via email

@fingolfin fingolfin added the do not merge PRs which are not yet ready to be merged (e.g. submitted for discussion, or test results) label Mar 3, 2018
@fingolfin fingolfin changed the title Bug fix: IsRightAlgebraModule is a right module, not left Bug fix: IsRightAlgebraModule is a right module, not left (DO NOT MERGE) Mar 3, 2018
@fingolfin fingolfin closed this May 31, 2021
@fingolfin fingolfin reopened this May 31, 2021
@codecov
Copy link

codecov bot commented May 31, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@144b52a). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #2221   +/-   ##
=========================================
  Coverage          ?   93.65%           
=========================================
  Files             ?      708           
  Lines             ?   803466           
  Branches          ?        0           
=========================================
  Hits              ?   752495           
  Misses            ?    50971           
  Partials          ?        0           
Impacted Files Coverage Δ
lib/algrep.gd 100.00% <ø> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge PRs which are not yet ready to be merged (e.g. submitted for discussion, or test results) kind: bug Issues describing general bugs, and PRs fixing them topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants