Repository navigation
Add Embedding and Projection for direct sums of rings
#6702
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
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dc18b49
embedding and projection for direct sums of rings
cdwensley 6a76783
processing comments from Max
cdwensley 1460361
changed manual example to be closer to the test file
cdwensley 9c19fe3
Update tst/testinstall/ring-dsum.tst
cdwensley f727e5a
Update lib/ringsc.gi
cdwensley 4fbb081
Update lib/ringsc.gi
cdwensley 7531248
Update lib/ringsc.gi
cdwensley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| gap> START_TEST("ring-dsum.tst"); | ||
| gap> # direct sums of small rings | ||
| gap> R7 := SmallRing( 7, 2 );; SetName( R7, "R7" ); | ||
| gap> R8 := SmallRing( 8, 52 );; SetName( R8, "R8" ); | ||
| gap> R9 := SmallRing( 9, 11 );; SetName( R9, "R9" ); | ||
| gap> R78 := DirectSum( R7, R8 ); | ||
| <ring with 4 generators> | ||
| gap> info78 := DirectSumInfo( R78 ); | ||
| rec( embeddings := [ ], first := [ 0, 1, 4 ], projections := [ ], | ||
| rings := [ R7, R8 ] ) | ||
| gap> R789 := DirectSum( [ R7, R8, R9 ] ); | ||
| <ring with 6 generators> | ||
| gap> info789 := DirectSumInfo( R789 ); | ||
| rec( embeddings := [ ], first := [ 0, 1, 4, 6 ], projections := [ ], | ||
| rings := [ R7, R8, R9 ] ) | ||
| gap> # | ||
| gap> # embeddings and projections of small rings | ||
| gap> Embedding( R78, 2 ); | ||
| [ a, b, c ] -> [ Ba, Bb, Bc ] | ||
| gap> e3 := Embedding( R789, 3 ); | ||
| [ a, b ] -> [ Ca, Cb ] | ||
| gap> Projection( R78, 1 ); | ||
| [ Aa, Ba, Bb, Bc ] -> [ a, 0*a, 0*a, 0*a ] | ||
| gap> p3 := Projection( R789, 3 ); | ||
| [ Aa, Ba, Bb, Bc, Ca, Cb ] -> [ 0*a, 0*a, 0*a, 0*a, a, b ] | ||
| gap> genR9 := GeneratorsOfRing( R9 );; | ||
| gap> a := genR9[1];; b := genR9[2];; | ||
| gap> [ a*b^2, ImageElm( e3, a*b^2 ) ]; | ||
| [ -a, -Ca ] | ||
| gap> ForAll( genR9, g -> ( g ^ e3 ) ^ p3 = g ); | ||
| true | ||
| gap> genR789 := GeneratorsOfRing( R789 );; | ||
| gap> x := genR789[3];; y := genR789[6];; | ||
| gap> [ x^2, ImageElm( p3, x^2 ) ]; | ||
| [ Ba+Bc, 0*a ] | ||
| gap> [ y^2, ImageElm( p3, y^2 ) ]; | ||
| [ -Ca, -a ] | ||
| gap> # | ||
| gap> # other direct sums of rings | ||
| gap> R4 := ZmodnZ( 4 );; | ||
| gap> R5 := ZmodnZ( 5 );; | ||
| gap> R6 := ZmodnZ( 6 );; | ||
| gap> R45 := DirectSum( R4, R5 ); | ||
| <ring with 3 generators> | ||
| gap> info45 := DirectSumInfo( R45 ); | ||
| rec( embeddings := [ ], first := [ 0, 2, 3 ], projections := [ ], | ||
| rings := [ (Integers mod 4), GF(5) ] ) | ||
| gap> R456 := DirectSum( [ R4, R5, R6 ] ); | ||
| <ring with 5 generators> | ||
| gap> info456 := DirectSumInfo( R456 ); | ||
| rec( embeddings := [ ], first := [ 0, 2, 3, 5 ], projections := [ ], | ||
| rings := [ (Integers mod 4), GF(5), (Integers mod 6) ] ) | ||
| gap> # | ||
| gap> # embeddings and projections of these rings: methods for these | ||
| gap> # operations are only installed for rings of type IsSubringSCRing | ||
| gap> Embedding( R45, 1 ); | ||
| Error, no method found! For debugging hints type ?Recovery from NoMethodFound | ||
| Error, no 1st choice method found for `Embedding' on 2 arguments | ||
| gap> Projection( R456, 2 ); | ||
| Error, no method found! For debugging hints type ?Recovery from NoMethodFound | ||
| Error, no 1st choice method found for `Projection' on 2 arguments | ||
| gap> # | ||
| gap> # combine these all together: | ||
| gap> D := DirectSum( [R4,R5,R6,R7,R8,R9] ); | ||
| <ring with 11 generators> | ||
| gap> DirectSumInfo( D ); | ||
| rec( embeddings := [ ], first := [ 0, 2, 3, 5, 6, 9, 11 ], | ||
| projections := [ ], | ||
| rings := [ (Integers mod 4), GF(5), (Integers mod 6), R7, R8, R9 ] ) | ||
| gap> # | ||
| gap> # subrings whose generators are not the standard generators | ||
| gap> R3 := SmallRing( 3, 2 );; | ||
| gap> T3 := Subring( R3, [ -GeneratorsOfRing( R3 )[1] ] );; | ||
| gap> D3 := DirectSum( T3, T3 );; | ||
| gap> e := Embedding( D3, 2 );; p := Projection( D3, 2 );; | ||
| gap> ForAll( T3, r -> ( r ^ e ) ^ p = r ); | ||
| true | ||
| gap> ForAll( T3, r -> IsZero( ( r ^ e ) ^ Projection( D3, 1 ) ) ); | ||
| true | ||
| gap> S4 := SmallRing( 4, 1 );; g := GeneratorsOfRing( S4 )[1];; | ||
| gap> T4 := Subring( S4, [ 2*g, g ] );; | ||
| gap> D4 := DirectSum( T4, R3 );; | ||
| gap> e := Embedding( D4, 1 );; p := Projection( D4, 1 );; | ||
| gap> ForAll( T4, r -> ( r ^ e ) ^ p = r ); | ||
| true | ||
| gap> STOP_TEST("ring-dsum.tst"); | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.