Skip to content

Commit

Permalink
Support empty limits in FreydCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
zickgraf committed May 16, 2021
1 parent 8cac5c3 commit e2aaae7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FreydCategoriesForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Version := Maximum( [
## this line prevents merge conflicts
"2020.05-17", ## Mohamed's version
## this line prevents merge conflicts
"2021.05-02", ## Fabian's version
"2021.05-03", ## Fabian's version
## this line prevents merge conflicts
"2020.04-18", ## Kamal's version
] ),
Expand Down
12 changes: 10 additions & 2 deletions FreydCategoriesForCAP/gap/FreydCategory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ InstallGlobalFunction( FREYD_CATEGORY,

freyd_category!.category_as_first_argument := true;

if IsBound( underlying_category!.supports_empty_limits ) then

freyd_category!.supports_empty_limits := underlying_category!.supports_empty_limits;

fi;

freyd_category!.compiler_hints := rec(
category_attribute_names := [
"UnderlyingCategory",
Expand Down Expand Up @@ -597,9 +603,10 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_FREYD_CATEGORY,
AddUniversalMorphismIntoDirectSumWithGivenDirectSum( category,
function( cat, diagram, test_object, source, direct_sum_object )

return FreydCategoryMorphism( Source( source[1] ),
return FreydCategoryMorphism( test_object,
UniversalMorphismIntoDirectSum( underlying_category,
List( diagram, obj -> Range( RelationMorphism( obj ) ) ),
Range( RelationMorphism( test_object ) ),
List( source, mor -> MorphismDatum( mor ) ) ),
direct_sum_object
);
Expand All @@ -624,8 +631,9 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_FREYD_CATEGORY,
return FreydCategoryMorphism( direct_sum_object,
UniversalMorphismFromDirectSum( underlying_category,
List( diagram, obj -> Range( RelationMorphism( obj ) ) ),
Range( RelationMorphism( test_object ) ),
List( sink, mor -> MorphismDatum( mor ) ) ),
Range( sink[1] )
test_object
);

end );
Expand Down

0 comments on commit e2aaae7

Please sign in to comment.