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 Mar 16, 2024
1 parent 8f2ddb1 commit 7fcabdd
Show file tree
Hide file tree
Showing 15 changed files with 864 additions and 2 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
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
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
coprd_cocone := [ 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) ] ] ]
is_closed := G -> IsClosedPreSheafWRTCoproducts( PSh, G, [ coprd_cocone ] );
#! function( G ) ... end
PShJ := FullSubcategoryByObjectMembershipFunction( PSh, is_closed );
#Splash( DotVertexLabelledDigraph( PSh, [ Y, PShJ ], [ "grey", "blue", "red" ] ) );
G := Coproduct( [ PSh.l, PSh.r ] );
emb := EmbeddingIntoClosureOfPreSheafWRTCoproducts( G, [ coprd_cocone ] );
#Assert( 0, IsWellDefined( emb ) );
Assert( 0, IsMonomorphism( emb ) );
Assert( 0, Source( emb ) = G );
Assert( 0, is_closed( Target( emb ) ) );
closed := List( SetOfObjects( PSh ), G -> Target( EmbeddingIntoClosureOfPreSheafWRTCoproducts( G, [ coprd_cocone ] ) ) );
Assert( 0, Length( SetOfObjects( PShJ ) ) = Length( DuplicateFreeList( closed ) ) );
#! @EndExample
28 changes: 28 additions & 0 deletions FunctorCategories/gap/PreSheaves.gd
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ DeclareAttribute( "CoequalizerDataOfPreSheafUsingOptimizedCoYonedaLemma",
DeclareAttribute( "AssociatedCoequalizerPairInPreSheaves",
IsObjectInCategoryOfColimitQuivers );

#! @Arguments F
DeclareAttribute( "AssociatedCellInPreSheaves",
IsCellInCategoryOfColimitQuivers );

#! @Arguments F
DeclareAttribute( "AssociatedCoequalizerPairInPreSheaves",
IsObjectInFiniteColimitCompletionWithStrictCoproducts );
Expand All @@ -417,3 +421,27 @@ DeclareOperation( "ApplyPreSheafToMorphismInFiniteStrictCoproductCompletion",
#! @Arguments C
DeclareAttribute( "CategoryOfInternalCategories",
IsCapCategory );

#! @Arguments PSh, presheaf, coproducts_cocones
DeclareOperation( "IsClosedPreSheafWRTCoproductCocones",
[ IsObjectInPreSheafCategory, IsList ] );

#! @Arguments PSh, presheaf, lists_of_cofactors
DeclareOperation( "IsClosedPreSheafWRTCoproducts",
[ IsObjectInPreSheafCategory, IsList ] );

#! @Arguments presheaf, lists_of_indices
DeclareOperation( "IsClosedPreSheafWRTCoproductsByIndices",
[ IsObjectInPreSheafCategory, IsList ] );

#! @Arguments presheaf, coproduct_cocone
DeclareOperation( "EmbeddingIntoClosureOfPreSheafWRTCoproductCocone",
[ IsObjectInPreSheafCategory, IsList ] );

#! @Arguments presheaf, coproducts_cocones
DeclareOperation( "EmbeddingIntoClosureOfPreSheafWRTCoproductCocones",
[ IsObjectInPreSheafCategory, IsList ] );

#! @Arguments presheaf, lists_of_cofactors
DeclareOperation( "EmbeddingIntoClosureOfPreSheafWRTCoproducts",
[ IsObjectInPreSheafCategory, IsList ] );
Loading

0 comments on commit 7fcabdd

Please sign in to comment.