Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6618 +/- ##
==========================================
- Coverage 79.67% 79.67% -0.01%
==========================================
Files 684 684
Lines 295464 295517 +53
Branches 8656 8656
==========================================
+ Hits 235421 235462 +41
- Misses 58217 58229 +12
Partials 1826 1826 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
A tricky detail is that the direct sum of matrix algebras, for example, may be constructed using either basis vectors or algebra generators, so this needs to be stored in the info. |
|
This needs tests |
|
@fingolfin - indeed, and tst/testextra appears to be the best place? |
|
Work on Projections stalled while waiting for a reply to my message to GAP support: "Why is this map not single valued?" |
|
It appears that DirectProductInfo is not documented in the reference manual, so this should be added. |
|
... or, perhaps, there was a decision to not document these sorts of Info? |
|
Problem with Projections fixed: should use Zero(A), not One(A), as the image for the other generators. |
|
ringsc.gd contains the declatation: DeclareAttribute( "DirectSumInfo", IsGroup, "mutable" ); |
|
Just realised that, in a DirectSumInfo of a ring, info.first starts at 0, not 1. So will change to that convention here. |
|
One of you recent pushes screwed up the history. It now contains a handful of commits from master. Could you please try to rebase your PR once you are happy with your changes? |
|
No great surprise, as I do not understand the process of rebasing.
I have just committed; rebased; and made two small commits.
How does the history look to you now? Chris
|
|
Note that commit b352a74 also includes an implementation of Embedding and Projection for direct sums of rings, and documents DirectSumInfo as section 56.9.6. |
|
I had a look at the branch. It contains 34 commits from
So the rule is: after a rebase, never Here is how to clean up. I tried it on a copy of your branch and it goes
In future, to bring the branch up to date with This does not use your local |
|
Many thanks for your very detailed instructions - sorry to cause you so much hassle.
|
fingolfin
left a comment
There was a problem hiding this comment.
Thanks for working on this, embeddings and projections for direct sums of algebras have been missing for a long time (the #T comments you removed say so). The basic case works: for a sum of two algebras built from bases, Embedding and Projection onto the second summand do what they should.
It needs more work before it can be merged, though.
If you want, restrict this PR to algebras and do rings in a follow-up; that would make it quite a bit smaller.
Changing the declaration of DirectSumInfo from IsGroup to IsRing is right.
AI disclosure: I used AI to help review this PR.
|
Not sure why the tests are failing here - just seems to be a variation in line breaks? |
fingolfin
left a comment
There was a problem hiding this comment.
Thanks, this is much better: the history is clean, and nine of my thirteen comments are dealt with, so I resolved those. Four are still open (list form, kernel of the projection, flattening in the Lie method, test file); I added replies and a few new inline comments.
About the failing checks. There are two causes, both easy to fix.
-
gaplintcomplains aboutlib/algebra.gi:3020: Unused local variables: info2, info1. Removing them from thelocallist fixes it. -
All other failing checks show the same six differences in
tst/testinstall/alg-dsum.tst. You are right that they are only line breaks, butTestcompares the output character by character:Testalways formats output for a line width of 80, however wide your terminal is. Output copied from an interactive session in a window of another width, or re-wrapped by hand, has its line breaks elsewhere. For example line 161 of the file is 114 characters long.- An empty line directly before a
gap>line counts as output of the previous command. That is the difference reported for lines 170 and 191.
You do not need to fix this by hand. Start GAP in the root directory of your checkout and let it rewrite the file:
gap> Test( "tst/testinstall/alg-dsum.tst", rec( rewriteToFile := "tst/testinstall/alg-dsum.tst" ) );This shows the six differences once more and replaces the expected output in the file by what GAP really prints. Afterwards
gap> Test( "tst/testinstall/alg-dsum.tst" );must return
true.git diffshould then show changes in a handful of lines only. Commit and push as usual.
It is worth running that second command each time before you push a change to a test file. And if you want an empty line to separate two parts of a test file, put a line starting with # after it (not gap> #).
AI disclosure: I used Claude Code (Opus 5.5) to re-review the branch. It built it, ran the examples quoted in the comments, and drafted the comments.
|
Have attempted to deal with all the requests above, but have probably missed a few. See what happens when the changes are uploaded. |
Embedding and Projection for direct sums of algebras
|
Just attempted to rebase on current master using instructions from 4th August. Seems to have worked. |
Methods for DirectSumOfAlgebras do not yet provide embeddings or projections. This PR aims to remedy that.
The first commit just adds SetDirectSumInfo to the various methods.