Skip to content

Commit

Permalink
d&i IsClosedPreSheafWRTCoproductCocones
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Apr 7, 2024
1 parent 7641847 commit 24d7531
Show file tree
Hide file tree
Showing 34 changed files with 2,617 additions and 26 deletions.
9 changes: 9 additions & 0 deletions FiniteCocompletions/gap/CategoryOfColimitQuivers.gd
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ CapJitAddTypeSignature( "FiniteColimitCompletionWithStrictCoproductsOfUnderlying

end );

#! @Description
#! The inputs are a colimit quiver <A>colim_quiver</A> in the category $C$
#! and a list <A>vertices</A> of objects in $C$.
#! The output is the full colimit subquiver on these objects.
#! @Returns a monomorphism of colimit quivers
#! @Arguments colim_quiver, vertices
DeclareOperation( "EmbeddingOfFullColimitSubquiver",
[ IsObjectInCategoryOfColimitQuivers, IsList ] );

####################################
#
#! @Section Constructors
Expand Down
59 changes: 59 additions & 0 deletions FiniteCocompletions/gap/CategoryOfColimitQuivers.gi
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,65 @@ InstallMethod( CategoryOfPreSheavesOfUnderlyingCategory,

end );

##
InstallMethod( CategoryOfPreSheavesOfUnderlyingCategory,
[ IsCategoryOfColimitQuivers ],

function( ColimitQuiversC )

return PreSheaves( UnderlyingCategory( ColimitQuiversC ) );

end );

##
InstallOtherMethodForCompilerForCAP( EmbeddingOfFullColimitSubquiver,
[ IsCategoryOfColimitQuivers, IsObjectInCategoryOfColimitQuivers, IsList ],

function( ColimitQuiversC, colim_quiver, list_of_objects )
local C, vertices_arrows, vertices, arrows, positions, V, id, A, colim_subquiver, embedding;

C := UnderlyingCategory( ColimitQuiversC );

vertices_arrows := ObjectDatum( ColimitQuiversC, colim_quiver );

vertices := vertices_arrows[1];
arrows := vertices_arrows[2];

positions := List( vertices, vertex ->
PositionProperty( list_of_objects, obj -> IsEqualForObjects( C, obj, vertex ) ) );

V := Filtered( [ 0 .. Length( vertices ) - 1 ], i -> IsInt( positions[1 + i] ) );

id := List( list_of_objects, obj -> IdentityMorphism( C, obj ) );

A := Filtered( [ 0 .. Length( arrows ) - 1 ], j ->
( arrows[1 + j][1] in V ) and ( arrows[1 + j][3] in V ) );

colim_subquiver := CreateColimitQuiver( ColimitQuiversC,
Pair( vertices{1 + V}, arrows{1 + A} ) );

embedding := CreateMorphismOfColimitQuivers( ColimitQuiversC,
colim_subquiver,
Pair( Pair( V, id{positions{1 + V}} ),
A ),
colim_quiver );
#% CAP_JIT_DROP_NEXT_STATEMENT
SetIsMonomorphism( embedding, true );

return embedding;

end );

##
InstallMethod( EmbeddingOfFullColimitSubquiver,
[ IsObjectInCategoryOfColimitQuivers, IsList ],

function( colim_quiver, list_of_objects )

return EmbeddingOfFullColimitSubquiver( CapCategory( colim_quiver ), colim_quiver, list_of_objects );

end );

####################################
#
# View, Print, Display and LaTeX methods:
Expand Down
6 changes: 6 additions & 0 deletions FpCategories/gap/PathCategories.gd
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,11 @@ DeclareAttribute( "ExternalHoms", IsPathCategory );
#
####################################

DeclareAttribute( "DecompositionIndicesOfMorphism",
IsPathCategoryMorphism );

DeclareAttribute( "DecompositionOfMorphismInCategory",
IsPathCategoryMorphism );

DeclareOperation( "ExtendFunctorToFpCategoryData",
[ IsPathCategory, IsList, IsCapCategory ] );
36 changes: 36 additions & 0 deletions FpCategories/gap/PathCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,42 @@ InstallOtherMethod( ExternalHoms,

end );

##
InstallOtherMethodForCompilerForCAP( DecompositionIndicesOfMorphism,
"for a path category and a morphism therein",
[ IsPathCategory, IsPathCategoryMorphism ],

function( C, mor )

return List( MorphismIndices( mor ), i -> -1 + i );

end );

##
InstallMethod( DecompositionIndicesOfMorphism,
"for a morphism in a path category",
[ IsPathCategoryMorphism ],

function( mor )

return DecompositionIndicesOfMorphism( CapCategory( mor ), mor );

end );

##
InstallMethod( DecompositionOfMorphismInCategory,
"for a morphism in a path category",
[ IsPathCategoryMorphism ],

function( mor )
local C;

C := CapCategory( mor );

return SetOfGeneratingMorphisms( C ){1 + DecompositionIndicesOfMorphism( mor )};

end );

##
InstallMethod( DatumOfCellAsEvaluatableString,
[ IsPathCategoryMorphism, IsList ],
Expand Down
2 changes: 1 addition & 1 deletion FunctorCategories/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Dependencies := rec(
NeededOtherPackages := [
[ "GAPDoc", ">= 1.5" ],
[ "ToolsForHomalg", ">= 2022.12-01" ],
[ "CAP", ">= 2024.02-01" ],
[ "CAP", ">= 2024.04-02" ],
[ "MonoidalCategories", ">= 2024.02-01" ],
[ "CartesianCategories", ">= 2024.02-05" ],
[ "ToolsForCategoricalTowers", ">= 2024.03-02" ],
Expand Down
35 changes: 35 additions & 0 deletions FunctorCategories/examples/ColimitingCocone.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#! @Chunk ColimitingCocone

#! @Example
LoadPackage( "FunctorCategories", false );
#! true
q := "q(a,l,m,r,i,i1,i2,c,b)[ac:a->c,lc:l->c,mi:m->i,ic:i->c,ri1:r->i1,i1i2:i1->i2,i2c:i2->c,cb:c->b]";;
q := RightQuiver( q );
#! RightQuiver( "" );
F := FreeCategory( q );
#F := PathCategory( q );
#! FreeCategory(
#! RightQuiver( "" ) );
Size( F );
#! 7
PSh := PreSheaves( F );
#! PreSheaves( FreeCategory(
#! RightQuiver( "" ) ) );
#! SkeletalFinSets )
Y := YonedaEmbeddingOfSourceCategory( PSh );
#! Yoneda embedding functor
coprd_cocone := [ F.c, [ F.lc, F.mi * F.ic, F.ri1 * F.i1i2 * F.i2c ] ];
#coprd_cocone := [ F.c, [ F.ac, F.lc ] ];
is_closed := G -> IsClosedPreSheafWRTCoproductCocones( PSh, G, [ coprd_cocone ] );
#! function( G ) ... end
G := Coproduct( [ PSh.a, PSh.a, PSh.l, PSh.m, PSh.r, PSh.r, PSh.c, PSh.b ] );
#G := Coproduct( [ PSh.a, PSh.l, PSh.l ] );
#! <An object in PreSheaves( FreeCategory(
#! RightQuiver( "" ) ),
#! SkeletalFinSets )>
emb := EmbeddingIntoClosureOfPreSheafWRTCoproductCocones( G, [ coprd_cocone ] );
Assert( 0, IsWellDefined( emb ) );
Assert( 0, IsMonomorphism( emb ) );
Assert( 0, Source( emb ) = G );
Assert( 0, is_closed( Target( emb ) ) );
#! @EndExample
40 changes: 40 additions & 0 deletions FunctorCategories/examples/JoinCocone.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! @Chunk JoinCocone

#! @Example
LoadPackage( "FunctorCategories", false );
#! true
q := FinQuiver( "q(a,l,r,i,c,b)[ac:a->c,lc:l->c,ri:r->i,ic:i->c,cb:c->b]" );
#! FinQuiver( "q(a,l,r,i,c,b)[ac:a-≻c,lc:l-≻c,ri:r-≻i,ic:i-≻c,cb:c-≻b]" )
F := PathCategory( q );
#! PathCategory(
#! FinQuiver( "q(a,l,r,i,c,b)[ac:a-≻c,lc:l-≻c,ri:r-≻i,ic:i-≻c,cb:c-≻b]" ) )
Size( F );
#! 16
P := PosetOfCategory( F );
#! PosetOfCategory( PathCategory(
#! FinQuiver( "q(a,l,r,i,c,b)[ac:a-≻c,lc:l-≻c,ri:r-≻i,ic:i-≻c,cb:c-≻b]" ) ) )
Size( P );
#! 16
digraphF := DigraphOfPoset( P );;
digraphF!.vertexlabels := List( SetOfObjects( F ), String );
#Splash( DotVertexLabelledDigraph( digraphF ) );
#Splash( DotVertexLabelledDigraph( DigraphOfPoset( P ) ) );
PSh := PreSheaves( P );
#! PreSheaves( PosetOfCategory( PathCategory(
#! FinQuiver( "q(a,l,r,i,c,b)[ac:a-≻c,lc:l-≻c,ri:r-≻i,ic:i-≻c,cb:c-≻b]" ) ) ),
#! IntervalCategory )
Y := YonedaEmbeddingOfSourceCategory( PSh );
#! Yoneda embedding functor
coproducts := [ [ P.c, [ P.l, P.r ] ] ];;
#! [ [ An object in the poset given by: (c),
#! [ An object in the poset given by: (l),
#! An object in the poset given by: (r) ] ] ]
PSh_J := ClosedPreSheavesWRTCoproducts( P, coproducts );;
closed := SetOfObjects( PSh_J );;
Assert( 0, Length( closed ) = 10 );
psh_J := ModelingCategory( ModelingCategory( PSh_J ) );;
Assert( 0, Length( SetOfObjects( psh_J ) ) = Length( SetOfObjects( PSh_J ) ) );
is_closed := psh_J!.ObjectMembershipFunction;
Assert( 0, ForAll( closed, obj -> is_closed( ObjectDatum( ModelingObject( PSh_J, obj ) ) ) ) );
#Splash( DotVertexLabelledDigraph( PSh, [ Y, psh_J ], [ "grey", "blue", "red" ] : offset := 0 ) );
#! @EndExample
127 changes: 127 additions & 0 deletions FunctorCategories/gap/ClosedCoPreSheavesWRTLimitingCones.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# FunctorCategories: Categories of functors
#
# Declarations
#

#! @Chapter Category of closed copresheaves with respect to limiting cones

####################################
#
#! @Section GAP categories
#
####################################

#! @Description
#! The &GAP; category of closed copresheaves with respect to limiting cones.
DeclareCategory( "IsClosedCoPreSheavesWRTLimitingCones",
IsCapCategory );

#! @Description
#! The &GAP; category of cells in the category of closed copresheaves with respect to limiting cones.
DeclareCategory( "IsCellInClosedCoPreSheavesWRTLimitingCones",
IsCapCategoryCell );

#! @Description
#! The &GAP; category of objects in the category of closed copresheaves with respect to limiting cones.
DeclareCategory( "IsObjectInClosedCoPreSheavesWRTLimitingCones",
IsCellInClosedCoPreSheavesWRTLimitingCones and IsCapCategoryObject );

#! @Description
#! The &GAP; category of morphisms in the category of closed copresheaves with respect to limiting cones.
DeclareCategory( "IsMorphismInClosedCoPreSheavesWRTLimitingCones",
IsCellInClosedCoPreSheavesWRTLimitingCones and IsCapCategoryMorphism );

####################################
#
#! @Section Constructors
#
####################################

#! @Description
#! The input is category <A>C</A> and a list <A>product_cones</A> of product cones in <A>C</A>.
#! The output is the category of of closed copresheaves with respect to <A>product_cones</A>.
#! @Arguments C, product_cones
DeclareOperation( "ClosedCoPreSheavesWRTProductCones",
[ IsCapCategory, IsList ] );

#CapJitAddTypeSignature( "ClosedCoPreSheavesWRTProductCones", [ IsCapCategory, IsList ], function ( input_types )
#
# return CapJitDataTypeOfCategory( ClosedCoPreSheavesWRTProductCones( input_types[1].category ) );
#
#end );

#! @Description
#! The input is category <A>C</A> and a list <A>lists_of_product_cofactors</A> of lists of product cofactors in <A>C</A>.
#! The output is the category of of closed copresheaves with respect to <A>lists_of_product_cofactors</A>.
#! @Arguments C, lists_of_product_cofactors
DeclareOperation( "ClosedCoPreSheavesWRTProducts",
[ IsCapCategory, IsList ] );

#CapJitAddTypeSignature( "ClosedCoPreSheavesWRTProducts", [ IsCapCategory, IsList ], function ( input_types )
#
# return CapJitDataTypeOfCategory( ClosedCoPreSheavesWRTProducts( input_types[1].category ) );
#
#end );

#! @Description
#! The input is category <A>C</A> and a list <A>lists_of_product_cofactors</A> of lists of product cofactors in <A>C</A>.
#! The output is the category of of closed copresheaves with respect to <A>lists_of_product_cofactors</A>.
#! @Arguments C, lists_of_product_cofactors
DeclareOperation( "ClosedCoPreSheavesWRTProductsByIndices",
[ IsCapCategory, IsList ] );

#CapJitAddTypeSignature( "ClosedCoPreSheavesWRTProductsByIndices", [ IsCapCategory, IsList ], function ( input_types )
#
# return CapJitDataTypeOfCategory( ClosedCoPreSheavesWRTProductsByIndices( input_types[1].category ) );
#
#end );

####################################
#
#! @Section Attributes
#
####################################

#! @Description
#! The input is the category of closed copresheaves on a category $C$ with respect to a list $L$ of limiting cones in $C$.
#! The output is the list $L$.
#! @Arguments coPSh_J
DeclareAttribute( "UnderlyingLimitingCones",
IsClosedCoPreSheavesWRTLimitingCones );

#! @Description
#! The input is the category of closed copresheaves on a category $C$ with respect to limiting cones in $C$.
#! The output is the category $C$.
#! @Arguments coPSh_J
DeclareAttribute( "Source",
IsClosedCoPreSheavesWRTLimitingCones );

CapJitAddTypeSignature( "Source", [ IsClosedCoPreSheavesWRTLimitingCones ],
function ( input_types )

return CapJitDataTypeOfCategory( Source( input_types[1].category ) );

end );

#! @Description
#! The input is the category of closed copresheaves on a category $C$ with respect to limiting cones in $C$.
#! The output is the target category.
#! @Arguments coPSh_J
DeclareAttribute( "Target",
IsClosedCoPreSheavesWRTLimitingCones );

CapJitAddTypeSignature( "Target", [ IsClosedCoPreSheavesWRTLimitingCones ],
function ( input_types )

return CapJitDataTypeOfCategory( Target( input_types[1].category ) );

end );

DeclareAttribute( "CoYonedaEmbeddingDataOfSourceCategory",
IsClosedCoPreSheavesWRTLimitingCones );

#! @Arguments coPSh_J
#! @Returns a &CAP; functor
DeclareAttribute( "CoYonedaEmbeddingOfSourceCategory",
IsClosedCoPreSheavesWRTLimitingCones );
Loading

0 comments on commit 24d7531

Please sign in to comment.