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

Admit non-fields as left acting domains for free (associative or Lie) algebras, and fix the zero-dimensional case #4245

Merged

Conversation

laurentbartholdi
Copy link
Contributor

@laurentbartholdi laurentbartholdi commented Feb 4, 2021

This PR fixes two problems:

gap> l := FreeLieAlgebra(Rationals,1);;
gap> Grading(l).hom_components(2); # ka-boom
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
gap> a := FreeAssociativeAlgebra(Rationals,1);;
gap> Grading(a).hom_components(0); # ka-boom
Error, no method found! For debugging hints type ?Recovery from NoMethodFound

which is fixed by supplying a zero element in case there are no generators to the component; and

gap> l := FreeLieAlgebra(Integers,1);;
gap> Grading(l).hom_components(2); # ka-boom
Error, usage: VectorSpace( <F>, <gens>[, <zero>][, "basis"] ) at /usr/local/Cellar/gap/4.11.0/libexec

granted, there is now little working functionality with these left modules; but I'm working on improving this situation within a package.

lib/alglie.gi Outdated
@@ -3752,8 +3752,9 @@ InstallGlobalFunction( FreeLieAlgebra, function( arg )
od; od;
od;
od;
return VectorSpace( R, List( B[degree],
p->ElementOfMagmaRing( F, zero, [ one ], [ p[3] ] )));
if degree<1 then B := []; else B := B[degree]; fi;
Copy link
Member

Choose a reason for hiding this comment

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

There is something wrong with indentation here

@fingolfin
Copy link
Member

Could you please also provide a test case, say in tst/testbugfix/?

@laurentbartholdi
Copy link
Contributor Author

laurentbartholdi commented Feb 5, 2021 via email

@wilfwilson wilfwilson added kind: bug Issues describing general bugs, and PRs fixing them kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes topic: library labels Feb 8, 2021
@fingolfin
Copy link
Member

Thank you

@fingolfin fingolfin merged commit 82afa0c into gap-system:master Feb 9, 2021
@ThomasBreuer ThomasBreuer self-assigned this Feb 16, 2021
@ThomasBreuer ThomasBreuer changed the title Fix zero-dimensional hom_component and non-field left acting ring Free (associative or Lie) algebras: admit non-fields as left acting domains, fixed the zero-dimensional case. Feb 16, 2021
@ThomasBreuer ThomasBreuer removed their assignment Feb 16, 2021
@ThomasBreuer ThomasBreuer added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 16, 2021
@fingolfin fingolfin changed the title Free (associative or Lie) algebras: admit non-fields as left acting domains, fixed the zero-dimensional case. Admit non-fields as left acting domains for free (associative or Lie) algebras, and fix the zero-dimensional case Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them release notes: added PRs introducing changes that have since been mentioned in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants