From df591159b17f1eb4b2e14b1b75482f4df7345887 Mon Sep 17 00:00:00 2001 From: Mohamed Barakat Date: Wed, 4 Oct 2023 13:11:17 +0200 Subject: [PATCH] AddDerivationToCAP( MorphismFromCoimageToImageWithGivenObjects, ... ) --- CAP/gap/DerivedMethods.autogen.gi | 10 +-- CAP/gap/DerivedMethods.gi | 17 ++-- .../MatrixCategory_precompiled.gi | 87 +++++-------------- 3 files changed, 33 insertions(+), 81 deletions(-) diff --git a/CAP/gap/DerivedMethods.autogen.gi b/CAP/gap/DerivedMethods.autogen.gi index 3ba6f3a1ad..dbc39fce8e 100644 --- a/CAP/gap/DerivedMethods.autogen.gi +++ b/CAP/gap/DerivedMethods.autogen.gi @@ -1050,17 +1050,15 @@ end : CategoryFilter := IsCapCategory, ## AddDerivationToCAP( MorphismFromCoimageToImageWithGivenObjects, - "dualizing the derivation of MorphismFromCoimageToImageWithGivenObjects by MorphismFromCoimageToImageWithGivenObjects using that images are given by kernels of cokernels", + "dualizing the derivation of MorphismFromCoimageToImageWithGivenObjects by MorphismFromCoimageToImageWithGivenObjects using that the image embedding lifts the coimage astriction", [ - [ KernelEmbedding, 1 ], - [ CokernelColift, 1 ], + [ CoimageProjectionWithGivenCoimageObject, 1 ], [ CoastrictionToImageWithGivenImageObject, 1 ], - [ PostCompose, 1 ], - [ IsomorphismFromCoimageToCokernelOfKernel, 1 ], + [ ColiftAlongEpimorphism, 1 ], ], function ( cat_1, C_1, alpha_1, I_1 ) - return PostCompose( cat_1, CokernelColift( cat_1, KernelEmbedding( cat_1, alpha_1 ), I_1, CoastrictionToImageWithGivenImageObject( cat_1, alpha_1, I_1 ) ), IsomorphismFromCoimageToCokernelOfKernel( cat_1, alpha_1 ) ); + return ColiftAlongEpimorphism( cat_1, CoimageProjectionWithGivenCoimageObject( cat_1, alpha_1, C_1 ), CoastrictionToImageWithGivenImageObject( cat_1, alpha_1, I_1 ) ); end : CategoryFilter := IsPreAbelianCategory, Weight := 1, is_autogenerated_by_CompilerForCAP := true ); diff --git a/CAP/gap/DerivedMethods.gi b/CAP/gap/DerivedMethods.gi index 6aeaab3d98..8b9b08404a 100644 --- a/CAP/gap/DerivedMethods.gi +++ b/CAP/gap/DerivedMethods.gi @@ -2939,21 +2939,16 @@ AddFinalDerivationBundle( "IsomorphismFromImageObjectToKernelOfCokernel as the i ## AddDerivationToCAP( MorphismFromCoimageToImageWithGivenObjects, - "MorphismFromCoimageToImageWithGivenObjects using that images are given by kernels of cokernels", - [ [ CokernelProjection, 1 ], - [ KernelLift, 1 ], + "MorphismFromCoimageToImageWithGivenObjects using that the image embedding lifts the coimage astriction", + [ [ ImageEmbeddingWithGivenImageObject, 1 ], [ AstrictionToCoimageWithGivenCoimageObject, 1 ], - [ PreCompose, 1 ], - [ IsomorphismFromKernelOfCokernelToImageObject, 1 ] ], + [ LiftAlongMonomorphism, 1 ] ], function( cat, coimage, morphism, image ) - local cokernel_projection, kernel_lift; - - cokernel_projection := CokernelProjection( cat, morphism ); - kernel_lift := KernelLift( cat, cokernel_projection, coimage, AstrictionToCoimageWithGivenCoimageObject( cat, morphism, coimage ) ); - - return PreCompose( cat, kernel_lift, IsomorphismFromKernelOfCokernelToImageObject( cat, morphism ) ); + return LiftAlongMonomorphism( cat, + ImageEmbeddingWithGivenImageObject( cat, morphism, image ), + AstrictionToCoimageWithGivenCoimageObject( cat, morphism, coimage ) ); end : CategoryFilter := IsPreAbelianCategory ); diff --git a/LinearAlgebraForCAP/gap/precompiled_categories/MatrixCategory_precompiled.gi b/LinearAlgebraForCAP/gap/precompiled_categories/MatrixCategory_precompiled.gi index 5276a4a3e4..5d3ae08adc 100644 --- a/LinearAlgebraForCAP/gap/precompiled_categories/MatrixCategory_precompiled.gi +++ b/LinearAlgebraForCAP/gap/precompiled_categories/MatrixCategory_precompiled.gi @@ -4154,28 +4154,24 @@ end ######## function ( cat_1, alpha_1 ) - local morphism_attr_1_1, deduped_2_1, deduped_3_1, deduped_4_1; - deduped_4_1 := UnderlyingRing( cat_1 ); - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - morphism_attr_1_1 := UniqueRightDivide( HomalgIdentityMatrix( RowRankOfMatrix( deduped_3_1 ), deduped_4_1 ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), deduped_4_1 ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) ) ); + local morphism_attr_1_1, deduped_2_1; + deduped_2_1 := AsHomalgMatrix( alpha_1 ); + morphism_attr_1_1 := UniqueRightDivide( HomalgIdentityMatrix( RowRankOfMatrix( deduped_2_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), BasisOfRows( deduped_2_1 ) ) ); return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, NumberRows( morphism_attr_1_1 ) ), morphism_attr_1_1, AsCapCategoryObject( cat_1, NumberColumns( morphism_attr_1_1 ) ) ); end ######## - , 1811 : IsPrecompiledDerivation := true ); + , 805 : IsPrecompiledDerivation := true ); ## cat!.cached_precompiled_functions.InverseOfMorphismFromCoimageToImage := ######## function ( cat_1, alpha_1 ) - local deduped_1_1, deduped_2_1, deduped_3_1, deduped_4_1; - deduped_4_1 := UnderlyingRing( cat_1 ); - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := RowRankOfMatrix( deduped_3_1 ); - deduped_1_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, deduped_2_1 ), UniqueRightDivide( HomalgIdentityMatrix( deduped_2_1, deduped_4_1 ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_1_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_1_1 ), deduped_4_1 ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_1_1 ) ) ), AsCapCategoryObject( cat_1, ColumnRankOfMatrix( deduped_3_1 ) ) ); + local deduped_1_1, deduped_2_1; + deduped_2_1 := AsHomalgMatrix( alpha_1 ); + deduped_1_1 := RowRankOfMatrix( deduped_2_1 ); + return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, deduped_1_1 ), UniqueRightDivide( HomalgIdentityMatrix( deduped_1_1, UnderlyingRing( cat_1 ) ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), BasisOfRows( deduped_2_1 ) ) ), AsCapCategoryObject( cat_1, ColumnRankOfMatrix( deduped_2_1 ) ) ); end ######## @@ -4186,32 +4182,13 @@ end ######## function ( cat_1, I_1, alpha_1, C_1 ) - local morphism_attr_1_1, deduped_2_1, deduped_3_1, deduped_4_1; - deduped_4_1 := UnderlyingRing( cat_1 ); - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - morphism_attr_1_1 := UniqueRightDivide( HomalgIdentityMatrix( RowRankOfMatrix( deduped_3_1 ), deduped_4_1 ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), deduped_4_1 ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) ) ); - return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, NumberRows( morphism_attr_1_1 ) ), morphism_attr_1_1, C_1 ); -end -######## - - , 1610 : IsPrecompiledDerivation := true ); - - ## - cat!.cached_precompiled_functions.InverseOfMorphismFromCoimageToImageWithGivenObjects := - -######## -function ( cat_1, I_1, alpha_1, C_1 ) - local deduped_1_1, deduped_2_1, deduped_3_1, deduped_4_1; - deduped_4_1 := UnderlyingRing( cat_1 ); - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := RowRankOfMatrix( deduped_3_1 ); - deduped_1_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, deduped_2_1 ), UniqueRightDivide( HomalgIdentityMatrix( deduped_2_1, deduped_4_1 ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_1_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_1_1 ), deduped_4_1 ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_1_1 ) ) ), C_1 ); + local deduped_1_1; + deduped_1_1 := AsHomalgMatrix( alpha_1 ); + return AsCapCategoryMorphism( cat_1, I_1, UniqueRightDivide( HomalgIdentityMatrix( AsInteger( I_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_1_1 ), deduped_1_1 ), BasisOfRows( deduped_1_1 ) ) ), C_1 ); end ######## - ; + , 604 : IsPrecompiledDerivation := true ); ## AddIsAutomorphism( cat, @@ -7094,25 +7071,23 @@ end ######## function ( cat_1, alpha_1 ) - local morphism_attr_1_1, deduped_2_1, deduped_3_1; - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - morphism_attr_1_1 := UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) ); + local morphism_attr_1_1, deduped_2_1; + deduped_2_1 := AsHomalgMatrix( alpha_1 ); + morphism_attr_1_1 := UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), BasisOfRows( deduped_2_1 ) ); return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, NumberRows( morphism_attr_1_1 ) ), morphism_attr_1_1, AsCapCategoryObject( cat_1, NumberColumns( morphism_attr_1_1 ) ) ); end ######## - , 1609 : IsPrecompiledDerivation := true ); + , 603 : IsPrecompiledDerivation := true ); ## cat!.cached_precompiled_functions.MorphismFromCoimageToImage := ######## function ( cat_1, alpha_1 ) - local deduped_1_1, deduped_2_1; - deduped_2_1 := AsHomalgMatrix( alpha_1 ); - deduped_1_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_2_1 ) ); - return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, ColumnRankOfMatrix( deduped_2_1 ) ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), deduped_1_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_1_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( BasisOfRows( deduped_2_1 ), deduped_1_1 ) ), AsCapCategoryObject( cat_1, RowRankOfMatrix( deduped_2_1 ) ) ); + local deduped_1_1; + deduped_1_1 := AsHomalgMatrix( alpha_1 ); + return AsCapCategoryMorphism( cat_1, AsCapCategoryObject( cat_1, ColumnRankOfMatrix( deduped_1_1 ) ), UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_1_1 ), deduped_1_1 ), BasisOfRows( deduped_1_1 ) ), AsCapCategoryObject( cat_1, RowRankOfMatrix( deduped_1_1 ) ) ); end ######## @@ -7123,29 +7098,13 @@ end ######## function ( cat_1, C_1, alpha_1, I_1 ) - local morphism_attr_1_1, deduped_2_1, deduped_3_1; - deduped_3_1 := AsHomalgMatrix( alpha_1 ); - deduped_2_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_3_1 ) ); - morphism_attr_1_1 := UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_3_1 ), deduped_3_1 ), deduped_2_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_2_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( BasisOfRows( deduped_3_1 ), deduped_2_1 ) ); - return AsCapCategoryMorphism( cat_1, C_1, morphism_attr_1_1, AsCapCategoryObject( cat_1, NumberColumns( morphism_attr_1_1 ) ) ); -end -######## - - , 1408 : IsPrecompiledDerivation := true ); - - ## - cat!.cached_precompiled_functions.MorphismFromCoimageToImageWithGivenObjects := - -######## -function ( cat_1, C_1, alpha_1, I_1 ) - local deduped_1_1, deduped_2_1; - deduped_2_1 := AsHomalgMatrix( alpha_1 ); - deduped_1_1 := SyzygiesOfRows( SyzygiesOfColumns( deduped_2_1 ) ); - return AsCapCategoryMorphism( cat_1, C_1, UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_2_1 ), deduped_2_1 ), deduped_1_1 ) * UniqueRightDivide( HomalgIdentityMatrix( NumberRows( deduped_1_1 ), UnderlyingRing( cat_1 ) ), UniqueRightDivide( BasisOfRows( deduped_2_1 ), deduped_1_1 ) ), AsCapCategoryObject( cat_1, RowRankOfMatrix( deduped_2_1 ) ) ); + local deduped_1_1; + deduped_1_1 := AsHomalgMatrix( alpha_1 ); + return AsCapCategoryMorphism( cat_1, C_1, UniqueRightDivide( UniqueLeftDivide( BasisOfColumns( deduped_1_1 ), deduped_1_1 ), BasisOfRows( deduped_1_1 ) ), I_1 ); end ######## - ; + , 402 : IsPrecompiledDerivation := true ); ## AddMorphismFromEqualizerToSink( cat,