Skip to content

Commit

Permalink
Remove code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Kuhmichel committed Aug 31, 2022
1 parent 5145597 commit 504bda9
Showing 1 changed file with 2 additions and 241 deletions.
243 changes: 2 additions & 241 deletions ModulePresentationsForCAP/gap/ModulePresentationsForCAP.gi
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ InstallGlobalFunction( ADD_FUNCTIONS_FOR_LEFT_PRESENTATION,
# has special cases
ADD_PRECOMPOSE_LEFT( category );

# simpler than the compiled version
ADD_EQUAL_FOR_OBJECTS( category );

# IsWellDefined* should not be compiled
ADD_IS_WELL_DEFINED_FOR_OBJECTS( category );

Expand All @@ -234,23 +231,12 @@ InstallGlobalFunction( ADD_FUNCTIONS_FOR_LEFT_PRESENTATION,
# differs from the compiled version
ADD_LIFT_AND_COLIFT_LEFT( category );

# this tensor structure slightly differs from the tensor structure of FreydCategory
ADD_ASSOCIATOR_LEFT( category );

ADD_UNITOR( category );

ADD_TENSOR_PRODUCT_ON_OBJECTS_LEFT( category );

ADD_TENSOR_PRODUCT_ON_MORPHISMS( category );

ADD_TENSOR_UNIT_LEFT( category );

ADD_INTERNAL_HOM_ON_OBJECTS_LEFT( category );

ADD_INTERNAL_HOM_ON_MORPHISMS_LEFT( category );

ADD_BRAIDING_LEFT( category );

ADD_EVALUATION_MORPHISM_LEFT( category );

ADD_COEVALUATION_MORPHISM_LEFT( category );
Expand All @@ -268,8 +254,6 @@ InstallGlobalFunction( ADD_FUNCTIONS_FOR_RIGHT_PRESENTATION,

ADD_PRECOMPOSE_RIGHT( category );

ADD_EQUAL_FOR_OBJECTS( category );

ADD_IS_WELL_DEFINED_FOR_OBJECTS( category );

ADD_IS_WELL_DEFINED_FOR_MORPHISM_RIGHT( category );
Expand All @@ -278,22 +262,12 @@ InstallGlobalFunction( ADD_FUNCTIONS_FOR_RIGHT_PRESENTATION,

ADD_LIFT_AND_COLIFT_RIGHT( category );

ADD_ASSOCIATOR_RIGHT( category );

ADD_UNITOR( category );

ADD_TENSOR_PRODUCT_ON_OBJECTS_RIGHT( category );

ADD_TENSOR_PRODUCT_ON_MORPHISMS( category );

ADD_TENSOR_UNIT_RIGHT( category );

ADD_INTERNAL_HOM_ON_OBJECTS_RIGHT( category );

ADD_INTERNAL_HOM_ON_MORPHISMS_RIGHT( category );

ADD_BRAIDING_RIGHT( category );

ADD_EVALUATION_MORPHISM_RIGHT( category );

ADD_COEVALUATION_MORPHISM_RIGHT( category );
Expand Down Expand Up @@ -388,21 +362,6 @@ InstallGlobalFunction( ADD_IS_WELL_DEFINED_FOR_MORPHISM_RIGHT,

end );

##
InstallGlobalFunction( ADD_EQUAL_FOR_OBJECTS,

function( category )

AddIsEqualForObjects( category,

function( cat, object1, object2 )

return UnderlyingMatrix( object1 ) = UnderlyingMatrix( object2 );

end );

end );

##
InstallGlobalFunction( ADD_KERNEL_LEFT,

Expand Down Expand Up @@ -517,12 +476,7 @@ InstallGlobalFunction( ADD_PRECOMPOSE_LEFT,

AddPreCompose( category,

[
[ function( cat, left_morphism, right_morphism )

return PresentationMorphism( Source( left_morphism ), UnderlyingMatrix( left_morphism ) * UnderlyingMatrix( right_morphism ), Range( right_morphism ) );

end, [ ] ],
[

[ function( cat, left_morphism, identity_morphism )

Expand Down Expand Up @@ -567,13 +521,7 @@ InstallGlobalFunction( ADD_PRECOMPOSE_RIGHT,

AddPreCompose( category,

[

[ function( cat, left_morphism, right_morphism )

return PresentationMorphism( Source( left_morphism ), UnderlyingMatrix( right_morphism ) * UnderlyingMatrix( left_morphism ), Range( right_morphism ) );

end, [ ] ],
[

[ function( cat, left_morphism, identity_morphism )

Expand Down Expand Up @@ -609,78 +557,6 @@ InstallGlobalFunction( ADD_PRECOMPOSE_RIGHT,

end );

##
InstallGlobalFunction( ADD_ASSOCIATOR_LEFT,

function( category )
local homalg_ring, associator_func;

homalg_ring := category!.ring_for_representation_category;

associator_func := function( cat, source, A, B, C, range )

return PresentationMorphism(
source,
HomalgIdentityMatrix( NrColumns( UnderlyingMatrix( source ) ), NrColumns( UnderlyingMatrix( range ) ), homalg_ring ),
range
);

end;

AddAssociatorLeftToRightWithGivenTensorProducts( category,
associator_func
);

AddAssociatorRightToLeftWithGivenTensorProducts( category,
associator_func
);

end );

##
InstallGlobalFunction( ADD_ASSOCIATOR_RIGHT,

function( category )
local homalg_ring, associator_func;

homalg_ring := category!.ring_for_representation_category;

associator_func := function( cat, source, A, B, C, range )

return PresentationMorphism(
source,
HomalgIdentityMatrix( NrRows( UnderlyingMatrix( source ) ), NrRows( UnderlyingMatrix( range ) ), homalg_ring ),
range
);

end;

AddAssociatorLeftToRightWithGivenTensorProducts( category,
associator_func
);

AddAssociatorRightToLeftWithGivenTensorProducts( category,
associator_func
);

end );

##
InstallGlobalFunction( ADD_UNITOR,

function( category )
local unitor_func;

unitor_func := function( cat, A, B )
return IdentityMorphism( A );
end;

AddLeftUnitorWithGivenTensorProduct( category, unitor_func );

AddRightUnitorWithGivenTensorProduct( category, unitor_func );

end );

##
InstallGlobalFunction( ADD_TENSOR_PRODUCT_ON_OBJECTS_LEFT,

Expand Down Expand Up @@ -749,59 +625,6 @@ InstallGlobalFunction( ADD_TENSOR_PRODUCT_ON_OBJECTS_RIGHT,

end );

##
InstallGlobalFunction( ADD_TENSOR_PRODUCT_ON_MORPHISMS,

function( category )

AddTensorProductOnMorphismsWithGivenTensorProducts( category,

function( cat, new_source, morphism_1, morphism_2, new_range )

return PresentationMorphism( new_source,
KroneckerMat( UnderlyingMatrix( morphism_1 ), UnderlyingMatrix( morphism_2 ) ),
new_range );

end );

end );

##
InstallGlobalFunction( ADD_TENSOR_UNIT_LEFT,

function( category )
local homalg_ring;

homalg_ring := category!.ring_for_representation_category;

AddTensorUnit( category,

function( cat )

return AsLeftPresentation( HomalgZeroMatrix( 0, 1, homalg_ring ) );

end );

end );

##
InstallGlobalFunction( ADD_TENSOR_UNIT_RIGHT,

function( category )
local homalg_ring;

homalg_ring := category!.ring_for_representation_category;

AddTensorUnit( category,

function( cat )

return AsRightPresentation( HomalgZeroMatrix( 1, 0, homalg_ring ) );

end );

end );

##
InstallGlobalFunction( ADD_INTERNAL_HOM_ON_OBJECTS_LEFT,

Expand Down Expand Up @@ -896,68 +719,6 @@ InstallGlobalFunction( ADD_INTERNAL_HOM_ON_MORPHISMS_RIGHT,

end );

##
InstallGlobalFunction( ADD_BRAIDING_LEFT,

function( category )

AddBraidingWithGivenTensorProducts( category,

function( cat, object_1_tensored_object_2, object_1, object_2, object_2_tensored_object_1 )
local homalg_ring, permutation_matrix, rank_1, rank_2, rank;

homalg_ring := UnderlyingHomalgRing( object_1 );

rank_1 := NrColumns( UnderlyingMatrix( object_1 ) );

rank_2 := NrColumns( UnderlyingMatrix( object_2 ) );

rank := NrColumns( UnderlyingMatrix( object_1_tensored_object_2 ) );

permutation_matrix := PermutationMat(
PermList( List( [ 1 .. rank ], i -> ( RemInt( i - 1, rank_2 ) * rank_1 + QuoInt( i - 1, rank_2 ) + 1 ) ) ),
rank
);

return PresentationMorphism( object_1_tensored_object_2,
HomalgMatrix( permutation_matrix, rank, rank, homalg_ring ),
object_2_tensored_object_1 );

end );

end );

##
InstallGlobalFunction( ADD_BRAIDING_RIGHT,

function( category )

AddBraidingWithGivenTensorProducts( category,

function( cat, object_1_tensored_object_2, object_1, object_2, object_2_tensored_object_1 )
local homalg_ring, permutation_matrix, rank_1, rank_2, rank;

homalg_ring := UnderlyingHomalgRing( object_1 );

rank_1 := NrRows( UnderlyingMatrix( object_1 ) );

rank_2 := NrRows( UnderlyingMatrix( object_2 ) );

rank := NrRows( UnderlyingMatrix( object_1_tensored_object_2 ) );

permutation_matrix := PermutationMat(
PermList( List( [ 1 .. rank ], i -> ( RemInt( i - 1, rank_2 ) * rank_1 + QuoInt( i - 1, rank_2 ) + 1 ) ) ),
rank
);

return PresentationMorphism( object_1_tensored_object_2,
TransposedMatrix( HomalgMatrix( permutation_matrix, rank, rank, homalg_ring ) ), ## transposed of the left case
object_2_tensored_object_1 );

end );

end );

##
InstallGlobalFunction( ADD_EVALUATION_MORPHISM_LEFT,

Expand Down

0 comments on commit 504bda9

Please sign in to comment.