if IsBound( options.range_category_of_homomorphism_structure ) then
if options.range_category_of_homomorphism_structure = "self"then
SetRangeCategoryOfHomomorphismStructure( CC, CC ); else
SetRangeCategoryOfHomomorphismStructure( CC, options.range_category_of_homomorphism_structure ); fi;
fi;
## set categorical properties if IsBound( options.properties ) then
if not IsSubset( Set( Filtered( Concatenation( CAP_INTERNAL_CATEGORICAL_PROPERTIES_LIST ), x -> x <> fail ) ), options.properties ) then
# COVERAGE_IGNORE_NEXT_LINE
Error( "The value of the option `properties` must be a list of categorical properties, see CAP_INTERNAL_CATEGORICAL_PROPERTIES_LIST." );
fi;
for prop in options.properties do
Setter( ValueGlobal( prop ) )( CC, true );
od;
fi;
## add constructors and data if IsBound( options.object_constructor ) then
elif not ForAll( options.list_of_operations_to_install, name -> IsBound( CAP_INTERNAL_METHOD_NAME_RECORD.(name) ) ) then
# COVERAGE_IGNORE_NEXT_LINE
Error( "The value of the option `list_of_operations_to_install` must be a list of names of CAP operations." );
fi;
# plausibility check if not "IsEqualForMorphisms" in options.list_of_operations_to_install then
if"IsEqualToIdentityMorphism" in options.list_of_operations_to_install then
# COVERAGE_IGNORE_NEXT_LINE
Display( "WARNING: You want to lift `IsEqualToIdentityMorphism` but not `IsEqualForMorphisms` in CategoryConstructor. Since the specification of the former depends on the latter, this is probably an error." );
fi;
if"IsEqualToZeroMorphism" in options.list_of_operations_to_install then
# COVERAGE_IGNORE_NEXT_LINE
Display( "WARNING: You want to lift `IsEqualToZeroMorphism` but not `IsEqualForMorphisms` in CategoryConstructor. Since the specification of the former depends on the latter, this is probably an error." );
# the default strings simply apply the operation in the underlying category
weight := OperationWeight( options.underlying_category, info.function_name );
elif IsFunction( create_func ) then
func_string_and_weight := create_func( name, CC );
if IsList( func_string_and_weight ) and Length( func_string_and_weight ) = 2 and IsInt( func_string_and_weight[2] ) then
if PositionSublist( func_string, "underlying_arguments" ) <> fail then
if not IsBound( options.underlying_category_getter_string ) or not IsBound( options.underlying_object_getter_string ) or not IsBound( options.underlying_morphism_getter_string ) then
# COVERAGE_IGNORE_NEXT_LINE
Error( "for generating underlying_arguments you must pass category, object and morphism getter strings" );
fi;
underlying_arguments := List( [ 1 .. Length( info.filter_list ) ], function( i )
local filter, argument_name;
Error( "option `top_object_getter_string` must be set in a call to `CategoryConstructor`" );
fi;
fi;
fi;
if StartsWith( info.return_type, "morphism" ) then
if IsBound( info.output_source_getter_string ) and IsBound( info.can_always_compute_output_source_getter ) and info.can_always_compute_output_source_getter then
elif IsBound( info.output_source_getter_string ) and ## the last resort used by SyntacticCategory, ## ensure that the operation to compute the source is at least marked for installation:
IsBound( info.output_source_getter_preconditions ) and
ForAll( info.output_source_getter_preconditions, pair -> IsList( pair ) and Length( pair ) = 2 ) and
ForAll( info.output_source_getter_preconditions, pair -> pair[1] in options.list_of_operations_to_install ) then
if IsBound( info.output_range_getter_string ) and IsBound( info.can_always_compute_output_range_getter ) and info.can_always_compute_output_range_getter then
elif IsBound( info.output_range_getter_string ) and ## the last resort used by SyntacticCategory, ## ensure that the operation to compute the target is at least marked for installation:
IsBound( info.output_range_getter_preconditions ) and
ForAll( info.output_range_getter_preconditions, pair -> IsList( pair ) and Length( pair ) = 2) and
ForAll( info.output_range_getter_preconditions, pair -> pair[1] in options.list_of_operations_to_install ) then
# if source and range cannot be computed we cannot do anything if PositionSublist( func_string, "top_source" ) <> fail or PositionSublist( func_string, "top_range" ) <> fail then
Info( InfoCategoryConstructor, 3, "cannot compute source and/or range of ", name );
continue;
fi;
if PositionSublist( func_string, "top_morphism_getter" ) <> fail then
if IsBound( options.top_morphism_getter_string ) then
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.