From d518f649b291d17562abe029f2ead3f82bd3d3cc Mon Sep 17 00:00:00 2001 From: Tibor Gruen Date: Mon, 10 Aug 2020 16:27:55 +0200 Subject: [PATCH] Made new example C4C4 similar to the first to understand choice of matrices and decomposition; added the example in doc --- doc/Doc.autodoc | 3 + examples/CategoryOfRepresentations.g | 2 + examples/RepresentingC4C4.g | 241 +++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) create mode 100644 examples/RepresentingC4C4.g diff --git a/doc/Doc.autodoc b/doc/Doc.autodoc index 6f1cb1e..611e187 100644 --- a/doc/Doc.autodoc +++ b/doc/Doc.autodoc @@ -5,6 +5,9 @@ @Subsection A category of module homomorphisms @InsertChunk CategoryOfRepresentations +@Subsection Another category of module homomorphisms +@InsertChunk RepresentingC4C4 + @Section GAP categories @Section Global variables @Section Attributes diff --git a/examples/CategoryOfRepresentations.g b/examples/CategoryOfRepresentations.g index 5e96ee7..cace767 100644 --- a/examples/CategoryOfRepresentations.g +++ b/examples/CategoryOfRepresentations.g @@ -159,6 +159,8 @@ Display( nine(kq.b) ); #! A morphism in Category of matrices over GF(3) IsWellDefined( nine ); #! true +Length( WeakDirectSumDecomposition( nine ) ); +#! 1 fortyone := TensorProductOnObjects( nine, nine ); #! <(1)->25, (2)->16; (a)->25x25, (b)->25x16, (c)->16x16> IsWellDefined( fortyone ); diff --git a/examples/RepresentingC4C4.g b/examples/RepresentingC4C4.g new file mode 100644 index 0000000..8224a71 --- /dev/null +++ b/examples/RepresentingC4C4.g @@ -0,0 +1,241 @@ +#! @BeginChunk RepresentingC4C4 + +LoadPackage( "CatReps" ); + +#! In order to understand the workings and choices in the first example, +#! I made a similar example to compare the results. + +#! @Example +c4c4 := ConcreteCategoryForCAP( [ [2,3,4,1], [5,6,7,8], + [,,,,6,7,8,5] ] ); +#! A finite concrete category +HOMALG_MATRICES.PreferDenseMatrices := true; +#! true +GF3 := HomalgRingOfIntegers( 3 ); +#! GF(3) +kq := Algebroid( GF3, c4c4 ); +#! Algebroid generated by the right quiver +#! q(2)[a:1->1,b:1->2,c:2->2] +UnderlyingQuiverAlgebra( kq ); +#! (GF(3) * q) / +#! [ Z(3)^0*(a*a*a*a) + Z(3)*(1), +#! Z(3)^0*(c*c*c*c) + Z(3)*(2), +#! Z(3)*(b*c) + Z(3)^0*(a*b) ] +SetIsLinearClosureOfACategory( kq, true ); +#! @EndExample + +#! We are now looking to represent our concrete category +#! $c4c4$, i.e. we want to find matrices a, b, c that +#! satisfy the relations of the Algebroid. +#! Since the endomorphisms are permutations on a set of +#! 4 elements it makes sense to choose permutation matrices. +#! But if we choose 4x4 permutation matrices for both +#! endomorphisms, the only possible matrix for b would +#! be the 4x4 identity matrix, which isn't very interesting. +#! Instead we can see the permutations on 4 elements in +#! $S_4$ as elements of $Stab_{5,6}$ subset $S_6$ or of +#! $Stab_{5}$ subset $S_5$. As permutation matrices, they +#! are block diagonal matrices with the smaller permutation +#! matrix on 4 elements complemented with a 2x2 or 1x1 +#! identity matrix on the diagonal. +#! This gives us two different +#! dimensions for our target matrix category, $6$ and $5$ +#! respectively, and makes the choice of the matrix for b +#! less trivial. + +#! @Example +CatReps := Hom( kq, GF3 ); +#! The category of functors: Algebroid generated by the +#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> +#! Category of matrices over GF(3) +#aMat := HomalgMatrix( [ +aMat :=[ + [ 0,0,0,1,0,0 ], + [ 1,0,0,0,0,0 ], + [ 0,1,0,0,0,0 ], + [ 0,0,1,0,0,0 ], + [ 0,0,0,0,1,0 ], + [ 0,0,0,0,0,1 ] +];; +# ], 6, 6, GF3 ); +# +#cMat := HomalgMatrix( [ +cMat := [ + [ 0,0,0,1,0 ], + [ 1,0,0,0,0 ], + [ 0,1,0,0,0 ], + [ 0,0,1,0,0 ], + [ 0,0,0,0,1 ] +];; +# ], 5, 5, GF3 ); +# +Display( aMat^4 ); +#! [ [ 1, 0, 0, 0, 0, 0 ], +#! [ 0, 1, 0, 0, 0, 0 ], +#! [ 0, 0, 1, 0, 0, 0 ], +#! [ 0, 0, 0, 1, 0, 0 ], +#! [ 0, 0, 0, 0, 1, 0 ], +#! [ 0, 0, 0, 0, 0, 1 ] ] +Display( cMat^4 ); +#! [ [ 1, 0, 0, 0, 0 ], +#! [ 0, 1, 0, 0, 0 ], +#! [ 0, 0, 1, 0, 0 ], +#! [ 0, 0, 0, 1, 0 ], +#! [ 0, 0, 0, 0, 1 ] ] +#! @EndExample + +#! I calculated by hand the matrix multiplications +#! $a*b = b*c$ and what they imply for the entries in b +#! given the matrices a and c above. The result is that +#! from the 30 variables $b_{11},...,b_{65}$ only +#! nine free variables remain, which can be set to +#! any element in our field: +#! + +#! @Example +b11 := 0;; b12 := 1;; b13 := 0;; b21 := 1;; +b15 := 0;; b51 := 1;; b55 := 0;; b61 := 1;; b65 := 1;; + +#bMat := HomalgMatrix( [ +bMat := [ + [b11,b12,b13,b21,b15], + [b21,b11,b12,b13,b15], + [b13,b21,b11,b12,b15], + [b12,b13,b21,b11,b15], + [b51,b51,b51,b51,b55], + [b61,b61,b61,b61,b65] +];; +#], 6,5, GF3 ); +# +Display( bMat ); +#! [ [ 0, 1, 0, 1, 0 ], +#! [ 1, 0, 1, 0, 0 ], +#! [ 0, 1, 0, 1, 0 ], +#! [ 1, 0, 1, 0, 0 ], +#! [ 1, 1, 1, 1, 0 ], +#! [ 1, 1, 1, 1, 1 ] ] +Display( aMat*bMat ); +#! [ [ 1, 0, 1, 0, 0 ], +#! [ 0, 1, 0, 1, 0 ], +#! [ 1, 0, 1, 0, 0 ], +#! [ 0, 1, 0, 1, 0 ], +#! [ 1, 1, 1, 1, 0 ], +#! [ 1, 1, 1, 1, 1 ] ] +Display( bMat*cMat ); +#! [ [ 1, 0, 1, 0, 0 ], +#! [ 0, 1, 0, 1, 0 ], +#! [ 1, 0, 1, 0, 0 ], +#! [ 0, 1, 0, 1, 0 ], +#! [ 1, 1, 1, 1, 0 ], +#! [ 1, 1, 1, 1, 1 ] ] +aMat*bMat = bMat*cMat; +#! true +#! @EndExample + +#! So the three relations in our algebroid should be satisfied +#! by these matrices, therefore they should make a +#! well-defined representation of C4C4. (Defining the matrices +#! as HomalgMatrices instead of GAP matrices yields in an error +#! in RecordOfCatRep which is used in WeakDirectSumDecomposition, +#! so for now they are defined as GAP matrices). + +#! @Example +eleven := AsObjectInHomCategory( kq, [ 6, 5 ], [ aMat, bMat, cMat ] ); +#! <(1)->6, (2)->5; (a)->6x6, (b)->6x5, (c)->5x5> +IsWellDefined( eleven ); +#! true +Display( eleven ); +#! An object in The category of functors: Algebroid +#! generated by the right quiver q(2)[a:1->1,b:1->2,c:2->2] +#! -> Category of matrices over GF(3) defined by the following data: +#! +#! +#! Image of <(1)>: +#! A vector space object over GF(3) of dimension 6 +#! +#! Image of <(2)>: +#! A vector space object over GF(3) of dimension 5 +#! +#! Image of (1)-[{ Z(3)^0*(a) }]->(1): +#! . . . 1 . . +#! 1 . . . . . +#! . 1 . . . . +#! . . 1 . . . +#! . . . . 1 . +#! . . . . . 1 +#! +#! A morphism in Category of matrices over GF(3) +#! +#! +#! Image of (1)-[{ Z(3)^0*(b) }]->(2): +#! . 1 . 1 . +#! 1 . 1 . . +#! . 1 . 1 . +#! 1 . 1 . . +#! 1 1 1 1 . +#! 1 1 1 1 1 +#! +#! A morphism in Category of matrices over GF(3) +#! +#! +#! Image of (2)-[{ Z(3)^0*(c) }]->(2): +#! . . . 1 . +#! 1 . . . . +#! . 1 . . . +#! . . 1 . . +#! . . . . 1 +#! +#! A morphism in Category of matrices over GF(3) +gammas := WeakDirectSumDecomposition( eleven ); +#! [ <(1)->1x6, (2)->0x5>, <(1)->1x6, (2)->1x5>, <(1)->1x6, (2)->1x5>, +#! <(1)->2x6, (2)->0x5>, <(1)->0x6, (2)->2x5>, <(1)->1x6, (2)->1x5> ] +#! @EndExample + +#! As opposed to nine in the first example, eleven itself +#! can already be decomposed. + +#! @Example +Display( Source( UniversalMorphismFromDirectSum( gammas ) ) ); +#! An object in The category of functors: Algebroid +#! generated by the right quiver q(2)[a:1->1,b:1->2,c:2->2] +#! -> Category of matrices over GF(3) defined by the following data: +#! +#! +#! Image of <(1)>: +#! A vector space object over GF(3) of dimension 6 +#! +#! Image of <(2)>: +#! A vector space object over GF(3) of dimension 5 +#! +#! Image of (1)-[{ Z(3)^0*(a) }]->(1): +#! 1 . . . . . +#! . 1 . . . . +#! . . 2 . . . +#! . . . . 2 . +#! . . . 1 . . +#! . . . . . 1 +#! +#! A morphism in Category of matrices over GF(3) +#! +#! +#! Image of (1)-[{ Z(3)^0*(b) }]->(2): +#! . . . . . +#! 1 . . . . +#! . 1 . . . +#! . . . . . +#! . . . . . +#! . . . . 2 +#! +#! A morphism in Category of matrices over GF(3) +#! +#! +#! Image of (2)-[{ Z(3)^0*(c) }]->(2): +#! 1 . . . . +#! . 2 . . . +#! . . 2 2 . +#! . . 2 1 . +#! . . . . 1 +#! +#! A morphism in Category of matrices over GF(3) +#! @EndExample +#! @EndChunk