Skip to content

Commit

Permalink
Merge pull request #162 from TKuh/objectify
Browse files Browse the repository at this point in the history
Objectify -> CreateCapCategory*
  • Loading branch information
kamalsaleh authored Jul 11, 2023
2 parents 42ec479 + 806fd98 commit df8d95b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
31 changes: 14 additions & 17 deletions StableCategories/gap/FrobeniusCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -305,28 +305,25 @@ InstallMethod( CreateShortSequence,

function( alpha, beta )
local s;

if not IsEqualForObjects( Range( alpha ), Source( beta ) ) then

Error( "Range of the first morphism should equal the Source of the second morphism" );

fi;

s := rec( o0:= Source( alpha ),

m0:= alpha,

o1 := Range( alpha ),

m1 := beta,

o2 := Range( beta ) );

ObjectifyWithAttributes( s, TheTypeCapCategoryShortSequence );


s:= CreateCapCategoryMorphismWithAttributes( TheTypeCapCategoryShortSequence );

s!.o0 := Source( alpha );
s!.m0 := alpha;
s!.o1 := Range( alpha );
s!.m1 := beta;
s!.o2 := Range( beta ) );

AddObject( CategoryOfShortSequences( CapCategory( alpha ) ), s );

return s;

end );

InstallMethod( CreateShortExactSequence,
Expand Down
26 changes: 12 additions & 14 deletions TriangulatedCategories/gap/CategoryOfTriangles.gi
Original file line number Diff line number Diff line change
Expand Up @@ -252,23 +252,19 @@ end );
InstallMethod( ExactTriangle,
[ IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapCategoryMorphism ],
function( alpha, iota, pi )
local cat, triangles, t;
local cat, triangles;

cat := CapCategory( alpha );

triangles := CategoryOfExactTriangles( cat );

t := rec( );
return CreateCapCategoryObjectWithAttributes(
triangles,
DomainMorphism, alpha,
MorphismIntoConeObject, iota,
MorphismFromConeObject, pi
);

ObjectifyObjectForCAPWithAttributes(
t, triangles,
DomainMorphism, alpha,
MorphismIntoConeObject, iota,
MorphismFromConeObject, pi
);

return t;

end );

##
Expand Down Expand Up @@ -367,16 +363,18 @@ InstallMethod( ExactTriangleByOctahedralAxiom,
end );

##
InstallMethod( MorphismOfExactTriangles,
InstallMethod( MorphismOfExactTriangles,
[ IsCategoryOfExactTrianglesObject, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCategoryOfExactTrianglesObject ],
function( s, mu_0, mu_1, mu_2, r )
local triangles, mu;

triangles := CapCategory( s );

mu := rec( 0 := mu_0, 1 := mu_1, 2 := mu_2 );
mu := CreateCapCategoryMorphismWithAttributes( triangles, s, r );

ObjectifyMorphismWithSourceAndRangeForCAPWithAttributes( mu, triangles, s, r );
mu!.0 := mu_0;
mu!.1 := mu_1;
mu!.2 := mu_2;

return mu;

Expand Down

0 comments on commit df8d95b

Please sign in to comment.