From 25ae038ce10c48301f693f822db3277e2e9774f1 Mon Sep 17 00:00:00 2001 From: Kamal Saleh Date: Wed, 2 Aug 2023 13:40:34 +0200 Subject: [PATCH] comply with CAP V2023.08-07 (start using the 'LinearCombinationOfMorphisms' operation) and bump FreydCategoriesForCAP to V2023.08-02 --- FreydCategoriesForCAP/PackageInfo.g | 4 ++-- FreydCategoriesForCAP/gap/CategoryOfRows.gi | 10 ++++------ FreydCategoriesForCAP/gap/LinearClosure.gi | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/FreydCategoriesForCAP/PackageInfo.g b/FreydCategoriesForCAP/PackageInfo.g index 5aa3fed5a9..d81c119a8e 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 := "2023.08-01", +Version := "2023.08-02", 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", @@ -87,7 +87,7 @@ PackageDoc := rec( Dependencies := rec( GAP := ">= 4.12.1", - NeededOtherPackages := [ [ "CAP", ">= 2023.06-04" ], + NeededOtherPackages := [ [ "CAP", ">= 2023.08-07" ], [ "MatricesForHomalg", ">= 2023.01-01" ], [ "GradedRingForHomalg", ">=2019.08.07" ], [ "MonoidalCategories", ">= 2023.02-04" ], diff --git a/FreydCategoriesForCAP/gap/CategoryOfRows.gi b/FreydCategoriesForCAP/gap/CategoryOfRows.gi index fd36c171b3..9f1f33a658 100644 --- a/FreydCategoriesForCAP/gap/CategoryOfRows.gi +++ b/FreydCategoriesForCAP/gap/CategoryOfRows.gi @@ -1326,9 +1326,8 @@ AddFinalDerivationBundle( "Using BasisOfExternalHom and CoefficientsOfMorphism t [ [ BasisOfExternalHom, 1 ], [ CoefficientsOfMorphism, 2 ], - [ MultiplyWithElementOfCommutativeRingForMorphisms, 2 ], - [ PreComposeList, 2 ], - [ SumOfMorphisms, 1 ] + [ LinearCombinationOfMorphisms, 1 ], + [ PreComposeList, 2 ] ], [ HomomorphismStructureOnObjects, @@ -1405,8 +1404,7 @@ AddFinalDerivationBundle( "Using BasisOfExternalHom and CoefficientsOfMorphism t InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism, [ [ BasisOfExternalHom, 1 ], - [ MultiplyWithElementOfCommutativeRingForMorphisms, 2 ], - [ SumOfMorphisms, 1 ] + [ LinearCombinationOfMorphisms, 1 ], ], function ( cat, a, b, iota ) local coeffs, basis; @@ -1415,7 +1413,7 @@ AddFinalDerivationBundle( "Using BasisOfExternalHom and CoefficientsOfMorphism t basis := BasisOfExternalHom( cat, a, b ); - return SumOfMorphisms( cat, a, ListN( coeffs, basis, { c, m } -> MultiplyWithElementOfCommutativeRingForMorphisms( cat, c, m ) ), b ); + return LinearCombinationOfMorphisms( cat, a, coeffs, basis, b ); end ] : diff --git a/FreydCategoriesForCAP/gap/LinearClosure.gi b/FreydCategoriesForCAP/gap/LinearClosure.gi index 65e4aee3c1..3a2e38f8e7 100644 --- a/FreydCategoriesForCAP/gap/LinearClosure.gi +++ b/FreydCategoriesForCAP/gap/LinearClosure.gi @@ -854,7 +854,7 @@ InstallMethodWithCache( ExtendFunctorToLinearClosureOfSource, supp := List( supp, m -> ApplyFunctor( F, m ) ); - return Sum( ListN( coeffs, supp, MultiplyWithElementOfCommutativeRingForMorphisms ) ); + return LinearCombinationOfMorphisms( s, coeffs, supp, r ); end );