Skip to content

Commit bb50335

Browse files
fixed AddCartesianBraidingInverseWithGivenDirectProducts( SkeletalFinSets, ... )
this bug was introduced in commit 798c9fb, a commit that had a misleading commit message had a misleading commit message
1 parent 8e1c29f commit bb50335

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

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 := "FinSetsForCAP",
1212
Subtitle := "The elementary topos of (skeletal) finite sets",
13-
Version := "2021.12-07",
13+
Version := "2021.12-08",
1414

1515
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1616
License := "GPL-2.0-or-later",

gap/SkeletalFinSetsForCAP.gi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,13 +804,13 @@ end );
804804
##
805805
AddCartesianBraidingInverseWithGivenDirectProducts( SkeletalFinSets,
806806
function ( cat, MN, M, N, NM )
807-
local n, mn;
807+
local m, n;
808808

809-
n := Length( N );
809+
m := Length( M );
810810

811-
mn := Length( MN );
811+
n := Length( N );
812812

813-
return MapOfFinSets( cat, MN, List( [ 0 .. mn - 1 ] , i -> 1 + ( i mod mn ) + QuoInt( i, n ) ), NM );
813+
return MapOfFinSets( cat, MN, List( [ 0 .. Length( MN ) - 1 ] , i -> 1 + ( i mod n ) * m + QuoInt( i, n ) ), NM );
814814

815815
end );
816816

gap/precompiled_categories/CategoryOfSkeletalFinSetsPrecompiled.gi

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ BindGlobal( "ADD_FUNCTIONS_FOR_CategoryOfSkeletalFinSetsPrecompiled", function (
1010

1111
########
1212
function ( cat_1, s_1, a_1, b_1, r_1 )
13-
local hoisted_1_1, hoisted_2_1, deduped_3_1;
14-
deduped_3_1 := Length( s_1 );
15-
hoisted_2_1 := Length( b_1 );
16-
hoisted_1_1 := deduped_3_1;
13+
local hoisted_1_1, hoisted_2_1;
14+
hoisted_2_1 := Length( a_1 );
15+
hoisted_1_1 := Length( b_1 );
1716
return ObjectifyMorphismWithSourceAndRangeForCAPWithAttributes( rec(
18-
), cat_1, s_1, r_1, AsList, List( [ 0 .. deduped_3_1 - 1 ], function ( i_2 )
19-
return 1 + i_2 mod hoisted_1_1 + QUO_INT( i_2, hoisted_2_1 );
17+
), cat_1, s_1, r_1, AsList, List( [ 0 .. Length( s_1 ) - 1 ], function ( i_2 )
18+
return 1 + i_2 mod hoisted_1_1 * hoisted_2_1 + QUO_INT( i_2, hoisted_1_1 );
2019
end ) );
2120
end
2221
########

0 commit comments

Comments
 (0)