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
@@ -89,6 +90,38 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
8990
9091 recnames := AsSortedList( RecNames( CAP_INTERNAL_METHOD_NAME_RECORD ) );
9192
93+ # # No support for twocells
94+ recnames := Difference( recnames,
95+ [ " HorizontalPreCompose" ,
96+ " HorizontalPostCompose" ,
97+ " VerticalPreCompose" ,
98+ " VerticalPostCompose" ,
99+ " IdenticalTwoCell" ] );
100+
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+
92125 for current_recname in recnames do
93126
94127 current_entry := CAP_INTERNAL_METHOD_NAME_RECORD.( current_recname );
@@ -97,15 +130,6 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
97130 continue ;
98131 fi ;
99132
100- # # No support for twocells
101- if current_recname in [ " HorizontalPreCompose" ,
102- " HorizontalPostCompose" ,
103- " VerticalPreCompose" ,
104- " VerticalPostCompose" ,
105- " IdenticalTwoCell" ] then
106- continue ;
107- fi ;
108-
109133 # # Conservative
110134 if not IsBound ( current_entry.dual_operation ) then
111135 continue ;
@@ -117,7 +141,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
117141 continue ;
118142 fi ;
119143
120- 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
121145 continue ;
122146 fi ;
123147
0 commit comments