Skip to content

Commit

Permalink
renamed local variables in QuotientCategory constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Oct 17, 2024
1 parent e1e349c commit 2fb70ad
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion QuotientCategories/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "QuotientCategories",
Subtitle := "Quotient categories",
Version := "2024.04-01",
Version := "2024.10-01",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
56 changes: 28 additions & 28 deletions QuotientCategories/gap/QuotientCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ InstallMethod( QuotientCategory,
[ IsRecord ],

function( record )
local congruence_function, cat, name, category_filter, category_object_filter, category_morphism_filter,
local congruence_function, ambient_cat, name, category_filter, category_object_filter, category_morphism_filter,
object_constructor, object_datum, morphism_constructor, morphism_datum,
create_func_bool, create_func_object, create_func_morphism,
list_of_operations_to_install, commutative_ring,
Expand Down Expand Up @@ -103,12 +103,12 @@ InstallMethod( QuotientCategory,

fi;

cat := record.underlying_category;
ambient_cat := record.underlying_category;

if IsBound( record.name ) then
name := record.name;
else
name := Concatenation( "QuotientCategory( ", Name( cat ), " ) defined by the congruence function ", NameFunction( record.congruence_function ) );
name := Concatenation( "QuotientCategory( ", Name( ambient_cat ), " ) defined by the congruence function ", NameFunction( record.congruence_function ) );
fi;

if IsBound( record.category_filter ) then
Expand Down Expand Up @@ -137,10 +137,10 @@ InstallMethod( QuotientCategory,

morphism_datum := { quotient_cat, m } -> UnderlyingCell( m );

list_of_operations_to_install := Intersection( ListInstalledOperationsOfCategory( cat ), CAP_INTERNAL_METHOD_NAME_LIST_FOR_QUOTIENT_CATEGORY );
list_of_operations_to_install := Intersection( ListInstalledOperationsOfCategory( ambient_cat ), CAP_INTERNAL_METHOD_NAME_LIST_FOR_QUOTIENT_CATEGORY );

if HasCommutativeRingOfLinearCategory( cat ) then
commutative_ring := CommutativeRingOfLinearCategory( cat );
if HasCommutativeRingOfLinearCategory( ambient_cat ) then
commutative_ring := CommutativeRingOfLinearCategory( ambient_cat );
else
commutative_ring := fail;
fi;
Expand All @@ -157,15 +157,15 @@ InstallMethod( QuotientCategory,

if ( HasIsLinearCategoryOverCommutativeRingWithFinitelyGeneratedFreeExternalHoms and
IsLinearCategoryOverCommutativeRingWithFinitelyGeneratedFreeExternalHoms and
HasCommutativeRingOfLinearCategory )( cat ) then
HasCommutativeRingOfLinearCategory )( ambient_cat ) then

if ( HasIsFieldForHomalg and IsFieldForHomalg )( CommutativeRingOfLinearCategory( cat ) ) then
if ( HasIsFieldForHomalg and IsFieldForHomalg )( CommutativeRingOfLinearCategory( ambient_cat ) ) then
Add( properties, "IsLinearCategoryOverCommutativeRingWithFinitelyGeneratedFreeExternalHoms" );
fi;

fi;

properties := Intersection( ListKnownCategoricalProperties( cat ), properties );
properties := Intersection( ListKnownCategoricalProperties( ambient_cat ), properties );

if IsBound( record.extra_properties ) then
properties := SortedList( Concatenation( properties, record.extra_properties ) );
Expand Down Expand Up @@ -262,8 +262,8 @@ InstallMethod( QuotientCategory,

end;

if IsBound( cat!.supports_empty_limits ) then
supports_empty_limits := cat!.supports_empty_limits;
if IsBound( ambient_cat!.supports_empty_limits ) then
supports_empty_limits := ambient_cat!.supports_empty_limits;
else
supports_empty_limits := false;
fi;
Expand All @@ -287,18 +287,18 @@ InstallMethod( QuotientCategory,
create_func_object := create_func_object,
create_func_morphism := create_func_morphism ) );

SetUnderlyingCategory( quotient_cat, cat );
SetUnderlyingCategory( quotient_cat, ambient_cat );

##
AddSetOfObjectsOfCategory( quotient_cat,
function( cat )
function( quotient_cat )
local ambient_cat, objects;

ambient_cat := UnderlyingCategory( cat );
ambient_cat := UnderlyingCategory( quotient_cat );

objects := SetOfObjects( ambient_cat );

return List( objects, o -> ObjectConstructor( cat, o ) );
return List( objects, o -> ObjectConstructor( quotient_cat, o ) );

end );

Expand All @@ -315,7 +315,7 @@ InstallMethod( QuotientCategory,

end );

if CanCompute( cat, "MultiplyWithElementOfCommutativeRingForMorphisms" ) then
if CanCompute( ambient_cat, "MultiplyWithElementOfCommutativeRingForMorphisms" ) then

##
AddMultiplyWithElementOfCommutativeRingForMorphisms( quotient_cat,
Expand All @@ -338,11 +338,11 @@ end );

InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,
function( quotient_cat )
local cat;
local ambient_cat;

cat := UnderlyingCategory( quotient_cat );
ambient_cat := UnderlyingCategory( quotient_cat );

if CanCompute( cat, "RandomObjectByInteger" ) then
if CanCompute( ambient_cat, "RandomObjectByInteger" ) then

AddRandomObjectByInteger( quotient_cat,
function( quotient_cat, i )
Expand All @@ -351,7 +351,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedSourceAndRangeByInteger" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedSourceAndRangeByInteger" ) then

AddRandomMorphismWithFixedSourceAndRangeByInteger( quotient_cat,
function( quotient_cat, S, R, i )
Expand All @@ -362,7 +362,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedSourceByInteger" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedSourceByInteger" ) then

AddRandomMorphismWithFixedSourceByInteger( quotient_cat,
function( quotient_cat, S, i )
Expand All @@ -373,7 +373,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedRangeByInteger" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedRangeByInteger" ) then

AddRandomMorphismWithFixedRangeByInteger( quotient_cat,
function( quotient_cat, R, i )
Expand All @@ -384,7 +384,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismByInteger" ) then
if CanCompute( ambient_cat, "RandomMorphismByInteger" ) then

AddRandomMorphismByInteger( quotient_cat,
function( quotient_cat, i )
Expand All @@ -394,7 +394,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,
end );
fi;

if CanCompute( cat, "RandomObjectByList" ) then
if CanCompute( ambient_cat, "RandomObjectByList" ) then

AddRandomObjectByList( quotient_cat,
function( quotient_cat, L )
Expand All @@ -403,7 +403,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedSourceAndRangeByList" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedSourceAndRangeByList" ) then

AddRandomMorphismWithFixedSourceAndRangeByList( quotient_cat,
function( quotient_cat, S, R, L )
Expand All @@ -414,7 +414,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedSourceByList" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedSourceByList" ) then

AddRandomMorphismWithFixedSourceByList( quotient_cat,
function( quotient_cat, S, L )
Expand All @@ -425,7 +425,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismWithFixedRangeByList" ) then
if CanCompute( ambient_cat, "RandomMorphismWithFixedRangeByList" ) then

AddRandomMorphismWithFixedRangeByList( quotient_cat,
function( quotient_cat, R, L )
Expand All @@ -436,7 +436,7 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_RANDOM_METHODS_TO_QUOTIENT_CATEGORY,

fi;

if CanCompute( cat, "RandomMorphismByList" ) then
if CanCompute( ambient_cat, "RandomMorphismByList" ) then

AddRandomMorphismByList( quotient_cat,
function( quotient_cat, L )
Expand Down

0 comments on commit 2fb70ad

Please sign in to comment.