Skip to content

Commit c95b6ab

Browse files
authored
Merge pull request #667 from zickgraf/freyd_empty_limits
Support empty limits in FreydCategory
2 parents 8cac5c3 + e2aaae7 commit c95b6ab

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

FreydCategoriesForCAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Version := Maximum( [
1717
## this line prevents merge conflicts
1818
"2020.05-17", ## Mohamed's version
1919
## this line prevents merge conflicts
20-
"2021.05-02", ## Fabian's version
20+
"2021.05-03", ## Fabian's version
2121
## this line prevents merge conflicts
2222
"2020.04-18", ## Kamal's version
2323
] ),

FreydCategoriesForCAP/gap/FreydCategory.gi

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ InstallGlobalFunction( FREYD_CATEGORY,
3333

3434
freyd_category!.category_as_first_argument := true;
3535

36+
if IsBound( underlying_category!.supports_empty_limits ) then
37+
38+
freyd_category!.supports_empty_limits := underlying_category!.supports_empty_limits;
39+
40+
fi;
41+
3642
freyd_category!.compiler_hints := rec(
3743
category_attribute_names := [
3844
"UnderlyingCategory",
@@ -597,9 +603,10 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_FREYD_CATEGORY,
597603
AddUniversalMorphismIntoDirectSumWithGivenDirectSum( category,
598604
function( cat, diagram, test_object, source, direct_sum_object )
599605

600-
return FreydCategoryMorphism( Source( source[1] ),
606+
return FreydCategoryMorphism( test_object,
601607
UniversalMorphismIntoDirectSum( underlying_category,
602608
List( diagram, obj -> Range( RelationMorphism( obj ) ) ),
609+
Range( RelationMorphism( test_object ) ),
603610
List( source, mor -> MorphismDatum( mor ) ) ),
604611
direct_sum_object
605612
);
@@ -624,8 +631,9 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_FREYD_CATEGORY,
624631
return FreydCategoryMorphism( direct_sum_object,
625632
UniversalMorphismFromDirectSum( underlying_category,
626633
List( diagram, obj -> Range( RelationMorphism( obj ) ) ),
634+
Range( RelationMorphism( test_object ) ),
627635
List( sink, mor -> MorphismDatum( mor ) ) ),
628-
Range( sink[1] )
636+
test_object
629637
);
630638

631639
end );

0 commit comments

Comments
 (0)