Skip to content

Commit

Permalink
Merge pull request #139 from kamalsaleh/temp
Browse files Browse the repository at this point in the history
Update TriangulatedCategories and add more tests to HomotopyCategories
  • Loading branch information
kamalsaleh authored Feb 28, 2023
2 parents c4de746 + 4e34a90 commit 91fab01
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 105 deletions.
91 changes: 91 additions & 0 deletions HomotopyCategories/tst/TiltingEquivalence.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
gap> q_O := RightQuiver( "q_O(O0,O1,O2)[x0:O0->O1,x1:O0->O1,x2:O0->O1,y0:O1->O2,y1:O1->O2,y2:O1->O2]" );;
gap> SetLabelsAsLaTeXStrings( q_O, [ "\\mathcal{O}_{0}", "\\mathcal{O}_{1}", "\\mathcal{O}_{2}" ], [ "x_0", "x_1", "x_2", "y_0", "y_1", "y_2" ] );;
gap> F_O := FreeCategory( q_O );;
gap> QQ := HomalgFieldOfRationals( );;
gap> k := QQ;;
gap> kF_O := k[F_O];;
gap> rho_O := [ PreCompose( kF_O.x0, kF_O.y1 ) - PreCompose( kF_O.x1, kF_O.y0 ), PreCompose( kF_O.x0, kF_O.y2 ) - PreCompose( kF_O.x2, kF_O.y0 ),
> PreCompose( kF_O.x1, kF_O.y2 ) - PreCompose( kF_O.x2, kF_O.y1 ) ];;
gap> A_O := kF_O / rho_O;;
gap> phi := 2 * A_O.x0 + 3 * A_O.x1 - A_O.x2;;
gap> A_O_op := OppositeAlgebroid( A_O );;
gap> q_O_op := UnderlyingQuiver( A_O_op );;
gap> SetLabelsAsLaTeXStrings( q_O_op, [ "\\mathcal{O}(0)", "\\mathcal{O}(1)", "\\mathcal{O}(2)" ], [ "x_0", "x_1", "x_2", "y_0", "y_1", "y_2" ] );;
gap> A_Oadd := AdditiveClosure( A_O );;
gap> KA_Oadd := HomotopyCategoryByCochains( A_Oadd );;
gap> E10 := [ A_O.O0, A_O.O0, A_O.O0 ] / A_Oadd;;
gap> E11 := [ A_O.O1, A_O.O1, A_O.O1 ] / A_Oadd;;
gap> E12 := [ A_O.O2 ] / A_Oadd;;
gap> delta_0 := AdditiveClosureMorphism(
> E10,
> [ [ A_O.x1, -A_O.x0, ZeroMorphism(A_O.O0, A_O.O1) ],
> [ A_O.x2, ZeroMorphism(A_O.O0, A_O.O1), -A_O.x0 ],
> [ ZeroMorphism(A_O.O0, A_O.O1), A_O.x2, -A_O.x1 ] ],
> E11 );;
gap> delta_1 := AdditiveClosureMorphism(
> E11,
> [ [ A_O.y0 ],
> [ A_O.y1 ],
> [ A_O.y2 ] ],
> E12 );;
gap> E1 := CreateComplex( KA_Oadd, [ delta_0, delta_1 ], 0 );;
gap> E20 := [ A_O.O0, A_O.O0, A_O.O0 ] / A_Oadd;;
gap> E21 := [ A_O.O1] / A_Oadd;;
gap> delta_0 := AdditiveClosureMorphism(
> E20,
> [ [ A_O.x0 ],
> [ A_O.x1 ],
> [ A_O.x2 ] ],
> E21 );;
gap> E2 := CreateComplex( KA_Oadd, [ delta_0 ], 0 );;
gap> E3 := CreateComplex( KA_Oadd, A_O.O0 / A_Oadd, 0 );;
gap> seq := CreateStrongExceptionalSequence( [ E1, E2, E3 ] );;
gap> T := DirectSum( [ E1, E2, E3 ] );;
gap> RankOfObject( HomStructure( E1, E1 ) ) = 1 and
> RankOfObject( HomStructure( E2, E2 ) ) = 1 and
> RankOfObject( HomStructure( E3, E3 ) ) = 1;
true
gap> IsZero( HomStructure( E3, E2 ) ) and
> IsZero( HomStructure( E2, E1 ) ) and
> IsZero( HomStructure( E3, E1 ) );
true
gap> IsZero( HomStructure( T, Shift( T, -2 ) ) ) and
> IsZero( HomStructure( T, Shift( T, -1 ) ) ) and
> IsZero( HomStructure( T, Shift( T, 1 ) ) ) and
> IsZero( HomStructure( T, Shift( T, 2 ) ) );
true
gap> RankOfObject( HomStructure( T, T ) );
12
gap> A_E := AbstractionAlgebroid( seq );;
gap> q_E := UnderlyingQuiver( A_E );;
gap> B_E := UnderlyingQuiverAlgebra( A_E );;
gap> Dimension( B_E );
12
gap> rho_E := RelationsOfAlgebroid( A_E );;
gap> a := IsomorphismIntoAbstractionAlgebroid( seq );;
gap> r := IsomorphismFromAbstractionAlgebroid( seq );;
gap> m := A_E.("m1_2_1");;
gap> m = ApplyFunctor( a, ApplyFunctor( r, m ) );
true
gap> T_E := TriangulatedSubcategory( seq );;
gap> O0 := CreateComplex( KA_Oadd, A_O.("O0") / A_Oadd, 0 );;
gap> O1 := CreateComplex( KA_Oadd, A_O.("O1") / A_Oadd, 0 );;
gap> O2 := CreateComplex( KA_Oadd, A_O.("O2") / A_Oadd, 0 );;
gap> IsWellDefined( AsSubcategoryCell( T_E, O0 ) ) and
> IsWellDefined( AsSubcategoryCell( T_E, O1 ) ) and
> IsWellDefined( AsSubcategoryCell( T_E, O2 ) );
true
gap> G := ReplacementFunctorIntoHomotopyCategoryOfAdditiveClosureOfAbstractionAlgebroid( seq );;
gap> F := ConvolutionFunctorFromHomotopyCategoryOfAdditiveClosureOfAbstractionAlgebroid( seq );;
gap> G_O0 := ApplyFunctor( G, O0 );;
gap> G_O1 := ApplyFunctor( G, O1 );;
gap> G_O2 := ApplyFunctor( G, O2 );;
gap> epsilon := CounitOfConvolutionReplacementAdjunction( seq );;
gap> epsilon_O0 := ApplyNaturalTransformation( epsilon, O0 );;
gap> epsilon_O1 := ApplyNaturalTransformation( epsilon, O1 );;
gap> epsilon_O2 := ApplyNaturalTransformation( epsilon, O2 );;
gap> ForAll( [ epsilon_O0, epsilon_O1, epsilon_O2 ], IsIsomorphism );
true
gap> i := InverseForMorphisms( DirectSumFunctorial( [ epsilon_O0, epsilon_O1, epsilon_O2 ] ) );;
gap> IsWellDefined( i ) and IsIsomorphism( i );
true
2 changes: 1 addition & 1 deletion TriangulatedCategories/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "TriangulatedCategories",
Subtitle := "Framework for triangulated categories",
Version := "2023.01-01",
Version := "2023.02-01",
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",

Expand Down
60 changes: 30 additions & 30 deletions TriangulatedCategories/gap/CategoryOfTriangles.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
#! The ⪆ category for the category of triangles over some triangulated category.
#! @Arguments T
#! @Returns true or false
DeclareCategory( "IsCapCategoryOfExactTriangles", IsCapCategory );
DeclareCategory( "IsCategoryOfExactTriangles", IsCapCategory );

#! @Description
#! The ⪆ category for exact triangles.
#! @Arguments triangle
#! @Returns true or false
DeclareCategory( "IsCapExactTriangle", IsCapCategoryObject );
DeclareCategory( "IsCategoryOfExactTrianglesObject", IsCapCategoryObject );

#! @Description
#! The ⪆ category for morphism of exact triangles
#! @Arguments mu
#! @Returns true or false
DeclareCategory( "IsCapExactTrianglesMorphism", IsCapCategoryMorphism );
DeclareCategory( "IsCategoryOfExactTrianglesMorphism", IsCapCategoryMorphism );

######
#! @Section Constructors
Expand All @@ -40,7 +40,7 @@ DeclareAttribute( "CategoryOfExactTriangles", IsTriangulatedCategory );
#! The output is $\mathcal{T}$.
#! @Arguments C
#! @Returns a CAP category
DeclareAttribute( "UnderlyingCategory", IsCapCategoryOfExactTriangles );
DeclareAttribute( "UnderlyingCategory", IsCategoryOfExactTriangles );

######

Expand All @@ -58,51 +58,51 @@ DeclareOperation( "ExactTriangle", [ IsCapCategoryMorphism, IsCapCategoryMorphis
#! The output is $\alpha:A\to B$.
#! @Arguments t
#! @Returns a morphism
DeclareAttribute( "DomainMorphism", IsCapExactTriangle );
DeclareAttribute( "DomainMorphism", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments is an exact triangle defined by three morphisms
#! $\alpha:A\to B$, $\iota:B\to C$ and $\pi:C\to\Sigma A$.
#! The output is $\iota:B\to C$.
#! @Arguments t
#! @Returns a morphism
DeclareAttribute( "MorphismIntoConeObject", IsCapExactTriangle );
DeclareAttribute( "MorphismIntoConeObject", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments is an exact triangle defined by three morphisms
#! $\alpha:A\to B$, $\iota:B\to C$ and $\pi:C\to\Sigma A$.
#! The output is $\pi:C\to\Sigma A$.
#! @Arguments t
#! @Returns a morphism
DeclareAttribute( "MorphismFromConeObject", IsCapExactTriangle );
DeclareAttribute( "MorphismFromConeObject", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments is an exact triangle defined by three morphisms
#! $\alpha:A\to B$, $\iota:B\to C$ and $\pi:C\to\Sigma A$ and an integer $i\in\{0,1,2,3\}$.
#! The output is $A$ if $i=0$, $B$ if $i=1$, $C$ if $i=2$ and $\Sigma A$ if $i=3$.
#! @Arguments t, i
#! @Returns an object
KeyDependentOperation( "ObjectAt", IsCapExactTriangle, IsInt, ReturnTrue );
KeyDependentOperation( "ObjectAt", IsCategoryOfExactTrianglesObject, IsInt, ReturnTrue );

#! @Description
#! Delegates to the operation <C>ObjectAt</C>.
#! @Arguments t, i
#! @Returns an object
DeclareOperation( "\[\]", [ IsCapExactTriangle, IsInt ] );
DeclareOperation( "\[\]", [ IsCategoryOfExactTrianglesObject, IsInt ] );

#! @Description
#! The arguments is an exact triangle defined by three morphisms
#! $\alpha:A\to B$, $\iota:B\to C$ and $\pi:C\to\Sigma A$ and an integer $i\in\{0,1,2\}$.
#! The output is $\alpha$ if $i=0$, $\iota$ if $i=1$, $\pi$ if $i=2$.
#! @Arguments t, i
#! @Returns a morphism
KeyDependentOperation( "MorphismAt", IsCapExactTriangle, IsInt, ReturnTrue );
KeyDependentOperation( "MorphismAt", IsCategoryOfExactTrianglesObject, IsInt, ReturnTrue );

#! @Description
#! Delegates to the operation <C>MorphismAt</C>.
#! @Arguments t, i
#! @Returns a morphism
DeclareOperation( "\^", [ IsCapExactTriangle, IsInt ] );
DeclareOperation( "\^", [ IsCategoryOfExactTrianglesObject, IsInt ] );

#! @Description
#! The arguments is a morphism $\alpha:A\to B$ in some triangulated
Expand All @@ -117,23 +117,23 @@ DeclareAttribute( "StandardExactTriangle", IsCapCategoryMorphism );
#! The output the standard exact triangle $(\alpha,\iota(\alpha),\pi(\alpha))$.
#! @Arguments t
#! @Returns an standard exact triangle
DeclareAttribute( "StandardExactTriangle", IsCapExactTriangle );
DeclareAttribute( "StandardExactTriangle", IsCategoryOfExactTrianglesObject );

#! @Description
#! The argument is an exact triangle $t=(\alpha,\iota,\pi)$. The operation checks whether $t$ is
#! standard exact triangle or not. I.e., it checks whether $\iota=\iota(\alpha)$
#! and $\pi=\pi(\alpha)$.
#! @Arguments t
#! @Returns true or false
DeclareProperty( "IsStandardExactTriangle", IsCapExactTriangle );
DeclareProperty( "IsStandardExactTriangle", IsCategoryOfExactTrianglesObject );

#! @Description
#! The argument is an exact triangle $t=(\alpha,\iota,\pi)$.
#! The output is an isomorphism of triangles from $t$ into the standard
#! exact triangle $(\alpha,\iota(\alpha),\pi(\alpha))$.
#! @Arguments t
#! @Returns a morphism of triangles
DeclareAttribute( "WitnessIsomorphismIntoStandardExactTriangle", IsCapExactTriangle );
DeclareAttribute( "WitnessIsomorphismIntoStandardExactTriangle", IsCategoryOfExactTrianglesObject );

#! @Description
#! The argument is an exact triangle $t=(\alpha,\iota,\pi)$.
Expand All @@ -143,7 +143,7 @@ DeclareAttribute( "WitnessIsomorphismIntoStandardExactTriangle", IsCapExactTrian
#! the standard exact triangle.
#! @Arguments t
#! @Returns a morphism of triangles
DeclareAttribute( "WitnessIsomorphismFromStandardExactTriangle", IsCapExactTriangle );
DeclareAttribute( "WitnessIsomorphismFromStandardExactTriangle", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments are an exact triangle $t_1$, three morphisms
Expand All @@ -153,21 +153,21 @@ DeclareAttribute( "WitnessIsomorphismFromStandardExactTriangle", IsCapExactTrian
#! @Arguments t_1, mu_0, mu_1, mu_2, t_2
#! @Returns a morphism $t_1\to t_2$
DeclareOperation( "MorphismOfExactTriangles",
[ IsCapExactTriangle, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapExactTriangle ] );
[ IsCategoryOfExactTrianglesObject, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCategoryOfExactTrianglesObject ] );

#! @Description
#! The arguments is a morphism $\mu:t_1\to t_2$ of exact triangles defined by three morphisms
#! $\mu_0:t_1[0]\to t_2[0]$, $\mu_1:t_1[1]\to t_2[1]$ and $\mu_2:t_1[2]\to t_2[2]$; and an integer $i\in\{0,1,2\}$.
#! The output is $\mu_0$ if $i=0$, $\mu_1$ if $i=1$, $\mu_2$ if $i=2$.
#! @Arguments phi, i
#! @Returns a morphism
KeyDependentOperation( "MorphismAt", IsCapExactTrianglesMorphism, IsInt, ReturnTrue );
KeyDependentOperation( "MorphismAt", IsCategoryOfExactTrianglesMorphism, IsInt, ReturnTrue );

#! @Description
#! Delegates to the operation <C>MorphismAt</C>.
#! @Arguments phi, i
#! @Returns a morphism
DeclareOperation( "\[\]", [ IsCapExactTrianglesMorphism, IsInt ] );
DeclareOperation( "\[\]", [ IsCategoryOfExactTrianglesMorphism, IsInt ] );

#! @Description
#! The arguments are an exact triangle $t_1$, two morphisms $\mu_0:t_1[0]\to t_2[0]$, $\mu_1:t_1[1]\to t_2[1]$,
Expand All @@ -176,7 +176,7 @@ DeclareOperation( "\[\]", [ IsCapExactTrianglesMorphism, IsInt ] );
#! @Arguments t_1, mu_0, mu_1, t_2
#! @Returns a morphism
DeclareOperation( "MorphismBetweenConeObjects",
[ IsCapExactTriangle, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapExactTriangle ] );
[ IsCategoryOfExactTrianglesObject, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCategoryOfExactTrianglesObject ] );

#! @Description
#! The arguments are an exact triangle $t_1$, two morphisms $\mu_0:t_1[0]\to t_2[0]$, $\mu_1:t_1[1]\to t_2[1]$,
Expand All @@ -185,7 +185,7 @@ DeclareOperation( "MorphismBetweenConeObjects",
#! @Arguments t_1, mu_0, mu_1, t_2
#! @Returns a morphism
DeclareOperation( "MorphismOfExactTriangles",
[ IsCapExactTriangle, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCapExactTriangle ] );
[ IsCategoryOfExactTrianglesObject, IsCapCategoryMorphism, IsCapCategoryMorphism, IsCategoryOfExactTrianglesObject ] );

#! @Description
#! The arguments are two morphisms $\alpha:A\to B$, $\beta:B\to C$. The output is the exact triangle
Expand All @@ -208,22 +208,22 @@ DeclareOperation( "ExactTriangleByOctahedralAxiom", [ IsCapCategoryMorphism, IsC
#! If $b$ = <C>true</C> then the operation will compute a witness isomorphism into the standard exact triangle.
#! @Arguments t_1, t_2, b
#! @Returns a triangle
DeclareOperation( "ExactTriangleByOctahedralAxiom", [ IsCapExactTriangle, IsCapExactTriangle, IsCapExactTriangle, IsBool ] );
DeclareOperation( "ExactTriangleByOctahedralAxiom", [ IsCategoryOfExactTrianglesObject, IsCategoryOfExactTrianglesObject, IsCategoryOfExactTrianglesObject, IsBool ] );

#! @Description
#! The arguments are three exact triangles $t_1,t_2,t_3$ such that $t_1[1]=t_2[0]$,
#! $t_1[0]=t_3[0]$, $t_2[1]=t_3[1]$ and $t_2^0\circ t_1^0=t_3^0$.
#! The output is the exact triangle defined by the Octahedral axiom.
#! @Arguments t_1, t_2, t_3
#! @Returns a triangle
DeclareOperation( "ExactTriangleByOctahedralAxiom", [ IsCapExactTriangle, IsCapExactTriangle, IsCapExactTriangle ] );
DeclareOperation( "ExactTriangleByOctahedralAxiom", [ IsCategoryOfExactTrianglesObject, IsCategoryOfExactTrianglesObject, IsCategoryOfExactTrianglesObject ] );

#! @Description
#! The argument is an exact triangle $t=(\alpha,\iota,\pi)$. The output is the exact triangle
#! defined by the rotation axiom, i.e., the exact triangle $(\iota,\pi,-\Sigma \alpha)$.
#! @Arguments t
#! @Returns a triangle
DeclareAttribute( "Rotation", IsCapExactTriangle );
DeclareAttribute( "Rotation", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments are an exact triangle $t=(\alpha,\iota,\pi)$ and a boolian $b$. The output
Expand All @@ -232,7 +232,7 @@ DeclareAttribute( "Rotation", IsCapExactTriangle );
#! the operation will compute a witness isomorphism into the standard exact triangle.
#! @Arguments t, b
#! @Returns a triangle
DeclareOperation( "Rotation", [ IsCapExactTriangle, IsBool ] );
DeclareOperation( "Rotation", [ IsCategoryOfExactTrianglesObject, IsBool ] );

#! @Description
#! The argument is an exact triangle $t=(\alpha,\iota,\pi)$. The output is the exact triangle
Expand All @@ -243,7 +243,7 @@ DeclareOperation( "Rotation", [ IsCapExactTriangle, IsBool ] );
#! $C$ := <C>Range</C>$(\iota)$.
#! @Arguments t
#! @Returns a triangle
DeclareAttribute( "InverseRotation", IsCapExactTriangle );
DeclareAttribute( "InverseRotation", IsCategoryOfExactTrianglesObject );

#! @Description
#! The arguments are an exact triangle $t=(\alpha,\iota,\pi)$ and a boolian $b$.
Expand All @@ -252,13 +252,13 @@ DeclareAttribute( "InverseRotation", IsCapExactTriangle );
#! the operation will compute a witness isomorphism into the standard exact triangle.
#! @Arguments t, bool
#! @Returns a triangle
DeclareOperation( "InverseRotation", [ IsCapExactTriangle, IsBool ] );
DeclareOperation( "InverseRotation", [ IsCategoryOfExactTrianglesObject, IsBool ] );

if false then
KeyDependentOperation( "Shift", IsCapExactTriangle, IsInt, ReturnTrue );
KeyDependentOperation( "Shift", IsCapExactTrianglesMorphism, IsInt, ReturnTrue );
KeyDependentOperation( "Shift", IsCategoryOfExactTrianglesObject, IsInt, ReturnTrue );
KeyDependentOperation( "Shift", IsCategoryOfExactTrianglesMorphism, IsInt, ReturnTrue );
fi;

DeclareOperation( "ViewExactTriangle", [ IsCapExactTriangle ] );
DeclareOperation( "ViewMorphismOfExactTriangles", [ IsCapExactTrianglesMorphism ] );
DeclareOperation( "ViewExactTriangle", [ IsCategoryOfExactTrianglesObject ] );
DeclareOperation( "ViewMorphismOfExactTriangles", [ IsCategoryOfExactTrianglesMorphism ] );

Loading

0 comments on commit 91fab01

Please sign in to comment.