5959BindGlobal( " CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY" ,
6060
6161 function ( opposite_category, category )
62- local only_primitive_operations, recnames, current_recname, current_entry, dual_operation_name,
63- filter_list, input_arguments_names, return_type, func_string,
62+ local only_primitive_operations, recnames, list_of_installed_operations,
63+ operations_of_homomorphism_structure, operations_of_external_hom,
64+ current_recname, current_entry, dual_operation_name, filter_list, input_arguments_names, return_type, func_string,
6465 dual_preprocessor_func_string, preprocessor_string, dual_arguments, tmp,
6566 dual_postprocessor_func_string, postprocessor_string, output_source_getter_string, output_range_getter_string, return_statement,
6667 func, weight, current_add, list_of_attributes, attr, tester, setter, getter;
@@ -69,7 +70,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
6970
7071 # # Take care of attributes
7172 # # TODO: if there are more instances, set markers in the MethodRecord
72- list_of_attributes := [ " RangeCategoryOfHomomorphismStructure " , " CommutativeRingOfLinearCategory" ] ;
73+ list_of_attributes := [ " CommutativeRingOfLinearCategory" ] ;
7374
7475 for attr in list_of_attributes do
7576
@@ -97,6 +98,30 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
9798 " VerticalPostCompose" ,
9899 " IdenticalTwoCell" ] );
99100
101+ if only_primitive_operations then
102+ list_of_installed_operations := ListPrimitivelyInstalledOperationsOfCategory( category );
103+ else
104+ list_of_installed_operations := ListInstalledOperationsOfCategory( category );
105+ fi ;
106+
107+ operations_of_homomorphism_structure :=
108+ [ " DistinguishedObjectOfHomomorphismStructure" ,
109+ " HomomorphismStructureOnObjects" ,
110+ " HomomorphismStructureOnMorphisms" ,
111+ " HomomorphismStructureOnMorphismsWithGivenObjects" ,
112+ " InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure" ,
113+ " InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects" ,
114+ " InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism" ,
115+ ] ;
116+
117+ if HasRangeCategoryOfHomomorphismStructure( category ) and
118+ not IsEmpty( Intersection( list_of_installed_operations, operations_of_homomorphism_structure ) ) then
119+
120+ SetRangeCategoryOfHomomorphismStructure( opposite_category, RangeCategoryOfHomomorphismStructure( category ) );
121+ SetIsEquippedWithHomomorphismStructure( opposite_category, true );
122+
123+ fi ;
124+
100125 for current_recname in recnames do
101126
102127 current_entry := CAP_INTERNAL_METHOD_NAME_RECORD.( current_recname );
@@ -116,7 +141,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
116141 continue ;
117142 fi ;
118143
119- if only_primitive_operations and not dual_operation_name in ListPrimitivelyInstalledOperationsOfCategory( category ) then
144+ if not dual_operation_name in list_of_installed_operations then
120145 continue ;
121146 fi ;
122147
0 commit comments