Skip to content

Commit ba0ad3b

Browse files
authored
Merge pull request #191 from kamalsaleh/tmp
comply with homalg-project/CAP_project#1701
2 parents 1e78848 + 19219dd commit ba0ad3b

File tree

4 files changed

+154
-15
lines changed

4 files changed

+154
-15
lines changed

ComplexesCategories/PackageInfo.g

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "ComplexesCategories",
1212
Subtitle := "Category of (co)chain complexes of an additive category",
13-
Version := "2023.12-02",
13+
Version := "2024.11-15",
1414
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)( ),
1515
License := "GPL-2.0-or-later",
1616

@@ -74,9 +74,9 @@ PackageDoc := rec(
7474
Dependencies := rec(
7575
GAP := ">= 4.12.1",
7676
NeededOtherPackages := [ [ "AutoDoc", ">= 2019.09.04" ],
77-
[ "CAP", ">= 2023.12-09" ],
77+
[ "CAP", ">= 2024.10-06" ],
7878
[ "ToolsForHigherHomologicalAlgebra", ">= 2022.12-05" ],
79-
[ "PreSheaves", ">= 2023.12-04" ],
79+
[ "PreSheaves", ">= 2024.11-06" ],
8080
],
8181

8282
SuggestedOtherPackages := [ [ "Locales", ">= 2023.05-05" ],

ComplexesCategories/gap/HomStructure.gi

Lines changed: 129 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ BindGlobal( "_complexes_DistinguishedObjectOfHomomorphismStructure",
2828

2929
end ) );
3030

31+
##
32+
BindGlobal( "_complexes_DistinguishedObjectOfHomomorphismStructure_Weight",
33+
function ( ch_cat )
34+
local cat;
35+
36+
cat := UnderlyingCategory( ch_cat );
37+
38+
return OperationWeight( cat, "DistinguishedObjectOfHomomorphismStructure" );
39+
40+
end );
41+
3142
BindGlobal( "_complexes_HomomorphismStructureOnObjects",
3243
function ( ch_cat, B, C )
3344
local cat, range_cat, ch_range_cat, l_B, l_C, u_B, u_C, diagrams, objs, diffs;
@@ -83,7 +94,23 @@ BindGlobal( "_complexes_HomomorphismStructureOnObjects",
8394
return CreateComplex( ch_range_cat, objs, diffs, l_C - u_B, u_C - l_B );
8495

8596
end );
97+
98+
##
99+
BindGlobal( "_complexes_HomomorphismStructureOnObjects_Weight",
100+
function ( ch_cat )
101+
local cat, range_cat;
86102

103+
cat := UnderlyingCategory( ch_cat );
104+
range_cat := RangeCategoryOfHomomorphismStructure( ch_cat );
105+
106+
return
107+
4 * OperationWeight( cat, "HomomorphismStructureOnObjects" ) +
108+
8 * OperationWeight( cat, "HomomorphismStructureOnMorphismsWithGivenObjects" ) +
109+
8 * OperationWeight( range_cat, "ZeroMorphism" ) +
110+
2 * OperationWeight( range_cat, "MorphismBetweenDirectSumsWithGivenDirectSums" ) +
111+
1;
112+
end );
113+
87114
# phi
88115
# A -------> B
89116
#
@@ -163,6 +190,23 @@ BindGlobal( "_complexes_HomomorphismStructureOnMorphismsWithGivenObjects",
163190

164191
end );
165192

193+
##
194+
BindGlobal( "_complexes_HomomorphismStructureOnMorphismsWithGivenObjects_Weight",
195+
function ( ch_cat )
196+
local cat, range_cat;
197+
198+
cat := UnderlyingCategory( ch_cat );
199+
range_cat := RangeCategoryOfHomomorphismStructure( ch_cat );
200+
201+
return
202+
8 * OperationWeight( cat, "HomomorphismStructureOnObjects" ) +
203+
8 * OperationWeight( cat, "HomomorphismStructureOnMorphismsWithGivenObjects" ) +
204+
8 * OperationWeight( range_cat, "ZeroMorphism" ) +
205+
2 * OperationWeight( range_cat, "MorphismBetweenDirectSumsWithGivenDirectSums" ) +
206+
1;
207+
end );
208+
209+
##
166210
BindGlobal( "_complexes_HomomorphismStructureOnMorphisms",
167211

168212
function ( ch_cat, phi, psi )
@@ -176,6 +220,17 @@ BindGlobal( "_complexes_HomomorphismStructureOnMorphisms",
176220

177221
end );
178222

223+
##
224+
BindGlobal( "_complexes_HomomorphismStructureOnMorphisms_Weight",
225+
function ( ch_cat )
226+
227+
return
228+
2 * _complexes_HomomorphismStructureOnObjects_Weight( ch_cat ) +
229+
_complexes_HomomorphismStructureOnMorphismsWithGivenObjects_Weight( ch_cat ) +
230+
1;
231+
232+
end );
233+
179234
##
180235
BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects",
181236

@@ -210,6 +265,22 @@ BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomo
210265

211266
end );
212267

268+
##
269+
BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects_Weight",
270+
function( ch_cat )
271+
local cat, range_cat;
272+
273+
cat := UnderlyingCategory( ch_cat );
274+
range_cat := RangeCategoryOfHomomorphismStructure( ch_cat );
275+
276+
return
277+
OperationWeight( cat, "HomomorphismStructureOnObjects" ) +
278+
2 * OperationWeight( cat, "InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects" ) +
279+
OperationWeight( range_cat, "MorphismBetweenDirectSumsWithGivenDirectSums" ) +
280+
1;
281+
282+
end );
283+
213284
##
214285
BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure",
215286

@@ -224,6 +295,18 @@ BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomo
224295

225296
end );
226297

298+
##
299+
BindGlobal( "_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure_Weight",
300+
function( ch_cat )
301+
302+
return
303+
_complexes_DistinguishedObjectOfHomomorphismStructure_Weight( ch_cat ) +
304+
_complexes_HomomorphismStructureOnObjects_Weight( ch_cat ) +
305+
_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects_Weight( ch_cat ) +
306+
1;
307+
308+
end );
309+
227310
##
228311
BindGlobal( "_complexes_InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism",
229312

@@ -255,6 +338,23 @@ BindGlobal( "_complexes_InterpretMorphismFromDistinguishedObjectToHomomorphismSt
255338

256339
end );
257340

341+
##
342+
BindGlobal( "_complexes_InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism_Weight",
343+
function ( ch_cat )
344+
local cat, range_cat;
345+
346+
cat := UnderlyingCategory( ch_cat );
347+
range_cat := RangeCategoryOfHomomorphismStructure( ch_cat );
348+
349+
return
350+
2 * OperationWeight( cat, "HomomorphismStructureOnObjects" ) +
351+
2 * OperationWeight( cat, "InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism" ) +
352+
2 * OperationWeight( range_cat, "PreCompose" ) +
353+
2 * OperationWeight( range_cat, "ProjectionInFactorOfDirectSumWithGivenDirectSum" ) +
354+
1;
355+
356+
end );
357+
258358
##
259359
InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLEX_CATEGORY,
260360
function ( ch_cat )
@@ -307,7 +407,9 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
307407

308408
AddDistinguishedObjectOfHomomorphismStructure( ch_cat,
309409

310-
ch_cat -> as_object_in_abelian_category( _complexes_DistinguishedObjectOfHomomorphismStructure( ch_cat )[0] )
410+
ch_cat -> as_object_in_abelian_category( _complexes_DistinguishedObjectOfHomomorphismStructure( ch_cat )[0] ),
411+
_complexes_DistinguishedObjectOfHomomorphismStructure_Weight( ch_cat )
412+
+ 1
311413
);
312414

313415
AddHomomorphismStructureOnObjects( ch_cat,
@@ -316,7 +418,10 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
316418

317419
return KernelObject( range_cat, as_morphism_in_abelian_category( _complexes_HomomorphismStructureOnObjects( ch_cat, B, C )^0 ) );
318420

319-
end );
421+
end,
422+
_complexes_HomomorphismStructureOnObjects_Weight( ch_cat ) +
423+
OperationWeight( range_cat, "KernelObject" ) +
424+
1 );
320425

321426
AddHomomorphismStructureOnMorphismsWithGivenObjects( ch_cat,
322427

@@ -333,7 +438,10 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
333438
as_morphism_in_abelian_category( Range( hom_phi_psi )^0 ),
334439
hom_AD );
335440

336-
end );
441+
end,
442+
_complexes_HomomorphismStructureOnMorphisms_Weight( ch_cat ) +
443+
OperationWeight( range_cat, "KernelObjectFunctorialWithGivenKernelObjects" ) +
444+
1 );
337445

338446
AddHomomorphismStructureOnMorphisms( ch_cat,
339447

@@ -348,7 +456,10 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
348456
as_morphism_in_abelian_category( hom_phi_psi[0] ),
349457
as_morphism_in_abelian_category( Range( hom_phi_psi )^0 ) );
350458

351-
end );
459+
end,
460+
_complexes_HomomorphismStructureOnMorphisms_Weight( ch_cat ) +
461+
OperationWeight( range_cat, "KernelObjectFunctorial" ) +
462+
1 );
352463

353464
AddInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( ch_cat,
354465

@@ -366,7 +477,13 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
366477
KernelEmbedding( range_cat, as_morphism_in_abelian_category( hom_BC^0 ) ),
367478
as_morphism_in_abelian_category( ell[0] ) );
368479

369-
end );
480+
end,
481+
_complexes_DistinguishedObjectOfHomomorphismStructure_Weight( ch_cat ) +
482+
_complexes_HomomorphismStructureOnObjects_Weight( ch_cat ) +
483+
_complexes_InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects_Weight( ch_cat ) +
484+
OperationWeight( range_cat, "LiftAlongMonomorphism" ) +
485+
OperationWeight( range_cat, "KernelEmbedding" ) +
486+
1 );
370487

371488
AddInterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( ch_cat,
372489
function ( ch_cat, B, C, ell )
@@ -382,7 +499,13 @@ InstallGlobalFunction( ADD_FUNCTIONS_OF_HOMOMORPHISM_STRUCTURE_TO_COCHAIN_COMPLE
382499

383500
return _complexes_InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( ch_cat, B, C, ell );
384501

385-
end );
502+
end,
503+
_complexes_DistinguishedObjectOfHomomorphismStructure_Weight( ch_cat ) +
504+
_complexes_HomomorphismStructureOnObjects_Weight( ch_cat ) +
505+
OperationWeight( range_cat, "PreCompose" ) +
506+
OperationWeight( range_cat, "KernelEmbedding" ) +
507+
_complexes_InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism_Weight( ch_cat ) +
508+
1 );
386509

387510
else
388511

ComplexesCategories/gap/Objects.gi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,13 @@ InstallMethod( AsComplexOverOppositeCategory,
370370
[ IsCochainComplex ],
371371

372372
function( C )
373-
local coch_cat_op, o, diff, B;
373+
local cat, cat_op, coch_cat_op, o, diff, B;
374374

375-
coch_cat_op := ComplexesCategoryByCochains( Opposite( UnderlyingCategory( CapCategory( C ) ) ) );
375+
cat := UnderlyingCategory( CapCategory( C ) );
376+
377+
cat_op := Opposite( cat : only_primitive_operations_and_hom_structure := true );
378+
379+
coch_cat_op := ComplexesCategoryByCochains( cat_op );
376380

377381
o := i -> Opposite( Objects( C )[-i] );
378382

ComplexesCategories/gap/Resolutions.gi

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,14 @@ end );
307307
InstallOtherMethod( InjectiveResolution,
308308
[ IsCapCategoryObject, IsBool ],
309309

310-
{ o, bool } -> AsComplexOverOppositeCategory( ProjectiveResolution( Opposite( o ), bool ) )
311-
);
310+
function( o, bool )
311+
local cat_op;
312+
313+
cat_op := Opposite( CapCategory( o ) : only_primitive_operations_and_hom_structure );
314+
315+
return AsComplexOverOppositeCategory( ProjectiveResolution( Opposite( o ), bool ) );
316+
317+
end );
312318

313319
##
314320
InstallOtherMethod( MorphismBetweenProjectiveResolutions,
@@ -375,6 +381,12 @@ end );
375381
InstallOtherMethod( MorphismBetweenInjectiveResolutions,
376382
[ IsCapCategoryMorphism, IsBool ],
377383

378-
{ phi, bool } -> AsComplexMorphismOverOppositeCategory( MorphismBetweenProjectiveResolutions( Opposite( phi ), bool ) )
379-
);
384+
function( phi, bool )
385+
local cat_op;
386+
387+
cat_op := Opposite( CapCategory( phi ) : only_primitive_operations_and_hom_structure := true );
388+
389+
return AsComplexMorphismOverOppositeCategory( MorphismBetweenProjectiveResolutions( Opposite( phi ), bool ) );
390+
391+
end );
380392

0 commit comments

Comments
 (0)