# This method should usually not be selected when the two morphisms belong to the same category and the category can compute IsEqualForMorphisms.
InstallOtherMethod( IsEqualForMorphisms,
[ IsCapCategory, IsCapCategoryMorphism, IsCapCategoryMorphism ],
function( cat, morphism_1, morphism_2 )
if not HasCapCategory( morphism_1 ) then
Error( Concatenation( "the morphism \"", String( morphism_1 ), "\" has no CAP category" ) );
fi;
if not HasCapCategory( morphism_2 ) then
Error( Concatenation( "the morphism \"", String( morphism_2 ), "\" has no CAP category" ) );
fi;
if not IsIdenticalObj( CapCategory( morphism_1 ), cat ) then
Error( Concatenation( "the morphism \"", String( morphism_1 ), "\" does not belong to the CAP category <cat>" ) );
elif not IsIdenticalObj( CapCategory( morphism_2 ), cat ) then
Error( Concatenation( "the morphism \"", String( morphism_2 ), "\" does not belong to the CAP category <cat>" ) );
else
# convenience: as long as the morphisms are identical, everything "just works" if IsIdenticalObj( morphism_1, morphism_2 ) then
return true;
else
Error( "Cannot decide whether the morphism \"", String( morphism_1 ), "\" and the morphism \"", String( morphism_2 ), "\" are equal. You can fix this error by installing `IsEqualForMorphisms` in <cat> or possibly avoid it by enabling strict caching." );
fi;
fi;
end );
# This method should usually not be selected when the two morphisms belong to the same category and the category can compute IsCongruentForMorphisms.
InstallOtherMethod( IsCongruentForMorphisms,
[ IsCapCategory, IsCapCategoryMorphism, IsCapCategoryMorphism ],
function( cat, morphism_1, morphism_2 )
if not HasCapCategory( morphism_1 ) then
Error( Concatenation( "the morphism \"", String( morphism_1 ), "\" has no CAP category" ) );
fi;
if not HasCapCategory( morphism_2 ) then
Error( Concatenation( "the morphism \"", String( morphism_2 ), "\" has no CAP category" ) );
fi;
if not IsIdenticalObj( CapCategory( morphism_1 ), cat ) then
Error( Concatenation( "the morphism \"", String( morphism_1 ), "\" does not belong to the CAP category <cat>" ) );
elif not IsIdenticalObj( CapCategory( morphism_2 ), cat ) then
Error( Concatenation( "the morphism \"", String( morphism_2 ), "\" does not belong to the CAP category <cat>" ) );
else
if CapCategory( morphism_1 )!.is_computable then
# convenience: as long as the morphisms are identical, everything "just works" if IsIdenticalObj( morphism_1, morphism_2 ) then
return true;
else
Error( "Cannot decide whether the morphism \"", String( morphism_1 ), "\" and the morphism \"", String( morphism_2 ), "\" are congruent. You can fix this error by installing `IsCongruentForMorphisms` in <cat>." );
fi;
else
Error( "cannot decide congruence of morphisms in a non-computable category" );
if CapCategory( morphism_1 )!.input_sanity_check_level > 0 or CapCategory( morphism_2 )!.input_sanity_check_level > 0then if not IsIdenticalObj( CapCategory( morphism_1 ), CapCategory( morphism_2 ) ) then
Error( Concatenation( "the morphism \"", String( morphism_1 ), "\" and the morphism \"", String( morphism_2 ), "\" do not belong to the same CAP category" ) ); fi; fi; if not IsEqualForObjects( Source( morphism_1 ), Source( morphism_2 ) ) or not IsEqualForObjects( Range( morphism_1 ), Range( morphism_2 ) ) then
return false;
fi; if IsEqualForMorphisms( morphism_1, morphism_2 ) then
##
InstallMethod( ExtendRangeOfHomomorphismStructureByFullEmbedding,
[ IsCapCategory, IsCapCategory, IsFunction, IsFunction, IsFunction, IsFunction ], function ( C, E, object_function, morphism_function, object_function_inverse, morphism_function_inverse )
# C has a D-homomorphism structure # object_function and morphism_function defined a full embedding ι: D → E # object_function_inverse and morphism_function_inverse define the inverse of ι on its image
InstallMethodForCompilerForCAP( DistinguishedObjectOfHomomorphismStructureExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ) ], function ( C, E )
return object_function( C, E, DistinguishedObjectOfHomomorphismStructure( C ) );
end );
InstallMethodForCompilerForCAP( HomomorphismStructureOnObjectsExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), ObjectFilter( C ), ObjectFilter( C ) ], function ( C, E, a, b )
return object_function( C, E, HomomorphismStructureOnObjects( C, a, b ) );
end );
InstallMethodForCompilerForCAP( HomomorphismStructureOnMorphismsExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), MorphismFilter( C ), MorphismFilter( C ) ], function ( C, E, alpha, beta )
local mor;
mor := HomomorphismStructureOnMorphisms( C, alpha, beta );
return morphism_function( C, E, object_function( C, E, Source( mor ) ), mor, object_function( C, E, Range( mor ) ) );
end );
InstallMethodForCompilerForCAP( HomomorphismStructureOnMorphismsWithGivenObjectsExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), ObjectFilter( E ), MorphismFilter( C ), MorphismFilter( C ), ObjectFilter( E ) ], function ( C, E, s, alpha, beta, r )
local mor;
mor := HomomorphismStructureOnMorphismsWithGivenObjects( C, object_function_inverse( C, E, s ), alpha, beta, object_function_inverse( C, E, r ) );
return morphism_function( C, E, s, mor, r );
end );
InstallMethodForCompilerForCAP( InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), MorphismFilter( C ) ], function ( C, E, alpha )
local mor;
mor := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( C, alpha );
return morphism_function( C, E, object_function( C, E, Source( mor ) ), mor, object_function( C, E, Range( mor ) ) );
end );
InstallMethodForCompilerForCAP( InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjectsExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), ObjectFilter( E ), MorphismFilter( C ), ObjectFilter( E ) ], function ( C, E, distinguished_object, alpha, r )
local mor;
mor := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects( C, object_function_inverse( C, E, distinguished_object ), alpha, object_function_inverse( C, E, r ) );
return morphism_function( C, E, distinguished_object, mor, r );
end );
InstallMethodForCompilerForCAP( InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphismExtendedByFullEmbedding,
[ CategoryFilter( C ), CategoryFilter( E ), ObjectFilter( C ), ObjectFilter( C ), MorphismFilter( E ) ], function ( C, E, a, b, iota )
return InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( C, a, b, morphism_function_inverse( C, E, object_function_inverse( C, E, Source( iota ) ), iota, object_function_inverse( C, E, Range( iota ) ) ) );
end );
end );
##
InstallMethod( ExtendRangeOfHomomorphismStructureByIdentityAsFullEmbedding,
[ IsCapCategory ], function ( C )
local object_function, morphism_function, object_function_inverse, morphism_function_inverse;
if IsBound( C!.range_category_of_hom_structure_already_extended_by_identity ) then ## the range of the hom-structure has already been extended by identity
return; fi;
object_function := function ( category, range_category, object ) #% CAP_JIT_RESOLVE_FUNCTION
return object;
end;
morphism_function := function ( category, range_category, source, morphism, range ) #% CAP_JIT_RESOLVE_FUNCTION
return morphism;
end;
object_function_inverse := function ( category, range_category, object ) #% CAP_JIT_RESOLVE_FUNCTION
return object;
end;
morphism_function_inverse := function ( category, range_category, source, morphism, range ) #% CAP_JIT_RESOLVE_FUNCTION
return morphism;
end;
ExtendRangeOfHomomorphismStructureByFullEmbedding( C, RangeCategoryOfHomomorphismStructure( C ), object_function, morphism_function, object_function_inverse, morphism_function_inverse );
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.