Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AdditiveClosuresForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "AdditiveClosuresForCAP",
Subtitle := "Additive closures for pre-abelian categories",
Version := "2025.06-01",
Version := "2025.07-01",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
52 changes: 52 additions & 0 deletions AdditiveClosuresForCAP/examples/WeakHomomorphismTheorem.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#! @Chapter Example on additive closure

#! @Section The category of rows over a Bézout domain is pre-abelian.

#! @Example
LoadPackage( "AdditiveClosuresForCAP", false );
#! true
zz := HomalgRingOfIntegers( );
#! Z
Zmat := CategoryOfRows( zz );
#! Rows( Z )
Display( Zmat );
#! A CAP category with name Rows( Z ):
#!
#! 83 primitive operations were used to derive 425 operations for this category \
#! which algorithmically
#! * IsEquippedWithHomomorphismStructure
#! * IsLinearCategoryOverCommutativeRingWithFinitelyGeneratedFreeExternalHoms
#! * IsPreAbelianCategory
#! * IsRigidSymmetricClosedMonoidalCategory
#! * IsRigidSymmetricCoclosedMonoidalCategory
#! and furthermore mathematically
#! * IsSkeletalCategory
#! * IsStrictMonoidalCategory
mat := HomalgMatrix(
[ [ -36, 18, -80, -54, 28 ],
[ 90, -45, 140, 45, -40 ],
[ -24, 12, -32, -4, 8 ],
[ -6, 3, -4, 5, 0 ] ], zz );;
mor := mat / Zmat;
#! <A morphism in Rows( Z )>
split_epi := CoimageProjection( mor );
#! <An epimorphism in Rows( Z )>
IsSplitEpimorphism( split_epi );
#! true
split_mono := ImageEmbedding( mor );
#! <A monomorphism in Rows( Z )>
IsSplitMonomorphism( split_mono );
#! true
epimono := MorphismFromCoimageToImage( mor );
#! <A morphism in Rows( Z )>
IsEpimorphism( epimono );
#! true
IsMonomorphism( epimono );
#! true
LiftAlongMonomorphism( split_mono, AstrictionToCoimage( mor ) ) = epimono;
#! true
ColiftAlongEpimorphism( split_epi, CoastrictionToImage( mor ) ) = epimono;
#! true
PreCompose( [ split_epi, epimono, split_mono ] ) = mor;
#! true
#! @EndExample
56 changes: 33 additions & 23 deletions AdditiveClosuresForCAP/gap/CategoryOfRows.gi
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ end );
InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,

function( category )
local ring, is_defined_over_field;
local ring, is_defined_over_bezout_domain, is_defined_over_field;

ring := UnderlyingRing( category );

is_defined_over_bezout_domain :=
HasIsBezoutRing( ring ) and IsBezoutRing( ring ) and
HasIsIntegralDomain( ring ) and IsIntegralDomain( ring );

is_defined_over_field := HasIsFieldForHomalg( ring ) and IsFieldForHomalg( ring );

## Well-defined for objects and morphisms
Expand Down Expand Up @@ -735,29 +739,9 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,

end );

## Abelian case
## Pre-Abelian case

if is_defined_over_field then

## enough projectives & injectives

##
AddSomeProjectiveObject( category, { cat, obj } -> obj );

##
AddEpimorphismFromSomeProjectiveObject( category, { cat, obj } -> IdentityMorphism( cat, obj ) );

##
AddIsProjective( category, { cat, obj } -> true, 1 );

##
AddSomeInjectiveObject( category, { cat, obj } -> obj );

##
AddMonomorphismIntoSomeInjectiveObject( category, { cat, obj } -> IdentityMorphism( cat, obj ) );

##
AddIsInjective( category, { cat, obj } -> true, 1 );
if is_defined_over_bezout_domain then

##
AddKernelObject( category,
Expand Down Expand Up @@ -801,6 +785,12 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,

end );

fi;

## Abelian case

if is_defined_over_field then

##
AddImageObject( category,
function( cat, morphism )
Expand Down Expand Up @@ -839,6 +829,26 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,

end );

## enough projectives & injectives

##
AddSomeProjectiveObject( category, { cat, obj } -> obj );

##
AddEpimorphismFromSomeProjectiveObject( category, { cat, obj } -> IdentityMorphism( cat, obj ) );

##
AddIsProjective( category, { cat, obj } -> true, 1 );

##
AddSomeInjectiveObject( category, { cat, obj } -> obj );

##
AddMonomorphismIntoSomeInjectiveObject( category, { cat, obj } -> IdentityMorphism( cat, obj ) );

##
AddIsInjective( category, { cat, obj } -> true, 1 );

##
AddSomeReductionBySplitEpiSummand( category,
function( cat, alpha )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ InstallMethod( CategoryOfRows_as_AdditiveClosure_RingAsCategory,
[ "FinalizeCategory", true ],
],
function( CAP_NAMED_ARGUMENTS, homalg_ring )
local ring_as_category, add, is_defined_over_field, object_constructor, modeling_tower_object_constructor, object_datum, modeling_tower_object_datum, morphism_constructor, modeling_tower_morphism_constructor, morphism_datum, modeling_tower_morphism_datum, wrapper;
local ring_as_category, add, is_defined_over_bezout_domain, is_defined_over_field, object_constructor, modeling_tower_object_constructor, object_datum, modeling_tower_object_datum, morphism_constructor, modeling_tower_morphism_constructor, morphism_datum, modeling_tower_morphism_datum, wrapper;

ring_as_category := RING_AS_CATEGORY( homalg_ring );

Expand All @@ -37,6 +37,10 @@ InstallMethod( CategoryOfRows_as_AdditiveClosure_RingAsCategory,

fi;

is_defined_over_bezout_domain :=
HasIsBezoutRing( homalg_ring ) and IsBezoutRing( homalg_ring ) and
HasIsIntegralDomain( homalg_ring ) and IsIntegralDomain( homalg_ring );

is_defined_over_field := HasIsFieldForHomalg( homalg_ring ) and IsFieldForHomalg( homalg_ring );

if is_defined_over_field then
Expand All @@ -47,6 +51,10 @@ InstallMethod( CategoryOfRows_as_AdditiveClosure_RingAsCategory,

SetIsAbelianCategoryWithEnoughInjectives( add, true );

elif is_defined_over_bezout_domain then

SetIsPreAbelianCategory( add, true );

fi;

Finalize( add );
Expand Down
2 changes: 1 addition & 1 deletion CAP/gap/DerivedMethods.autogen.gi
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ AddDerivationToCAP( CoimageProjection,

function ( cat_1, alpha_1 )
return PostCompose( cat_1, IsomorphismFromCokernelOfKernelToCoimage( cat_1, alpha_1 ), CokernelProjection( cat_1, KernelEmbedding( cat_1, alpha_1 ) ) );
end : CategoryFilter := IsAbelianCategory,
end : CategoryFilter := IsPreAbelianCategory,
Weight := 1,
is_autogenerated_by_CompilerForCAP := true );

Expand Down
6 changes: 3 additions & 3 deletions CAP/gap/DerivedMethods.gi
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ AddDerivationToCAP( ImageEmbedding,
return PreCompose( cat, IsomorphismFromImageObjectToKernelOfCokernel( cat, mor ),
image_embedding );

end : CategoryFilter := IsAbelianCategory ); ##FIXME: PreAbelian?
end : CategoryFilter := IsPreAbelianCategory );

##
AddDerivationToCAP( CoastrictionToImage,
Expand Down Expand Up @@ -2935,7 +2935,7 @@ AddFinalDerivationBundle( "IsomorphismFromImageObjectToKernelOfCokernel as the i
return IdentityMorphism( cat, kernel_of_cokernel );

end,
] : CategoryFilter := IsAbelianCategory );
] : CategoryFilter := IsPreAbelianCategory );

##
AddDerivationToCAP( MorphismFromCoimageToImageWithGivenObjects,
Expand Down Expand Up @@ -3012,7 +3012,7 @@ AddFinalDerivationBundle( "IsomorphismFromCoimageToCokernelOfKernel as the ident
return IdentityMorphism( cat, cokernel_of_kernel );

end,
] : CategoryFilter := IsAbelianCategory );
] : CategoryFilter := IsPreAbelianCategory );

## Final methods for initial object

Expand Down