Skip to content

Commit 5d2f3fa

Browse files
authored
Merge pull request #1250 from zickgraf/master
Avoid calls to `CapCategory` in pre and redirect functions
2 parents 093bbcd + 53bba3a commit 5d2f3fa

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

CAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CAP",
1212
Subtitle := "Categories, Algorithms, Programming",
13-
Version := "2023.02-05",
13+
Version := "2023.02-06",
1414
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1515
License := "GPL-2.0-or-later",
1616

CAP/gap/MethodRecord.gi

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ MultiplyWithElementOfCommutativeRingForMorphisms := rec(
13041304

13051305
pre_function := function( cat, r, morphism )
13061306

1307-
if not r in CommutativeRingOfLinearCategory( CapCategory( morphism ) ) then
1307+
if not r in CommutativeRingOfLinearCategory( cat ) then
13081308

13091309
return [ false, "the first argument is not an element of the ring of the category of the morphism" ];
13101310

@@ -2510,16 +2510,13 @@ IsWellDefinedForMorphisms := rec(
25102510
dual_operation := "IsWellDefinedForMorphisms",
25112511

25122512
redirect_function := function( cat, morphism )
2513-
local category, source, range;
2513+
local source, range;
25142514

25152515
source := Source( morphism );
25162516

25172517
range := Range( morphism );
25182518

2519-
category := CapCategory( morphism );
2520-
2521-
if not ( IsWellDefined( source ) and IsWellDefined( range ) ) or
2522-
not ( IsIdenticalObj( CapCategory( source ), category ) and IsIdenticalObj( CapCategory( range ), category ) ) then
2519+
if not ( IsWellDefinedForObjects( cat, source ) and IsWellDefinedForObjects( cat, range ) ) then
25232520

25242521
return [ true, false ];
25252522

0 commit comments

Comments
 (0)