diff --git a/CAP/PackageInfo.g b/CAP/PackageInfo.g index 8cde46187a..05e1ecbf22 100644 --- a/CAP/PackageInfo.g +++ b/CAP/PackageInfo.g @@ -10,7 +10,7 @@ SetPackageInfo( rec( PackageName := "CAP", Subtitle := "Categories, Algorithms, Programming", -Version := "2022.09-15", +Version := "2022.09-16", Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ), License := "GPL-2.0-or-later", diff --git a/CAP/gap/InstallAdds.gi b/CAP/gap/InstallAdds.gi index b15361cf92..904e6d6747 100644 --- a/CAP/gap/InstallAdds.gi +++ b/CAP/gap/InstallAdds.gi @@ -546,7 +546,23 @@ InstallGlobalFunction( CapInternalInstallAdd, # set name for debugging purposes if NameFunction( i[ 1 ] ) in [ "unknown", "_EVALSTRINGTMP" ] then - SetNameFunction( i[ 1 ], Concatenation( "Function added to ", Name( category ), " for ", function_name ) ); + if is_derivation then + + SetNameFunction( i[ 1 ], Concatenation( "Derivation (first added to ", Name( category ), ") of ", function_name ) ); + + elif is_final_derivation then + + SetNameFunction( i[ 1 ], Concatenation( "Final derivation (first added to ", Name( category ), ") of ", function_name ) ); + + elif is_precompiled_derivation then + + SetNameFunction( i[ 1 ], Concatenation( "Precompiled derivation added to ", Name( category ), " for ", function_name ) ); + + else + + SetNameFunction( i[ 1 ], Concatenation( "Function added to ", Name( category ), " for ", function_name ) ); + + fi; fi; diff --git a/FreydCategoriesForCAP/PackageInfo.g b/FreydCategoriesForCAP/PackageInfo.g index f1d71b6cc4..cf514a2306 100644 --- a/FreydCategoriesForCAP/PackageInfo.g +++ b/FreydCategoriesForCAP/PackageInfo.g @@ -10,7 +10,7 @@ SetPackageInfo( rec( PackageName := "FreydCategoriesForCAP", Subtitle := "Freyd categories - Formal (co)kernels for additive categories", -Version := "2022.09-06", +Version := "2022.09-07", Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ), License := "GPL-2.0-or-later", diff --git a/FreydCategoriesForCAP/gap/CategoryOfRowsAsAdditiveClosureOfRingAsCategory.gi b/FreydCategoriesForCAP/gap/CategoryOfRowsAsAdditiveClosureOfRingAsCategory.gi index 730215c2b4..114d73ba51 100644 --- a/FreydCategoriesForCAP/gap/CategoryOfRowsAsAdditiveClosureOfRingAsCategory.gi +++ b/FreydCategoriesForCAP/gap/CategoryOfRowsAsAdditiveClosureOfRingAsCategory.gi @@ -179,6 +179,83 @@ InstallMethod( CategoryOfRowsAsAdditiveClosureOfRingAsCategory, end ); + ## + AddIsLiftable( wrapper, + function( cat, alpha, beta ) + + return IsZero( DecideZeroRows( UnderlyingMatrix( alpha ), UnderlyingMatrix( beta ) ) ); + + end ); + + ## + if HasIsCommutative( homalg_ring ) and IsCommutative( homalg_ring ) then + + ## Operations related to homomorphism structure + + Assert( 0, IsCategoryOfRows( RangeCategoryOfHomomorphismStructure( wrapper ) ) ); + + ## + AddHomomorphismStructureOnObjects( wrapper, + function( cat, object_1, object_2 ) + + return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), RankOfObject( object_1 ) * RankOfObject( object_2 ) ); + + end ); + + ## + AddHomomorphismStructureOnMorphismsWithGivenObjects( wrapper, + function( cat, source, alpha, beta, range ) + + return CategoryOfRowsMorphism( RangeCategoryOfHomomorphismStructure( cat ), source, + KroneckerMat( TransposedMatrix( UnderlyingMatrix( alpha ) ), UnderlyingMatrix( beta ) ), + range ); + + end ); + + ## + AddDistinguishedObjectOfHomomorphismStructure( wrapper, + function( cat ) + + return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), 1 ); + + end ); + + ## + AddInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects( wrapper, + function( cat, distinguished_object, alpha, r ) + local underlying_matrix; + + underlying_matrix := UnderlyingMatrix( alpha ); + + underlying_matrix := ConvertMatrixToRow( underlying_matrix ); + + return CategoryOfRowsMorphism( RangeCategoryOfHomomorphismStructure( cat ), + distinguished_object, + underlying_matrix, + r + ); + + end ); + + ## + AddInterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( wrapper, + function( cat, A, B, morphism ) + local nr_rows, nr_columns, underlying_matrix; + + nr_rows := RankOfObject( A ); + + nr_columns := RankOfObject( B ); + + underlying_matrix := UnderlyingMatrix( morphism ); + + underlying_matrix := ConvertRowToMatrix( underlying_matrix, nr_rows, nr_columns ); + + return CategoryOfRowsMorphism( cat, A, underlying_matrix, B ); + + end ); + + fi; + Finalize( wrapper ); return wrapper; diff --git a/LinearAlgebraForCAP/PackageInfo.g b/LinearAlgebraForCAP/PackageInfo.g index 67874f7589..b1d155bf09 100644 --- a/LinearAlgebraForCAP/PackageInfo.g +++ b/LinearAlgebraForCAP/PackageInfo.g @@ -10,7 +10,7 @@ SetPackageInfo( rec( PackageName := "LinearAlgebraForCAP", Subtitle := "Category of Matrices over a Field for CAP", -Version := "2022.09-08", +Version := "2022.09-09", Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ), License := "GPL-2.0-or-later", diff --git a/LinearAlgebraForCAP/gap/MatrixCategoryAsAdditiveClosureOfRingAsCategory.gi b/LinearAlgebraForCAP/gap/MatrixCategoryAsAdditiveClosureOfRingAsCategory.gi index 8b340e5b58..f22d37e5c2 100644 --- a/LinearAlgebraForCAP/gap/MatrixCategoryAsAdditiveClosureOfRingAsCategory.gi +++ b/LinearAlgebraForCAP/gap/MatrixCategoryAsAdditiveClosureOfRingAsCategory.gi @@ -149,6 +149,78 @@ InstallMethod( MatrixCategoryAsAdditiveClosureOfRingAsCategory, end ); + ## + AddIsLiftable( wrapper, + function( cat, alpha, beta ) + + return IsZero( DecideZeroRows( UnderlyingMatrix( alpha ), UnderlyingMatrix( beta ) ) ); + + end ); + + ## Operations related to homomorphism structure + + Assert( 0, IsCategoryOfRows( RangeCategoryOfHomomorphismStructure( wrapper ) ) ); + + ## + AddHomomorphismStructureOnObjects( wrapper, + function( cat, object_1, object_2 ) + + return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), RankOfObject( object_1 ) * RankOfObject( object_2 ) ); + + end ); + + ## + AddHomomorphismStructureOnMorphismsWithGivenObjects( wrapper, + function( cat, source, alpha, beta, range ) + + return CategoryOfRowsMorphism( RangeCategoryOfHomomorphismStructure( cat ), source, + KroneckerMat( TransposedMatrix( UnderlyingMatrix( alpha ) ), UnderlyingMatrix( beta ) ), + range ); + + end ); + + ## + AddDistinguishedObjectOfHomomorphismStructure( wrapper, + function( cat ) + + return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), 1 ); + + end ); + + ## + AddInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects( wrapper, + function( cat, distinguished_object, alpha, r ) + local underlying_matrix; + + underlying_matrix := UnderlyingMatrix( alpha ); + + underlying_matrix := ConvertMatrixToRow( underlying_matrix ); + + return CategoryOfRowsMorphism( RangeCategoryOfHomomorphismStructure( cat ), + distinguished_object, + underlying_matrix, + r + ); + + end ); + + ## + AddInterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( wrapper, + function( cat, A, B, morphism ) + local nr_rows, nr_columns, underlying_matrix; + + nr_rows := Dimension( A ); + + nr_columns := Dimension( B ); + + underlying_matrix := UnderlyingMatrix( morphism ); + + underlying_matrix := ConvertRowToMatrix( underlying_matrix, nr_rows, nr_columns ); + + return VectorSpaceMorphism( cat, A, underlying_matrix, B ); + + end ); + Finalize( wrapper ); return wrapper;