Skip to content

Commit 0af42c7

Browse files
installed derivations for Abelian categories
* IsomorphismFromKernelOfCokernelToImageObject * IsomorphismFromCoimageToCokernelOfKernel
1 parent ef9b637 commit 0af42c7

File tree

3 files changed

+64
-18
lines changed

3 files changed

+64
-18
lines changed

CAP/gap/DerivedMethods.gi

+40
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,26 @@ AddDerivationToCAP( IsomorphismFromKernelOfCokernelToImageObject,
18201820

18211821
end : Description := "IsomorphismFromKernelOfCokernelToImageObject as the inverse of IsomorphismFromImageObjectToKernelOfCokernel" );
18221822

1823+
##
1824+
AddDerivationToCAP( IsomorphismFromKernelOfCokernelToImageObject,
1825+
[ [ ImageEmbedding, 1 ],
1826+
[ CokernelProjection, 1 ],
1827+
[ KernelEmbedding, 1 ],
1828+
[ LiftAlongMonomorphism, 1 ] ],
1829+
1830+
function( cat, mor )
1831+
local image_embedding, ker_of_coker_embedding;
1832+
1833+
image_embedding := ImageEmbedding( cat, mor );
1834+
1835+
ker_of_coker_embedding := KernelEmbedding( cat, CokernelProjection( cat, mor ) );
1836+
1837+
return LiftAlongMonomorphism( cat, image_embedding, ker_of_coker_embedding );
1838+
1839+
end : CategoryFilter := IsAbelianCategory, ##FIXME: PreAbelian?
1840+
Description := "IsomorphismFromKernelOfCokernelToImageObject as the unique lift of the kernel of the cokernel along the image embedding"
1841+
);
1842+
18231843
##
18241844
AddDerivationToCAP( IsomorphismFromImageObjectToKernelOfCokernel,
18251845

@@ -1875,6 +1895,26 @@ AddDerivationToCAP( IsomorphismFromCoimageToCokernelOfKernel,
18751895

18761896
end : Description := "IsomorphismFromCoimageToCokernelOfKernel as the inverse of IsomorphismFromCokernelOfKernelToCoimage" );
18771897

1898+
##
1899+
AddDerivationToCAP( IsomorphismFromCoimageToCokernelOfKernel,
1900+
[ [ CoimageProjection, 1 ],
1901+
[ KernelEmbedding, 1 ],
1902+
[ CokernelProjection, 1 ],
1903+
[ ColiftAlongEpimorphism, 1 ] ],
1904+
1905+
function( cat, mor )
1906+
local coimage_projection, coker_of_ker_projection;
1907+
1908+
coimage_projection := CoimageProjection( cat, mor );
1909+
1910+
coker_of_ker_projection := CokernelProjection( cat, KernelEmbedding( cat, mor ) );
1911+
1912+
return ColiftAlongEpimorphism( cat, coimage_projection, coker_of_ker_projection );
1913+
1914+
end : CategoryFilter := IsAbelianCategory, ##FIXME: PreAbelian?
1915+
Description := "IsomorphismFromCoimageToCokernelOfKernel as the unique colift of the cokernel of the kernel along the coimage projection"
1916+
);
1917+
18781918
##
18791919
AddDerivationToCAP( IsomorphismFromFiberProductToKernelOfDiagonalDifference,
18801920

LinearAlgebraForCAP/gap/CompilerLogic.gi

+10
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,13 @@ CapJitAddLogicTemplate(
5454
needed_packages := [ [ "MatricesForHomalg", ">= 2020.05.19" ] ],
5555
)
5656
);
57+
58+
# RightDivide( B, A ) * RightDivide( A, C ) => RightDivide( B, C )
59+
CapJitAddLogicTemplate(
60+
rec(
61+
variable_names := [ "A", "B", "C" ],
62+
variable_filters := [ "IsHomalgMatrix", "IsHomalgMatrix", "IsHomalgMatrix" ],
63+
src_template := "RightDivide( B, A ) * RightDivide( A, C )",
64+
dst_template := "RightDivide( B, C )",
65+
)
66+
);

LinearAlgebraForCAP/gap/precompiled_categories/MatrixCategoryPrecompiled.gi

+14-18
Original file line numberDiff line numberDiff line change
@@ -2165,16 +2165,14 @@ end
21652165

21662166
########
21672167
function ( cat_1, C_1, alpha_1, I_1 )
2168-
local morphism_attr_1_1, deduped_2_1, deduped_3_1, deduped_4_1;
2169-
deduped_4_1 := UnderlyingRing( cat_1 );
2170-
deduped_3_1 := UnderlyingMatrix( alpha_1 );
2171-
deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) );
2172-
morphism_attr_1_1 := RightDivide( HomalgIdentityMatrix( RowRankOfMatrix( deduped_3_1 ), deduped_4_1 ), RightDivide( LeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * RightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), deduped_4_1 ), RightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) ) );
2168+
local morphism_attr_1_1, deduped_2_1;
2169+
deduped_2_1 := UnderlyingMatrix( alpha_1 );
2170+
morphism_attr_1_1 := RightDivide( HomalgIdentityMatrix( RowRankOfMatrix( deduped_2_1 ), UnderlyingRing( cat_1 ) ), RightDivide( LeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), BasisOfRows( deduped_2_1 ) ) );
21732171
return CreateCapCategoryMorphismWithAttributes( cat_1, CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberRows( morphism_attr_1_1 ) ), C_1, UnderlyingMatrix, morphism_attr_1_1 );
21742172
end
21752173
########
21762174

2177-
, 1817 : IsPrecompiledDerivation := true );
2175+
, 1512 : IsPrecompiledDerivation := true );
21782176

21792177
##
21802178
AddIsAutomorphism( cat,
@@ -2603,12 +2601,12 @@ end
26032601
function ( cat_1, alpha_1 )
26042602
local morphism_attr_1_1, deduped_2_1;
26052603
deduped_2_1 := UnderlyingMatrix( alpha_1 );
2606-
morphism_attr_1_1 := RightDivide( HomalgIdentityMatrix( ColumnRankOfMatrix( deduped_2_1 ), UnderlyingRing( cat_1 ) ), LeftDivide( SyzygiesOfColumns( SyzygiesOfRows( deduped_2_1 ) ), BasisOfColumns( deduped_2_1 ) ) );
2604+
morphism_attr_1_1 := LeftDivide( BasisOfColumns( deduped_2_1 ), SyzygiesOfColumns( SyzygiesOfRows( deduped_2_1 ) ) );
26072605
return CreateCapCategoryMorphismWithAttributes( cat_1, CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberRows( morphism_attr_1_1 ) ), CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberColumns( morphism_attr_1_1 ) ), UnderlyingMatrix, morphism_attr_1_1 );
26082606
end
26092607
########
26102608

2611-
, 808 : IsPrecompiledDerivation := true );
2609+
, 503 : IsPrecompiledDerivation := true );
26122610

26132611
##
26142612
AddIsomorphismFromCokernelOfDiagonalDifferenceToPushout( cat,
@@ -2984,15 +2982,14 @@ end
29842982

29852983
########
29862984
function ( cat_1, alpha_1 )
2987-
local morphism_attr_1_1, deduped_2_1, deduped_3_1;
2988-
deduped_3_1 := UnderlyingMatrix( alpha_1 );
2989-
deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) );
2990-
morphism_attr_1_1 := RightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), UnderlyingRing( cat_1 ) ), RightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) );
2985+
local morphism_attr_1_1, deduped_2_1;
2986+
deduped_2_1 := UnderlyingMatrix( alpha_1 );
2987+
morphism_attr_1_1 := RightDivide( SyzygiesOfRows( SyzygiesOfColumns( deduped_2_1 ) ), BasisOfRows( deduped_2_1 ) );
29912988
return CreateCapCategoryMorphismWithAttributes( cat_1, CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberRows( morphism_attr_1_1 ) ), CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberColumns( morphism_attr_1_1 ) ), UnderlyingMatrix, morphism_attr_1_1 );
29922989
end
29932990
########
29942991

2995-
, 808 : IsPrecompiledDerivation := true );
2992+
, 503 : IsPrecompiledDerivation := true );
29962993

29972994
##
29982995
AddIsomorphismFromKernelOfDiagonalDifferenceToFiberProduct( cat,
@@ -4139,15 +4136,14 @@ end
41394136

41404137
########
41414138
function ( cat_1, C_1, alpha_1, I_1 )
4142-
local morphism_attr_1_1, deduped_2_1, deduped_3_1;
4143-
deduped_3_1 := UnderlyingMatrix( alpha_1 );
4144-
deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) );
4145-
morphism_attr_1_1 := RightDivide( LeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * RightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), UnderlyingRing( cat_1 ) ), RightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) );
4139+
local morphism_attr_1_1, deduped_2_1;
4140+
deduped_2_1 := UnderlyingMatrix( alpha_1 );
4141+
morphism_attr_1_1 := RightDivide( LeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), BasisOfRows( deduped_2_1 ) );
41464142
return CreateCapCategoryMorphismWithAttributes( cat_1, C_1, CreateCapCategoryObjectWithAttributes( cat_1, Dimension, NumberColumns( morphism_attr_1_1 ) ), UnderlyingMatrix, morphism_attr_1_1 );
41474143
end
41484144
########
41494145

4150-
, 1614 : IsPrecompiledDerivation := true );
4146+
, 1309 : IsPrecompiledDerivation := true );
41514147

41524148
##
41534149
AddMorphismFromFiberProductToSink( cat,

0 commit comments

Comments
 (0)