5959BindGlobal( " CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY" ,
6060
6161 function ( opposite_category, category )
62- local only_primitive_operations, recnames, list_of_installed_operations ,
62+ local only_primitive_operations, recnames, list_of_underlying_operations ,
6363 operations_of_homomorphism_structure, operations_of_external_hom,
6464 current_recname, current_entry, dual_operation_name, filter_list, input_arguments_names, return_type, func_string,
6565 dual_preprocessor_func_string, preprocessor_string, dual_arguments, tmp,
@@ -99,9 +99,9 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
9999 " IdenticalTwoCell" ] );
100100
101101 if only_primitive_operations then
102- list_of_installed_operations := ListPrimitivelyInstalledOperationsOfCategory( category );
102+ list_of_underlying_operations := ListPrimitivelyInstalledOperationsOfCategory( category );
103103 else
104- list_of_installed_operations := ListInstalledOperationsOfCategory( category );
104+ list_of_underlying_operations := ListInstalledOperationsOfCategory( category );
105105 fi ;
106106
107107 operations_of_homomorphism_structure :=
@@ -114,8 +114,13 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
114114 " InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism" ,
115115 ] ;
116116
117- if HasRangeCategoryOfHomomorphismStructure( category ) and
118- not IsEmpty( Intersection( list_of_installed_operations, operations_of_homomorphism_structure ) ) then
117+ if not IsEmpty( Intersection( list_of_underlying_operations, operations_of_homomorphism_structure ) ) then
118+
119+ if not HasRangeCategoryOfHomomorphismStructure( category ) then
120+
121+ Error( " <category> has operations related to the homomorphism structure but no range category is set. This is not supported." );
122+
123+ fi ;
119124
120125 SetRangeCategoryOfHomomorphismStructure( opposite_category, RangeCategoryOfHomomorphismStructure( category ) );
121126 SetIsEquippedWithHomomorphismStructure( opposite_category, true );
@@ -137,11 +142,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
137142
138143 dual_operation_name := current_entry.dual_operation;
139144
140- if not CanCompute( category, dual_operation_name ) then
141- continue ;
142- fi ;
143-
144- if not dual_operation_name in list_of_installed_operations then
145+ if not dual_operation_name in list_of_underlying_operations then
145146 continue ;
146147 fi ;
147148
0 commit comments